<leg7>
I mean it looks like it's doing the right thing
<leg7>
and it kinda works that's the only bug
<leg7>
anyways that's not super important it's just anoying
zetef has quit [Remote host closed the connection]
<leg7>
I have like 5 days more to work on my OS before I have to send the code to my teacher for evaluation and I wanted to know what I can do in the time I have left
<geist>
ah. was wondering what this was all about
<geist>
are you sure you want to call it ligma os?
<leg7>
I was thinking either IDE driver + ext2 + porting os to use hard drive
<leg7>
or timer + soundcard
<leg7>
well ligmaos is just a placeholder name
<geist>
timer probably. ide + ext2 there's no way you can get that going in 5 days
<leg7>
yeah that's what I was thinking
<geist>
i guess it all depends on what it currently does
<leg7>
the os?
<geist>
es
<leg7>
I got interrupts and irqs working
<leg7>
I just made a ps2 driver
<leg7>
for scan code set 2
<leg7>
I can write to it
<geist>
does it switch threads?
<leg7>
my friend made some vbe stuff to have a pretty interface
<leg7>
no it doesn't
<geist>
so whats the scope of what you're turning into the teacher?
<leg7>
(that I know of atleast)
<geist>
lilke, what are you asked to do
<leg7>
well we could choose projects from a list or come up with our own
<leg7>
so I came up with my own :D
<leg7>
I wanted to make an OS
<leg7>
and the teacher told me no one had done that in 25 years so he doesn't have any requirements
<leg7>
Because he doesn't have a reference point
<geist>
ah okay. so if they're CS savvy at all they'll probably ask what you're doing about interrupts and threads and wahtnot
<leg7>
yeah
<leg7>
Well he's a logic teacher
<leg7>
loves PROLOG and stuff
<geist>
i'm not trying to diss on it, done get me wrong, everyone starts somwehere, but in this current form it's basically a bare metal program that displays some stuff and talks to some hardware
<geist>
which is an achievement, but it's a bit of a stretch to call it an OS
<leg7>
yeah but I only had 8 weeks
<geist>
sure. so i guess since you only have 5 days.... yeah hmm
<leg7>
and I've never done embeded stuff
<geist>
i guess focus on easy to do flashy stuff
<leg7>
exactly
<geist>
like, i dunno, show a live counter of time in the corner of the screen
<geist>
reading from the RTC, updating once a second
<leg7>
I told my friend I could probably get sound and then he can make a piano/keyboard interface
<geist>
to show that it's not just sitting there waitinf for your to tyle
<geist>
type
<leg7>
ok
<geist>
if you update the clock in a timer interrut it makes it look like it can do more than one thing at a time
<geist>
kinda gives it a bit more of a proper OS feel
<geist>
did you implement interrupt handling?
<leg7>
yeah
<leg7>
I can do that
<geist>
yeah so you could say run a timer and read the RTC, and write a clock to the screen in the interrupt
<geist>
that might be cute
<leg7>
ok
<leg7>
I can probably do that in a day or two
srjek has joined #osdev
<leg7>
do you think I can get basic sound?
<geist>
basic sound out of what interface?
<leg7>
I don't really know them
<leg7>
the simplest sound controller
<geist>
on a PC right?
<geist>
are you running this under qemu?
<leg7>
yeah
<geist>
i guess QEMU emulates a PC speaker? I honestly duno
<geist>
PC speaker is very easy to get it to make some beeps and whatnot
<geist>
more complicated to do anything more than that
<geist>
something like a soundblaster or whatnot is probably outside the scope of 5 days
<leg7>
yeah some beeps is good enough
<leg7>
I'll keep working on it afterwards but I just want something the teacher can play with for 5 seconds and be like `yeah they did some work`
<leg7>
because realistically he won't read or understand any of the code
<geist>
yah makes sense
<geist>
also if that's the case make sure you check in things and dont break it in the next 5 days
<geist>
in case you actually mess it up with something crashy
<geist>
you can at least revert back to the functional version before turning it in
xenos1984 has quit [Read error: Connection reset by peer]
<bslsk05>
wiki.osdev.org: Just a moment...
<leg7>
Ermine: sounds plausible
<leg7>
geist: yeah I check in my stuff pretty often
<Mondenkind>
googling for it yields no hits except that wiki article so probably not
xenos1984 has joined #osdev
<Mondenkind>
also you can implement fopen_http yourself in terms of fopencookie sooo
<leg7>
geist: The weird thing about my Makefile is that if I do just `make` it says `kernel.c.o is up to date` but if I `make run` it recompiles it just fine even though `make run` just calls the default target and runs the emulator
<geist>
leg7: are you sure you're including *all* of the .d files?
<leg7>
Do you mind sharing your github username so I can check out the makefile you sent me yestery
<bslsk05>
github.com: LigmaOS/src/kernel/drivers/input/PS2_keyboard.c at 0244e89c949063fe2edb35a8c41123858360ef44 · leg7/LigmaOS · GitHub
<leg7>
I had no idea how to do it so I just made a transition table like we did on paper
<leg7>
and managed some stuff in the irq
<geist>
yah and one of the things that running on emulators vs real hardware will get you into trouble is the emulator will pretty much always queue up all of the bytes of a multi byte scancode instantly
<geist>
but on real hardware they come in fairly slowly from the keyboard. so you can actually end up with the bytes chopped
<geist>
no big deal. you just have to handle the states across interrupts, etc
<leg7>
uh yeah I think that's what I do
<geist>
good, excellent
<leg7>
I mean for every int I just read 1 byte
<leg7>
I googled how to make a state machine in C before trying but all the answers I could find looked convoluted and slow
<leg7>
with function pointers and stuff
<geist>
good i've seen a lot of first ps2 drivers do it the opposite way: read as many bytes as there are queued up (which isn't a bad idea) but then you end up with what i'm talking about which is that on emulator it's always nicely packetized and never chopped
<geist>
yah usually i just define an enum and write a switch statement for moderate sized state machines
<leg7>
ngl I think I tried reading multiples bytes at onec but it didn't work
<leg7>
yeah switch sounds like a reasonable solution
<bslsk05>
stackoverflow.com: State machines in C - Stack Overflow
<geist>
this is some ancient code i wrote long ago but basically does a simple state machine to parse a command line with quotes and whatnot
<leg7>
yeah it's pretty understandable without the diagram
<leg7>
I think mine is incomprehensible without it
<leg7>
I need to generate a virtual one I did it on paper
<leg7>
I cloned lk some time ago and used it for inspiration
<leg7>
it's good stuff
<leg7>
anyways I've gtg it's late
<geist>
kk, take care!
<leg7>
Thanks a lot for the help!
<leg7>
o/
leg7 has quit [Remote host closed the connection]
nikolar has quit [Read error: Connection reset by peer]
nikolar has joined #osdev
<kof673>
> fopen_http djgpp, and posix IIRC ...funopen IIRC...lets you write function points to hook the FILE * stream stuff. not sure i've seen anything actually use that
<kof673>
"in terms of fopencookie" yes, that stuff ^^^
<kof673>
*write functions and use function pointers
<bslsk05>
github.com: tinyos-main/tos/lib/printf/2_0_2/avr_stdio.h at master · tinyos/tinyos-main · GitHub
<clever>
down on line 351, you can see how simple it is
<kof673>
considering file:// URI scheme... iti s not so far-fetched, just not sure anything fully tries to "unify" such things into a single "filename scheme"
<kof673>
*it is not. conway as always :D which one is "standard" "depends where you are coming from"
Left_Turn has quit [Read error: Connection reset by peer]
nadja has quit [Quit: bye!]
spare has quit [Remote host closed the connection]