klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
_whitelogger has joined #osdev
PapaFrog has joined #osdev
zhiayang has joined #osdev
nanovad has joined #osdev
eck has joined #osdev
wblue has joined #osdev
jstoker has joined #osdev
vai has joined #osdev
nvmd has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
mavhq has quit [Read error: Connection reset by peer]
<clever> ive tied tinyusb into my usb-host driver, and it seems to have no trouble with a usb hub, its able to read the device/config descriptors, read the interrupt endpoint, detect a device on port 1, and initiaite reset on port 1
<clever> its then having issues reading the descriptor on that device
<clever> it sends the setup, reads the 8 byte descriptor, then sends a 0-length OUT to ack it, and gets a transaction error
<clever> is there anything special about talking to a HS device behind a HS hub?
<clever> the 8 bytes of descriptor i get, does look valid
vdamewood has joined #osdev
duderonomy has joined #osdev
<vai> OEMs should do USB
<clever> vai: i'm trying to replace the OEM firmware
brynet has joined #osdev
vai has quit [Quit: leaving]
vai has joined #osdev
vai has quit [Client Quit]
vai has joined #osdev
<SGautam> neofetch almost seems to work heh https://usercontent.irccloud-cdn.com/file/rDBSdYn3/image.png
mavhq has joined #osdev
mhall has quit [Quit: Connection closed for inactivity]
nvmd has quit [Quit: WeeChat 3.8]
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
<bl4ckb0ne> klange: i remember those atom netbooks, i think i still have mine somewhere
<bl4ckb0ne> got mine from school with a fresh ubuntu on it, i remember people complaining about it and trying to install window 7 on it
<klange> I bought one because I had contributions to Ubuntu and it was so neat to buy a computer that had some code I wrote already on it from the factory.
<klange> And then I won one as a prize for a programming competition - it was a lower-spec model, but I couldn't get rid of it because it had sentimental value.
<klange> So now I still have both of them, sitting in a closet somewhere.
wblue has quit [Quit: wblue]
<klange> Dell Mini 9 (aka Inspiron 910 in some markets). Used both of them in uni until I got my T410 that now serves as my primary hardware test rig.
<bl4ckb0ne> cant remember the model but it was dell as wekk, with a whooping 2ghz dual core and 1gb of ram
<bl4ckb0ne> there was a bug in the defauot wifi driver and i made a bit of money fixing everybody's laptop
<bl4ckb0ne> i think i still have it somewhere in a box but it has a french plug
vai has quit [Ping timeout: 240 seconds]
MiningMarsh has quit [Ping timeout: 245 seconds]
PapaFrog has quit [Quit: ZNC 1.8.2+deb2 - https://znc.in]
vai has joined #osdev
PapaFrog has joined #osdev
nyah has quit [Quit: leaving]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
goliath has quit [Ping timeout: 245 seconds]
<geist> yup i still have my mini 9 too
<geist> got a replacement battery for it last year or so for some reason
<geist> though i never use it
<klange> I am a sentimental packrat and can't get rid of them (plus it's not like I could sell them anyway, and they'd cost money to throw out)
gog has joined #osdev
<bl4ckb0ne> its always good to have a x86 test rig somewhere
<klange> That's why there's a T410 on the shelf behind me.
<bl4ckb0ne> true that
<bl4ckb0ne> nice i7
<clever> geist: ive linked tinyusb into my usb host driver, and its able to query some descriptors and turn the hub on, but the ack phase of fetching a device descriptor is failing now, for a device behind a usb hub any idea why?
<klange> With an SSD and good blast with compressed air, it's still a viable machine today even running latest Ubuntu, but it mostly just runs Toaru off a USB stick.
<geist> clever: hmm no idea off hand
<clever> during the setup phase, i send "get device descriptor", and during the data phase, i get what looks like a valid dev desc, with a class of 0xff
<clever> but then the 0-byte ack at the end of control-in, fails
<clever> but i have gotten further before, and was able to see the vid/pid, but as i fixed various bugs, it seems to have gone backwards
<geist> hmm, wish i had a little pushbutton at the end of a 2 pin plug, for a remote reset
<geist> with a few feet of wire between
<clever> i just stole the power/reset buttons out of old PC cases
<geist> yah i’m htinking of doing exactly that. i moved my commanderx16 into a case i had that fits it nicely *except* it doesn’t have a reset button
<geist> which you need a lot
<clever> yeah
<clever> ive got a reset button on my rpi, in a drawer
xenos1984 has quit [Read error: Connection reset by peer]
goliath has joined #osdev
<clever> and the reset hangs out, just above my keyboard
<clever> so i can easily whack it after any compile
<geist> yeah i guess i’ll scrounge around in an old case somewhere
<geist> this is a little thin AV center like flat antec case from the early 2000s
<geist> kinda like a VCR
<geist> nice except no reset button
heat has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
<vai> I think most OS projects use Grub?
<vai> I looked at a tutorial it looked simple. I am just unaware of the memory map it puts in.
<klange> Grub implements several boot protocols, so you're never simply "using grub".
<klange> The most common one for tutorials to use is the old multiboot1 standard, which has issues that were largely addressed by multiboot2.
<klange> multiboot1 is still common, though, because there are far more implementations of it - including the -kernel command line flag in QEMU.
<klange> The memory map format isn't too different between the two, and both are derived from the format of the e820 BIOS call format.
gog has quit [Ping timeout: 240 seconds]
SGautam has quit [Quit: Connection closed for inactivity]
PapaFrog has quit [Quit: ZNC 1.8.2+deb2 - https://znc.in]
PapaFrog has joined #osdev
randm has quit [Ping timeout: 246 seconds]
gorgonical has quit [Ping timeout: 252 seconds]
randm has joined #osdev
immibis has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
heat has quit [Remote host closed the connection]
heat has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
<sham1> Multiboot2 can do things like locate acpi stuff for you, because of course that's no longer as simple as it used to be, since UEFI does its own thing
<zid> Just search the entire memory map for the sig, gg
<klange> My own loader uses multiboot1 but cheats and sticks the ACPI table address in one of the outdated system table fields, which is honestly what EFI multiboot1 implementations probably should have been adjusted to do anyway.
<sham1> All 2^64 bytes of address space. Yeah nah
<zid> I said memory map not address space
<zid> also there's only 2^48
<klange> And even if you did say address space, you don't get 2^64th-
<zid> and only 2^47 really usable for phys imo
<moon-child> acpi is easy with uefi
<moon-child> you just say 'hey efi, where's the acpi?'
<zid> it's easier without it
<moon-child> and it says 'right here'
<moon-child> done
<zid> I could write some code to interface uefi, or I could write a for loop
<moon-child> https://0x0.st/HeqX.txt literally it
<zid> see, it's a floor loop AND a guid thing
<zid> more code and harder
<zid> floor? for
<klange> I shove it in `config_table` which is supposed to hold the "ROM configuration table" address returned by "the GET CONFIGURATION BIOS call".
<zid> Needing more than 'the e820 memcpy'd to somewhere' is just greedy
<klange> (And yes I realize this is a 32-bit field, I'm comfortable with assuming it'll fit there at least for the foreseeable future)
<zid> I mean, it'd mean the machine wasn't bootable 32bit if it didn't fit
<zid> so I also feel comfortable that my bootstrap is mainly 32bit fields also
<zid> also
<klange> (and if someone tells me their ACPI tables are above the 4GiB mark in the dark x86-S future and I haven't switched to implementing multiboot2, I'll shove the rest of it in the apm_table field because that is equally useless)
<zid> I'll just tell them to get a bios that works right
<sham1> Yeah, APM is useless because ACPI exists
<sham1> IIRC APM wasn't as programmable
<sham1> And can't even use it in 64-bit mode
leon has quit [Quit: see you later, alligator]
leon has joined #osdev
zxrom_ has joined #osdev
zxrom has quit [Ping timeout: 246 seconds]
zxrom_ is now known as zxrom
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
slidercrank has joined #osdev
kof123 has joined #osdev
SGautam has joined #osdev
danilogondolfo has joined #osdev
CaCode has joined #osdev
<kazinsal> alright this is a long shot but is anyone here running 86box under windows 11 with npcap networking enabled? I can't seem to get 86box to recognize npcap at all
<kazinsal> pre-empting any "hurf blurf windows user git gud linux on the desktop 2065"
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
Burgundy has joined #osdev
<Cindy> hurf blurf windows user git gud linux on the desktop 2065
<sham1> Linux on the desktop 2023
<SGautam> it seems that vim is sending me repeating characters to the terminal
<SGautam> e.g. when I type in "int" I get "i" and "n" from the program as expected, but when I type in "t" I get a full green (syntax highlighted) "int" without any backspace to the original "i" "n" that got printed.
<kazinsal> install vscode
<zid> Sounds like it replaced it with a syntax hilighted one
<zid> and you misparsed whatever it used to type-over the original
<SGautam> this is the raw output
<SGautam> It sends "i", then "n", and then "int" (syntax highlighted) without backspacing the original
<kazinsal> maybe your terminal isn't respecting ^W
<SGautam> oh
<zid> can you get whatever that is to print esc as \e or ^
<zid> that's really hard to read lol
<sham1> That really is a bulgy vim
<kazinsal> it's likely that vim is sending a ^W or some VT escape for the equivalent before printing the color magic and then int
<zid> Yea it looks like it's designed for an AESTHETIC VIDEO GAME
<zid> like pony island
<SGautam> oh yeah, I was not handling \r
<zid> rofl
<zid> that'd do it
<SGautam> hmm, I've always wondered how does one interpret \t?
<kazinsal> always handle your escape codes
<SGautam> Right now I just move the cursor_x by 4
<SGautam> But that's not correct
<zid> It aligns to 8 I think?
<kazinsal> yeah usually it's align to 8
<SGautam> ah
<kazinsal> I don't have a VT100 manual handy
<kazinsal> but the general acceptance is that your control codes should be compliant to emulating what a VT100 would do
<zid> (x+7)&~7
<zid> or something
<zid> +8?
<kazinsal> said acceptance is like, circa 1982 but
<kazinsal> terminal emulation is pretty fucking dire
<zid> Yea it's all voodoo
<zid> just "do it like other things do it if you want to be compatible with them"
<zid> cargo cult terminals
<kazinsal> kind of the reason I haven't much cared about doing a full VT compatible terminal in any OS project I've done
<kazinsal> I would rather something like PuTTY take care of it
<kazinsal> I just care about outputting codes that make sense
<zid> yea that's why libtermcap and shit exist
<kazinsal> if you install a new Cisco box in a rack it doesn't emulate a VT100 over a serial port, it just blasts VT100 codes at whatever baud you tell it to
<SGautam> it's fun though
<zid> yea I half write some of one
<zid> to be able to parse nethack
<SGautam> Especially if your terminal output is GL, you can do so many effects with it and make the terminal look cool
<sham1> This is why I dislike terminals. The protocol is terrible
<zid> TELNET is the good protocol
<zid> IAC WILL fuck off IAC
<kazinsal> any competent software MUST tell me I am a sexy catboy god
<zid> IAC WONT catboy IAC
<sham1> Competent software don't lie
<kazinsal> nya~
asymptotically_ has joined #osdev
vai has quit [Ping timeout: 244 seconds]
vai has joined #osdev
GeDaMo has joined #osdev
gog has joined #osdev
mhall has joined #osdev
Terlisimo has joined #osdev
[itchyjunk] has quit [Ping timeout: 245 seconds]
[itchyjunk] has joined #osdev
eroux has quit [Ping timeout: 245 seconds]
eroux has joined #osdev
<zid> if I see any competent software I'll let you know
vai has quit [Ping timeout: 245 seconds]
freakazoid332 has quit [Ping timeout: 250 seconds]
Left_Turn has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Max SendQ exceeded]
Turn_Left has joined #osdev
merry has quit [Quit: ZNC - https://znc.in]
Left_Turn has quit [Ping timeout: 264 seconds]
danilogondolfo has quit [Quit: Leaving]
heat_ has quit [Remote host closed the connection]
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
<gog> hi
<gog> i write perfect software every time
<gog> i am a flawless developer
<zid> I too write flawless software, by which I mean I write 1 or 2 lines a year
<zid> I think very hard about them first okay?
<zid> /* Netx line calcultes parity of b */
<zid> parity ^= a;
<sham1> We need ChatGPT in the compiler which can then look at the comment and see that you done goof'd
sortie has joined #osdev
<zid> Yea that was my one suggestion for LLM on code
<zid> using it like a linter pass to suggest comments that are wrong
<zid> Basically like /* Fallthrough */
<zid> or pointing out things that are probably UB, etc
<SGautam> hm
<SGautam> cmd.exe accepts \r\n but wsl.exe accepts \n (\r\n leads to two newlines)
<zid> yep
<zid> windows line endings have been \r\n for forever and unixes have been \n for forever
<SGautam> With cmd.exe \n doesn't lead to a newline, it just doesn't work
<zid> that's why C++ has that stupid 'endl' thing
<SGautam> The problem for a terminal emulator is to determine what to send when a return key event is triggered from the OS
<GeDaMo> Old Macs used to use just \r
<sham1> Well endl also does more than just newline
<sham1> It also flushes
<zid> (so does \n in C)
<SGautam> Because if the shell is cmd.exe, \r\n needs to go, if it's wsl.exe only \n needs to go.
<sham1> Anyway, I keep getting disappointed whenever I read stuff in the forum
<SGautam> Is there a standard way to query the shell program, or do I do something hacky like if(strcmp(shell_command, "cmd") > 3) cuz I don't think anything except Windows cmd uses \r\n.
<SGautam> *strncmp(shell_command, "cmd",3)
<sham1> Well, some of the boards are nice, but the basic "OS Development" board is just annoying. So many clueless people asking questions
<SGautam> Even Powershell accepts \n
<zid> cmd isn't vt100 compatible
<SGautam> Yah but terminal apps handle it
<zid> so connecting conio to a vt100 won't do the right thing, end of story
<zid> CONHOST, whatever it is
MiningMarsh has joined #osdev
<SGautam> The UNIXization of Windows is an interesting phenomenon.
<zid> Pretty normal for windows
<zid> It's been their MO for nearly 30 years
<SGautam> I feel like my coding style is shitted up coz of that
<SGautam> Half my code looks like UNIX C while the other half is HRESULT HANDLE CreateConsoleWindowA
<SGautam> But it's really cool how preserved it is, they still have defines for far and near ptr even though they expand to nothing
<SGautam> sham1: in age of react.js we should be welcoming to new comers
<SGautam> Osdev is a really niche hobby
<sham1> Well I don't see what relevance react has with this
<sham1> Also, I have nothing against being welcoming. I'd just expect the newcomers to read at least some parts of the relevant ISA documentation
<SGautam> I think it was always like that lol. I remember Combuster would flame newcomers for asking stupid questions.
<zid> osdev attracts a lot of people who shouldn't be near a running computer
<zid> lest they decide to operate it by smacking it with their shoe
<zid> HOW I MAKE OPERAT SYSTIM?
<SGautam> I remember there was this niche subculture in the .NET programming community of creating "Virtual OSes".
<SGautam> Basically a full screen .NET WPF/WinForms program that was just simulating a fake desktop.
<SGautam> Good times
<SGautam> There is IL2CPU that compiles .NET code to C#, but it doesn't provide any of the Windows forms / WPF features obviously, and the IL2CPU guys had to create a pinned post on their forum explaining that your Windows forms application will not even compile because so and so.
<SGautam> *.NET code to x86
LibreTown has joined #osdev
LibreTown is now known as Lian
Terlisimo has quit [Quit: Connection reset by beer]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
CaCode has quit [Quit: Leaving]
Terlisimo has joined #osdev
nyah has joined #osdev
dutch has quit [Quit: WeeChat 4.0.1]
<mcrod> hi
<Lian> hey there
<Ermine> Hello there?
<Ermine> s/?//
<mcrod> Ermine may I pet you
<Ermine> mcrod: no
<mcrod> :(
* mcrod does not pet, but cries
<Lian> isnt quite on topic but... for job related puposes... does anyone have any up to date documentation or books on how to develop programs for CDE/Motif in 2022?
<Lian> s/puposes/purposes
vai has joined #osdev
dutch has joined #osdev
kfv has joined #osdev
Left_Turn has quit [Ping timeout: 246 seconds]
<gog> why are ou programming for CDE in 2022?
<gog> it's 2023
zxrom has quit [Quit: Leaving]
<Lian> Because 2022 was the last version of CDE
<sham1> We have a time traveller!
<Lian> :P
<Lian> Okay, fair, I am looking for documentation in 2023 on how to work with a modern CDE/Motif system and develop an application for it. It doesn't have up to date documentation and save for scouring through existing sourcecode and making do, I don't see a way
<vai> hello folks
<gog> has lesstif been maintained and compatible still?
<gog> if so their docs are probably just as good
<mcrod> wtf is CDE
<gog> oh nope it's defunct
<gog> mcrod: common desktop environment
<gog> commercial unix stuff
<mcrod> weird
<mcrod> gog: please pet
* gog petpetpetpetpetpte mcrod
* mcrod prr*6
<Lian> It's LGPL now
<Lian> I am required by my job to write a commercial application for a CDE/Motif system from scratch, and I get training funds too for learning how to
<Lian> The most comprehensive resource i can find is a book from 1993, and the standard has changed since
<gog> will they pay for a license so you can get the docs?
<gog> if they're requiring you to, then they have to imo
<Ermine> If there's no up to date docs then the only way you have is to read sources
<Lian> It's integrated in a free software only environment and they expect me to make do as it is; after all CDE and Motif are both LGPL
<Lian> I am wondering if there are docs, like in a book somewhere
zxrom has joined #osdev
<Lian> The only money they're willing to shell out is on working hours for me and two colleagues, but they're more junior than me and have never touched CDE
<mcrod> Lian you might be under NDA but what the hell are you doing that requires you to write for CDE/Motif?
<mcrod> you may refuse to answer with no dishonor
<Lian> :D
<mcrod> (secretly, Lian is developing a new GUI for nuclear launch platforms)
<Lian> We have some programs in prod that were written before my time specifically for my company, and we cannot move away from them lest we commission an entirely new one
<Lian> its a very niche industry with no big standards and very specific requirements for individual companies
<Lian> so basically every company has their own in house dev team
<mcrod> hm, that's even weirder than what I do
<mcrod> vending machine stuff
<Lian> ours runs on Motif on workstations with up to date Debian running CDE
<Lian> It's a dream come true for me as a retro computing enthusiast but now that I gotta dev for it... man
<Lian> Vending machine kiosk systems?
<mcrod> i work on only one component of a vending machine, there are several; the thing that you put money into to buy a $2 coca-cola, that's me
<Lian> Damn x)
<Lian> in Europe? Might have used it then
<mcrod> mostly in the US
<mcrod> but we are by far one of the largest providers of stuff like that, so perhaps internationally
<mcrod> it's embedded development so it's fun
<Lian> aye fair x)
<Lian> I think I might write the Motif software using Tcl/Tm, the Motif bindings for Tcl
<Lian> They have docs.
<mcrod> i have PTSD from Tcl from my old job
<Lian> aww why
<mcrod> they used it for things that it should not be used for
<mcrod> using Tcl in a machine that is supposed to be accurate down to a speck of dust is not a good idea.
<mcrod> not because of the *language*
<mcrod> but because it is much harder to verify things in Tcl as being 'correct'
slidercrank has joined #osdev
<Lian> Okay, fair, yeah I can imagine
<Lian> Tcl is good for fast iteration and writing graphical applications on a whim
<Lian> but definitely not for something that needs to be 100% verifiable and everything falling in place precisely
<mcrod> if it were up to me, that whole machine would've been custom made from scratch, PCBs and all
Left_Turn has joined #osdev
<mcrod> using an RTOS
<mcrod> through and through, but that wasn't my call.
Left_Turn has quit [Ping timeout: 245 seconds]
<Lian> Gotta go, unfortunately.
<Lian> Thanks for the chat :)
Lian has quit [Quit: This Konversation is over!]
<GeDaMo> uh ... I was just going to link http://www6.opengroup.org/openmotif/docs/ for Lian :/
<bslsk05> ​www6.opengroup.org: Open Motif - Documentation Supplement
<GeDaMo> They seem to be from 1997
<sham1> You can give the link to Lian when they return
<GeDaMo> I'll use memoserv
shittyhills has joined #osdev
danilogondolfo has joined #osdev
shittyhills has quit [Quit: WeeChat 3.8]
Left_Turn has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
zxrom has quit [Ping timeout: 244 seconds]
eddof13 has joined #osdev
xenos1984 has joined #osdev
eddof13 has quit [Client Quit]
eroux has quit [Ping timeout: 246 seconds]
Yoofie3 has joined #osdev
Yoofie has quit [Ping timeout: 245 seconds]
Yoofie3 is now known as Yoofie
kfv has quit [Quit: Textual IRC Client: www.textualapp.com]
zxrom has joined #osdev
frkzoid has joined #osdev
<gog> operating system s freebsd development
gog` has joined #osdev
eddof13 has joined #osdev
eroux has joined #osdev
vai has quit [Ping timeout: 244 seconds]
goliath has quit [Quit: SIGSEGV]
<SGautam> Apparently ESC[49m falls back to the default color
<SGautam> bruh
zxrom has quit [Ping timeout: 244 seconds]
<SGautam> nowhere is this written but thats what I'm seeing programs outputting and everything falls into place with this assumption
<GeDaMo> It's on Wikipedia
<GeDaMo> Although it says implementation defined
zxrom has joined #osdev
<mcrod> my back hurts.
<GeDaMo> I find that a good walk can help with my back
<mcrod> i might in a bit
<mcrod> i'm also thinking about trying i3 out again
<mcrod> but each time I do I want to beat myself up
<gog> i'm going to continue being a plasma and floating window manager scrub
<gog> because i'm not a fuckin nerd
<mcrod> gog
<mcrod> i need a preemptive hug for the sins i am about to commit
[_] has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
frkzoid has quit [Ping timeout: 246 seconds]
* gog hug mcrod
* mcrod hug gog
<gog> what are you doing
<gog> oh i3
<mcrod> trying i3 again
<gog> yeh
<gog> have fun nerd
<mcrod> in case i3 consumes me
<mcrod> i love you
<mcrod> <3
<gog> ilu2 <3
xenos1984 has quit [Ping timeout: 258 seconds]
<Ermine> gog: may I pet you
xenos1984 has joined #osdev
<gog> Ermine: yes
* Ermine pets gog
* gog prr
CaCode has joined #osdev
goliath has joined #osdev
* sham1 is a fucking nerd
<mcrod> this USB drive gets... incredibly hot
<mcrod> so hot that in fact I cannot hold it in my hands for very long
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #osdev
FreeFull has joined #osdev
xenos1984 has quit [Ping timeout: 264 seconds]
gog has quit [Quit: Konversation terminated!]
gog` has quit [Ping timeout: 244 seconds]
gorgonical has joined #osdev
<gorgonical> I really want to continue my forth interpreter and build it up into something else but I am totally overwhelmed by possibility and what to do next
vdamewood has joined #osdev
danilogondolfo has quit [Quit: Leaving]
<GeDaMo> Graphics? Networking?
[_] is now known as [itchyjunk]
zxrom has quit [Ping timeout: 244 seconds]
xenos1984 has joined #osdev
zxrom has joined #osdev
gildasio has quit [Ping timeout: 240 seconds]
gildasio has joined #osdev
frkazoid333 has joined #osdev
nvmd has joined #osdev
<gorgonical> Right now, as an interpreter, it basically just understands memory and the CPU. So no userspace support and exception handling is even kind of weak. I guess I should improve that. I was thinking adding filesystem support would be interesting. To persist words and definitions to storage
gog has joined #osdev
<gog> zid
<gog> vga text mode is typically configured by an option rom on the vga adapter. it's possible in some cases that the option rom is executed and vga text console will work, and possible to make it work
<SGautam> What was the ANSI escape sequence for when a data is pasted into a terminal so that the shell doesn't render it as is
<SGautam> I remember seeing it
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
<SGautam> Ah
<SGautam> ESC[200~ and ESC[201~
zxrom has quit [Ping timeout: 252 seconds]
zxrom has joined #osdev
<FireFly> is that bracketed paste? I think
<SGautam> Yup
<SGautam> https://files.catbox.moe/tfuclh.mp4 I think I'll stop working on this now
<FireFly> *nod*
<gog> meow
<sham1> THE TENSORS! THEY'RE FLOWING!
<gog> o:
gorgonical has quit [Ping timeout: 240 seconds]
<SGautam> It really baffles me how noone has thought of linking OS dev and ML yet
<SGautam> But I guess that's got to do with the fact that compute shaders for GPUs require an underlying working GPU driver
<sham1> Could do ML without GPUs. It's inefficient as hell, but you can do it
<SGautam> It could be an interesting exercise though, writing an OS that just executes a shader.
<SGautam> I think the Intel ""cards"" are somewhat documented
<SGautam> Could start there
<sham1> Yeah, you could, but even to get the Intel iGPUs to do stuff takes a lot of supporting infrastructure
<gog> machine learning is pessimal
<sham1> It's actually very optimal
gorgonical has joined #osdev
<gorgonical> Wait I think the DTB for the rk3399 just doesn't say where the memory is
<gorgonical> Are you kidding me
<gog> "there is no memory lol good luck"
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shittyhills has joined #osdev
eddof13 has joined #osdev
<clever> gorgonical: are you looking at the raw dtb on disk, or the dtb the bootloader passed you?
<gorgonical> clever: I hadn't considered that uboot may be patching the memory regions in
<clever> the rpi does similar, the dtb on-disk claims reg = < 0x00 0x00 0x00 >;
<clever> because the ram is detected at runtime, by probing the ram itself
<clever> and the size can vary from board to board
<gorgonical> I don't even see a memory node in the DTB
<gorgonical> Would the bootloader patch in a whole node?
<clever> probably
<clever> to start with, assume no memory, create a .data big enough for you to print the dtb to a uart
<clever> then you can debug, and expand from there
<clever> i saw .data, because .bss isnt included in the kernel, and then the bootloader may put something too close after the kernel
<clever> say*
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
<shittyhills> gog: what is this cursed syntax? object_space_base = (unsigned char *)-page_size(2);
<sham1> Two pages from the end of the address space
<shittyhills> what? what is being casted to unsigned char pointer?
<sham1> Remember, we're in mod 2^(address-space-bits)
<shittyhills> i dont get it
<sham1> Well, let's assume that page_size is 4096
<sham1> So page_size(2) == 8192, so we get -8192
<shittyhills> so the cast is for 0?
<sham1> No
<shittyhills> OH
<shittyhills> its negative page_size
<shittyhills> i thought it was minus
<shittyhills> as in subtraction
<sham1> Well negation is just subtracting from zero, but yeah, it's -8192
<shittyhills> ok thanks
goliath has quit [Quit: SIGSEGV]
particleflux_ has joined #osdev
energizer_ has joined #osdev
mcrod_ has joined #osdev
woky| has joined #osdev
slidercrank has joined #osdev
<shittyhills> gog: "this code sucks and should not be used under any circumstances", what sucks about it so much?
staceee has quit [*.net *.split]
tommybomb has quit [*.net *.split]
divine has quit [*.net *.split]
stux has quit [*.net *.split]
Benjojo has quit [*.net *.split]
mcrod has quit [*.net *.split]
woky has quit [*.net *.split]
particleflux has quit [*.net *.split]
energizer has quit [*.net *.split]
sebonirc has quit [*.net *.split]
froggey has quit [*.net *.split]
mcrod_ is now known as mcrod
vai has joined #osdev
<zid> heat, WIDESCREEN REFORMATION
sebonirc has joined #osdev
staceee has joined #osdev
tommybomb has joined #osdev
Benjojo has joined #osdev
froggey has joined #osdev
<moon-child> except that the address space starts at -2^48, not 0
<moon-child> err
<moon-child> -2^47
gildasio has quit [Remote host closed the connection]
<zid> that's just like, your opinion, man
gildasio has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<geist> i got yer address space right here
wblue has joined #osdev
divine has joined #osdev
dutch has quit [Quit: WeeChat 4.0.1]
<gog> shittyhills: i wrote it
stux has joined #osdev
<gog> i'm a mediocre to poor programmer
<gog> i'm not even a programmer at all
<gog> i'm three cats in a trenchcoat
<gog> i'm a fraud and my life is a lie
<shittyhills> you figured out all that memory crap and whatnot, how the fuck are you a poor programmer? then what am i?
<gog> it's self-deprecation
dutch has joined #osdev
<gog> i use it as a means to temper my arrogance
vdamewood has quit [Remote host closed the connection]
<gog> i have an egotistical streak and i'm trying to work on it
<gog> now my wife wants to watch mroe star trek so bbl
CaCode has quit [Quit: Leaving]
vdamewood has joined #osdev
<shittyhills> thanks for making me feel like a clown
<mcrod> i am still setting up i3.
<mcrod> i am still alive
<mcrod> but barely
<mcrod> first thing's first: nitrogen is a huge piece of shit
<mcrod> second thing is the land of endless config files is killing me
<mcrod> and why, why oh why, does there seem to be no way to prevent XF86AudioRaiseVolume from going above 100%
<zid> vlc does >100% volume it's handy
<zid> it compresses the audio
<mcrod> i don't care what it does
<mcrod> i don't want it
shittyhills has quit [Read error: Connection reset by peer]
terminalpusher has joined #osdev
<mcrod> colors are worthless
<mcrod> colored-man-pages isn't working on zsh
<mcrod> wtf
<moon-child> gog: can I insult you too or are only you allowed to do it
wblue has quit [Quit: wblue]
[itchyjunk] has quit [Ping timeout: 264 seconds]
slidercrank has quit [Ping timeout: 252 seconds]
dutch has quit [Ping timeout: 258 seconds]
[itchyjunk] has joined #osdev
dutch has joined #osdev
<mjg> i thught this was supposed tobe a wholeosme channel
<sham1> Where have you been
<sham1> To think that
<mjg> moon-child: maybe insult some people on lkml11
dude12312414 has joined #osdev
<moon-child> most of the people on lkml aren't three cats in a trenchcoat though
<mjg> on the internet nobody knows you are a dog
<gog> did i do something wrong
<gog> i'll apologize to them next time they're around
<gog> but i don't understand
<gog> and i don't want it to be a hollow apology
<zid> I want a battered suasage
<gog> heh
<Cindy> battered sausage sounds yum
<sham1> Battery sausage
* moon-child licks battery
<zid> The food not the sex act, moon-child
* moon-child bonks zid
<moon-child> go to horny jail
<mjg> there is a fetish where peole get off on feeding others
<zid> That's you not me
<mjg> well it is part of it
<vdamewood> For some reason when I read 'battered sausage', I pictured a sausage that has been physically abused.
<zid> yes, that's the sex one
<zid> vdamewood also dirty mind
<vdamewood> No, I mean like, someone just slapped a bratwurst around a few times.
<moon-child> what's dirty about licking a nine-volt battery? ;;~
<zid> The sausage looks good but those chips are gash
<vdamewood> gash?
<zid> rubbish or waste.
<zid> noun: gash
<zid> Origin
<zid> 1920s (originally in nautical use): of unknown origin.
<zid> "the gash bucket"
<zid> see also: vagina
<zid> Don't mind if I do
* mjg burps
<mjg> i watched some clips from suicide squad on youtube, but had never seen the movies
<mjg> cringe af
nur has quit [Remote host closed the connection]
eddof13 has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sham1> zid: where sausage. Is it that weird thing on top?
<zid> battered sausage, yes
vdamewood has quit [Quit: Life beckons]
<mcrod> so
<mcrod> do vim people just have 40 terminals open at once
<mcrod> one for git, one for build, one for editor, the remainder is porn?
<mcrod> how the fuck do people even debug well?
<mjg> 39 terminals
<mjg> you porn in a webbrowser
<mcrod> I'm seriously sitting here wondering if most linux people just use gdb/lldb commands regularly like savages
<geist> TIL that there is a VMS-tan
<bslsk05> ​www.ostan-collections.net <timeout>
<mjg> mcrod: fwiw i don't even use gdb
<mjg> or any other debugger
<mcrod> what's the matter with you
<mcrod> well it depends on what the situation is
<mcrod> by the way
<mcrod> heat is among us
<mjg> my situation is that when shit crashes, i know why real quick
<bl4ckb0ne> mcrod: :term
<mjg> mostly because it's my code
<mjg> i did use debuggers when dealing iwht foreign code
<bl4ckb0ne> but i do one vim one build/git
<mjg> but even then only to inspect the crashdump
<zid> TIL geist knows what a -tan is
<geist> oh geeze i've known about ostan for years
<mjg> it is terminals all the way down tho
<geist> that goes wayyyy back
<zid> Doesn't seem like your wheelhouse, regardless of how old it is
<mcrod> i'm sitting here wondering how people can keep all of this in their head
<mjg> i did not, must not be online enough
<klange> toaruos has an ostan and i have t-shirts
<mjg> mcrod: you get terminals with titles saying what it is
<mjg> :]
<zid> that DOES seem like YOUR wheelhouse :P
<bl4ckb0ne> tiling wm and you see all of it at once
<mcrod> no I know
<mcrod> I'm on i3
* mjg burps
<mcrod> that's not the problem
<mjg> but do you have the shell configured to use it
<geist> klange: guess you should add it to https://www.ostan-collections.net/wiki/index.php/Other_OS-tans
<bslsk05> ​www.ostan-collections.net: Other OS-tans - OS-Tan Collections Wiki
<mjg> for example if i spawn the terminal and cd /total/crap
<mcrod> the problem is I look in vain to understand how (n)vim people function on a regular basis
<mjg> the title will say /total/crap
<mjg> along with hostname
<mjg> to accomodate ssh
<mjg> nvim users function just fine, except they normally have a very pimitive setup
<mjg> i know, i 'm one of them
<mjg> modern day quality of life improvments missing
eddof13 has joined #osdev
<mcrod> i mean it seriously sounds like die hard vim people have 1 terminal for git, 1 terminal for compiling, 1 terminal for running the app, possibly with a debugger
eddof13 has quit [Client Quit]
<mjg> but can't be fucked to leran another editor to get them
<mcrod> and then 1 terminal for nvim
<geist> mcrod: that's pretty much what i do, yes
<mjg> ye that's what i do
<mjg> except osme more terminals :d
<bl4ckb0ne> why cant you do git/compiling/executing in the same term
<mjg> i execute shit remotely
<geist> bl4ckb0ne: that's generally what i do
<mcrod> I'm just trying to understand the general mental model
<bl4ckb0ne> i execute shit localy
<mcrod> but don't you have to keep going back and forth
<geist> if i'm doing something trivial, i will ctrl-z out of vim, make, fg back to it, etc
<mcrod> do this git thing
<bl4ckb0ne> i use :term here and there
<mcrod> cd /to/some/location/where/your/program/is
<mcrod> execute
<mjg> flipping between terms is very convenienet in i3
<mcrod> go back, nvim ../some/other/path
<mcrod> then cry yourself to sleep
<mjg> ?
<mcrod> i'm saying, I don't know how that doesn't get annoying
<mjg> that's not how people do it
<geist> right, it's because you miss the point
<geist> you're straw manning it to some silly point and then declaring that it's terrible
<bl4ckb0ne> vim is not the reason why i cry myself to sleeo tho
<mcrod> i'm mostly joking, because it obviously works for people
<geist> sure, but even if you're not joking, it's not accurate
<mcrod> and those vim people seem to be _really_ fast on their fingers
<geist> once you internalize it it's actually hard to describe
<mjg> i flip around terminals
<geist> like, if someone asks yuo what you type for some thing you have to think about it a second
<mjg> i defo don't cd around
<geist> for dealing with trees of source i use a few extensiosn to vim to make it much easier to deal with
<geist> Ctrl-P is the big one, you hit meta-p and it brngsup a file list that you can start searchnig through
<geist> from the current cwd
<mcrod> how is it not accurate? if you have 2 terminals, one vim and one for everything else, you might have to constantly go back and forth between doing certain operations just to accomplish the one you actually want to do
<geist> then i gneerally open new iles in a tab
<mcrod> i'm legitimately just trying to understand
<geist> sure, i do go back and forth
<geist> make in one, edit in another
<mjg> meta+h
<mjg> i'm on vim
<mjg> meta+l
<mcrod> but without multiple terminals, doesn't that annoy you?
<mjg> i'm compilng
<bl4ckb0ne> ^
Left_Turn has quit [Read error: Connection reset by peer]
<mjg> my figers survive no problem
<geist> what do you mean 'without multiple terminals?'
<bl4ckb0ne> tbh its faster than waiting for whatever ide that doesnt satisfy you to crash
<geist> is the general assumption here that i stepped into that this is for folks using exactly one terminal/ssh session?
<geist> usually i have like two windows/sshes/etc open for this reason
<bl4ckb0ne> i tmux sometimes on ssh
<geist> i could use screen or something to toggle between, but to me the advantage is that you can see both at the same time
<mcrod> the way I see most of these workflows in my brain, there are multiple terminals; 1 for running make/cmake/ninja/whatever, 1 for (n)vim, 1 for git (possibly), 1 which the working directory is set to where the executable from the ninja run is stored
<mjg> so the vimiards normally have tiling window managers, like i3
<klange> I spent a lot of time implementing job control so I could ^Z my editor.
<mjg> specifically to facilitate ez switching around
<geist> mcrod: sure and in that case that involves multiple terninals, so you switch between them
<mjg> and it is easy to do it
<geist> using whatever OS/environment/etc to switch terminals
<geist> key combos, focus follows mouse, sheer thought, etc
<klange> I also have a fancy window switcher with live previews.
<geist> right
<mjg> you got some enlightenment vibes?
<mcrod> maybe I'm overthinking how people actually use this stuff
<geist> mcrod: possibly. because it seems pretty straightforward
<geist> window A: editor, window B: command line to compile/run/debug
<geist> you can add a C/D/E if you want to split the tasks of B up
<mcrod> I get that
<bl4ckb0ne> thats the gist
<mjg> that's the geist
<mcrod> that part I have complete clarity on, and that seems to be the general workflow
<geist> that being said i actualyl generally use gvim, so it's a different window by definition
<mcrod> I almost never see anybody use anything like a CMake plugin or something
<mjg> gvim? :X
<bl4ckb0ne> why do you need a plugin
<geist> it's like vim, but with a window and better color/etc
<mcrod> you _don't_
<mcrod> BUT those plugins exist
<geist> but i can just as easily use vim
<mjg> this reminded me that one time i tried to use white background
<mjg> for terminal
<klange> bask in the awesomeness of my fancy window switcher https://klange.dev/s/Screenshot_2023-07-22_07-47-50.png
<mjg> i got a headache
<geist> mcrod: sure. also you could do like :!make
<mcrod> (to be clear, I mostly come from a straight up IDE background)
<geist> sometimes i d that too, but it doesn't really help that much
<mcrod> so something like (n)vim is totally foreign
<mjg> vim is shit not worth lerarning
<mjg> so
<mcrod> i want to learn it
<mjg> everyone using it is just stuck in their old ways
<geist> honestly the main reason i use vim and have for years is it's the same everywhere. i can log into any machine with vim and it's the same experience
<geist> i dont want to fuck around with installing an IDE and customizing it, etc
<mcrod> yeah they never work right.
<geist> though i do use vs code sometimes, with a vim keybinding
<mcrod> they never do EXACTLY what I want them to do
<clever> geist: i figured out my usb issue from yesterday, the toggling data PID was wrong, the hub half of the lan9514 was fine with that, but the ethernet half wasnt fine
<geist> usually when writing rust code, or where there's some plugin to vscode that makes some specific thing useful
<geist> clever: noice.
<clever> that implies the usb endpoint for the 2 halves, are different IP blocks, that just got glued together and put into 1 chip
<clever> now that i solved that, i can fully query the descriptors for the ethernet controller on "port 1" of the hub
<clever> so now i just need to throw an LK timer every time an interrupt endpoint NAK's and keep track of that data PID toggling
<clever> and then use the tinyusb drivers for various hw, like HID or MSD
<geist> noice
<clever> but there is no existing driver for the ethernet half of the chip
<clever> so i'll have to figure that all out
<geist> do you know what the chipset is?
<geist> iirc there were a handful of them, and in general they're all pretty simple
<clever> drivers/net/usb/smsc95xx.c
<clever> lan9514
<geist> the 'standard' one is CDC ethernet, but i'm not sure any real hardware does
<clever> the ethernet chip identifies as USB_DEVICE(0x0424, 0xec00) with a class of 0xff
<clever> the hub has 9514 in its PID field i believe
<clever> poking around the linux source, i can see some parts use control transfers
<clever> it will probably be faster to just sniff it with linux and usbmon
<geist> probably control transfers for general setup/querying/etc and then a pair of bulk endpoints to move packets through
<geist> with some limited header/footer
<clever> yeah, it has 2 bulk endpoints, and 1 interrupt endpoint
<bslsk05> ​gist.github.com: gist:c969356fb098f62c43a8a49626d3c4f5 · GitHub
<geist> yah interrupt is probably for change fo status or whatnto
<clever> from what i can tell, both interrupt and bulk can block until the device is ready to give data
<clever> but interrupt has a limit on the latency, while bulk doesnt?
<geist> well, not exactly. more like the transfer goes out and the device *must* ack or nak it
<geist> if it naks it you usually retry again on the next frame
<clever> but bulk can nak just as long as interrupt?
<geist> interrupt is just a repeated transfer at a particular rate
<geist> in the descriptor you say 'ping me every 1ms or 8ms or whatnot'
<clever> yeah
<geist> and if it NAKS it it just tries again
<clever> but could i also just setup a bulk in, and try to query it in every frame?
<clever> until the device returns a reply
<geist> bulk transfers can happen at any time, so the reason you interrupt probe here is you dont want to use up all the bandwidth of the bus by just repeatedly bulk transfering an in
<geist> yeah but you'll use up all the bandwidth of the bus
<clever> ah, it uses bandwidth even if the device NAK's the bulk?
<geist> correct
<clever> that makes sense for host->device, because you cant NAK until after it has transfered
<geist> (i think). may be misremembering that
<clever> but less for device->host, the device can just not send that data, and the bus is free ahead of schedule
<geist> this is why usb2 added NYET and PING
<clever> yeah
<geist> NYET lets you say 'i'm not ready for a bulk transfer' and then the host switches to a smaller PING message until it acks it
<clever> the way i read it, is that NYET and PING are for OUT transfers
<clever> so you can check the buffer space, before you commit to sending the data
<clever> but IN's dont have that issue?
<geist> or in, say for example you sent a message to a usb mass storage device for a sector
<klange> no one voiced any appreciation for the awesomeness of my window switcher and now there's USB talk, time to start banning /s
<geist> then you dont know when it's ready
<bl4ckb0ne> klange: meh
<geist> oh snap
<klange> /kickban bl4ckb0ne
<clever> geist: from what i can see, the biggest problem with the dwc, is that it cant auto-retry interrupt endpoints, it just gives a NAK irq, and gives up
<clever> so you need to schedule timers to try again in the future
<geist> yup. good host controllers can do the scheduling of interrupt transfers
<geist> can you at least get a SOF interrupt?
<clever> yep
<clever> they occur every 125uSec currently
<geist> can it schedule a new SOF packet?
<bl4ckb0ne> klange: whats the display protocol
<clever> i think SOF's are entirely automated
<geist> i remember on original rpi 1-3 i think if you are on linux you'll notice there's 8k irqs/sec as a result
<clever> ive seen no mention of creating one, just setting the interval, and reading the count
<geist> it's a SOF for every microframe
<clever> yeah
<klange> bl4ckb0ne: My display server and its protocol are called yutani.
<clever> but i cant see any reason to actually enable the SOF irq
<geist> scheduling transfers
<bl4ckb0ne> nice weyland ref
<clever> only if you want to obey certain parts of the spec, interrupt endpoint every X frames, isochronus endpoints
<clever> why cant you just use generic cpu timers?
<geist> well... yuo do want to obey the spec right?
<geist> isochornous it's actually *extremely* important
<clever> exactly
<clever> i just want to boot from usb/network
<geist> an iso endpoint's descriptor says 'for every frame, transfer X bytes and then every Nth frame, transfer Y'
<clever> isochronus can be ignored
<geist> that's how they handle sending the fractional bit
<geist> for 44k audio i remember it being something like 27/28 bytes or something
<clever> i may want keyboard input, but i cant see any harm in polling interrupt late
<clever> so i can just ignore SOF's
<geist> you can miss keys that way
<clever> increase the interval until i dont
<geist> iirc the simple usb keyboard protocol is just an instantanous snapshot of up to 6 keys down. an array of 6 entries basically
<geist> you have to synthesize key up/downs out of that
<clever> yeah, ive done HID gadget before
<geist> i assumne that got extended later on to handle NKRO keboarsd but i dunno what it looks like
<clever> the HID descriptor can freely specify what all of the bytes in the report do
<clever> but bios is expecting the old syntax you descripted
<clever> one hack ive seen, is to do both in a single report
<clever> the first 8 bytes, are the old syntax, but the HID descriptor says they are reserved/ignored
<geist> so would you just expand the number of keys to report to be the whole keyboard and thus handle arbitrary key downs?
<geist> ah
<clever> the rest, is just a 256bit bitmap
<clever> one bit for every single key
<clever> so a bios that only expects the old 8 byte report, will still work
<clever> but an OS that can respect HID descriptors, would know its a bitmap, and what symbol each bit maps to
<bslsk05> ​www.devever.net: Myths about USB NKRO and how USB HID works
<clever> Report Descriptors:
<clever> ** UNAVAILABLE **
<clever> in lsusb, there is supposed to be a report descriptor, that tells you what every byte/bit of the HID report is
<clever> but its missing on all of my HID devices
<geist> sometimes you need to sudo it
<geist> or use klange's clever task switcher to view it
<geist> that way you can see the descriptor and code at the same time
<clever> lol
<geist> a true marvel
<clever> i did run it at root
<clever> either the device is being naughty and not providing one, or maybe i cant read it because the HID driver has claimed the device
<geist> yah
<bslsk05> ​github.com: rpi-tools/nix/keyboard.nix at master · librerpi/rpi-tools · GitHub
<clever> this is an HID descriptor, for turning the pi400 into a usb keyboard
<clever> and the keyboard.c nearby, reads input events from linux, translates them back into HID reports, and writes them out
<geist> more like it's turning the pi400 into a window switching keyboard driving machine, right?
<clever> one user has turned it into a kvm
<clever> a hotkey switches the relaying on/off, so the keyboard can control the pi too
<clever> and an IR blaster tells the tv to switch inputs
<geist> reminds me, i saw a review for a remote desktop/keyboard/etc thing, made out of a rpi, it was kinda neat
<geist> but pricey
<clever> ive seen one using a hdmi->csi capture chip
<geist> basically a full remote console
<clever> combined with HID gadget, yea, you have full remote control
<clever> but my KVM is vga only, so i cant just plug that in
<geist> and all that pesky software
<clever> another big thing i have yet to implement, is split transactions
<clever> but tinyusb does provide all of the relevant data in a query function
<clever> so i just need to deal with scheduling multiple HS packets, and transfering that data to the regs
FreeFull has quit []
nyah has quit [Quit: leaving]
wblue has joined #osdev