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
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.
<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]
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
<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.
<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]
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.
<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.
<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
<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>
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
<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