Game Physics (in Assembler) - Computerphile

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

ความคิดเห็น • 809

  • @xPROxSNIPExMW2xPOWER
    @xPROxSNIPExMW2xPOWER 7 ปีที่แล้ว +1654

    I want more of post malone to do some graphics in assembler

    • @mauriciocortazar9604
      @mauriciocortazar9604 5 ปีที่แล้ว +9

      i thought he was batman

    • @Jestroo
      @Jestroo 5 ปีที่แล้ว +3

      ProSurviver bahaha

    • @alephnull9742
      @alephnull9742 5 ปีที่แล้ว +26

      What you talking about, thats Aphex Twin

    • @LeoBego
      @LeoBego 4 ปีที่แล้ว +1

      haHAA Real funny

    • @fbn7766
      @fbn7766 4 ปีที่แล้ว +1

      lol

  • @WATTgames
    @WATTgames 7 ปีที่แล้ว +686

    Nothing but respect for how knowledgeable this guy is, brilliant teacher too

    • @jamiedavies4545
      @jamiedavies4545 6 ปีที่แล้ว +1

      Its Jamie Davies will I ever be able to make a video game I mean in the same way this guy develops video games WATTgames mate? I really like to be a game programmer and game design and game developer WATTgames mate.

    • @jamiedavies4545
      @jamiedavies4545 6 ปีที่แล้ว

      Its Jamie Davies yeah but how do you programme trees and scenery into the video game joshua gollaher mate?

    • @jamiedavies4545
      @jamiedavies4545 6 ปีที่แล้ว

      Its Jamie Davies could you teach me how develop video games for my computer joshua gollaher mate?

    • @cppbear6115
      @cppbear6115 6 ปีที่แล้ว +6

      Learn how to program and then eventually you will be able to make video games with graphics libraries as OpenGL or with game engines as Unity or unreal Engine.

    • @jamiedavies4545
      @jamiedavies4545 6 ปีที่แล้ว +2

      Its Jamie Davies I live in the UK can you tell me again please that there's more than billions people all over the world and more than millions people in Great Britain that love living on their own and love having their own independence and love having their own freedom and love having their own personal space too just the same as me please text me back yes Deffo that's true please cpp bear mate.

  • @ForViewingOnly
    @ForViewingOnly 7 ปีที่แล้ว +839

    I always start watching vids like this at 3am.

    • @sandoval9276
      @sandoval9276 7 ปีที่แล้ว +6

      same, 4am here

    • @israelRaizer
      @israelRaizer 7 ปีที่แล้ว +4

      same, 02:26 here

    • @smieszny_zart
      @smieszny_zart 7 ปีที่แล้ว +1

      4 am here. ♬~ Maybe the dreams will come, maybe they'll visit me ~♬

    • @JamalNasirTV
      @JamalNasirTV 7 ปีที่แล้ว +1

      3 am session here too

    • @Skarsburning
      @Skarsburning 7 ปีที่แล้ว +2

      lol 2:45 here

  • @alterego5985
    @alterego5985 7 ปีที่แล้ว +747

    "I got my environment setup" -> notepad++

    • @dmasb
      @dmasb 5 ปีที่แล้ว +3

      xD

    • @thotsi
      @thotsi 4 ปีที่แล้ว +95

      hes a real programmer

    • @zyaicob
      @zyaicob 4 ปีที่แล้ว +4

      I mean yeah

    • @k80sju
      @k80sju 4 ปีที่แล้ว +1

      Haha xD

    • @raynebenson9040
      @raynebenson9040 4 ปีที่แล้ว +24

      Notepad++ is a decent tool for programming

  • @TheGodlikeBlock
    @TheGodlikeBlock 4 ปีที่แล้ว +462

    "let's define gravity" - things that prove programmers are gods

    • @TheMoucastre
      @TheMoucastre 3 ปีที่แล้ว +42

      You left out the best part!
      "Let's define gravity .. as 8" 😅

    • @dummybugstudios6450
      @dummybugstudios6450 2 ปีที่แล้ว

      🎵 Kiss me goodbye, I'm defining gravity 🎵

    • @mrboyban
      @mrboyban 2 ปีที่แล้ว

      LOL

    • @ruben-xt8hm
      @ruben-xt8hm ปีที่แล้ว

      high school physics will teach you that gravity is 9.8 m/s^2

  • @robintst
    @robintst 6 ปีที่แล้ว +108

    I can't quite wrap my head around a lot of it, but it's super interesting that he's literally demonstrating how developers had to program Genesis games back in the early-90s, especially when you look back and consider some of the more mechanically and visually impressive titles on the system at the time. To me, it's very significant to the history of game development and industry history in general. Also helps that it's my all-time favorite console, hehe.

    • @nebularain3338
      @nebularain3338 4 ปีที่แล้ว +1

      *Megadrive

    • @Musikur
      @Musikur 3 ปีที่แล้ว +4

      It's basically like any basic programming, just without any frameworks or complex APIs, it will literally only do exactly what you tell it. Have a look at Game Maker if you want to get a feel for this yourself, it's a much higher level programming language obviously, but you can build up a lot of the same kinds of logic as is used here to get a feel for it.

    • @user-ph1yj9rr2p
      @user-ph1yj9rr2p 3 ปีที่แล้ว +3

      @@Musikur I would say that the hardware itself was a framework. You had to play by its rules

  • @DoctorHerbstein
    @DoctorHerbstein 7 ปีที่แล้ว +129

    This guy is so clearly knowledgeable about this. This is a truly great host to have on the show!

  • @chadestioco
    @chadestioco 7 ปีที่แล้ว +400

    Wow. You make it sound easier than Python.

    • @ThePoke151
      @ThePoke151 7 ปีที่แล้ว +109

      Yes Python gets complicated a lot faster. Not because Python is difficult, but you get faster to the difficult problems vs playing with registers all day to get basic "movement" :P

    • @BlazertronGames
      @BlazertronGames 7 ปีที่แล้ว +17

      chadestioco ikr? I thought it would take thousands of lines to get basic player movement in assembly

    • @rameynoodles152
      @rameynoodles152 6 ปีที่แล้ว +91

      assembly is really, the most simple language out there. But it's also the most tedious language. Assembly isn't hard, it's tedious and time consuming.

    • @mmbcproductions3340
      @mmbcproductions3340 6 ปีที่แล้ว +68

      Indeed, asm is very simple because you can only do a few things. What's complicated about it is making complex things out of those basic things

    • @patternwhisperer4048
      @patternwhisperer4048 4 ปีที่แล้ว +11

      @@okie9025 .. "strict" (you meant static, or strongly typed but the contrast to strongly typed would be weakly typed) and "dynamic" refer to the typesystem your language uses. You're confusing it with "higher level" languages that don't reify memory management like Python, and to a slightly lesser extend Java/C#. There are languages with type systems that don't abstract memory management such as CPP. CPP has both static type checking and support for dynamic typing. Seriously, for the sake of your own growth, check up on basic terminology and principles before you get opinionated on anything.

  • @HK-sw3vi
    @HK-sw3vi 3 ปีที่แล้ว +26

    this is what my family thinks i do when I'm restarting the laptop to solve a problem.

  • @jeremiahknol9969
    @jeremiahknol9969 6 ปีที่แล้ว +78

    Assembly is so much fun. It's tedious, but it makes you feel like you are one with the machine, knowing it's every breath.

    • @lordoftheflings
      @lordoftheflings 5 ปีที่แล้ว +4

      why would you want to be "one" with a machine? I used to write / debug linux device drivers in C and asm. I never once felt "one" with the machine. Was just a job to me. Its basically a more complex version of programming a VCR. I find women MUCH more interesting than computers.

    • @updaet6870
      @updaet6870 4 ปีที่แล้ว +48

      @@lordoftheflings Then you failed as a programmer

    • @joedartonthefenderbass
      @joedartonthefenderbass 2 ปีที่แล้ว +14

      @@lordoftheflings whyd you bring women into it

    • @carocs1886
      @carocs1886 2 ปีที่แล้ว +5

      @@lordoftheflings We women also can relate to what Jeremiah said, you know?
      "why would you want to be "one" with a machine?" For you It's just a job but for others is some awesome interesting stuff that we want to learn for fun. It's just a matter of interests I guess.

    • @ua2894
      @ua2894 ปีที่แล้ว +4

      i felt the bulge of assembly last night

  • @marksims68
    @marksims68 6 ปีที่แล้ว +8

    68000 machine code, brings back memories of 5am coding sessions on my beloved Amiga, bleary eyed with a half empty cup of coffee staring at devpac. Brilliant video!

    • @thewelder3538
      @thewelder3538 4 ปีที่แล้ว

      You weren't a proper coder if you used Devpac, Asm-One was the only way to go!

    • @mp-lv8bw
      @mp-lv8bw ปีที่แล้ว

      @@thewelder3538 In 1988 Asm-One was not yet available.

    • @thewelder3538
      @thewelder3538 ปีที่แล้ว

      @@mp-lv8bw Ah yes, so true. The only useful thing about DevPac was the fact it supported doing proper Workbench stuff better. Like the WaitPort() and DupHandle() you had to do for proper CLI/Icon start code. I must have used it initially, it's all just such a blur now.

  • @Gredran
    @Gredran 3 ปีที่แล้ว +26

    And coding is tough NOW, but when you look at Assembly, you instantly realize how much easier we have it these days for sure lol.
    He truly is a wizard to keep retain this all.
    Also the ultimate flex in this all is he is showing the demo, with a large EXPO marker, on PAPER. Not even a white board or laminated paper. This guy is so damn casual in his confidence

  • @theburntcrumpet8371
    @theburntcrumpet8371 7 ปีที่แล้ว +27

    I think it's great when Matt does videos on the Megadrive Devkit/Assembly. It's brilliant how instead of simply vaguely explaining how Assembly works (which he may have done in another video (?) not sure), they're actually showing a snippet of what coding in assembly is actually like in essence.

  • @darkmage07070777
    @darkmage07070777 7 ปีที่แล้ว +288

    13:20 - "Let's add to that: let's define gravity."
    ...moments that make you stop and realize what you're capable of as a programmer...

    • @vuurniacsquarewave5091
      @vuurniacsquarewave5091 7 ปีที่แล้ว +19

      And if you defined it as a CPU address pointing to RAM, you could have variable gravity. Great for a level gimmick or whatever.

    • @valenneptune3251
      @valenneptune3251 6 ปีที่แล้ว +21

      indeed, you can also see why one should and must,
      admire that every single behavior in all programs
      are written by some considerate programmers
      I mean if the programmer didn't do the implementation,
      you can't even close a window by clicking the close button.

    • @AsilarWindsailor
      @AsilarWindsailor 5 ปีที่แล้ว +2

      He called the POUND a "hash," I wonder if he is younger than me? (Soon to be 29)

    • @reckz420
      @reckz420 5 ปีที่แล้ว +9

      @@AsilarWindsailor No. # is referred to as Pound only in the US/Canada. in RoW it's hash and probably 1 other term I am unable to recollect at the moment.

    • @AsilarWindsailor
      @AsilarWindsailor 5 ปีที่แล้ว

      @@reckz420 Interesting. I've never heard anyone refer to it as anything but pound until now. Does the # mean something in code? I cant remember now why he used it in this video as I hadn't watched since my previous comment

  • @AstAMoore
    @AstAMoore 7 ปีที่แล้ว +19

    I think the LD (load) mnemonic is much less confusing than MOV (move). You don’t _move_ values into registers as such; you _load_ registers _with_ values. Additionally, you can load registers with values of other registers or memory locations. Since the original values remain unchanged, the notion of _moving_ values is at best misleading.
    Keep up with the series! Make Assembly Great Again!

    • @nikolazelovic2285
      @nikolazelovic2285 7 ปีที่แล้ว +1

      Ast A. Moore I was just thinking the same thing

    • @KuraIthys
      @KuraIthys 7 ปีที่แล้ว +1

      Ast A. Moore I suppose. Depends on the processor and it's instruction set though. If you were dealing with an snes or a commodore 64 you'd find what you're allowed to do with registers is quite restricted, and there is no generic instruction to move values from memory into a register, but rather a bunch of more restricted ones.
      Then again the majority of operations on these processors are register+ memory operations.
      For insantance, to add two numbers you load a value into the A register, then pass a memory location to the ADD instruction. (possibly using the x register to store a partial adress, though aince there are about 27 addressing modes there's lots of odd variations).
      the result of the ADD instruction has then overwritten the contents of the A register.
      Which you can store somewhere in memory....
      I guesx that doesn't really say much about mov vs ld really. XD
      neither truly makes sense because the implication of mov is that the value is erased from the source.
      It's really a logic thing.
      load implies 'load a value from ...', move implies 'move a value to ...'
      Yet the reality of course is that you need both a source AND destination for such instructions to make any sense...
      as mnemonics, either of those only really truly makes sense if one of the two is implied.
      lda makes sense (load from the specified location to register a), mva would sort of seem like a store instruction rather than a load.
      But of course if you have a generic load, store or move instruction that specifies both source and destination it all amounts to the same thing, but with different emphasis. load (x)(from), store (x)(to), move (x)(to).
      move has the disadvantage of implying that the source is erased, which it pretty much never is, so in that sense, mov really doesn't work logically.
      but mnemonics are arbitrary anyway. two assemblers can use completely different mnemonics and if they produce the same binary instruction codes in the end it doesn't matter which you use.

    • @AstAMoore
      @AstAMoore 7 ปีที่แล้ว +2

      Well, you are not wrong, and different architectures indeed work slightly differently. But consider these two CPUs: Z80 and 8080. The Z80 is 100% backward compatible with the 8080 (to the point of having identical opcodes). Nevertheless, conventionally, the Z80 uses the LD mnemonic, whereas the 8080 uses MOV (or variations of STORE). For example:
      MOV A,B vs LD A,B
      MVI A,byte vs LD A,byte
      LHLD word vs LD HL,(word)
      SHLD word vs LD (word),HL
      STAX B vs LD (BC),A
      These are identical instructions and after assembly, the resulting machine codes will be 100% compatible. Yet, Zilog decided to make the instruction set more uniform and straightforward (and, extended it quite a bit, naturally).

    • @RobNicholson1234
      @RobNicholson1234 7 ปีที่แล้ว +3

      Writing code equally in Z80, 6502, 68000 and 8086 for multiple platforms just used to make my head hurt ;-) I learnt Z80 first (Zaks!) on my ZX81 but then came across the 6809 at university. Always preferred t e 6502, 6809, 68000 family over the Z80 and the horrible 64k banked 8088/8086. The key problem was that you could write a routine in 6502 and assuming your algorithm was sound, the first attempt was pretty much as fast it'll ever get. With the Z80, there were loads of tricks of which the main one was trying to keep everything in registers as compared to the 6502, accessing memory was real slow. So with Z80, you might re-write that all important "WriteSprite" routine on the Specky three or four times. The 68000 was a dream to work with. Loved it. Shame that Motorola didn't win the CPU wars. Intel's CPU line held the industry back quite a few years.

    • @AstAMoore
      @AstAMoore 7 ปีที่แล้ว +1

      I also started on the Z80 (on the Speccy, though; skipped the ZX80 and ZX81). Then there was some 8086, then the PIC, then the 68k and the PowerPC (both on Macs). Loved the PowerPC architecture.
      I must admit that optimizing my Z80 code was, arguably, the most satisfying part. Sure, it wasn’t always straighforward, and I occasionally resorted to self-modifying code (which is a no-no on modern systems, because of security reasons), but that was the _exciting_ bit. Counting the bytes and T-states, shaving off a couple here and a couple there, working around the Spectrum’s quirky screen memory addressing, sprite flickering, etc., there’s was a great deal of thrill in it.
      I still write a little bit of Z80 code from time to time, just because I enjoy it so much.

  • @karlblixt8648
    @karlblixt8648 7 ปีที่แล้ว +321

    I like him, can we keep him?

    • @piqresq
      @piqresq 6 ปีที่แล้ว +31

      nope.
      Matt_Phillips.Dispose();

    • @yasserarguelles4245
      @yasserarguelles4245 6 ปีที่แล้ว +9

      RIP

    • @malcolmx86
      @malcolmx86 4 ปีที่แล้ว +1

      name: dc.b 'matt phillips'
      movea.l name, a0
      jsr revive

    • @highlanderc
      @highlanderc 4 ปีที่แล้ว

      Isn't that from "heroes"?

  • @InsaneMetalSoldier
    @InsaneMetalSoldier 7 ปีที่แล้ว +9

    One of my favorite channels on youtube. We need more videos from this guys focused on game development! Pure gold! Awesome guy

  • @tamaszsebe3730
    @tamaszsebe3730 7 ปีที่แล้ว +106

    Nice work!
    By the way, I've always loved the animations you use as part of explanations. What do you use for that?

    • @Computerphile
      @Computerphile  7 ปีที่แล้ว +77

      +Tamas Zsebe Adobe After Effects >Sean

    • @valeriobertoncello1809
      @valeriobertoncello1809 5 ปีที่แล้ว +33

      Assembly

    • @vibaj16
      @vibaj16 3 ปีที่แล้ว

      Valerio Bertoncello yes

    • @aadarshkumarshah8795
      @aadarshkumarshah8795 2 ปีที่แล้ว

      @@Computerphile yes I was expecting something complicated here too

  • @mayurbalwani7277
    @mayurbalwani7277 7 ปีที่แล้ว +33

    Assembly codes are superfast!
    C complier unnecessarily extends the length of the code, but by organising the registers so that none of them is wasted and placing of the instructions, we can get max out of the CPU performance. This basic programming reminded me of my graduation years when we used to do the programming in assembly and analyse the entire operation through machine cycles and its waveforms. Amazing to see how higher level languages and highly resourceful CPUs have abstracted the process and relieved user from this lengthy process.

    • @verymuchgoodgaming132
      @verymuchgoodgaming132 7 ปีที่แล้ว +35

      Mayur Balwani I think it's worth noting that all popular and large C compilers have been designed for maximum performance of the resulting assembly (with proper settings of course) for years. This means that most programmers won't be able to create more efficient assembly code than those compilers.

    • @gabydewilde
      @gabydewilde 7 ปีที่แล้ว

      there is no such thing as maximum performance

    • @mayurbalwani7277
      @mayurbalwani7277 7 ปีที่แล้ว +2

      gaby de wilde But there is something called maximum value of a function and optimisation techniques in the mathematics and also in real life. I have seen programmers optimizing their code to make the processor do what seems very difficult or even impossible to do with such least resources.

    • @iAmTheSquidThing
      @iAmTheSquidThing 7 ปีที่แล้ว +1

      There's a digital guitar amplifier called a Kemper. You plug it into any other guitar amplifier and it copies its tone almost perfectly. Apparently all its algorithms are written directly in assembly code.

    • @nharding
      @nharding 7 ปีที่แล้ว +7

      It is difficult to write assembly language on modern x86 processors (with speculative pipelines, etc) but those considerations don't apply to 68000. You can write code 50% to 300% faster in assembly language (I needed an interrupt driver for sampled sound on the ST, and so I used the USP as a temporary register that was used to keep track of the sample address, that saved 8 cycles, and since that code was executed 8000 times a second, it was 8% more efficient with just that one change). I wrote a 68000 to C converter for Sonic 3D and I had to work out whether the condition codes would be checked, in order to reduce the code size and get the code to run fast enough.

  • @jeffreyg6850
    @jeffreyg6850 5 ปีที่แล้ว +7

    This is one of the best intros to Assembler I've ever watched. Thank you!

  • @dafl00
    @dafl00 7 ปีที่แล้ว +10

    like that bit at the end.. nice to know there are channels that still read the comments

  • @IceMetalPunk
    @IceMetalPunk 7 ปีที่แล้ว +62

    I hope this is a full series; I'd love to learn about how this flavor of assembly interacts with I/O, like buttons and graphics :)

    • @Mtaalas
      @Mtaalas 7 ปีที่แล้ว +21

      Button inputs are just hardwired to the hardware in such a way that when you press a button, there's a register somewhere in the system that changes value accordingly.
      Then you can read that register value and do what ever you want with that in your program.
      The "input register" might not be located on the main processor itself but on a peripheral IO device that's behind a bus of some sorts (SPI, I2S) in which case you might need to write the routine to get the values from the pheripheral to the processor/RAM and then use them as you wish.
      But it's all the same, twiddle registers and use the values.

    • @thatsnotright
      @thatsnotright 7 ปีที่แล้ว +3

      You're ignoring debounce requirements, and most inputs are not mapped to a register but have to be read in to a register. Perhaps the peripheral already debounces and you just need to read over the bus in to a register.

  • @JamesNewton
    @JamesNewton 7 ปีที่แล้ว +3

    Just excellent! I would really love to see more in this series. The real beauty of a system like this is when the complexity increases and you start to understand how all the different parts are working together.

  • @flavysvlogs5697
    @flavysvlogs5697 7 ปีที่แล้ว +5

    Gives an insight on how much programming languages have evolved

  • @nerdiloo9863
    @nerdiloo9863 4 ปีที่แล้ว +3

    This demo was really interesting. I like that 1 guy was 'doing' and the 'voice' was asking probing questions, so as to not assume the viewers were familiar with the jargon. Very cool and I'm gonna 'casually' retry my hand at ASM again like it's 1989.

    • @rewrose2838
      @rewrose2838 4 ปีที่แล้ว +2

      All the videos on Numberphile(math), Objectivity(history), Sixty Symbols(Physics) , Periodic Videos(chemistry) and Deep Sky videos (Astronomy) are like that.
      The voice makes it easier for the host by sticking to simpler themes

  • @needlessoptions
    @needlessoptions 7 ปีที่แล้ว +25

    *Assembly
    An Assembler is the tool used to compile Assembly language.

  • @renanrodrigues1255
    @renanrodrigues1255 6 ปีที่แล้ว +1

    Matt Phillips thanks you for sharing your knowledge on your blog, finally learning about programming games in Assembly, thank you.

  • @Epsilonsama
    @Epsilonsama 2 ปีที่แล้ว +2

    To think that 30 years ago this was how you made games.

  • @MrAntieMatter
    @MrAntieMatter 7 ปีที่แล้ว +157

    That guy has a really nice shirt.

    • @fgregerfeaxcwfeffece
      @fgregerfeaxcwfeffece 7 ปีที่แล้ว +7

      Invader Zim Merch is awesome, i know. Just poke the wound.

    • @JoeKenyon
      @JoeKenyon 7 ปีที่แล้ว +3

      It's Sips O'clock... Oh wait wrong channel.

  • @Kylefassbinderful
    @Kylefassbinderful 4 ปีที่แล้ว +1

    The amount of information I've learned from Computerphile videos is invaluable.

  • @PointB1ank
    @PointB1ank 7 ปีที่แล้ว +2

    This guy was probably like, "finally some recognition for this project I've been working on for 3 years."

  • @xanokothe
    @xanokothe 7 ปีที่แล้ว +37

    This guy knows a lot!

  • @HatelivesNextDoor
    @HatelivesNextDoor 2 ปีที่แล้ว +2

    So this is how we got Noita? Bless this man.

  • @michaelnorman5045
    @michaelnorman5045 5 ปีที่แล้ว +1

    And everyone said assembly was hard. Maybe we just need this guy to explain it.

    • @davidchien8149
      @davidchien8149 4 ปีที่แล้ว

      Assembly is very easy to understand-Anyone must rearrange your brain to think about the program from the most simple (+,-,*,/) to complicate TN/STN LCD Driver.I focused on assembly over 30 years and prepared to introduce H/S for
      some in Taiwan.

  • @xplinux22
    @xplinux22 7 ปีที่แล้ว +4

    Slight nitpick: this video should be titled *Game Physics (in assembly)*. Assembly refers to the actual language being used, and an assembler is the program used to convert assembly language into machine code. Nonetheless, this is an excellent video as always!

  • @gustavosalmeron2013
    @gustavosalmeron2013 2 ปีที่แล้ว

    Using music sheet paper to explain assembly code. A true gentleman.

  • @yoran-g
    @yoran-g 7 ปีที่แล้ว +5

    This was awesome! Would love to see more assembly themed videos. For example a video explaining how you write an assembler from binary, if that's how that works.

  • @markdavies794
    @markdavies794 7 ปีที่แล้ว +1

    Ah the memories come flooding back to when I coded in assembly on the 68000 & 68030. Move.l #x,d0 = 16 cycles and move.b or move.w #x,d0 = 8 cycles (on the Atari STe). Spent many hours trying to optimise my code run in one vsync cycle.

  • @aionmagan7280
    @aionmagan7280 2 ปีที่แล้ว +1

    i would enjoy a 1 hour video of him explaining everything in detail

  • @charleygrossman8368
    @charleygrossman8368 7 ปีที่แล้ว +4

    Congrats on accomplishing your Kickstarter needs! Fantastic work

  • @marekant7776
    @marekant7776 6 ปีที่แล้ว +3

    Microprocessor Systems Design - Alan Clements. Great book on the 68k processor, for those who are interested, and would like to get into this. I picked it up for less than $10 shipped, amazing. Great addition to my library.

  • @georgemargaris
    @georgemargaris 7 ปีที่แล้ว +21

    This guy is 30 years late, but sure, why not. Maybe he waits for "doc" brown to show up in his delorean soon....

    • @Anonymous_Man
      @Anonymous_Man 7 ปีที่แล้ว +19

      30 years late for what? I still have my Sega console and it works.

    • @georgemargaris
      @georgemargaris 7 ปีที่แล้ว +5

      Me too, lol. I was talking about a "career in sega programming". If you plan to do that now.... please don't quit your dayjob!!!

    • @EKULvideos
      @EKULvideos 7 ปีที่แล้ว +12

      The principle is the same for any game written in assembly language.

    • @ELYESSS
      @ELYESSS 7 ปีที่แล้ว +4

      Yes +EKULvideos you are right, it is too late to write games in assembly

    • @georgemargaris
      @georgemargaris 7 ปีที่แล้ว +3

      Today's games are written in C++ combined with GPU specific languages. Your Z80 or Motorola 68000 assembly skills won't really get you a job anymore. Sorry! Ok, maybe there is a job opening at an arcade museum or you could write an Emulator. I love those things!

  • @user10cool
    @user10cool 5 ปีที่แล้ว +39

    0:40 “So if you can imagine back to your BASIC days...” Uh what age is the target demographic of this video?

    • @shubham.1172
      @shubham.1172 4 ปีที่แล้ว +1

      @B3ro1080 We used to write QBasic in the 6th grade (2010) :)

    • @tiny_toilet
      @tiny_toilet 3 ปีที่แล้ว +1

      @@shubham.1172 No way. I can't believe it was still used that recently. I remember learning on QuickBASIC way back when.

    • @shubham.1172
      @shubham.1172 3 ปีที่แล้ว +2

      @@tiny_toilet haha, it's still there in school curriculums in India!

    • @tiny_toilet
      @tiny_toilet 3 ปีที่แล้ว +1

      @@shubham.1172 Glad to hear it. Judging by the number of engineers I've met from India, they've always taken their technology education quite seriously there.

  • @spyrex3988
    @spyrex3988 4 ปีที่แล้ว +4

    assembly language is so fukin cool. I loved every single bit of my microprocessor architecture course in college sem 2

  • @Lambda_Ovine
    @Lambda_Ovine 4 ปีที่แล้ว +6

    I would love if universities taught microcomputing by making a video game on a SEGA mega-cd.

  • @DaVince21
    @DaVince21 6 ปีที่แล้ว +2

    He did it! He finished making the game! Congratulations to Matt. :)

  • @YDwelve
    @YDwelve 7 ปีที่แล้ว +16

    12:30 Really need to see that one!

  • @dmitripogosian5084
    @dmitripogosian5084 ปีที่แล้ว

    Much of this is not about the assemblyr but about how you discretize and solve differential equations. You do the same steps whatever your language is

  • @pjakobs
    @pjakobs 7 ปีที่แล้ว +1

    Ah the beauty of 68k assembly, did a lot of that back on the Amiga and enjoyed it greatly.

  • @jayjeckel
    @jayjeckel 7 ปีที่แล้ว +17

    Loving these videos, Matt is awesome. :)
    To anyone who's goal is to learn 2d game mechanics, if your specific goal isn't learning assembler, then don't start with assembler. You would be much better off starting with something like Python and PyGame or even C#/Mono and Xna/MonoGame. One of the main reasons that programming languages exist is so that people don't have to use assembler and worry about things like assigning registers and dealing directly with buses.

  • @StrangelyIronic
    @StrangelyIronic 2 ปีที่แล้ว +1

    I wish I had an explanation like this back in the day. It would have made me want to learn more and make me keep going with the idea of, "I can actually understand/do this." I the hang of Assembly with an Apple IIGS at a young age in a fairly short amount of time. That said, I also approached (and still do if I'm being honest) a lot of things with the result of hitting a brick wall figuratively over and over and over until at one moment it's like a switch is turned on, everything I've been taking in makes perfect sense, and I can easily do what I was attempting to do. That might be a learning problem, though; the same thing happened when I was learning to type, learning other languages, etc. When I teach mathematics now on the side I try and use as many descriptive word problems as I can to explore the processes in ways that relates to the student. I find I don't "hit a brick wall" nearly as often when presented in this way (like this player example) versus boring problems with no attachment or visual elements past just numbers.

    • @ronjon7942
      @ronjon7942 2 ปีที่แล้ว

      I resemble your comment. Thanks for sharing.

  • @Impedancenetwork
    @Impedancenetwork 6 ปีที่แล้ว +2

    That BGT is the same in ARM assembler. I write code for embedded ARM processors and it's the same. BLT (Branch if less than), BGT (Branch if greater than)

  • @jamesrav
    @jamesrav 2 ปีที่แล้ว

    somewhat strange to see essentially the same thing in 2016 that people were doing in the early 80's. My neighbor was a computer savant, programmed games in assembler on an Apple II at age 14. Had his own company, hired other programmers. Made a *ton* of money. He and Matt even look alike.

  • @2dapoint424
    @2dapoint424 2 ปีที่แล้ว +2

    Did Matt have own channel where he teaches these things in depth?

  • @tarcal87
    @tarcal87 6 ปีที่แล้ว +1

    And this is just the very beginning and nothing visible on the screen - I can barely contemplate the fact that the original Roller Coaster Tycoon game was written almost purely in Assembly. Hats off to that developer

  • @motionwindart
    @motionwindart 7 ปีที่แล้ว +11

    wow I knew assembly was hardcore, but it's insane, dude you are amazing

    • @user-zb8tq5pr4x
      @user-zb8tq5pr4x 5 ปีที่แล้ว

      Honestly it's first grade of faculty level

  • @andljoy
    @andljoy 7 ปีที่แล้ว +36

    i did not know how nice 68000 assembler was so nice ! x86 assembly is horrible.

    • @tramsgar
      @tramsgar 7 ปีที่แล้ว +22

      Andrew Joy Well we tried to tell you 30 yrs ago 😂😜

    • @KungKras
      @KungKras 7 ปีที่แล้ว +12

      The wrong processor family won. That's for sure.
      At least we still have ARM and MIPS though.

    • @ZLau13
      @ZLau13 7 ปีที่แล้ว +2

      tramsgar Sometimes I wonder what the today's world might be like if Amiga "won"...

    • @KungKras
      @KungKras 7 ปีที่แล้ว +7

      ZLau13
      Motorola quad cores.... I get happy just by thinking about it.

    • @jtsiomb
      @jtsiomb 7 ปีที่แล้ว +11

      x86 is one of the ugliest instruction sets out there. Try ARM assembly (especially the original 32bit variant), it's absolutely wonderful.

  • @espacemaxim
    @espacemaxim 3 ปีที่แล้ว +3

    Basically this is what a real life wizard looks like

  • @ShaunDreclin
    @ShaunDreclin 7 ปีที่แล้ว +10

    if you're interested in learning assembly, you should play human resource machine. it's a puzzle game based around writing assembly programs. multiplatform too! playing it on my phone rn

    • @bensmith9253
      @bensmith9253 7 ปีที่แล้ว +1

      Thanks dude! This looks great!
      Downloading now.

  • @adrianflo6481
    @adrianflo6481 7 ปีที่แล้ว +49

    could you make a video going through and explaining how someone could be as mad as to write RollerCoaster Tycoon in x86 assemble ?

    • @danielf950
      @danielf950 3 ปีที่แล้ว +1

      Was it, really??

    • @adrianflo6481
      @adrianflo6481 3 ปีที่แล้ว +3

      @@danielf950 yep.

    • @danielf950
      @danielf950 3 ปีที่แล้ว

      @@adrianflo6481 Thanks, I didn't know that. What a patience!
      Merry Christmas, Adrian.

    • @adrianflo6481
      @adrianflo6481 3 ปีที่แล้ว

      @@danielf950 merry Yule!

    • @danielf950
      @danielf950 3 ปีที่แล้ว +1

      @rerunturbografx that's amazing! I never knew Assembly could be used to write CPU agnostic software! I mean, I thought each CPU had it's own Assembly. I'll look into it. Thanks a lot!

  • @marlandkennedy7747
    @marlandkennedy7747 5 ปีที่แล้ว +3

    I wish you were my teacher when I was taking machine programming.

  • @IceDelight
    @IceDelight 4 ปีที่แล้ว +1

    Oh I recognise that place, it's the NVA in Nottingham, I used to work there, haha. Unfortunately it closed down last year.

  • @bastawa
    @bastawa 6 ปีที่แล้ว

    My first contact with assembly was on atari 65xs. I bought a book which was very hard for me to follow. This guy makes it so clear and easy! Thanks

  • @mrboyban
    @mrboyban 2 ปีที่แล้ว

    Matt is very knowledgeable, so much so that he moves and sounds like he is part of the assembly.

  • @jgallantyt
    @jgallantyt 7 ปีที่แล้ว +1

    Anyone casually interested in assembly should check out the game "Shenzhen I/O" on steam. It's a puzzle game where you write assembly for fictional microprocessor chips and interconnect the chips on a circuit board to get them all working together to solve a problem. It's a lot of fun and gets quite challenging. I highly recommend it.

  • @abhishekshah11
    @abhishekshah11 4 ปีที่แล้ว

    No dual monitors. No wide-screen. No VS code. This guy!

  • @iggienator
    @iggienator 7 ปีที่แล้ว

    I have been coding a vector graphics rasteriser on one of the industrial control processors at work. It takes a long time to do seemingly small stuff but it feels so damn good when it finally works!

  • @TheGuruMeditation
    @TheGuruMeditation 7 ปีที่แล้ว +36

    Brillant video. Thank you very much. I love this channel! -- Bill

  • @detaart
    @detaart 7 ปีที่แล้ว +32

    +1000 for the invader zim shirt

    • @simbaonsteroids8836
      @simbaonsteroids8836 7 ปีที่แล้ว +1

      detaart Let's sing the doom song!

    • @themeeman
      @themeeman 7 ปีที่แล้ว +4

      detaart
      If you press the like button 1000 times, it cancels out your like :(

    • @detaart
      @detaart 7 ปีที่แล้ว +2

      Clingfilm Productions TH-cam is broken :/

  • @Zuschauerquaeler
    @Zuschauerquaeler ปีที่แล้ว +1

    combining my two favourite topics!

  • @RonJohn63
    @RonJohn63 7 ปีที่แล้ว +6

    19:14 Didn't realize it was widespread? But SCSI has been around since the early 1980s. Almost all of the M68K Macs used it for hard disk IO.

    • @Computerphile
      @Computerphile  7 ปีที่แล้ว +9

      +RonJohn63 he meant how widespread saying "scuzzy" was instead of saying "S. C. S. I."

    • @RonJohn63
      @RonJohn63 7 ปีที่แล้ว +1

      ***** And people have been saying "scuzzy" that long.

    • @Cre8tvMG
      @Cre8tvMG 7 ปีที่แล้ว

      West coast generally said 'scuzzy' and east coast generally said 'sexy', from my experience in the 80s and 90s.

    • @RonJohn63
      @RonJohn63 7 ปีที่แล้ว +1

      Cre8tvMG _West coast generally said 'scuzzy'_
      And Gulf Coast, since the 80s.
      _east coast generally said 'sexy'_
      I've worked professionally with people in NY/NJ since 2GB drives were common in the mid 1990s, and never once herd them say that they needed to install or replace "sexy" drives.

  • @Jbdoster
    @Jbdoster 5 ปีที่แล้ว

    This video means so much to me.

  • @thogameskanaal
    @thogameskanaal 2 ปีที่แล้ว

    I love how this legacy dev kits are just a press on the power switch and a serial cable to the PC, no extra probes or debug bridges needed, it's all built into software.
    I still have an IS_NITRO_EMULATOR at the office, which is the development hardware used for the original NTR Nintendo DS. It plugs in using a USB cable or serial connector, and (as long as you're running Windows 2000 or up) you can configure GDB to read your arm-T9 elf binary and step through the C/C++ code using a modern interface like Code::Blocks or even VSCode.
    Though the drivers are proprietary, that's the only thing to keep in mind if you lost your installer CD (and the original warioworld portal has been shut down for years now)

  • @Ry____
    @Ry____ 5 ปีที่แล้ว +1

    Great job on explaining assembly! I wish I had this video when I was trying to create my “bear in a maze” game in assembly language!

  • @shaddoty
    @shaddoty 2 ปีที่แล้ว

    Hey it's the guy who made Tanglewood, what a G

  • @Mgaak
    @Mgaak 6 ปีที่แล้ว

    "lets define gravity" has a really shocking and awe inspiring tone there.

  • @mailmaxxxx
    @mailmaxxxx 5 ปีที่แล้ว

    I'm totally geeking out right now! Who knew there were videos like this on the interwebs?
    Learned 6502 on the PET and then BBC, then learned 68K on the Atari
    SO much fun!

  • @heaslyben
    @heaslyben 7 ปีที่แล้ว +1

    This was great! A very clear presentation of advanced technical material. Thanks again!

  • @FennecTECH
    @FennecTECH 7 ปีที่แล้ว +143

    ya know what ima buy this game lol

    • @AntiPattern123
      @AntiPattern123 6 ปีที่แล้ว +21

      Preorder the digital deluxe edition to join the closed alpha and get the season pass

  • @Thaden0
    @Thaden0 7 ปีที่แล้ว +37

    The 'pc' register I've only ever heard called the IP (Instruction Pointer). Are they different things?

    • @notroop
      @notroop 7 ปีที่แล้ว +11

      They're the same, the Program Counter register on x86 (amd style) assembly is %eip (IP being a mnemonic for instruction pointer).

    • @ELYESSS
      @ELYESSS 7 ปีที่แล้ว +3

      PC stands for program counter and they are the same

    • @WujuStyler
      @WujuStyler 7 ปีที่แล้ว

      I read somewhere somebody called it the "Reading Head" or something like that.

    • @MaakaSakuranbo
      @MaakaSakuranbo 7 ปีที่แล้ว +12

      "Reading Head" sounds more like a turing machine thingy.

    • @jtsiomb
      @jtsiomb 7 ปีที่แล้ว +8

      Different CPUs call the same things with different names. In most architectures it's called a program counter, on intel x86s it's called an instruction pointer.

  • @stretchx
    @stretchx 7 ปีที่แล้ว +3

    Cool Video - I hope his game gets funded, It's so close!

  • @ProtoMan137
    @ProtoMan137 7 ปีที่แล้ว +1

    ...now I understand how I could have made my early Cpp projects so much easier.

  • @whuzzzup
    @whuzzzup 7 ปีที่แล้ว +11

    Will we get a video where this will be connected to some graphics? Even just a moving square or so will be nice.

    • @whuzzzup
      @whuzzzup 7 ปีที่แล้ว +4

      If you do that on Twitch it would be good to also have the videos afterwards on TH-cam, so to have them available at any time and people can find them after some time.

  • @kenny-kvibe
    @kenny-kvibe 4 ปีที่แล้ว

    I think Carry Flag is when the value is bigger than the available current registry space that it's in, so that the flag tells it to carry the leftover (bigger) values of the whole value to the next registry space, because of it's size it can't be saved in one registry space.
    And for that of what he describes at around 4:45 is called the Negate/Negative flag.
    Otherwise nice video :)

  • @wesmatron
    @wesmatron 7 ปีที่แล้ว

    An invaluable vid no matter which language you program in

  • @totallynotabot151
    @totallynotabot151 5 ปีที่แล้ว

    Very nice introduction to both assembly and game programming!

  • @erdmax_
    @erdmax_ 7 ปีที่แล้ว

    Ahh you're so close with your Kickstarter, I really hope you get it. Game looks like it could be really fun.

  • @SaccoBelmonte
    @SaccoBelmonte 6 ปีที่แล้ว

    Just crazy how they get from this to a graphical end product where you see none of this. Mindblown.

  • @juanmena3648
    @juanmena3648 5 ปีที่แล้ว

    His looks, his monitor, keyboard, pc, the fact that he has a SEGA console and the cameta quality...
    *makes me feel like I'm in the early 90s watching a VHS that's probably called:*
    *_So you want to code games? TUBULAR!_*
    InB4: I too have the same look as his... but I lack the coding skills...

  • @RightReverb
    @RightReverb 7 ปีที่แล้ว +2

    Thank you so much for the video. You guys are making youtube useful again. Thumbs up!

  • @davistalhone9482
    @davistalhone9482 5 ปีที่แล้ว

    This all makes sense in terms of establishing all the game's parameters- I need to keep digging until I discover how Assembly is used to plot graphical points. Years and years ago I wrote complete games in Basic and have been intimidated by Assembly for as long as I can remember. Looking at it like this, it make a lot of sense.

    • @totallynotabot151
      @totallynotabot151 5 ปีที่แล้ว

      Drawing pixels is not really part of languages, it depends on the computer hardware and operating system. He's developing for a Sega console so he can probably just write pixels to a character map and then characters into a tile map using direct memory writes. On a modern desktop PC you would have to call OS functions to do that instead.

  • @goeiecool9999
    @goeiecool9999 7 ปีที่แล้ว

    11:02 Wow! Such luxury! Keeping track of a variable in a register. That's really nice. It's kind of inconvenient having to push and pop all the time.

  • @Fenris0000
    @Fenris0000 6 ปีที่แล้ว

    Excellent video, from basic concepts, a detailed explenation of assembly language...

  • @sebastiandrozd18
    @sebastiandrozd18 5 ปีที่แล้ว

    I cant watch these videos. I will never be on the level of this guy..genius.

  • @bricknut11
    @bricknut11 7 ปีที่แล้ว +3

    Didn't understand a word after 0:20 but still very interesting.

  • @anothermouth7077
    @anothermouth7077 3 ปีที่แล้ว +1

    Foetnite kids will never be able to imagine how mind boggling it was to have games in 8 bit

  • @kaizen9451
    @kaizen9451 7 ปีที่แล้ว +59

    Matt Phillips, where do you live? I want to buy you a drink and talk assembly.

    • @ancientapparition1638
      @ancientapparition1638 5 ปีที่แล้ว +5

      And maybe smoke a joint considering your awesome profile picture.

  • @suckinDiesel44
    @suckinDiesel44 7 ปีที่แล้ว

    Fantastic video, I had no idea the key ideas of game development were this simple.

    • @erikshure360
      @erikshure360 6 ปีที่แล้ว

      Mike Ehrmantraut It gets a bit more complex depending on what kind of game you are writing and for what system.

  • @happy_labs
    @happy_labs 7 ปีที่แล้ว

    Very cool video, I like the straightforward explanatory style.

  • @MrDiglenson
    @MrDiglenson ปีที่แล้ว

    Man, this guy is soooo inspirational