How Windows Kernel Draws Graphics

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

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

  • @givememoJo
    @givememoJo 2 หลายเดือนก่อน +380

    no ads, no fancy wording, no overreaction just simply going straight to the point. really like your videos and i am always happy if a new one pops up at my frontpage :)

    • @Osmosisisthespontaneousnetmove
      @Osmosisisthespontaneousnetmove 2 หลายเดือนก่อน +1

      @@givememoJo Vulkan > DirectX

    • @SuperLimeWorld
      @SuperLimeWorld 2 หลายเดือนก่อน +1

      I like to call that type of stuff "retention bait" like click bait but instead it's to make you think it's worth it to continue watching

    • @TheMcSebi
      @TheMcSebi 2 หลายเดือนก่อน

      exactly that

    • @ahmede92
      @ahmede92 หลายเดือนก่อน +1

      @@Osmosisisthespontaneousnetmove It's kinda true as Vulkan supports other operating systems :)

    • @jimmlmao
      @jimmlmao หลายเดือนก่อน

      bot i seen your comment 500 times

  • @threx71
    @threx71 2 หลายเดือนก่อน +82

    Never thought someone could explain so easily going from an action, to the driver, to the kernel, to fking ASSEMBLY, this was brilliant.

  • @jbray250
    @jbray250 2 หลายเดือนก่อน +208

    This is genuinely so insane, how did you learn to use windbg like that?? Also how did you know what function in the kernel you wanted, from messing around with it or a book/class?

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +99

      Experience and reading the docs :) also specifically for Kernel debugging there is a recommended free book (that comes with the windows sdk) that is handy, I will put info about this next time I update the welcome page. About the second question, I found the specific function through my own reserach, info about BasicDisplay is pretty scarce on the WWW

    • @jackcartersmith
      @jackcartersmith 2 หลายเดือนก่อน +41

      The good answer is always "read the doc", I hate this answer x')

    • @tablettablete186
      @tablettablete186 2 หลายเดือนก่อน +2

      ​@@jackcartersmithWhy do you hate it? Curious

    • @eobardthawnemcoc
      @eobardthawnemcoc 2 หลายเดือนก่อน +18

      @@tablettablete186 i guess cuz it's a obvious answer and what we already know but just don't do it

    • @jackcartersmith
      @jackcartersmith 2 หลายเดือนก่อน +1

      @@eobardthawnemcoc have the point :P

  • @qvindicator
    @qvindicator 2 หลายเดือนก่อน +45

    This channel is a hidden gem. Should have millions of subscribers

    • @TheVizualkat
      @TheVizualkat 2 หลายเดือนก่อน +6

      Billions must subscribe

    • @gabrielspeed5464
      @gabrielspeed5464 2 หลายเดือนก่อน +1

      @@TheVizualkat trillions tbh we need a larger population to sufficiently appreciate this

  • @glossedghost
    @glossedghost 2 หลายเดือนก่อน +32

    Amazing video just for the sheer amount of WinDbg knowledge you have. It is far more entertaining to hear and see the commands in a neat tidy and time respecting package that you have offered here compared to reading the docs. Bless you and I'm so glad I got this recommended. Keep it up, perfect pace and no nonsense and wasting time.
    As for the debugging part, I have had the most productive success by running a Hyper-V Windows instance and using network debugging aka KDNET. Everything else was way too slow for me.

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +1

      Interesting, I actually haven't tried network debugging yet since serial works pretty well in my experience, but now that I think about it, it is a little slow sometimes, I'll give it a try sometime. Also the Hyper-V setup, looks interesting!

    • @jirehla-ab1671
      @jirehla-ab1671 หลายเดือนก่อน

      @@nirlichtman does win32 really mean that its just for 32 bit

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน +1

      @@jirehla-ab1671 nope win32 is just a legacy nickname of windows api going back to the old days when there was also a 16bit windows api, nowadays win32 just means windows api in general

  • @dj.yacine
    @dj.yacine 2 หลายเดือนก่อน +67

    Always high quality content 👏

  • @KimGameDev
    @KimGameDev 2 หลายเดือนก่อน +22

    Interesting to see what is actually happening under the hood of Windows. Keep up the good work.

    • @monad_tcp
      @monad_tcp 2 หลายเดือนก่อน +1

      Its actually kinda cool , compared to the insanity of the Linux Graphics stack, Windows is a surprisingly good system.
      That's one of the reasons I run Xen and use Windows as a DE.

  • @siperPL
    @siperPL 2 หลายเดือนก่อน +19

    10:06 I got flashbacks from Win 9x era

  • @kinershah464
    @kinershah464 2 หลายเดือนก่อน +8

    Man I am genuinely surprised at how cool Windows really is. Its docs are outstanding, APIs makes so much sense, development tools are simply awesome. And your videos are so cool man, always extremely informative. Please keep making more such videos related to Windows.

    • @1495978707
      @1495978707 2 หลายเดือนก่อน

      Too bad it's closed source and they shove adware and spyware into it. If it were open source, at least we could confidently strip out whatever crap we don't want

    • @theairaccumulator7144
      @theairaccumulator7144 หลายเดือนก่อน +2

      Is this sarcastic? The docs are really lacking once you get into the more complicated stuff. Your only option at that point is obscure books or asking people "in the know". I wouldn't call that good docs. APIs also stop making sense when you hit the Function2Ex territory.

    • @kinershah464
      @kinershah464 หลายเดือนก่อน +1

      @@theairaccumulator7144 not sarcastic. I have had a look at some API functions and they were well documented. Maybe there are docs which lack details which I am unaware of, I am sure there should be some way to report it so they can improve it.

    • @delphicdescant
      @delphicdescant หลายเดือนก่อน +1

      @@theairaccumulator7144 Windows docs may be better than average API docs, and this may be thanks to the average being pretty abysmal.

  • @thepenguin9
    @thepenguin9 หลายเดือนก่อน +1

    This has helped explain so many graphics weirdness bugs I've encountered over the years

  • @UnrealOG137
    @UnrealOG137 2 หลายเดือนก่อน +6

    Your videos are amazing! They are super informative, to the point, and incredibly interesting. They are also technical, yet very easy to watch. I'd watch an hour long video if you made one.
    Keep up the great work!

  • @immortalxgr
    @immortalxgr หลายเดือนก่อน +1

    Very rare to see such high quality and to the point content these days

  • @KevinVeroneau
    @KevinVeroneau 2 หลายเดือนก่อน +2

    I'm genuinely happy that I didn't know it was that easy to grab and use debugging information in Windows through the serial port like that, or I could be profiled for being a potential Windows hacker. Great video, and super crazy that this is even possible. Love watching interesting things like this. Personally, I'm mainly a Linux user, but love learning and understand all technology, as each bit of software is always put together in it's own unique way. Windows is interesting as it is closed source, and I find it generally more difficult to see it's internals, this video really changes that perspective for me, seeing a command like "lsmod" on Linux to see all loaded modules in the Windows kernel... Mind blown!

  • @TuxikCE
    @TuxikCE 2 หลายเดือนก่อน +4

    I would really love to see you break the hell out of an operating system and see some really interesting artifacts. Man who would have though that kernel debugging would be so awesome!

  • @Lilly24244
    @Lilly24244 หลายเดือนก่อน

    This is a genuinely good video. Thanks for making this, I can't be bothered enough to actually figure out windbg and you've pretty much set up the most practical foundation with this.

  • @Z3rgatul
    @Z3rgatul 2 หลายเดือนก่อน +4

    Bro casually messes up windows kernel memory like this is some sort of hello world example in JavaScript

  • @stevep5759
    @stevep5759 2 หลายเดือนก่อน +1

    Best channel for systems programming, always learn something new each video. Keep it up! 👌👌

  • @1088lol
    @1088lol หลายเดือนก่อน

    my professor wants to give you 6 credit points for this awesome straight to the point demonstration

  • @Psychopatz
    @Psychopatz 2 หลายเดือนก่อน +4

    So this is how some of the malware do some cool wavy stuffs. Super thanks sir!

  • @albaniqn
    @albaniqn 2 หลายเดือนก่อน

    while i may not understand all things shown, i like how you break down topics and apply them

  • @revealingfacts4all
    @revealingfacts4all 2 หลายเดือนก่อน +4

    awesome video. makes me wonder why they have two different APIs on top of DirectX. Why not have just one API with both the simpler Rectangle calls along with more advanced ones. An area I always wanted to see explored is how something like openGL works across different platforms such as Windows and Linux where you have a common openGL API that caters, under the hood, to make the right call/bindings to whatever system it's on (directx, x11 is it? or wayland?) anyway, love these low level how things work videos and your style of just getting right to the dam point without a lot of upfront yappin lol... anyway, you got another subscriber!

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +7

      One of the reasons is historical, GDI is considered a legacy API and Direct3D is more modern and used by many modern applications and also components of Windows (even DWM - the window manager that is built-in Windows uses Direct3D). GDI is simpler to use but is a lot more limited in terms of performance and features. But in the end Windows has to remain backwards compatible and thus GDI is here to stay.

  • @davidxyz5815
    @davidxyz5815 2 หลายเดือนก่อน +1

    damn I was actually researching how to write to the graphics frame buffer so that I could create my own little undetected esp cheat but everywhere I read about it people were saying thats a thing one would do ages ago and that displaying graphics nowadays wouldnt be as easy as just writing pixel color values to a buffer - but here we are. Dope video as always!

  • @ItsCOMMANDer_
    @ItsCOMMANDer_ 2 หลายเดือนก่อน +10

    INSANE knowlage dude. What will you make next? 2nd place on the most recent vote, windows boot process?

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +4

      next one will prob be a Linux vid

  • @TurntableTV
    @TurntableTV 2 หลายเดือนก่อน +4

    These videos are gold. Thank you for sharing with us, mr Nir!
    One thing that has always puzzled me is whether total obfuscation of a virtual machine (VM) is possible or if it can still be detected. Some malware can determine if a host is running on bare metal or in a VM, but I’m not sure how they accomplish this. I’ve read that there are methods like checking the Windows registry for certain keys, querying hardware information with tools like dmidecode, and so on. But is it possible to obfuscate a VM to the extent that it is 100% undetectable?

  • @le9038
    @le9038 2 หลายเดือนก่อน +42

    Never in a million years would I suspect microsoft giving debuggung capabilities to the average windows user!
    Wouldn't this allow people to try and clean-room decompile the kernal? The debugging symbols would be really useful for that kind of stuff...

    • @xfaon
      @xfaon 2 หลายเดือนก่อน +2

      dlls have to expose symbol names, u can use that to debug dlls

    • @hye181
      @hye181 2 หลายเดือนก่อน +27

      microsoft is very open with the internals of the windows kernel

    • @smallcube-zn2mm
      @smallcube-zn2mm 2 หลายเดือนก่อน +8

      @@hye181 joke of the year

    • @hye181
      @hye181 2 หลายเดือนก่อน +41

      @@smallcube-zn2mm It's true & it's not my fault you've never been smart enough to bother looking. There's a whole world outside your Reddit-harvested opinions :)

    • @whamer100
      @whamer100 2 หลายเดือนก่อน +13

      ​@@smallcube-zn2mm no they're quite serious, its just the deeper into the kernel you go, the less documented it becomes. but a large amount of it is publicly documented

  • @ThatStella7922
    @ThatStella7922 หลายเดือนก่อน

    This is extremely useful to someone wanting to get into Windows RE and research! Great video, clear explanations and no fluff.

    • @GeneralKenobi69420
      @GeneralKenobi69420 หลายเดือนก่อน

      @@ThatStella7922 daily reminder that you will never be a w

  • @rw-kb9qv
    @rw-kb9qv 2 หลายเดือนก่อน +1

    this guy is just straight to the point and I love it :)

  • @paradoxicalcat7173
    @paradoxicalcat7173 2 หลายเดือนก่อน

    Great video! I used to do this in DOS with assembler. Nothing really new about overwriting the raw bytes drawn to the screen. Today, it's just more complex to do.

  • @captainswing4040
    @captainswing4040 2 หลายเดือนก่อน +8

    this is pretty off topic but here goes
    first time i was learning opengl i thought it was pretty stupid but now that i am trying it again with a little more experience, i think it has really nice and logical interface
    i don't know why i am writing this in a comment section
    maybe beacuse i just want to talk about it with like minded people

    • @skilz8098
      @skilz8098 2 หลายเดือนก่อน

      If you think OpenGL is nice, you might want to look into Vulkan. It's a bit more verbose but a lot more powerful.

    • @commander3494
      @commander3494 2 หลายเดือนก่อน

      I've been meaning to learn graphics programming for a while. I think im going to start with WGPU though

    • @qvindicator
      @qvindicator 2 หลายเดือนก่อน +1

      This is my experience when learning everything
      Try something -> quit because it’s hard -> try again and it’s so much easier because I’ve already learned so much

    • @captainswing4040
      @captainswing4040 2 หลายเดือนก่อน

      @@commander3494 thats a great choice
      and learning web gpu will also be useful in case you want to learn vulkan in the future because the concepts translate well from web gpu to vulkan

    • @captainswing4040
      @captainswing4040 2 หลายเดือนก่อน +1

      @@qvindicator haha
      can relate for sure

  • @sirflimflam
    @sirflimflam หลายเดือนก่อน

    This is something I've been interested in since the win98 days, though it's a lot more fancy these days.

  • @dravorek
    @dravorek หลายเดือนก่อน

    Some stellar content 👌.
    Clear, concise and very interesting.
    Wonder how long the reverse engineering session was to make it seem so simple 😃

  • @dylanh333
    @dylanh333 2 หลายเดือนก่อน

    Thanks for spending more time making the WinDBG commands memorable with mnemonics. One day they'll stick for me!

  • @bluebutterfly6394
    @bluebutterfly6394 หลายเดือนก่อน

    Not a Windows user anymore , but this was highly informative

  • @Jonathan-ru9zl
    @Jonathan-ru9zl 2 หลายเดือนก่อน +5

    Highly gifted programmer

  • @robinb3921
    @robinb3921 หลายเดือนก่อน

    Thank you for this! I like your style of presentation and explaining. Looking forward to another video

  • @Illustalkero
    @Illustalkero หลายเดือนก่อน

    I don't know how yt recommended it. Awesome video

  • @smb1397
    @smb1397 หลายเดือนก่อน

    the sheer quantity of stuff ive learned from this video ... probably more than any youtube video ive ever seen

  • @jackcartersmith
    @jackcartersmith 2 หลายเดือนก่อน

    Perfect timing! Just when I search infos on this kind of technique! Thanks!

  • @ObrtASCENTvl.ZlatanOmerovic
    @ObrtASCENTvl.ZlatanOmerovic 2 หลายเดือนก่อน +3

    The best Israeli on the planet

  • @leeroyjenkins0
    @leeroyjenkins0 2 หลายเดือนก่อน +1

    I find it funny that they have a kernel-level concept of what a mouse pointer is

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +3

      The mouse pointer functions over there come from the win32k driver which was part of the move Microsoft did in the second major release of NT - they moved part of the graphical subsystem to the kernel to improve performance, hence the name win32k (win32 kernel part)

  • @tom_zanna
    @tom_zanna 2 หลายเดือนก่อน

    I'm loving your videos! I've always thought of Windows internals as closed and impenetrable but you're proving me the opposite

  • @G-3-A-R-Z
    @G-3-A-R-Z 2 หลายเดือนก่อน +3

    Always informative.

  • @Astoilov1
    @Astoilov1 หลายเดือนก่อน +1

    Awesome video man,wish you luck!

  • @poutineausyropderable7108
    @poutineausyropderable7108 2 หลายเดือนก่อน

    Comments so the algo recommends me more of your stuff.
    I'm not yet skilled wnough to be at the level of fully dollowing your vids, Its neat knowledge. But when I'll get there I want them.
    Algods:
    Great video. Very helpful. Loved it. Thank you you helped me so much.
    Seriously, I had this problem for 3 months and I just fixed it with it. You can't imagine how much it helped me. I wish more people would see it.
    It's criminal you don't have more subscribers.
    Should be enough. Love your stuff for real. Cya

  • @IsaacHisey
    @IsaacHisey หลายเดือนก่อน

    Jaw droppingly awesome!

  • @ghostsdefeated4078
    @ghostsdefeated4078 2 หลายเดือนก่อน +1

    another banger... he can't keep getting away with this

  • @countedgnome7216
    @countedgnome7216 2 หลายเดือนก่อน

    Very cool video! Makes me want to mess around in the windows kernel!

  • @ANormalMale
    @ANormalMale 2 หลายเดือนก่อน +3

    Very intelligent man

  • @timbrando96
    @timbrando96 2 หลายเดือนก่อน +1

    Awesome video!!!
    Would this be a valid way to realize a desktop warp (and blend) to project the screen onto a curved canvas by reading the current pixel value and putting it somewhere else? or would you rather use a more high-level API? :)

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน

      Thanks! The trick I did in the video is very hacky, I wouldn't recommend to build something based on that :) I would start by looking to see if there is a clean existing solution (program/driver) and if not look into a clean solution using an API (for example looking into the available DWM API methods in the win32 docs), but since this is quite a unique use case there is a good chance no API exists (at least in user mode) to facilitate this, and then you could resort to trying to make a more hacky user mode solution (perhaps extending dwm or the user mode graphical driver), or perhaps making a driver to help with this in the kernel

  • @geertdepuydt2683
    @geertdepuydt2683 2 หลายเดือนก่อน +1

    Anyone ever heard about the "happy hacker"? This has the same vibes from my childhood in the 90's 😎

  • @hoardingapples7083
    @hoardingapples7083 2 หลายเดือนก่อน +2

    This is really cool low level stuff, where do you learn these things? I wanna know more and get in to doing some cool experiments like this, do you have any resources?

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +1

      Check out the welcome link on my channel, I maintain a list of suggested learning resources over there

    • @hoardingapples7083
      @hoardingapples7083 2 หลายเดือนก่อน

      @@nirlichtman thanks 👌

  • @jan-pcro
    @jan-pcro หลายเดือนก่อน

    Hey nice video!
    i am wondering where the bytes you turned to grey are located, is it the ram or the graphic-ram?
    Thanks a lot in advance, always nice to so where problems have their roots, since i had these kind of graphic bugs with my old pc and was wondering what was wrong.

  • @wizard_za
    @wizard_za 29 วันที่ผ่านมา

    Really interesting video, thank you! Is it possible to do the same regarding some popular display manager and desktop environment on linux just to get a better grasp of it?

  • @mandrei1528
    @mandrei1528 2 หลายเดือนก่อน +2

    who are you? this is good and amazing, we wanto more windbg stuff and windows topics. do you have some private channel or somethingfrom where we can learn, pay for this? Thank you.

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน

      Thanks! All my content is free, no private channel :)

  • @ihartmacz
    @ihartmacz 2 หลายเดือนก่อน +3

    Missed you!

  • @alpizzayer
    @alpizzayer หลายเดือนก่อน

    This is very useful. Thank you so much.

  • @cedric6941
    @cedric6941 2 หลายเดือนก่อน +2

    Love the videos! I assume you have tried the Rust language, what are your opinions on it? Rust videos would be really cool.

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +2

      actually havent tried Rust yet, but it looks interesting, one of the open source projects I like (ruffle) is written using Rust

    • @cedric6941
      @cedric6941 2 หลายเดือนก่อน +2

      @@nirlichtman cool! definitely try it :D

  • @TCOphox
    @TCOphox หลายเดือนก่อน

    Oh I've encountered graphical bugs where the screen would be totally black unless i move my cursor, in which whatever is in the cursor's path somehow regenerates my wallpaper and other GUI elements. As if I'm 'magic brushing' in the correct colours on my screen.
    ....and now I have a bit of a deeper clue as to why! Perhaps, some memory space was just zero'd out and I guess it even zero'd out the ones responsible for storing the information of the frame buffer so everything went black, until it gets updated with new information such as having to render a cursor and the shadow effects around said cursor?

  • @CFSworks
    @CFSworks หลายเดือนก่อน

    The truly impressive thing is how expertly you used WinDbg. That thing is *not* user-friendly. The few times I've had the misfortune of using it, it felt like the sort of thing meant to be used internally within Microsoft to aid in Windows development, and only later did they decide to release it.

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน

      Thanks :) right, it's highly geared for internal Microsoft Windows dev and in fact in the kernel debugging tutorial document that comes with the Windows SDK it can clearly be seen in the screenshots that Microsoft uses WinDbg to debug Windows on the source level. And indeed the learning curve is steep at first, but the debugger is very powerful.

  • @YmanYoutube
    @YmanYoutube 2 หลายเดือนก่อน +3

    Does something like OpenGl go through the same driver?

    • @leeroyjenkins0
      @leeroyjenkins0 2 หลายเดือนก่อน

      ​@@YmanTH-cam yes, that's what "3rd party graphics client" refers to in the graph :)
      As far as I understand -it's- the directx kernel subsystem is similar to the "Direct rendering manager" on Linux, in that it manages per-process memory for the GPU and such.

    • @YmanYoutube
      @YmanYoutube 2 หลายเดือนก่อน

      @@leeroyjenkins0 I see, ty for the response.

  • @slendi9623
    @slendi9623 2 หลายเดือนก่อน +2

    i love framebuffers

  • @censoredeveryday3320
    @censoredeveryday3320 2 หลายเดือนก่อน

    Reminds me of when I was writing VxD for Windows 95 and 98.

  • @MaksimKartoskinov
    @MaksimKartoskinov 2 หลายเดือนก่อน

    Man you so good. Thx for ur videos. Can u advice some books abt understanding windows from zero. Im understand smth in progrmming, but idk low level things in windows

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน

      I have learning resource recommendations in the welcome link on my channel

  • @BabaTova
    @BabaTova 2 หลายเดือนก่อน +1

    Great video as always!

  • @RelabTV
    @RelabTV 2 หลายเดือนก่อน +1

    amazing video

  • @davidechiappa8927
    @davidechiappa8927 2 หลายเดือนก่อน

    In case i'm running a game that's using Vulkan api instead of directx (i suppose the correct name should be direct3D), will everything be handled anyway by the directx kernel subsystem in the lower level?

  • @_denzy_6310
    @_denzy_6310 หลายเดือนก่อน

    This makes me want to try windbg too. Looks like an excellent debugger when my win32 code breaks

  • @JAzzWoods-ik4vv
    @JAzzWoods-ik4vv หลายเดือนก่อน

    Kinda insane you can just write to the frame buffer directly. Would be fun if you could do that directly inside the OS

  • @tomaviv2470
    @tomaviv2470 2 หลายเดือนก่อน

    Hey Nir!
    I feel like its a good intro for a video about WINE 👀

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +1

      That's a good point! cool to see you in the comments section Tom :)

  • @anon_y_mousse
    @anon_y_mousse 2 หลายเดือนก่อน

    That's awesome. Has Windows always allowed you to debug it just willy-nilly like that? Maybe you could make a video on patching it, to either alter functionality or to legitimately fix bugs. It'd be cooler still if we had access to the source, but back when I was a kid we'd patch commercial applications when they had bugs and think nothing of it, so why not.

  • @montyoso
    @montyoso 2 หลายเดือนก่อน +3

    Can you make a video showing how to debug Linux using a serial port?

    • @kaankarakoc7680
      @kaankarakoc7680 2 หลายเดือนก่อน +3

      @@montyoso there is already check the video that explains how the printf function works on linux in the channel

  • @isura.m
    @isura.m 2 หลายเดือนก่อน +2

    How to acquire this much power?

  • @xlx9048
    @xlx9048 2 หลายเดือนก่อน

    like your videos, easy to understand!

  • @FARDEENKHANQWE123
    @FARDEENKHANQWE123 2 หลายเดือนก่อน

    can this be used to make gaming on linux a thing?

  • @BigPackets
    @BigPackets หลายเดือนก่อน

    Very nice

  • @fongyboy
    @fongyboy 2 หลายเดือนก่อน

    Could you do something similar and trace how the graphics stack works on Linux? I think there's a huge value in seeing how to do this kernel debug tracing and how to set up all the tools to analyze that for Linux. Thanks!

    • @fongyboy
      @fongyboy 2 หลายเดือนก่อน

      Sorry - I just noticed that you already have something similar with the dynamically debugging linux kernel :P

  • @cyberbiosecurity
    @cyberbiosecurity 2 หลายเดือนก่อน

    it felt like i was freed from a cage of not knowing how to write directly to framebuffer after 20 years of confinement.

  • @raigorxhellscream7657
    @raigorxhellscream7657 2 หลายเดือนก่อน +1

    Amazing

  • @jw200
    @jw200 หลายเดือนก่อน

    Windows (3, NT 3.51, WIN2000, 95, 98, XP) sourcecodes are available, lots of stuff (info) in there too.

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน

      Yah the leaks are indeed a very interesting source of information, also ReactOS source is helpful at times

  • @Blue-bb9ro
    @Blue-bb9ro 2 หลายเดือนก่อน +2

    עוקב אחריך תקופה, אחלה סרטונים~!

    • @yaringermon5475
      @yaringermon5475 2 หลายเดือนก่อน +2

      @@Blue-bb9ro חייב להסכים

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน +1

      מעריך!

  • @bettyswunghole3310
    @bettyswunghole3310 2 หลายเดือนก่อน

    Very interesting stuff.

  • @TheFuture36520
    @TheFuture36520 19 วันที่ผ่านมา

    Microsoft documentation is broad to read through cause of other requirements needed for implementing software development.

  • @AceixSmart
    @AceixSmart 2 หลายเดือนก่อน +3

    just curious. why do you use windows as host OS and not a linux distro?
    love you content by the way! premium quality

    • @marsovac
      @marsovac 2 หลายเดือนก่อน +18

      maybe because he wants to be able to run Premiere for video editing or doesnt want to have trouble with anti cheat in games. Or he had a bad experience with an Nvidia gpu in Wayland. But most likely because WinDbg is a windows program, and debugging a windows kernel is easier with a windows host. Anyhow let's leave the tribalism aside. He can use whatever he wants, even TempleOS.

  • @rohitjacob803
    @rohitjacob803 2 หลายเดือนก่อน +5

    I have 1 small question. Why didn't windows immediately refresh the screen with new content even after you wrote the fb with white and grey data. I thought that it followed the swap chain method, where the backbuffer gets switched and becomes the front buffer, erasing all the custom content you just wrote.

    • @Z3rgatul
      @Z3rgatul 2 หลายเดือนก่อน +5

      Windows UI code doesn't work in the same way as games do. It tries to only refresh parts of framebuffer which actually have some changes. For performance reasons. This approach does not work with 2 buffers.

    • @mradsi8923
      @mradsi8923 2 หลายเดือนก่อน +2

      @@rohitjacob803 A typical desktop application (including the desktop environment itself) doesn't change much if no user input is involved.
      Think: An uncompressed screenshot of my computer's desktop (same aspect ratio) is open on your device. If you touch nothing, will you be able to distinguish it from a real running os? Now let's say that you moved your mouse, this invalidates the pixels that correspond with previous/next mouse positions. Nothing really changed beside those few pixels, so why bother rerendering the whole UI again.
      This concept in graphics programming is called damage and is often used in event-driven desktop applications.

  • @dazealex
    @dazealex 2 หลายเดือนก่อน

    How does this work on macOS?

  • @BoganBits
    @BoganBits หลายเดือนก่อน

    Where does the debug info come from?

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน

      From pdb files which are automatically fetched by WinDbg from Microsoft's public symbols server (the default WinDbg symbol path config has Microsoft's server as part of the search), the server contains symbols for many Windows components and versions to assist debugging.

  • @jamesross3939
    @jamesross3939 2 หลายเดือนก่อน

    Wow, that's awesome.

  • @anstropleuton2
    @anstropleuton2 หลายเดือนก่อน

    When you said "win d b g", I immediately get reminded of a video by MattKC about porting housands of apps to windows 95 and his awful struggle with windbg, which lead him to pronounce it as "win dbg" (not even "debug", just pronounced as "dbg" in the most awkward way possible)
    It was so funny tho, and hope windbg isn't that bad today?

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน +1

      In my opinion windbg is a very good debugger, it is very powerful and rich :)

  • @FraztheWizard
    @FraztheWizard 2 หลายเดือนก่อน +1

    love your content

  • @gotonethatcansee
    @gotonethatcansee หลายเดือนก่อน

    have you tried ghidra with windbg

    • @nirlichtman
      @nirlichtman  หลายเดือนก่อน

      Haven't tried it with windbg, but I have a little bit with Cutter (it's one of the decompiler options)

  • @coffee-is-power
    @coffee-is-power 2 หลายเดือนก่อน

    the kernel doing the graphics is a bit cursed in my opinion, but windows is a GUI only operating system anyway so idk if that's a actually a problem or not

    • @nirlichtman
      @nirlichtman  2 หลายเดือนก่อน

      interestingly on the first release of Windows NT they had a lot of the graphical handling in user mode as part of the win32 subsystem, on the next major release they pushed it down to the kernel for performance reasons and called the kernel part win32k - the kernel side of the win32 subsystem

  • @leggysoft
    @leggysoft 27 วันที่ผ่านมา

    You'd think that by now the driver would just run on the GPU directly.

  • @SirusStarTV
    @SirusStarTV 2 หลายเดือนก่อน

    Wow, didn't know there's debugging for windows itself

  • @collapsingspace
    @collapsingspace หลายเดือนก่อน

    bro casually started debugging windows kernel 🥶

  • @BudgiePanic
    @BudgiePanic 2 หลายเดือนก่อน

    Based on this experiment it looks like the GUI isn’t redrawn completely each frame, only the “dirty” region.

    • @RatcheT2497
      @RatcheT2497 2 หลายเดือนก่อน

      not an expert on this by any means, but that method was very popular when windows was just starting to take hold in the days of ms-dos, since graphics were usually cpu driven on very slow (by modern standards at least) single core cpu's. the bandwidth to copy around entire windowfuls at a time just wasn't there to keep up a speedy pace, so only the changes were ever written to screen

    • @BudgiePanic
      @BudgiePanic 2 หลายเดือนก่อน

      @@RatcheT2497 it’s the difference between an immediate mode and retained mode graphical user interfaces

    • @RatcheT2497
      @RatcheT2497 2 หลายเดือนก่อน

      @@BudgiePanic i feel like boiling winapi down ti a retained mode user interface isn't quite enough given how weird using it can feel. it's event driven more than anything else, including repaints, though i'm nowhere near clear on the theory behind everything

  • @AMith-lv2cv
    @AMith-lv2cv 2 หลายเดือนก่อน +1

    we want more videos

  • @Montazeran8
    @Montazeran8 หลายเดือนก่อน

    🔥🔥🔥

  • @aayush_deo_ranchi
    @aayush_deo_ranchi 2 หลายเดือนก่อน

    Please try to debug windows on Rasbperry Pi 4 as it will be ARM64 flavour of windows

  • @bluescorpian
    @bluescorpian 2 หลายเดือนก่อน

    very cool

  • @GameBacardi
    @GameBacardi 2 หลายเดือนก่อน

    Nice