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
parrott has joined #osdev
<parrott> P
<heat> p indeed
<parrott> Oops
<parrott> Fat fingers, I guess.
<parrott> I'm about to print the UEFI spec
<heat> save the trees
<heat> you're not going to read even half of it anyway
<parrott> Well, I wouldn't if it were in digital
<heat> the UEFI spec is available in pdf
<parrott> Yeah I'm gonna print and bind it
<heat> you could just use the pdf
<geist> clearly they dont want to
<heat> but the trees :(
<parrott> Mail me a kindle
<parrott> Anyway
<parrott> I figure that's where it all starts these days. UEFI
<geist> yah
<heat> it starts in the SEC phase
<heat> exactly like the BIOS
<heat> 16-bit
<heat> the SEC phase hands off to the PEI phase, the PEI phase is either 32-bit or 64-bit (depends on the cpu really), which initialises ram and basic board stuff, pci, etc
<heat> then it executes DXE which initialises all drivers
<heat> eventually it finds your bootloader and executes it
<parrott> Does that have to do with ACPI?
<heat> no
<parrott> Is it in the hardware/firmware?
<heat> what is?
<parrott> All that you said
<heat> yes, in flash
<parrott> Sec,pei,etc
<parrott> I'm just looking at software
<heat> SEC, PEI, DXE are mostly in flash (you can add UEFI drivers to your ESP which is not in flash)
<heat> this is all software
<heat> the 3 main phases of your UEFI firmware
<parrott> Oh
<heat> it's stored in flash in your mobo but it's all software
<parrott> Ok but just the OS is where I'm going
<parrott> The boot, etc
<heat> you don't need to know UEFI to write just the OS
<heat> you can just get booted by grub/some other bootloader and that's it
<parrott> Seems like I want to understand it for the boot
<heat> if you're curious, sure.
<parrott> Rolling from scratch...
<heat> but it's not important
<parrott> Disagree
<parrott> It's the boot
<klange> I recommend starting with another bootloader just because bootloader stuff is immensely boring and x86-specific
<klange> then come back to it later
<parrott> Seems like there's more in there, too
<parrott> Well I'm focusing on x64
<heat> you don't really need the UEFI spec
<heat> in fact, you can write a UEFI bootloader without looking at it pretty much
<parrott> Pretty sure I want to understand it
<heat> why?
<parrott> Oh, u
<klange> Bootloaders are a pitfall of issues as a starting point. You don't really know what you want out of one early on, they're a unique set of weird platform-specific things, hard to get right, easy to get wrong...
<geist> because understanding it is maybe interesting
<geist> wouldn't recommending writing, but understanding may be worth while
<heat> yes but you can't read these specs front to back
<parrott> Can't you just fully implement the spec?
<klange> Fully implement what spec?
<parrott> UEFI
<klange> UEFI is not something you implement, it's something that is handed to you.
<heat> that's been done, github.com/tianocore/edk2 and github.com/tianocore/edk2-platforms
<bslsk05> ​tianocore/edk2 - EDK II (1664 forks/2845 stargazers/NOASSERTION)
<bslsk05> ​tianocore/edk2-platforms - EDK II sample platform branches and tags (291 forks/349 stargazers/NOASSERTION)
<heat> that's *most* of your firmware's code right there
<heat> it implements all of UEFI
<heat> you as an osdever just use the interfaces
<parrott> I'll have to read it to understand
<heat> ok do it
<parrott> I have questions that I know are answered in it
freakazoid12345 has joined #osdev
<klange> For building a loader, the UEFI spec is better read as an ad hoc reference for the APIs you want at the moment.
<parrott> Seems like UEFI may have something to do with interfacing with hardware
<parrott> Also^
<heat> depends on what you're doing
<parrott> Implementing on modern hardware, is what I want to do
<heat> implementing what?
<klange> UEFI is basically a fancier DOS. It provides you a standardized API for doing things like reading filesystems, getting user input, presenting output.
<parrott> Yeah, I want that :)
<parrott> Anyway, that's where I'm at
<heat> if you want to read all of uefi don't forget https://uefi.org/sites/default/files/resources/PI_Spec_1_6.pdf
<heat> that describes all of PEI's interfaces
<parrott> Well I'm going to do UEFI and ACPI and go from there
<geist> when you say 'doing' what do you mean?
<parrott> Read
<geist> ah okay
<parrott> Reading them
<heat> i suggest you start with the intel manuals first
<heat> else you might be a bit lost
<parrott> I'm interested in rolling an os from scratch, basically
<heat> that's literally the first thing in boot, the cpu
<klange> Well, you're in #osdev, so that's kinda the assumption.
<parrott> Sure, ok
<parrott> New here
<heat> i know you want to read all that but understand that UEFI and ACPI are not things you implement
<heat> that's not osdev, that's firmware dev
<parrott> I fat fingered a "P" and here we are
<heat> in fact, you can't implement those since that's all provided by your OEM and signed so you can't flash your own
<parrott> Stuff I need to know is in that spec
<heat> *sigh* you do you mang
<klange> Eh, well, that's complicated. You probably can't directly replace the ones provided, but you can always chain load into your own EFI, and build ACPI tables yourself :)
<geist> i dunno why everyone is being so harsh on them
<parrott> Like I've already started to read it, but I can't look at a GUI
<geist> it's a spec, read it. it may or may not be fun. i do that sort of stuff all the time for lulz
<parrott> Word
<geist> just dont expect there to be any real eternal truths in there. it's highly specific to what UEFI sets out to do
<heat> yes, but they're new, not someone with 20+ years of expertise under their belt. I'm trying to let them know that they don't *need* to read that (and IMO it's best not to if you're starting out)
<parrott> It's gonna be a long process
<parrott> Much reading to do
<geist> very read, much process
<parrott> Word
<klange> I recommend using a PDF viewer instead ;)
<klange> [crickets]
<parrott> I'll pm my address
<parrott> ;)
<kazinsal> reading specs can be fun but you've really gotta have been in this particular can of worms for a while before you get to the point where it is
<parrott> It won't be fun.
<parrott> I'll kill it in a month and then have the print for reference
<klange> 1627 pages, lot of paper
<parrott> Word
<parrott> Save some paper for me
<parrott> Also, front and back
<kazinsal> yeah I don't have too many technical manuals in hardcopy for that reason
<kazinsal> pretty much just windows internals and a bunch of oddball cisco manuals
<klange> I think that's the main reason Intel stopped offering their manuals in dead tree. They just got too thick.
<kazinsal> yeah, it'd be nice to have them as like, a bookshelf piece
<kazinsal> for actual regular use though, you can't ctrl+F a hardcopy ;)
<parrott> Table of Contents :)
<klange> Really you want the index for that, not the ToC.
<kazinsal> I would definitely not want to try to go through, say, one of the Intel ethernet controller manuals without a find function
<kazinsal> the programmer's guide for the 710 series is 1719 pages long
<heat> that's baby shit compared to the intel gpu manuals
<CompanionCube> ARM is ~5k pages, imagine that in dead tree
<parrott> Put it in ASCII and I'd be down for digital
<parrott> I'm sure I'll go pdf reader eventually
<CompanionCube> someone's probably written pdf-to-text, how good it works on the actual PDF is anyone's guess.
<heat> the tigerlake reference manuals are 7800 pages long
<klange> It's a massive pain, really, PDF to text, because of how print-layout-oriented the format is.
parrott has left #osdev [Leaving]
<kazinsal> yeah
<klange> Either you've got a PDF that someone put the effort into making accessible, and it has properly annotated continuous text, or you've got the output of most authoring tools where you're lucky if a single sentence is a contiguous chunk...
Matt|home has joined #osdev
Matt|home has quit [Read error: Connection reset by peer]
Coldberg has joined #osdev
C-Man has quit [Ping timeout: 260 seconds]
pretty_dumm_guy has quit [Ping timeout: 246 seconds]
JanC has quit [Ping timeout: 260 seconds]
parrott has joined #osdev
CyberneticRev has joined #osdev
srjek has quit [Ping timeout: 240 seconds]
m3a has joined #osdev
troseman has quit [Ping timeout: 246 seconds]
freakazoid12345 has quit [Ping timeout: 256 seconds]
parrott has quit [Read error: Connection reset by peer]
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
CyberneticRev has quit [Ping timeout: 260 seconds]
the_lanetly_052 has joined #osdev
sonny has joined #osdev
heat has quit [Ping timeout: 260 seconds]
sonny has quit [Quit: Ping timeout (120 seconds)]
sonny has joined #osdev
sortie has quit [Ping timeout: 272 seconds]
seds has quit [*.net *.split]
jimbzy has quit [*.net *.split]
rorx has quit [*.net *.split]
air has quit [*.net *.split]
j00ru has quit [*.net *.split]
hegz4 has quit [*.net *.split]
Raito_Bezarius has quit [*.net *.split]
moon-child has quit [*.net *.split]
eschaton has quit [*.net *.split]
wgrant has quit [*.net *.split]
warlock has quit [*.net *.split]
koolazer has quit [*.net *.split]
sham1 has quit [*.net *.split]
night has quit [*.net *.split]
basil has quit [*.net *.split]
moon-child has joined #osdev
air has joined #osdev
night has joined #osdev
jimbzy has joined #osdev
basil has joined #osdev
sham1 has joined #osdev
sortie has joined #osdev
hegz6 has joined #osdev
eschaton has joined #osdev
divine has quit [*.net *.split]
MrBonkers has quit [*.net *.split]
ecs has quit [*.net *.split]
remexre has quit [*.net *.split]
cheapie has quit [*.net *.split]
Celelibi has quit [*.net *.split]
sahibatko has quit [*.net *.split]
cln has quit [*.net *.split]
stux|away has quit [*.net *.split]
j`ey has quit [*.net *.split]
cb has quit [*.net *.split]
mcfrdy has quit [*.net *.split]
nickster has quit [*.net *.split]
Emil has quit [*.net *.split]
ecs has joined #osdev
j`ey has joined #osdev
Emil has joined #osdev
remexre has joined #osdev
cln has joined #osdev
mcfrdy has joined #osdev
nickster has joined #osdev
MrBonkers has joined #osdev
koolazer has joined #osdev
j00ru has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
Celelibi has joined #osdev
cheapie has joined #osdev
rorx has joined #osdev
atrapa has joined #osdev
sonny has quit [Quit: Client closed]
the_lanetly_052 has quit [Ping timeout: 246 seconds]
fwg has joined #osdev
the_lanetly_052 has joined #osdev
the_lanetly_052 has quit [Ping timeout: 268 seconds]
eroux has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
fwg has joined #osdev
Burgundy has joined #osdev
Coldberg has quit [Ping timeout: 260 seconds]
_xor has quit [Quit: bbl]
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
dennis95 has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
GeDaMo has joined #osdev
fwg has joined #osdev
xenos1984 has quit [Ping timeout: 252 seconds]
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]
pretty_dumm_guy has joined #osdev
C-Man has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
fwg has joined #osdev
fwg has quit [Quit: so long and thanks for all the fish.]
fwg has joined #osdev
Jmabsd has joined #osdev
m3a has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
parrott has joined #osdev
<parrott> Think I'm gonna go with a PDF reader
atrapa has quit [Quit: atrapa]
nyah has joined #osdev
stux|away has joined #osdev
Ali_A has joined #osdev
srjek has joined #osdev
JanC has joined #osdev
Likorn has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
Ali_A has quit [Quit: Connection closed]
freakazoid12345 has joined #osdev
heat has joined #osdev
mahmutov has joined #osdev
Ali_A has joined #osdev
FatalNIX has joined #osdev
<FatalNIX> As somebody who likes traditional FASM, how is the general appreciation of FASM g here (I haven't even used it yet)
<FatalNIX> From what I understand it's pretty nice with its new macro system that can be used for pretty much any architecture.
<heat> it's an assembler that goes brrrr and gives you bytes :P
<heat> I've used NASM before but I personally prefer the gnu/llvm assemblers since they're already included in the toolchain anyway and are really powerful
<FatalNIX> You know it's funny. I use clang for my projects and I have yet to use llvm's assembler
<FatalNIX> directly anyways
<heat> few projects require an assembler :P
<FatalNIX> I mean
<FatalNIX> My MSP430 :D
<heat> but yeah, I strongly suggest you use the one included with your toolchain unless you really want to build your stuff on windows or something
<FatalNIX> But I don't use C on that anyways
<FatalNIX> Who would run a C compiler for a chip that only has 128 bytes of RAM
<heat> depends
<heat> how much flash?
<FatalNIX> I think mine -might- have 4KB. I haven't used the thing for a couple years now XD
<FatalNIX> I should dig it out
<FatalNIX> I'm looking
<FatalNIX> I can't find the damn thing, but it's kind of like this one, no idea for sure: https://www.ti.com/product/MSP430G2231#features
<bslsk05> ​www.ti.com:
<FatalNIX> They are awesome little chips though
<FatalNIX> I've been looking to improve my gameboy / gameboy color usb serial adapter thing I made. perhaps I might look into one of these instead of using an AVR next time for it.
<zid> usb serial as in the com port, or as in you have a cool cart port usb?
<FatalNIX> the link com port. It's kinda janky
<FatalNIX> basically it converts the SPI mode 3 of the gameboy to TTL serial and then a TTL serial adapter does the rest
<zid> what are you using it for?
<zid> other than team rocketing some free pokemon
<FatalNIX> playing around. The first thing I did was make the gameboy joypad send its data over the cable
<FatalNIX> I almost wrote a simple joypad driver for it on Linux but I was like meh
<FatalNIX> it would have been a bit interesting
sonny has joined #osdev
<zid> could make a gameboy player, like a player piano
<zid> with a small stub
<FatalNIX> heh
<zid> injected into a random game
<FatalNIX> There were multiple issues.. the AVR chip was constantly getting clock skew issues even wit SPI with the gameboy as the master
<zid> It'd be pretty useful for creating test roms
<FatalNIX> so I ended up making a little 4b5b codec thing
<FatalNIX> yeah maybe. I wish I could use it as a debug port but I can't see how that'd be possible really
<zid> You write a debug stub
<zid> and shove it in the irq handler
<FatalNIX> I thought of that, but then I thought of the issue where register data etc may not be preserved perfectly.
<zid> You'd just need to reserve some memory for regsave
<FatalNIX> May be something to look into. I have a flash cart that uses an SD card
<zid> sick
<zid> I always wanted a gb flash cart
<zid> I ended up with gba later on at least
<FatalNIX> currently I have an emulator that has a vscode plugin for full debugger on gameboy and gameboy color / sgb
<FatalNIX> it's kinda cool
<FatalNIX> If I could get that to work on real hardware...
<zid> I wrote my own emulator, I don't really care about writing actual gb software
<zid> but I love emulating it
<FatalNIX> Even with the strangeness of intel and zilog having a baby?
<zid> it's also a lovely cpu
Burgundy has quit [Remote host closed the connection]
<FatalNIX> Yeah I like writing for it when i have the time
<zid> the only actual weirdness is daa
<FatalNIX> oh the BCD fix instruction?
<zid> yea
<zid> it's not the same as z80 or intel's
<FatalNIX> I see a lot of people ask about it on forums etc confused.
<FatalNIX> I have avoided any BCD so far
<zid> you just to daa adc
<FatalNIX> but from what I gather, it should just add / subtract 6 and 9 right?
<FatalNIX> like you'd do on paper
<zid> or 60
<zid> or subtract them
<zid> depending on direction flag
<FatalNIX> It's interesting to me because, I don't think the Ricoh 2A03 even had BCD at all
<FatalNIX> for the NES
<zid> that's the 6502 in th -
<zid> yea
<zid> one of these cpus lacks direction but I forget which
<FatalNIX> all of the BCD stuff was ripped out afaik, yet the gameboy has an instruction for it
<zid> the adding 6 is to turn A back into 1, btw
<zid> 5 + 5 should be 10, not A
<FatalNIX> Sounds about right
<FatalNIX> I avoid BCD like the plague
<FatalNIX> :)
<zid> It saves a bunch of cycles for printing your score
<FatalNIX> I would have been the asshole that just printed hex digits or something
JerryXiao has quit [Ping timeout: 240 seconds]
* gog prints "mew"
freakazoid12345 has quit [Ping timeout: 260 seconds]
Matt|home has joined #osdev
atrapa has joined #osdev
freakazoid343 has joined #osdev
sonny has quit [Ping timeout: 250 seconds]
* moon-child pets a picture of god
<zid> I've nver sent you a picture of me or matsuri though
<heat> petting god is kinda patronizing though
<zid> what if god is fluffy though
<zid> or has an itchy head
<zid> then it's basically a ritualistic offering
<gog> incidentally i do have an itchy head
* heat scratches gog's head
* gog prrrs
<heat> uhhh, uhh, i shouldn't do this, i'm not a cheater
<heat> i must admit I have another cat
<heat> you're just a sidecat
<gog> i knew what this was and i'm ok with it
<moon-child> I have no cat, and can't get one
<moon-child> must settle for digital simulacra
<moon-child> :/
<gog> we have neighborhood cats that visit us
<papaya> I have a cat too but she'll get over it
xenos1984 has quit [Read error: Connection reset by peer]
* papaya pets gog.
xenos1984 has joined #osdev
JanC has quit [Remote host closed the connection]
JanC has joined #osdev
rustyy has quit [Quit: leaving]
scripted has joined #osdev
<zid> gog: what do they eat, it's not like they have trees for birds to live in
<scripted> Can somebody tell me what's wrong with this (not finished) printf function? It seems to print out the value, but also some gibberish
<bslsk05> ​gist.github.com: video.c · GitHub
<bslsk05> ​ibb.co: image — ImgBB
rustyy has joined #osdev
<moon-child> scripted: *args != '\0' presumably should be *args_temp != '\0'?
<moon-child> also, you do not increment args_temp again after reading the 's' in %s
<scripted> ah yes
<moon-child> (and really, I am not sure what the point is in making a copy of 'args', but)
<scripted> I feel like I was drunk writing this
sonny has joined #osdev
<gog> zid: mice
<scripted> moon-child: I applied your changes, but that didn't change anything
<zid> what do the mice eat, moss?
<scripted> it's printing even more gibberish
<zid> endangered moss
<moon-child> ermm
<GeDaMo> scripted: why do you increment args_temp on line 53?
<moon-child> your 'print' function wants a char*
<moon-child> but you are feeding it a char
mahmutov has quit [Ping timeout: 260 seconds]
<scripted> without the incrementation my whole kernel breaks
<moon-child> 'while(*args != '%')' this should also be args_temp. And, what if *args_temp is '\0'?
<FatalNIX> I am a bad person for writing dpmi.h
<scripted> moon-child: yeah, this is just a first write
<scripted> not completed
<FatalNIX> I will be hated forever
<scripted> but you are right
<scripted> I should have thought about the end of the char array and so on
<mjg> pro tip would be to imlement this in userspace first
<mjg> you can write(2) instead of using the vga area
<mjg> get hex working as well
<GeDaMo> I don't really understand why you have a while loop inside the for
<zid> Have you configured your DMI POOL DATA yet
<zid> that was a big thing at one point in my life then suddenly stopped
<scripted> I used a pre-written one
<scripted> to get an idea on how printf works
<scripted> and this is just the start
<scripted> I fixed it
<scripted> the issue was the line 48
<scripted> it was '*args != '\0';' but should've been '*args_temp != '\0''
<GeDaMo> I don't think that's the only problem :|
<scripted> well it works now
<scripted> sure as hell doesn't look nice
<scripted> I will try to make it more efficent before continuing
<scripted> *also removed the while loop
<scripted> any idea on how to implement a single char though?
<scripted> I don't think it's smart to convert a char to char pointer
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<GeDaMo> Have a function to output a single char which could be called from either your print or printf functions
<scripted> that's what I thought
<scripted> like a putchar function
<moon-child> alternately: print((char[]){*x, 0})
<moon-child> (don't actually do this, putchar is better)
<moon-child> (or, I should rather say, more suitable)
<zid> thanks I hate it
<scripted> moon-child: Why though? It seems to save a lot of space
<scripted> instead of writing a separate function
<moon-child> why are you interested in saving space?
<scripted> I mean less lines of code
<moon-child> why are you interested in saving space?
<scripted> why would you write a separate function if you can do the same thing in a 1 line which doesn't take much space?
<GeDaMo> If you do the same thing at different points in the program, putting them in one place makes it easier to modify
<moon-child> scripted: separation of concern
<scripted> GeDaMo: yeah that's where printf comes in
<gog> writing lots of functions is good actually
<gog> the more functions something has the better it is
<moon-child> for i in {1..1000000}; do echo "void f$i() {}"; done > t.c
<gog> but also printf is responsible for formatting the output and should be agnostic of what it's outputting to more or less
<gog> because it might be a stream, it might be a string buffer
<moon-child> yep
<moon-child> but, baby steps :P
<scripted> great
<scripted> putchar function is working
<FatalNIX> Oh hey it's scripted
<scripted> yeah
<scripted> oh great
<zid> I don't think he's *actually* a bot FatalNIX
<scripted> I'm a bot?
<gog> i'm a not
<gog> a bot
<scripted> that would be cool actually
<zid> I'm a pot
<FatalNIX> I'm a cop
<zid> I'm a sign not a cop
<gog> i want a lawyer
<FatalNIX> hahaha
<scripted> show me the money
<FatalNIX> I'm no cop
<moon-child> i anal
<FatalNIX> is that a movie like i robot?
<zid> pics?
<scripted> everyone shooting at lawyers but suddenly they need one
<FatalNIX> except that you get it from the back section
<scripted> iRobot?
<FatalNIX> ok after using fasmg for the first time
<FatalNIX> it's insane.
<scripted> You mean this movie where some teen got like a 30$ android movie into his brain and it somehow plugged into his brain without him dying realistically?
<zid> have you considered using a C compiler
<scripted> yeah, that move was garbage
<scripted> *movie
<zid> makes you look less like a loonie
<gog> never use a c compiler
<scripted> no, code your own os in scratch
<bslsk05> ​scratch.mit.edu <no title>
<FatalNIX> ...
<FatalNIX> Why not piet?
<scripted> piet?
<FatalNIX> you could include a built in editor with the OS that uses PCX files
<zid> oh wow pcx
<FatalNIX> and then write a provided compiler
<zid> I forgot that format even existed
<scripted> what is pcx
<FatalNIX> :>
<FatalNIX> PCX is what Paint used before BMP was used
<FatalNIX> so like, MS-DOS days
<FatalNIX> it supported animated pallettes
<FatalNIX> which was cool af
<scripted> oh yeah, I only remember windows vista
<scripted> which was garbage
<gog> it was fine
<scripted> no
<scripted> it was garbage
<FatalNIX> I am a DOS user
<scripted> 80% of the PCs couldn't run it
<FatalNIX> but I also use Linux and BSD
<gog> after SP2 it was fine
<zid> FatalNIX is a 70s kid
<scripted> Windows 7 was more like the finished version
<FatalNIX> 80s kid
<FatalNIX> you were close
<scripted> yeah, I'm not that old
<zid> That's not what I meant
<FatalNIX> I remember when my parents got Windows 3.1
<scripted> holy shit
<FatalNIX> It was really cool but I was more familiar with MS-DOS
<zid> You're those people leaving comments on duran duran videos on youtube "omg I was born in the wrong decade"
<FatalNIX> so I usually didn't bother with Windows then
<scripted> duran duran?
<scripted> boomer
<scripted> just kidding
<FatalNIX> hahahaha
<gog> my wife is a huge duran duran fan
<zid> her name is rio
<zid> and she dances on the sand
<gog> yes
<FatalNIX> I'm one of those people taht say "HELP HELP IM TRAPPED IN THE 90s WHEN SHIT WAS STARTING TO GET COOL AND I CANT GET OUT
<gog> just like the river twisting through the dusty land
<FatalNIX> Lol
<scripted> I never heard of a duran duran
<scripted> till now
<scripted> sorry, I only know epic minecraft disstrackers
<scripted> (kidding)
<scripted> *distracks
alpha2023 has joined #osdev
<GeDaMo> Damned kids! Get off my LAN, etc. :P
<zid> I prefer the early 2000s
<scripted> all them elementary students using the school wifi for minecraft videos
<zid> the web wasn't ruined yet, people still used irc
<scripted> I remember when phones were +18
<scripted> I use irc since a month
<scripted> and it's great so far
<scripted> better than discord
<FatalNIX> I honestly just moved my new computer into my home office a couple weeks ago for the first time. It feels a bit weird: https://media.discordapp.net/attachments/943224671183204374/957361817854832700/20220325_122827.png
<gog> the eraly 2000's was ok i guess
<scripted> GOD DAMN IT
<scripted> WHY DOESNT MY IRC CLIENT ALLOW ME TO COPY LINKS?!?!
<gog> it might be your terminal actually
<zid> I like your keyboard more than most keyboards people post pictures of
<scripted> gog: could be
<scripted> usually it detects links
<FatalNIX> the black one is a lenovo USB keyboard I have boxes of
<scripted> I use the i3 terminal so
<zid> nice
<FatalNIX> and the white one is an IBM keyboard I've had
<moon-child> ooh you have an oscilloscope?
<moon-child> nice
<gog> a silly scope
<zid> I spent weeks looking for a non-shitty keyboard and evetually found one that was half shitty
<zid> for stupid money
<FatalNIX> It's not a model M, but the white one is a PS/2 IBM keyboard that honestly I like better than the Ms.
<FatalNIX> I find the model Ms to be a bit.. awkward
<zid> model M only came in a weird ansi variant afaik?
<zid> I can only use ISO
<FatalNIX> the computer on the left is a Pentium II 686 400Mhz I've had, was built in 1998?
<FatalNIX> it has a 3DFX voodoo banshee in it with 16MB of video memory
<zid> I had a 400MHz celeron with a TNT2
<FatalNIX> I use it with FreeDOS to do low level hardware dev and things
<scripted> I finally got it to open
<scripted> wait, is your monitor new?
<FatalNIX> the one in the center is
<zid> It'd play WoW at like 12fps
<FatalNIX> the CRT I've had for years
<scripted> Don't tell me you used that monitor on the left side the whole time
<zid> My crt's a trinitron, I win
<FatalNIX> the CRT is a 22" flatscreen lensed Gateway monitor that runs at 2048x1536 resolution
<zid> oh nice, mine's only 2048x1152
<FatalNIX> the center monitor is a 2K 144Hz curved Gigabyte I picked up.
<scripted> I wouldn't buy anything over 1080p even if I could
<zid> nah I wish, my LCD is :P
<zid> how much did you pay for the 2k 144
ZipCPU_ has joined #osdev
<FatalNIX> I had two of these CRTs but one got thrown out on me long ago
<FatalNIX> I think $300
<zid> I looked at prices recently cus my LCD is dying and they're.. not cheap
<scripted> damn
ZipCPU has quit [Ping timeout: 256 seconds]
<scripted> 3x the price of mine
<FatalNIX> Lemme see
<zid> 1080p is like $120, 144 is like $120
ZipCPU_ is now known as ZipCPU
<zid> 144 2k is like $400
<zid> maybe I need to wait another 5 years
<scripted> I got a samsung curved monitor 72hz and 1080p for like $130
<zid> My current LCD's dying, but I'm too scared to dismantle it in case I break 49023 beads of glue and plastic clips and can't get it together again
<papaya> you can get a 144hz 1440p display for about 300
<scripted> What's that thingg on the right side though?
<zid> + vat + import duty = $400
<papaya> asus tuf on amazon
<gog> a silly scope
<scripted> it looks like some kind of old school medical device
<papaya> oh I dunno about vat I'm in US
<papaya> but yea our taxes would add like $30 to it
<zid> That's fairly cheap
<bslsk05> ​www.amazon.co.uk: BenQ EX2780Q 27-Inch QHD (2560 x 1440) HDRi 144Hz Gaming Monitor, IPS, FreeSync Premium, USB-C, PS5/Xbox X Compatible : Amazon.co.uk: Computers & Accessories
<zid> $327
<zid> shame my amazon has £93 in it not £250
<gog> i really need a new computer
<gog> i can't even play graveyard keeper on this :(
<zid> my computer's fine, I need a new psu though
<zid> so I can change back to my stupid cpu
<gog> ah your xeon
<scripted> ah great
<zid> the stupid cpu makes my 3.3V rail dip low enough for the mobo to turn off
<scripted> invalid opcode interrupt
<zid> I'm not sure why
<scripted> *exception
<gog> zid: bad transistor between the 5 and 3v rails?
<zid> yea I assume just the 12 -> 3.3 conversion stage is dying
<zid> but why the other xeon would be causing it and not this one is strange
<papaya> the asus tuf one I mentioned is 32"
<gog> what's the dissipation on the other one?
<zid> disisispiation?
<gog> the power draw
<gog> the other one might want more amps
<papaya> lol nvm the price went back up since yesterday
<zid> even at stock tdp it was doing it
<gog> and then the transistor doing the switchery stuff starts to drag because it can't keep up and then the voltage sags
<zid> I was running the 1650 up at 200W and not seeing lots of crashes, and the 1620 doesn't crash at 160W, but I've crashed the 1650 at 140W
<gog> hm
<gog> that is weird
<zid> In a few years it won't even run the 1620 presumably, and I'll have to replace the psu
<zid> and I'll switch back to the 1650
<FatalNIX> I found it. This is what I have for the center monitor: amazon.com/GIGABYTE-G27QC-Monitor-Display-Response/dp/B0927BQT33/ref=asc_df_B0927BQT33
<bslsk05> ​www.amazon.com: Amazon.com: ASUS TUF Gaming 32" 1440P HDR Curved Monitor (VG32VQ) - QHD (2560 x 1440), 144Hz, 1ms, Extreme Low Motion Blur, Speaker, Adaptive-Sync, FreeSync Premium, VESA Mountable, DisplayPort, HDMI : Everything Else
<bslsk05> ​amazon.com: Amazon.com: GIGABYTE G27QC A (27" 165Hz 1440P Curved Gaming Monitor, 2560 x 1440 VA 1500R Display, 1ms (MPRT) Response Time, 88% DCI-P3, HDR Ready, 1x Display Port 1.2) : Electronics
<papaya> 32" 1440p 144hz $309
<FatalNIX> I don't know why it says Asus on the bot, it's a Gigabyte
<bslsk05> ​www.amazon.co.uk: ASUS TUF Gaming VG32VQ Gaming Monitor, 32 Inch (31.5 Inch) WQHD (2560x1440), Curved VA, up to 144Hz, DP, HDMI, ELMB Sync, FreeSync : Amazon.co.uk: Computers & Accessories
<papaya> this is actually what I have its been a good monitor for me
<zid> papaya: I'll take either, I'll add it to my wishlist and you can grab it
<FatalNIX> I have had no complaints and honestly for someone like me who is a single monitor at a time person the curved monitor is fantastic
<zid> I'm not fussed about curved monitors
<FatalNIX> I'm not sure how well it'd go for people who like more than one
<papaya> even if you use multiple monitors its good, its not excessively curved its just right
<FatalNIX> they make a non-curved version
<zid> I don't need the inch of desk space it saves
ZipCPU_ has joined #osdev
sonny has left #osdev [#osdev]
<FatalNIX> well theoretically given average viewing distance with a curved monitor all parts of the screen will be the same distance from your face
<FatalNIX> that's not always true
<FatalNIX> but it's neat
<zid> yea and you'd need to change the curvature if you're using multiple monitors from farther away etc
<zid> it's kinda silly overall
<zid> I'm fine with 3 flat ones with a beveled setup or whatever, not that I use multiple monitors atm
<FatalNIX> I still really like the boldness of a CRT though
<zid> I changed to a 1050 ti and 10xx+ series cards don't have analogue out
<zid> so my crt's been off
<FatalNIX> having that pitch black background is nice
<FatalNIX> also, these gigabyte monitors are heavy af
<FatalNIX> they are solid and rugged
<FatalNIX> vesa mountable
<zid> I'll make whatever monitor you want very solid and heavy
<zid> just need a couple of sand bags and some lead shot
<FatalNIX> some people like really light monitors
<FatalNIX> but I uh
<FatalNIX> I've knocked them over before :D
<FatalNIX> I've knocked CRTs over too but that's a different cause
<zid> either of you two happen to have 32GB of ddr3 ecc udimms
<zid> might as well ask, seeing as you're paying attention
<FatalNIX> when it's "Time to build a new desk because your 50 pound CRT fell off the desk and the VGA cable was one of those heavy duty ones that you actually screwed into the monitor instead of just plugging it in"
ZipCPU has quit [Ping timeout: 260 seconds]
ZipCPU_ is now known as ZipCPU
<FatalNIX> and the desk was what went flying
<papaya> That's wild
<FatalNIX> But as you can see I build my desks like workbenches now
<zid> quick, check your desk draws for udimms
<FatalNIX> you could drop a bowling ball on them
<zid> It's life or death
<papaya> my desk surface is glass I wouldn't dare
<FatalNIX> I reinforce my legs with triangles using 2x4s so the desk is stronger
<FatalNIX> and use good plywood
<zid> I have like
<zid> a coffee table
<papaya> do you have
<zid> It's cheap but the desktop is like 1.5" thick
<papaya> coffee?
<zid> nope
<papaya> then thats a fail
<gog> i do
<zid> I could get some
<papaya> coffee is life
<zid> You're mistaking coffee for dr pepper
<papaya> I'm certain I'm not
<zid> sounds like I need paying off
<scripted> I'm done, let me know what you think of it! https://gist.github.com/ScriptedDeveloper/b2840aebc82099c10fe8acd062c50812
<FatalNIX> Oh somebody mentioned oscilloscope
<scripted> it's all working
<zid> The price will be 4x8GB 1933MHz DDR3 ECC UDIMMs
<zid> and I'll say whatever you like about coffee
<zid> 933MHz*
<GeDaMo> scripted: I don't think it is, line 59 will just output the rest of the format string regardless of later %s
<moon-child> scripted: print() should be implemented in terms of putchar()
<scripted> GeDaMo: What do you mean, it doesn't
<FatalNIX> My oscilloscope in action when I was working on the gameboy serial adapter project
<FatalNIX> it's an 88 Tektronics 2440
<scripted> it can't print out multiple data types at a row
<scripted> but that's fine with me
<GeDaMo> It's calling print with the contents of the string, not an address
<zid> I like a cheap tektronics
<heat> btw putchar is faster than fwrite
<moon-child> oh, I just noticed, your width/height are backwards
<heat> it's a simpler code path if you need to write a single byte
<scripted> moon-child: the putchar function is based off the print function
<moon-child> scripted: print() should _call_ putchar() instead of doing the logic itself
<scripted> Ah
<scripted> thanks for pointing that out
<FatalNIX> Looking at fasmg and realizing that the ELF output format is literally just assembly macros that generate an ELF file...
<GeDaMo> scripted: line 59 should be calling putchar, not print
<FatalNIX> I wonder how I can abuse this :D
<heat> FatalNIX, that's horrific lol
<FatalNIX> heat: there's an example shipped with it that will even assemble JVM bytecode..
<gog> FatalNIX: there's a few tutorials online about how to use NASM to make really tiny ELF files by abusing the phdrs
<FatalNIX> I might use it with my homemade cpu arch
<zid> I do a lot of object format headers with db
<zid> just needs the linker to be able to do the right relocations
<scripted> yeah I see
* geist yawns
<geist> good morning folks
<scripted> fuck
<zid> uh-oh
* moon-child hands geist a cuppa
<scripted> making line 20 to putchar makes my print function break
<zid> it's dr pepper today, we upgraded
<geist> yah brewing some coffee right now
<GeDaMo> Why did you change line 20?
kkd has joined #osdev
<scripted> wait not line 20
<scripted> I meant the logic
<scripted> 23-25
<zid> GeDaMo: you can check your drawers too
<scripted> to : "putchar(string[i]);"
<scripted> wait I might know why
<scripted> yup
<FatalNIX> I actually usually never have to think about object formats too much since I don't mix them with embedded projects anyways but fasmg was able to generate an elf64 using 16 bit x86 assembly... are there any real complications with things like word alignment doing that?
<GeDaMo> zid: what am I checking for?
<scripted> it was the term_height increment
<scripted> in the print function
<scripted> now it works
<zid> GeDaMo: 4x8GB ecc 933Mhz udimms
<scripted> I'm committing to github now
<heat> FatalNIX, alignment of what?
<scripted> gotta do homework now smh
<FatalNIX> well my thought would be that elf64 is really meant to handle linking for 64 bit address space, right? Or does it actually not care at all. Obviously if everything is linked and packed into a file just right the machine doesn't care at all
<zid> it's just an elf where the vaddr and paddr fields are 8 bytes
<geist> it's meant to handle architectures that are 64bit
<geist> ie, arm64, x86-64, power, etc
<geist> right
dennis95 has quit [Quit: Leaving]
<moon-child> zid: some of the bits get shuffled around for alignment reasons
<moon-child> but yeah that's the main meaningful change
<scripted> Ok, pushed to github (this time correctly I checked 3x times)
<scripted> time to do homework I guess
<scripted> cya everyone
scripted has quit [Quit: WeeChat 3.5]
<FatalNIX> So I guess, what I am curious about since the steps were always done for me before- I just want to make sure that if I am mixing 16 bit and 32 bit x86 code in the same binary, that using say elf32 for both wouldn't cause problems.
<FatalNIX> usually I'd just say output and elf and voila it's done
<FatalNIX> but with fasmg I have to include the proper elf format
<zid> you can load whatever data you want to whatever address you want with elf
<zid> ld will get annoyed if you don't lie to it in the correct ways about the contents of the executable sections though
<FatalNIX> That's good. See what I was afraid of for example, was, what if I used elf64 like a weirdo, would shit start getting alligned to 64 bit offsets everywhere because it assumed things, just as an example
<zid> "i386 input incompatible with x86_64 output" or whatever
<FatalNIX> aha
<zid> so as long as you lie consistently you're fine
<FatalNIX> :>
mahmutov has joined #osdev
parrott has left #osdev [Leaving]
<heat> if you're mixing bitness you better have a way of switching processor modes
<zid> I am leaving that as an exercise to the reader
<heat> having an elf32 with 64-bit code or an elf64 with 32-bit code is pretty common
<heat> in os land
vdamewood has joined #osdev
<FatalNIX> What I was thinking of trying for a fun little fasmg project this time isn't anything special, but I was thinking of making a pluggable module interface for bootstrapping. For example, I could throw a DPMI module and if you compiled the kernel into a COM for dos or something with dpmi compiled in it would check for 32 bit dpmi services and then make the jump using DPMI's assistance, instead of doing what
<FatalNIX> I normally do and just compiling a DPMI aware executable that does it for me.
<FatalNIX> It's a stupid project really
<FatalNIX> But I never initiated a dPMI client on my own, I always used an stdlib that did it for me :)
<FatalNIX> I have obviously jumped to projected mode the regular way before obviously
<FatalNIX> but DPMI gives me free shit
<FatalNIX> and I figured it'd be a good test for the new fasmg assembler I'm playing with
<zid> dos4gw
<FatalNIX> I never actually got dos4gw to work right
<FatalNIX> I've been using cwsdpmi
<zid> I've never used any fancy dos stuff
<zid> things just came with dos4gw that I ran
<FatalNIX> heh
<zid> my dos mode programming never went past 256 byte demos
<FatalNIX> I have made 32 bit programs and 16 bit programs for DOS separately, and with 32 bit DPMI services it's not honestly any different half the time with an actual stdlib anyways
Burgundy has joined #osdev
<FatalNIX> but at that point it just feels like using glibc with some DOS limitations
<FatalNIX> and cool interrupts you can call
<heat> isn't DOS with modules just UEFI with extra steps? :P
<FatalNIX> hahaha
<zid> 64bit linux is just dos4gw but with an optional syscall interface
<FatalNIX> I was sad to hear that freedos plus plus, a 64 bit C++ fork of freedos doesn't work on real hardware :(
srjek has quit [Ping timeout: 268 seconds]
<FatalNIX> I could use some DLMI
<FatalNIX> heh
<zid> just do some osdev and dump yourself into a naked 64bit env
<FatalNIX> I spend most of my time working with small systems though
<heat> not naked you pervs
<moon-child> prove it
<zid> prove you're naked, for moon-child
<FatalNIX> Like, a systems developer, yes, but I am by far not your every day x86/x86_64.. that processor family scares me to the shits
<moon-child> pretty sure thats's illegal
<FatalNIX> I've been meaning to invest my next adventures with RISC-V
<zid> well you do seem to like toy computers
<FatalNIX> I just feel that computers could be simpler sometimes.
<FatalNIX> :)
<zid> risc-v isn't even simple
<FatalNIX> It didn't look too bad when I glanced at it a year ago
<zid> and any machine anybody makes with it in will just be a PC anyway
<zid> pci-e, dram, etc
<zid> nobody's going to connect it to 33MHz sodimms
<zid> and isa
<FatalNIX> But I want VLB
<zid> Is that a disease
<FatalNIX> My 486 has VLB
<zid> ah, vesa local bus
<FatalNIX> it was very short lived
<FatalNIX> in fact until I had this I never once had a machine with it even in the 90s
<FatalNIX> We went from 16 bit ISA directly to 32 bit PCI
<zid> not sure risc-v is going to revive that for you, sorry
<FatalNIX> ha
<FatalNIX> BUT
<FatalNIX> RISC-V + virtio.. not real hardware but, hey
<zid> I was AGP when I was computering
<FatalNIX> might be kinda sexy
<zid> I have a 6800 Ultra still
<FatalNIX> My TRS-80s have a 6809E
<FatalNIX> Dual Stack deliciousness
<FatalNIX> They kinda suck though. The serial ports don't have any interrupts
<FatalNIX> I've been thinking, maybe I should use an AVR or something to make like a serial comm thing for it, connect it to IRC somehow
<FatalNIX> Maybe play a MUD
<zid> play discworld
<FatalNIX> I have a better ideas.
<zid> there are no better ideas
<zid> discorld is the best mud
<FatalNIX> Hook it up to this guy I just took a picture of
<zid> That's a lot of hardware for 56k
<zid> is it at least v.92
<zid> looks too old
<FatalNIX> Yes it's a v.everything.
<zid> surprising
<FatalNIX> it even handles 57777
<zid> I was on dialup for a long time so I had a v.92 pci card the size of a postage stamp
<FatalNIX> I have another v.92 here..
<zid> by the end
<FatalNIX> they're great with walmart walkie talkies you know
<FatalNIX> you get like 20 miles of service for fun projects
<zid> I think I have a pcmcia 56k modem around somewhere still
<FatalNIX> just put an arduino on one end with a 25 pin to 9 pin adapter a ttl to rs232 level shifter and you're good to go for controlling your robot
<FatalNIX> I just think they're handy to have around for toy projects.
fwg has quit [Ping timeout: 260 seconds]
fwg has joined #osdev
<FatalNIX> See every time I talk about dialup modems it goes silent
<FatalNIX> :)
<kazinsal> if you start talking about faxes I'll have to invent new profanities
<kazinsal> friggin hate fax machines
<zid> I love the talk on fax machines though
<zid> from defcon or whatever
<bslsk05> ​'DEF CON 26 - Eyal Itkin, Yaniv Balmas - What the Fax?!' by DEFCONConference (00:44:15)
<FatalNIX> daxes are just printers with a dialup modem though really
<FatalNIX> I mean what's the big deal
<kazinsal> the way faxes communicate gets really complicated and janky when digital phone trunking gets involved
<FatalNIX> That's normal though
<FatalNIX> they should have just done postscript
<FatalNIX> postscript over dialup would have been fine
<zid> in 1966?
<FatalNIX> welllll
<FatalNIX> I mean, once postscript became a thing
<kazinsal> telephony is the ultimate example of needing incredible amounts of backwards compatibility
<zid> we did do that
<zid> we switched to email
<FatalNIX> ha
<zid> the moment pdf/ps/etc were a thing
<zid> fax was a legacy technology in the 80s
<kazinsal> still required by a lot of medical information statutes
<FatalNIX> I have a fax machine
<zid> I mean.. I *had* a fax machine, assuming you mean fax modem :p
<FatalNIX> it's handy when I have a company like insurrance that needs documents only over fax
<FatalNIX> I can just slam something into my hopper and send it away
<kazinsal> for real though there's incredible effort made to ensure backwards compatibility in telephony. you can shove a rotary telephone into a FXS port on a cisco gateway and it'll automatically detect pulse dialing just fine
<FatalNIX> yeah my ATA supports pulse dial I was like wtf
<FatalNIX> lol
Ali_A has quit [Quit: Connection closed]
Likorn has quit [Quit: WeeChat 3.4.1]
<geist> FatalNIX: re mixing 16 and 32bit code, i'd recommend always compiling and linking as 32, but if you have some 16 bit code, write it in asm and link it directly in, faking out the linker
<geist> and avoid doing it as much as possible. any external references from 16bit code is flaky, etc
<geist> even better, avoid using 16bit code altogether
<zid> yup
<zid> Keep your lie consistent
<geist> yah avoid trying to use the linker to jam 16bit .o files with 32bit .o files. at best it's a huge mess, at worst it just doesn't work
<gog> you could put all 16 bit code into its own section with a NOCROSSREFS
<kazinsal> section .hicsuntdracones
<zid> hi cunt dracones?
<zid> oh here's an s, hic sunt dracones, latin?
<gog> here be dragons
<zid> ah
<zid> that makes sense, gog is clever
<gog> hérna er drekkur
<zid> ryuu wa koko ni arimasu
<gog> weeb
<zid> I need a word for iceland fanaticism.. sans-tree-aboo?
<gog> lol
* FireFly is randomly reminded of the carta marina from the 'hic sunt dracones'.. also because iceland :p
<zid> old maps are the best
<FireFly> yeah, they're fun
<FireFly> I should get some blutack so I can put up the facsimile of it I picked up recently..
mahmutov has quit [Ping timeout: 248 seconds]
GeDaMo has quit [Remote host closed the connection]
PapaFrog has quit [Ping timeout: 252 seconds]
PapaFrog has joined #osdev
<gog> they call it iceland because there are no trees here
<gog> ísland á engin tré
archenoth has quit [Ping timeout: 260 seconds]
V has quit [Changing host]
V has joined #osdev
atrapa has quit [Quit: atrapa]
<Griwes> elf linkers pack segments together, ostensibly to "save space", but I don't think I care about this (; I'd like all LOAD segments to have their virtual address page aligned. I tried to find an option for doing this, but I've failed so far - is there something I missed that'd allow me to force a different layout, or am I left with patching the linker I'm using? (I'm using lld if that makes a difference)
<Griwes> ...that open ( was supposed to be followed by "with 5 load segments worst case is you waste 12KiB-4 if I'm counting right)"
<gog> in your linker script just ALIGN(4K) the section
<FatalNIX> geist: you know I didn't think about that. the more the 16 bit stuff is hidden from the rest of the linking process probably the better.
<Griwes> Hmm, I guess I could have the compiler always use a custom linker script after spending a while making it do what I want
<bslsk05> ​github.com: bootstrap/linker.ld at master · zid/bootstrap · GitHub
<zid> My super generic linker script I just copy paste
<Griwes> I'll need to make this much more detailed :P this is for userspace apps and is supposed to be a part of my userspace target in the toolchain
<zid> remove the . and it works fine for userspace... after you add whatever custom sections your userspace needs, or just remove the discard
<mrvn> FatalNIX: you should mix 16bit and 64bit. forget about 32bit.
<Griwes> I guess I haven't considered this because I've never touched segment definitions in linker scripts
<Griwes> Alright, I'll try to grab the default linker script lld is using and butcher it to match what I want
<FatalNIX> OMG
<FatalNIX> I just remembered about objcopy
<zid> grats :P
<FatalNIX> I can always turn a binary file into an object with objcopy
<FatalNIX> and just link it in :P
<zid> not really, that's hard
<zid> bin2o is easier
<zid> or an .S file with INCBIN in it or such
<FatalNIX> I have never even heard of it
<FatalNIX> yeah incbin would work too
<zid> ld isn't a huge fan of -I binary
freakazoid343 has quit [Remote host closed the connection]
sortie has quit [Quit: Leaving]
sortie has joined #osdev
<FatalNIX> I use incbin all the time elsewhere so I dunno why I didn't think of that either
<zid> also you have the option of like, xxd to spit out a C array
<zid> and just compile it :P
<zid> I've done this before because I was being lazy and just made gcc do some temporary calcs
<FatalNIX> ahahahaha
<FatalNIX> actually I used to do that with a perl one liner
<zid> I made a 3D demo once and the 3d model format I designed I designed in a C header for what it'd look like in memory
<FatalNIX> heh
<zid> ..so I just spat out a .c with an instance of one of those structs in it from blender
kingoffrance has joined #osdev
<FatalNIX> that's.. actually kind of neat
<FatalNIX> so the header became your abstraction over the model
<FatalNIX> and the model was just a source file
<zid> dragon.c - 9788kB
<FatalNIX> LOL
<zid> it's fairly.. verbose, lots of commas and digits per byte of actual model
archenoth has joined #osdev
<zid> unsigned int dragon_verts = 82978;
<zid> unsigned int dragon_indicies = 100000;
<zid> struct vertex_struct dragon_vertices[]={
<zid> {-0.080060f, 0.020094f, -0.268005f, -0.079348f, 0.404370f, 0.911130f, 0.254293f, 0.736938f},
<FatalNIX> sure, but it isn't intended on being manipulated by a person
<zid> *repeat 100k times*
<zid> dragon.o is 3M
<FatalNIX> how did you connect vertices? or were they just point clouds?
<zid> indices
<FatalNIX> heh
<zid> line 82933:
<zid> unsigned short dragon_indexes[]={
<zid> 3, 4, 5,
<zid> 0, 1, 2,
<FatalNIX> wth lol
<FatalNIX> I just came up with a terrible 3D model format.
<FatalNIX> in my head
<zid> had to scroll backwards a lot through my image dump discord
<FatalNIX> forget links, make it pixel by pixel mesh, you bisect the model in half like a BSP would, and you have an greyscale with two halves, and the value of the greyscale pixels are a number between 0 and 1 where 0 is the origin of the BSP.
<FatalNIX> no scaling though
<FatalNIX> and no wireframes
<FatalNIX> but it's horrifying and I love it
<zid> sounds like you just invented voxels and oct trees
<FatalNIX> You know
<FatalNIX> octrees are pretty cool actually
<zid> https://cdn.discordapp.com/attachments/417023075348119556/451149648288153611/unknown.png When you get confused as to which texture is up / west / east etc
<moon-child> urk
<FatalNIX> I am actually a bigger fan of BSP trees
<FatalNIX> WTF is this
<FatalNIX> This is one hell of a skybox
<moon-child> zid: texture ur dragon pls
<zid> it is textured
<moon-child> the textures suck then
<zid> it's some grey stone thing
<moon-child> it doesn't look like grey stone
<zid> look at the first image then?
<zid> It needs some SSAO though, or shadows, the inside of the mouth should be dark etc
<moon-child> first image doesn't have a dragon tho
Likorn has joined #osdev
<moon-child> oh nvm there was an earlier image
<zid> yea it do?
<kingoffrance> you can merge with sortie and put him inside a pyramid :)
* zid bops moon-child
<moon-child> zid: I see jaggies
<moon-child> aa pls
<FatalNIX> what do you do when somebody gets confused when you say the word "processes" and they say, "you mean, Apps?"
<zid> I did rewrite the opengl loader later to do AA
<zid> "l2computer" is what I say
<zid> you can't do AA without doing the extended context creation crap, it's a big pain in the bum
<zid> You have to wglCreateContext, then dlsym on that to get the extended version, and use it to make another context, and delete the original
<moon-child> > wgl
<moon-child> imagine using win32 in 2022
<heat> we're all over win64 these days
<heat> win32 is for losers
<FatalNIX> win16
<heat> win8
<FatalNIX> win4
wgrant has joined #osdev
<heat> 4-bit is cursed
<moon-child> I see 4 levels of grayscale
<moon-child> looks like 2x aa?
dra has joined #osdev
<zid> WGL_SAMPLES_ARB, 16,
<zid> I think that's the thing?
<zid> oh that's multisampling
<zid> need to find out if that's textures or screen sampling..
<zid> yea it's multisample rasterization, screenspace
<mrvn> Now that C++ has spaceship operators I want an quaternary operator: <ordering> @ <less> ! <equal> ° <more>
<moon-child> thanks, i hate it
<bslsk05> ​gist.github.com: gl.c · GitHub
<zid> That's why I didn't do it at first.. the code is beeg.
<bslsk05> ​gist.github.com: gist:50ec4bf21fb3f271aead8ef944ea5690 · GitHub
<kingoffrance> FatalNIX  "when you say the word "processes" and they say, "you mean, Apps?""   there's a ms paint-like steve jobs meme, with him grinning vindictively, bearing braces, as the side columns read   x -> app  y -> app  z -> app    im not sure that is accurate that he is responsible, but i believe that is the most appropriate response known
<kingoffrance> at this time
<vin> What was the channel for asking build tools related question? I can't find it in the search list
<zid> workingset
<zid> That'll be $4
<vin> Thanks!
<heat> #toolchain-nerds
<zid> failing that, ##binutils and ask boru in your worst irish accent
srjek has joined #osdev
<vin> Thanks zid! Can't send you $4 but here is a song for good mood https://www.youtube.com/watch?v=pBkHHoOIIn8
<bslsk05> ​'Portugal. The Man - Feel It Still (Official Music Video)' by Portugal. The Man (00:02:50)
Likorn has quit [Quit: WeeChat 3.4.1]
Likorn has joined #osdev
<vin> Okay, since I didn't get help anywhere. I will post it here hoping for some help :)
<vin> I am trying to compile c++ code using gcc because I wanted to use a custom glibc (I want __memmove_chk_avx512_no_vzeroupper) however I get an underfined reference error. I have tested this with c code and it works fine. Here is the command and ouput https://pastebin.com/raw/EgtV6Xtb
<mrvn> Maybe if you take the train to fly to hawaii because you wanted apples instead of oranges your luggage may be lost? wait, what?
<heat> vin, what's your c++ code?
<heat> __memmove_chk_avx512_no_vzeroupper(void*, void*, unsigned long) is mangled, which means you forgot the extern "C"
<heat> __memmove_chk_avx512_no_vzeroupper(void*, void*, unsigned long) != __memmove_chk_avx512_no_vzeroupper ;)
<mrvn> vin: you shlould really start to compile compilation units on their own and then link them.
<vin> Ah my bad I had forgotten to add extern C, it works now thanks heat!
<heat> plot twist: I am the toolchain nerd
<vin> haha
<mrvn> don't forget the #ifdef __cpp__
<vin> yes mrvn and yes this is a prototype, I will clean it up soon by seperating it!
dra has quit [Quit: Leaving]
matrice64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kingoffrance has quit [Ping timeout: 246 seconds]
Jmabsd has quit [Quit: Leaving]
<sortie> I PUT A CLOUD VM OF MY OS ON THE INTERNET WITH AN ACTUAL IPV4!
<zid> neat
<sortie> omg omg omg
<zid> Mine sorta.. connects to the internet, but all it does is respond to pings
<zid> so less connecting and more.. babbling
C-Man has quit [Ping timeout: 268 seconds]
<sortie> oh hey it responds to ping too
<zid> go on then, give the ip so we cn root it
<heat> you don't need root, sortix doesn't have permission checking
<heat> sortix 1 - 0 zid
<sortie> I ssh'd into it!!
<zid> so we can control it remotely without your permission*
<Bitweasil> Yeah, how are you not giving us the IP? :D
<sortie> Yeah maybe let's not give an angry herd of osdevers the IP address :)
<sortie> But soon enough I'll migrate irc.sortix.org to it
<sortie> So what I'm doing is really cool. I got an extra IPv4 for my dedicated server and my host assigned a MAC address that would be get the IPv4 if it asked over DHCP
<sortie> Bridge networking is super scary because I don't wanna fuck up my remote server, since it seems that I need to basically migrate to a secondary virtual interface for normal operations, and turn the real interface into a switch
<sortie> But I learned about this super cool thing called macvtap which is a lot more like what I want. Basically I use the ip(8) command to make such a device associated with my primary network interface and give it a MAC address, and then it creates a /dev/tapN device
<zid> yea I constantly fuck up the internet in my VM messing with a bridge for my OS
<sortie> That /dev/tap device is then associated with that MAC and transparently is connected to the LAN
<sortie> I then spawn a qemu using that tap device, in a bit obscure way, and tell it to use the MAC address assigned by my host
<sortie> The qemu boots my OS, my OS sees a network interface with a MAC, it brings the interface up with is connected via the tunnel through the macvtap directly to and from the real network interface to the gateway, the DHCP broadcast is sent from the right MAC, and my hosting provider responds with the secondary IPv4 I got assigned, and then my OS uses that MAC+IPv4
<sortie> And boom my VM is directly connected to the public internet, receiving raw ethernet frames with raw IP packets
<sortie> I.e. you're literally talking to my IP stack
<zid> mine's simpler
<klange> I just turn on my ThinkPad.
<zid> brctl addif br0 eth0; brctl addif tap0 eth0
<zid> brctl addif br0 eth0; brctl addif br0 tap0*
<sortie> Previously people were technically talking to a Linux IP stack that was then port forwarded by qemu
<sortie> I tried that bridge stuff but it took my desktop offline since the eth0 interface was now sent to the bridge..
<klange> you can also just... run vmware
<klange> no slirp, only tuntap ;-;
<sortie> VirtualBox also takes care of stuff yea
<zid> yea vmware also has a bridge mode, works fine
<zid> I tested my code in it
<sortie> The macvtap stuff is semantically a lot closer to what I want tho
<zid> I suck at setting up linux bridges and routing tables and stuff :P
<zid> so I just made vmware do the setup
<sortie> It's how I thought bridges worked since virtualbox made it seem that easy
<kazinsal> when I eventually do my core rewrite (yeah, I know, I've been talking about this for months and haven't written a line of code) I need to actually make sure that it works right in virtualbox
<sortie> https://paste.ahti.space/ba2a3d.html ← This is basically how I set up the macvtap stuff, pretty simple
<bslsk05> ​paste.ahti.space <no title>
<heat> kazinsal, why wouldn't it? you just need to be careful at early boot with how you do your memory allocation
<heat> that's the only issue I've ran into
<kazinsal> something about the way I handle interrupts in my current x86 core makes vbox have a sad
<sortie> (It will allocate a MAC for you by default which you can see in /sys/class/net/macvtap0/address, I just override it manually since that's what my host expects to assign the right IPv4)
<heat> my bootmem allocator was poorly thought out and not reserving things like it should so it overwrote stuff
<kazinsal> vmware, hyper-v, real hardware, all fine. vbox? nope
<heat> that's weird
<heat> like irqs?
<kazinsal> yeah
<sortie> I dare say this stuff is actually simpler than bridged networking :)
freakazoid12345 has joined #osdev
<kazinsal> lots of weird little bugs like that in my kernel core so I'm eventually going to just throw it out and write a new x86-64 kernel core and then bolt my network stack back onto it
<sortie> Woo just logged into my OS via 'ssh $ip' with ssh public/private keys and it just worked \o/
<klange> now if only I had the give-a-shit to actually implement listening sockets
<sortie> Oh hey it's the eve of shitsgiving
<heat> i also don't have listening sockets
<kazinsal> same
<heat> i am proud to announce I have reached feature parity with toaruos
<heat> please use my os
<heat> thanks
<sortie> Hello clientele I will be your host tonight
<kazinsal> it's high on the to-do list primarily because a router that you need to console into is a shitty router
<heat> true routers use telnet
<heat> or http
<heat> but telnet's for hackerz
<heat> kazinsal: re: kernel rewrite; https://www.youtube.com/watch?v=ZXsQAXx_ao0
<bslsk05> ​'Shia LaBeouf "Just Do It" Motivational Speech (Original Video by LaBeouf, Rönkkö & Turner)' by MotivaShian (00:01:04)
<bslsk05> ​'"Shia LaBeouf" Live - Rob Cantor' by robcantor (00:03:28)
<sortie> I just need a port of let's encrypt and maybe nginx and then I can probably connect my sortix.org VM directly to the internet via an IPv4
<sortie> I guess I kinda also need let's encrypt for irc.sortix.org but I can probably just cheat and take it offline whenever I need to renew the cert
<heat> weren't you using openbsd's httpd?
<sortie> Yup
<sortie> It's missing a couple features, so the nginx proxying fixes a couple headers and redirects
<sortie> One missing feature is the ability to set headers, which somehow they didn't implement (maybe added recently?), which I need in order to e.g. force HTTPS
<heat> i want an exclusively http2/3 pub.sortix.org running on sortix
<heat> http1.1 is for old people
* sortie beard
<klange> i would just like to have my old http server ported
<sortie> It's a pretty surreal feeling though to boot VM and have it be assigned an official IPv4
<sortie> Next up I should assign it like an official fully qualified hostname
<klange> Reasonably certain I have no way to do this.
<klange> I can't just go and get another global IPv4 address from anything right now.
<sortie> Like then, you know, it OFFICIALLY ***IS** foo.sortix.org
<sortie> IPv4 allocation, DNS assignment, hostname, all that official stuff
<klange> Couldn't even hook the ThinkPad up to the outside world directly, we don't do IPoE here... would need a PPPoE stack...
* sortie blinks
<sortie> MY HOSTING PROVIDER HAS IPV6
<sortie> I need to implement ipv6..
<sortie> Network like it's 1995
<klange> I could get a global IPv6 address...
<klange> I could get several.
<sortie> I think they gave me a /64
<klange> We _do_ do IPv6 via IPoE.
<sortie> Alas I still don't have consumer IPv6 >:(
<klange> I currently have 9 global IPv6 addresses on this box.
<sortie> That's like a primary reason I haven't cared about IPv6.. but now that I can put a VM online on the internet (both 4 and 6) I actually have a reason to implement it
<heat> no ipv6 in denmark?
<heat> that's kinda sus
<sortie> heat, depends on provider
<sortie> But mostly they just suck
nyah has quit [Quit: leaving]
<sortie> The coolest thing about this setup is that it's completely transparent to users that it's a VM, it's a legit IP that works
<sortie> All the packets routed perfectly
<sortie> Much like real cloud providers anyway
<klange> I could put my thinkpad in the DMZ
<klange> and it could host a UDP service
<sortie> You know you want to sef-host nyancatd
heat has quit [Remote host closed the connection]
<sortie> niht :)
<sortie> It's 1 AM but some cool osdev stuff really cheered me up after a pretty down day :)
srjek has quit [Ping timeout: 260 seconds]
immibis has quit [Remote host closed the connection]
immibis has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
Likorn has quit [Quit: WeeChat 3.4.1]