@@sphaerophoriaYou could just transfer video data-rendered offscreen on the main computer-to the microcontroller to display it on the LED grid (perhaps using I2C).
Makes me feel better about myself seeing a dude who can code laps around me also forget what the arguments are for memset multiple times within an hour
Anybody who is good at anything will tell you that you gotta remember the concepts and not the facts. We know what memset does but that doesn't mean we know everything about it and the arguments it requires. That's what the Internet was made more
@turboluck1023 Yeah, especially in the age if LLMs, its less valuable to remember things, instead know how the pieces fit together and the fundamental concepts so you know how to direct your searches and LLM prompts to get what you want. Reading documentation is focused on the big ideas and the examples instead of the minute details nowadays.
I don't think LLM's are good sources of knowledge but yes, it's much more practical to remember what things do instead of how to do it. it does help when you remember though
This is the linux way. "I want to make some art, I guess I need to learn how to make a paint brush, so how do I grow a tree for wood, what are bristles made of? Squids make ink, so guess I need to make a fish tank... How the fuck do I make a canvas, is that also wood?"
The fact you can easily do all of those if you want is so amazing. Because it could be (or rather is in Windows world) this: "I want to make some art, I guess I need to learn how to make a paint brush ah it's proprietary, so how do I grow a tree for wood ah damn it is licensed, what are bristles made of? Squids make ink, so guess I need to make a fish tank...ah closed source How the fuck do I make a canvas, is that also wood? Oh it's 10k dollars to get access. Well I guess I'm not doing any art."
One person already did, his name is Dylan Barrie, & that individual is the creator of the fury GPU project. & I'm about to do something like that myself, using risc-v to make a vector & opencl engine, then after that, put a 2d/3d engine in it in the form of hardware extensions/optimizations for my GPU architecture. I'm planning to give it scan-line based, volume tile forward rendering, or what I like to call, scan-lined cube rendering for the framebuffer part of the hardware based 3D engine, you know one of the hardware level GPU optimizations.
A bit more detail on the CRTC - the original PC used a Motorola 6845. Every video card for a PC created to this day still emulates this chip from 1981. You're right in that it calculates addresses. The more interesting part is that the original intention was for text modes, where things aren't quite as obvious. It has a register for character height in scanlines, so that when it's scanning out addresses into the framebuffer, it rescans the same row of characters N times, while increasing a different address offset to represent the offset in the font for the right row.
There's also /dev/fb0, with which you can skip everything and draw to the framebuffer itself. It's a lot slower and without hardware acceleration, but i used it to make a display server in PHP. So you went ahead with the dri thing... Neat.
@@whoman0385 Oh, it was a little side project, i wanted to prove it was possible. I have a recording of how it looks on my channel. (screen tearing is a recording artifact btw)
I went through something similar to your project using a raspberry pi to output gpio. Ended up doing a deep dive in writing my first linux kernel driver. The display driver dictates gpio output based on the framebuffer which is just memory mapped in userspace. Fun to see someone with more experience tackle the task!
hey i just found this channel but you are the first person to scratch that itch of excited person saying crazy shit at the hackerspace vibe that ive been wanting
Dude, I’m only 17 minutes in, and this is amazing! I love doing the same type of stuff like this, it’s fun to see a kindred spirit on UA-cam. I’m subscribing!
It's good that you gave us opportunity to learn how things are done. With libraries you don't really know what is going on under the hood. Compilation time was issue but from the other hand the purpose of this video wast to just do some very basic stuff - if you ever want to do something more complex then you can always come up with something. Like maybe map those native functions to some scripting language and then have interactive shell on your host machine that sends code to vm as soon as you stop typing and then vm automatically restarts rendering with new code. But from the other hand it may not save you much time - the amount you save from compiling would be spent on mapping C++ functions to python or javascript or whatever you like.
Yo! I haven't watched the video yet, but I love the concept. I've only tried rawdogging the X11 protocol and Wayland protocol myself (never completed a project). I hadn't even thought to go to that level. Edit @1:29 : I want to see an article titled "The Solution to The Art Problem".
not sure if it's applicable, but illegal instruction in zig is often ubisan hating you. you can add a compile flag to make it stop enabling ubsan, or you can fix the UB. if you're pulling in a library, fixing the UB can become much more of a pain
@@sphaerophoria That's so nice of you! It probably doesn't mean much in terms of support but I did subscribe. I'll hopefully be able you more meaningfully soon. Also, if it's okay to ask, how do you learn all this? I'm in the tech field and going through something like was really overwhelming and ended up not pursuing it. Like, learning rendering with vulkan for example. I hope to be as competent as you someday ❤
@@dexterman6361 To have that kind of knowledge, you need the arcane spell of old coding wizards: UTSL (check definition on wiktionary) with a little detectivistic mindset.
Hey my guy I am kinda new to Linux and shit and I was curious as if you have messed around with the Linux buffer frame? I’ve done a similar thing but with the Linux buffer frame only
Afaik the /dev/fb0 frame buffer (if it's what you're referring to) doesn't have access to the gpu to compute any 3d thing, so you have to do everything on the cpu. (Though a modern cpu will be able to do quite a lot of 3d stuff at decent framerates) You usually want to mmap the framebuffer so you can write faster without file i/o overhead. I think his goal with the video is to understand the GPU better though, and the framebuffer abstracts all that. (Btw don't get me wrong I love the framebuffer, it's imo the most straightforward way to draw stuff, just write the value you want to display on the screen)
@@sphaerophoriaI made a very rudimentary logic gate "gpu" in midinous (it's purpose made for tetris and doesn't do any 3d, but if you want to do a regular gpu it isn't that much harder, you replace all the tetris specific stuff with some vector units and just draw your vectors into the framebuffer.) You might want to look into processors, as a gpu is basically just a ton of specialized processors doing simd. Also I think you underestimate the 3d capabilities of modern microcontrollers (especially if your screen is at most 32x32) , a 2$ rp2040 is running at 133Mhz, 1993 doom can run on 25Mhz processors. I still think it's pretty cool, I should get back to that fpga with an hdmi out that I bought.
Tbf you can do decent 3d graphics on an esp32. Though something more interesting would be to coerce the npu on a bl808 (pineox64/sipeed m1s) into behaving as a gpu.
"use this", sir, this is a video. Also, AFAIK, DX12 doesn't exist on linux... unless you mean through like a dx12 -> vulkan translation layer like VKD3D. Also we aren't doing 3d acceleration. Also there is no support for anything. What do you mean?
@@sphaerophoria I am being sarcastic acting a typical Windows developer. Actually, great work. It would bridge the gap of implementing custom graphics drivers like for embedded systems.
I am a bit confused, what do you mean by making your own GPU? What about the hardware, how does that work? To my knowledge, gpu hardware is pretty different from a cpu hardware
'Graphics gems' - doing graphics the old-fashioned non GPU based way. Bresenham line& circle algorithms anyone? Btw, VGA probably the easiest 1to1 array to screen grid. Pre-vga it got awkward to max,y points to screen XY points.
If you want to actually *make* a GPU, look into FPGAs If you're a software dev, it might be hard to move into as it's more like hardware development imo But that's a good way to do it They're extremely fast and are the next best thing to custom silicon
3:02 To make a simple one, you wouldn't have to know all this As long as you keep your scope small, it would just be driving your display (or at least generating the signal for a driver circuit), then you would have it setup to do certain calculations really well So maybe you could send it some vertex coordinates, and it would draw them in wireframe for you Depending how far you go, could have it fill them for you or even shade them Look into the maths of drawing what you want to do
The nice thing about you making your own hardware, especially if you write the GPU drivers, is that you can make up everything beyond the CPU and follow absolutely no one, if you don't want to Probably should, but not imperative
As a hardware dev, it annoys be that I can't find software to upload the mux configuration on the fpga directly (or directly work with logic gates) that doesn't cost "request a quote" (aka too expensive for me) But yeah, race conditions everywhere if you aren't careful.
@@jordansprojects I'm from the Midwest and I've always said "it" or "this", never a gendered pronoun like "he" or "she". To be fair, I do the same with cars, even though a lot of people use "she"
What's the point? You could just be using Vulkan.
I feel like I gave a good explanation at 00:00
@@sphaerophoriaYou could just transfer video data-rendered offscreen on the main computer-to the microcontroller to display it on the LED grid (perhaps using I2C).
You could just use Windows. You could just oil paint on canvas. You could just close your eyes and use your imagination.
do not have fun, do not learn, do not engage in hobbies
Why build a bike when you could just use Toyota Corolla
Makes me feel better about myself seeing a dude who can code laps around me also forget what the arguments are for memset multiple times within an hour
Anybody who is good at anything will tell you that you gotta remember the concepts and not the facts.
We know what memset does but that doesn't mean we know everything about it and the arguments it requires. That's what the Internet was made more
@turboluck1023 Yeah, especially in the age if LLMs, its less valuable to remember things, instead know how the pieces fit together and the fundamental concepts so you know how to direct your searches and LLM prompts to get what you want.
Reading documentation is focused on the big ideas and the examples instead of the minute details nowadays.
no-one ever remembers which way the memset args go
Clang even tries to detect suspicious memset usage and emit a warning
I don't think LLM's are good sources of knowledge but yes, it's much more practical to remember what things do instead of how to do it. it does help when you remember though
This is the linux way.
"I want to make some art, I guess I need to learn how to make a paint brush, so how do I grow a tree for wood, what are bristles made of? Squids make ink, so guess I need to make a fish tank... How the fuck do I make a canvas, is that also wood?"
Hey, you ain't gotta call me out like that :(
The fact you can easily do all of those if you want is so amazing.
Because it could be (or rather is in Windows world) this:
"I want to make some art, I guess I need to learn how to make a paint brush ah it's proprietary, so how do I grow a tree for wood ah damn it is licensed, what are bristles made of? Squids make ink, so guess I need to make a fish tank...ah closed source How the fuck do I make a canvas, is that also wood? Oh it's 10k dollars to get access. Well I guess I'm not doing any art."
the simplest way to do it is to get a rock and another funny rock that crumbles upon friction leaving behind a trail on the other rock
@@ShadowMancerieverything is free if you know where to look
"what if we JUST made a gpu?" that's how you know this man is insane
That's the moment I realised I've got to subscribe
One person already did, his name is Dylan Barrie, & that individual is the creator of the fury GPU project.
& I'm about to do something like that myself, using risc-v to make a vector & opencl engine, then after that, put a 2d/3d engine in it in the form of hardware extensions/optimizations for my GPU architecture. I'm planning to give it scan-line based, volume tile forward rendering, or what I like to call, scan-lined cube rendering for the framebuffer part of the hardware based 3D engine, you know one of the hardware level GPU optimizations.
once you start playing with stuff like microcontrollers its usually pretty quick that you find yourself doing some fun stuff like this lol
Fun fact: Because everything is a file in linux, you can copy-paste the cpu/gpu/ram and achieve infinite performance
Could you please upload your RAM file so that I can download more RAM?
zig, linux, close to kernel development, all the things i like in one video. what a gem!
pun intended?
@@is0ss213 That information is above drm xD
aggressive yo yo yo today 😭
YO YO YO
@@sphaerophoriaIts HumpDay!!
these videos are awesome!!! thanks, man! I put them on in the background while working :)
i just love hearing the unfiltered brain train of a talented programmer :)
Two minutes in and I already know this video will be amazing
A bit more detail on the CRTC - the original PC used a Motorola 6845. Every video card for a PC created to this day still emulates this chip from 1981. You're right in that it calculates addresses. The more interesting part is that the original intention was for text modes, where things aren't quite as obvious. It has a register for character height in scanlines, so that when it's scanning out addresses into the framebuffer, it rescans the same row of characters N times, while increasing a different address offset to represent the offset in the font for the right row.
There's also /dev/fb0, with which you can skip everything and draw to the framebuffer itself.
It's a lot slower and without hardware acceleration, but i used it to make a display server in PHP.
So you went ahead with the dri thing... Neat.
display server in php? I'm sorry wtf
@@whoman0385 Oh, it was a little side project, i wanted to prove it was possible.
I have a recording of how it looks on my channel. (screen tearing is a recording artifact btw)
@@whoman0385 Should have used COBOL instead.
I went through something similar to your project using a raspberry pi to output gpio. Ended up doing a deep dive in writing my first linux kernel driver. The display driver dictates gpio output based on the framebuffer which is just memory mapped in userspace. Fun to see someone with more experience tackle the task!
Sounds really cool, do you have it up on a repo?
not *that* DRM
I fucking love you, I was looking for content like this for ages.
same
rtfm bro 😀
top tier background noise for cleaning, ty! i was thoroughly tuned out but remained interested nonetheless
banger video, i love this genre of content
hey i just found this channel but you are the first person to scratch that itch of excited person saying crazy shit at the hackerspace vibe that ive been wanting
google cant afford this guy
Dude, I’m only 17 minutes in, and this is amazing!
I love doing the same type of stuff like this, it’s fun to see a kindred spirit on UA-cam.
I’m subscribing!
You're insane. Keep up the good work. 8)
These videos are really fun to watch while doing work
Was just hanging on youtube and THIS GUY ! He just createdrivers from scratch...
Make myself feel bad about my development level 😂
Ok, Im one minute in and I already love that guy.
✨ +1 subscriber gained ✨
3:02 that abbreviation is cazy ☠️
relatable abbreviation
kms really does make me wanna kms
I was just wondering about this the other day. Thanks for explaining how you found all this information.
BASED
I like the personification of code bits. Seems helpful-- gonna try it
It's good that you gave us opportunity to learn how things are done. With libraries you don't really know what is going on under the hood. Compilation time was issue but from the other hand the purpose of this video wast to just do some very basic stuff - if you ever want to do something more complex then you can always come up with something. Like maybe map those native functions to some scripting language and then have interactive shell on your host machine that sends code to vm as soon as you stop typing and then vm automatically restarts rendering with new code. But from the other hand it may not save you much time - the amount you save from compiling would be spent on mapping C++ functions to python or javascript or whatever you like.
this is insane. respect.
you seem cool, and weirdly sociable for a linux user. subscribed
I NEEDED THIS VIDEO DOPE ASH
Gotta be the fastest vim I have seen.
Man radiates a lot of Casey Muratori energy
Funny thing is that literally a few days ago I was thinking about same idea. And then this guy just showed up
sailing in the parentha sea
I need this video. Maybe one day i can be as cracked
sheesh, these streams are fun, instasubscribed
I just recently understood how basic openGL works, this is amazing!
Subscribe just one the title alone
i dont know how or why i got this recommended but that title was too good
'it be really funny if its in millimeters', good foreshadowing. at least in xrandr its in MM so i'd hazard a guess it is the same in DRM.
Yo! I haven't watched the video yet, but I love the concept. I've only tried rawdogging the X11 protocol and Wayland protocol myself (never completed a project). I hadn't even thought to go to that level.
Edit @1:29 : I want to see an article titled "The Solution to The Art Problem".
very cool!
For local transfers, you could have used netcat.
Its crazy you were doing this as this is something I wan't to dig into myself after checking out X windows
I like the energy !
This video rules - thank you!
What’s your shell setup? Especially the plugin that shows your file system in columns like that
Valiantly watching this in case you accidentally fix some of AMD's graphics bugs on my laptop
not sure if it's applicable, but illegal instruction in zig is often ubisan hating you. you can add a compile flag to make it stop enabling ubsan, or you can fix the UB. if you're pulling in a library, fixing the UB can become much more of a pain
crazy title
I feel like this would do great as an edited down video, though I understand it would be a lot of work
I looked into it at some point and couldn't find a way to cut the vods down that I liked
very gud 👍
Wow this is SO COOL. Thank you for sharing!
Are the videos planned to be uploaded on youtube? Like, with a delay or something for non-subscribers?
I try to keep the paywalled stuff as supplemental content. You should be able to track whatever were working on just fine without it
@@sphaerophoria That's so nice of you!
It probably doesn't mean much in terms of support but I did subscribe. I'll hopefully be able you more meaningfully soon.
Also, if it's okay to ask, how do you learn all this? I'm in the tech field and going through something like was really overwhelming and ended up not pursuing it. Like, learning rendering with vulkan for example. I hope to be as competent as you someday ❤
@@dexterman6361 To have that kind of knowledge, you need the arcane spell of old coding wizards: UTSL (check definition on wiktionary) with a little detectivistic mindset.
tfw i know i wont ever be this good
cool stuff!
How are you doing that minimize-maximize looking thing in tmux? In another word, are your dotfiles available? ;) awesome stream btw
No dotfiles, but I think it's just prefix + z (see man tmux)
Hey my guy I am kinda new to Linux and shit and I was curious as if you have messed around with the Linux buffer frame? I’ve done a similar thing but with the Linux buffer frame only
Afaik the /dev/fb0 frame buffer (if it's what you're referring to) doesn't have access to the gpu to compute any 3d thing, so you have to do everything on the cpu.
(Though a modern cpu will be able to do quite a lot of 3d stuff at decent framerates)
You usually want to mmap the framebuffer so you can write faster without file i/o overhead.
I think his goal with the video is to understand the GPU better though, and the framebuffer abstracts all that.
(Btw don't get me wrong I love the framebuffer, it's imo the most straightforward way to draw stuff, just write the value you want to display on the screen)
I would rather make my own GPU on mister board or any other fpga.
But this was a great stream. Cheers!
Just to be clear, this is in the long term plans, I just want to get more familiar with the GPU world to make sure I design it right (enough)
@@sphaerophoria Kinda figured it out. You were getting too many FPGA Ads on web links. Btw your streams are way too cool. Keep it up!
@@sphaerophoriaI made a very rudimentary logic gate "gpu" in midinous (it's purpose made for tetris and doesn't do any 3d, but if you want to do a regular gpu it isn't that much harder, you replace all the tetris specific stuff with some vector units and just draw your vectors into the framebuffer.)
You might want to look into processors, as a gpu is basically just a ton of specialized processors doing simd.
Also I think you underestimate the 3d capabilities of modern microcontrollers (especially if your screen is at most 32x32) , a 2$ rp2040 is running at 133Mhz, 1993 doom can run on 25Mhz processors.
I still think it's pretty cool, I should get back to that fpga with an hdmi out that I bought.
Tbf you can do decent 3d graphics on an esp32.
Though something more interesting would be to coerce the npu on a bl808 (pineox64/sipeed m1s) into behaving as a gpu.
Hi can you tell me how to get started with implementing the GPU i am a Beginner please Help as i Find it very Interesting
I was gonna use this but no Direct X12 support.
"use this", sir, this is a video. Also, AFAIK, DX12 doesn't exist on linux... unless you mean through like a dx12 -> vulkan translation layer like VKD3D. Also we aren't doing 3d acceleration. Also there is no support for anything.
What do you mean?
@@sphaerophoria I am being sarcastic acting a typical Windows developer. Actually, great work. It would bridge the gap of implementing custom graphics drivers like for embedded systems.
oh rofl, I should have known
I am a bit confused, what do you mean by making your own GPU? What about the hardware, how does that work?
To my knowledge, gpu hardware is pretty different from a cpu hardware
What are the odds of doing this kind of stream for VAAPI? I've never been able to make sense of it.
Modern GPUs probably have microcode or µOps or whatever they call it or schedulers running. It's just fluff but could be interesting.
The adhd is strong with this one lol
Another day dreaming of AV1 for streamers... Text will be soooo clear after the switch
Some really cool books about some of the hardware and the software for doing graphics without a graphics card. VGA anyone?
'Graphics gems' - doing graphics the old-fashioned non GPU based way.
Bresenham line& circle algorithms anyone?
Btw, VGA probably the easiest 1to1 array to screen grid. Pre-vga it got awkward to max,y points to screen XY points.
I absolutely want your vim config
awesomeee
If you want to actually *make* a GPU, look into FPGAs
If you're a software dev, it might be hard to move into as it's more like hardware development imo
But that's a good way to do it
They're extremely fast and are the next best thing to custom silicon
3:02 To make a simple one, you wouldn't have to know all this
As long as you keep your scope small, it would just be driving your display (or at least generating the signal for a driver circuit), then you would have it setup to do certain calculations really well
So maybe you could send it some vertex coordinates, and it would draw them in wireframe for you
Depending how far you go, could have it fill them for you or even shade them
Look into the maths of drawing what you want to do
For designing semi complex HDL systems, I personally like MATLAB Simulinks HDL coder, which is a nice visual way to create your modules
The nice thing about you making your own hardware, especially if you write the GPU drivers, is that you can make up everything beyond the CPU and follow absolutely no one, if you don't want to
Probably should, but not imperative
But ofc you lose compatibility
As a hardware dev, it annoys be that I can't find software to upload the mux configuration on the fpga directly (or directly work with logic gates) that doesn't cost "request a quote" (aka too expensive for me)
But yeah, race conditions everywhere if you aren't careful.
hahahhaha, its a man problem.... the decorating... I dont mind bare walls either apparently
you type like lightning holy shit
Kudos 2 u
Have you thought about starting a discord?
would really love for the source code :)
This guy types so ridiculously fast how does he do it
1:27:41
-rep, didn't use HolyC, graphics not blessed
If you're going to dog linux graphics anyway
Lmao.
Are you from Newfoundland? I ask because I noticed you use "he" as a pronoun for some nouns.
I also noticed they say "he uses" and "this guy", when I'd normally use "it uses" and "this"
I notice network chuck does that too lol
That's also something people who's native language uses gendered pronouns for objects do. (E.g. French, German, Spanish )
Something kind of quirky Americans in general do as well. I do the same and I learned it from my mom.
@@jordansprojects I'm from the Midwest and I've always said "it" or "this", never a gendered pronoun like "he" or "she". To be fair, I do the same with cars, even though a lot of people use "she"
What distro is this?
NixOS it seems but the look of a distro isn't strictly defined by what distro it is. Looks like they're using KDE Plasma as a desktop.
how do you delete whole words while in insert mode?
+1
(ctrl + w) for deleting whole word on left side of cursor
@@spodarman3823 Oooh is this where the "Close Tab" shortcut in current browsers stems from?
ctrl+backspace in normal editors
what terminal r u using and how did u made it kali style command line
Alacritty plus tmux it looks like
What does "kali style" even mean?
you can just steal the .bashrc of any distro you like the bash config of.
Great idea! One of the next projects could be writing some LLM and train it/do inference on custom gpu. Would be so fun as well.
What's the point? You could just be using nano.
Based KDE user
Really don't appreciate the unnecessary swearing. Otherwise, good stuff.
alright soft ears
You clicked on a video called "raw dogging " it's par for the course really.
I played with DRM from Rust using ioctl's.