#Hornet(rewrite, do you remember?)

1 messages · Page 2 of 1

tardy mist
#

just load programs

#

Im testing in a test env

tardy mist
tardy mist
#

Im modifying flanterm to support beeg fonts

#

it now kinda works, it at least knows what glyph to display

#

holy shit it actually worked

#

clearing is still a bit buggy

#

oh, cuz I didnt modify plot_char_fast

#

nice

#

now it works

#

with any font I can imagine

#

the lack of AA is kinda annoying tho

#

anyways

#

now the terminal looks good

#

some of the letters in this font kinda look wierd

#

also its a bit too large

#

so can you suggest some better ones?

#

as close to 16x16 resolution as possible

tight summit
#

why did you need to modify it though?

#

couldn't you have told it to use a font of a different size?

tardy mist
#

I was too lazy to delete font_bool so its floating there unused :/

#

why does font_bool even exist?

hardy merlin
wind mortar
#

you still need to load it and compare it so i don’t see how it’s quicker

#

if anything it just uses more memory because you’ve expanded it to use a byte per bit, but idk how flanterm uses that so i might be speaking out of my ass here

hardy merlin
#

honestly I don't know why that is either

#

I'd point out my font drawing routines that use bit ops are slow... but it's NOT because they use bitops; it's because they're written in a way that doesn't make them performant

wind mortar
#

hand write them in assembly

hardy merlin
#

C is good enough, I'm not saying that

#

but it has to recalculate a bunch at once per pixel of font data

wind mortar
#

i’m jk

hardy merlin
#

like the address OF the pixel to write

#

I really should revamp that, but I'm working on boron right now

tardy mist
#

so the font_bool is garbage?

hardy merlin
#

I don't know

#

I guess wait for mintsuki to explain the reasoning

tight summit
#

because it's faster

#

practically tested to be faster

#

not saying that there couldn't be bitwise pieces of code that are as fast or faster

#

but this is faster than a naïve bitwise routine

#

don't ask me why, i don't know for sure

proven horizon
#

unless i'm retarded

tardy mist
proven horizon
barren sundial
#

yeah lol

proven horizon
#

yeah flanterm does support font scaling in the init function

barren sundial
#

a lot of english is just things we yoinked

tardy mist
#

so I made it use font_bits instead of font_bool

tight summit
#

you could also fix font_bool to not fuck things up i guess

#

that sounds like a change welcome upstream

#

either that or figuring out a way to make bits as fast as bool

tardy mist
#

I see, it expects a VGA font

#

then, I just have to make it take whatever bitmap

tardy mist
#

lessgooo

#

works

#

I have to change some things before contributing tho

tardy mist
#

so, the builtin font bugs out my code

#

cuz its exactly 8 pixels wide xD

#

I need to fix it so VGA fonts actually load

#

almost working

tardy mist
#

I lost all my progress :/

proven horizon
#

wut how

tardy mist
proven horizon
tardy mist
#

Its refactoring day

tardy mist
#

Im finished refactoring

tight summit
tardy mist
#

what is your question? is the code quality questionable?

tight summit
#

i am not sure whether you take into account the fact that glyphs 0xc0-0xdf need to be extended right

#

for one

tardy mist
tight summit
tardy mist
#

Cuz I alredy broke the VGA specification by letting any resolution be loaded

tight summit
#

nah

#

ok so

#

forget about the word VGA

#

codepage 437, which is what we use

#

those glyphs need to be right extended

#

they are mostly box drawing characters and similar

#

and no, that's not conditional

#

it has to be done

tardy mist
#

oh, so they have no spacing inbetween them and their neighbours?

tight summit
#

it's not that they have no spacing as much as it is that the last right most column of the glyph is repeated inside what would be the spacing

#

this allows something like a straight line to be drawn using box characters without any gaps

tardy mist
#

oh

#

Ill fix that rq

tardy mist
#

WHAT THE HELL FREETYPE, YOU CANT DO THIS THING WITHOUT GAPS?

#

works like a charm now

#

@tight summit done with fixing it

tight summit
#

alright ty

tardy mist
tight summit
tardy mist
#

ok

tardy mist
#

I made the page fault handler kill the current process instead of kernel panicing

#

also just fucking realized that my scheduler gives the same stack to all kernel processes

#

it wasnt a problem since I only had one kernel procass and 0 user processes

#

but it now is since I want to load programs

tardy mist
#

it now works

#

kinda

#

idk what that PID 267866096 is

#

added special case for the init system malfunctioning

tardy mist
#

Im alredy fucking stuck

#

its like @fallow pilot said, -1 motivation

proven horizon
#

what's wrong?

tardy mist
#

pid 0 crashes if theres another process running parallel to it

#

*user process

proven horizon
#

how can it run parallel with the kernel when you don't have SMP wat

proven horizon
#

in create_process you're creating a new process structure without defining stuff and immediately setting cr3 to an uninitialized value

tardy mist
#

not uninitialized

#

just the current cr3

proven horizon
#

newproc.cr3 can be anything at the point of executing the movq

tardy mist
#

no cuz this is limine

#

it sets up a page table

#

*uising limine

proven horizon
#

wait wait wait what's the syntax for gas

#

mov dest, src or mov src, dest ?

tardy mist
#

src dest

#

I learned it the hard way

proven horizon
#

fuuuck okay i'm retarded sorry

tardy mist
#

petition: add nasm syntax option into GCC

proven horizon
#

nah it's not that big of a deal really

fallow pilot
tardy mist
proven horizon
#

can't tell just from looking at my phone

#

i'll take a look when I get home

tardy mist
#

ok ty

tardy mist
fallow pilot
tardy mist
#

ty

fallow pilot
#

yeah

tardy mist
fallow pilot
#

text sorry

fallow pilot
#

why

tardy mist
#

Im tired of typing and screenshotting

fallow pilot
#

its not that bad

tardy mist
fallow pilot
#

but what do you need help with?

tardy mist
#

fucking inexplickable scheduler behaviour

#

Imma install simplescreenrecorder and make a vid for you

fallow pilot
#

ok

tardy mist
#

frick

#

wrong monitro

#

wait

tardy mist
#

well fuck I have to go

#

so just leave your findings here

proven horizon
#

jesus i can't even compile it

#

you're apparently including a missing stdio.h

#

oh wait you're supplying binaries in the repo thank god

#

it's flantermconcern

#

exactly this line in plot_char():
uint32_t bg = c->bg == 0xffffffff ? canvas_line[gx] : c->bg;
(line 467 in backends/fb.c)
@tight summit

#

the only times where plot_char() is called are here: (line numbers included and all in backends/fb.c)

747:    plot_char(_ctx, &c, ctx->cursor_x, ctx->cursor_y);
769:            plot_char_fast(_ctx, old, &q->c, q->x, q->y);
771:            plot_char(_ctx, &q->c, q->x, q->y);
779:            plot_char(_ctx, &ctx->grid[ctx->old_cursor_x + ctx->old_cursor_y * _ctx->cols], ctx->old_cursor_x, ctx->old_cursor_y);
832:        plot_char(_ctx, &ctx->grid[i], x, y);
#

yeah it's crashing absolutely randomly so it's not flanterm (sorry for the ping mint :p)

#

so you're getting a bunch of logs about a GPF in the process with a same PID, before the kernel gives up and throws a page fault, which does make me believe you're not actually killing the process

#

my blind guess: when you kill a process you don't actually reset the current_PID, but regardless of the process' RIP, you're doing this

if (not_first_tick)
        memcpy(&processes.data[current_PID].status, regs, sizeof(Registers));
#

which might be why you're getting the page fault, and not resetting the current_PID might be why you're getting the GPF repeatedly

#

and of course I might be wrong, I'm hella sleepy and my brain isn't braining as much

#

Braining xD

tardy mist
#

fucking hell

#

yk what caused ALL this

#

?

#

I switched up cs and ss

#

that is FUCKING IT

tardy mist
#

FUCK

#

just realized that my PMM is full of bugs

#

so I have to fix them

tardy mist
#

also there is a memory leak somewhere in my kernel, probably my shit testing shell

#

and yes, -5 points for baking in a shell

#

context: #1170316206935388231 message

fallow pilot
#

Can you show me the code for the shell?

proven horizon
#

just looked, lolguy gets -10 points for using if-else and strcmp for builtin commands

#

and -5 points for not building the shell as a separate executable

tardy mist
#

memory leak fixed

#

what took me so long was that I retrieved the size wrong in the free function so it just froze

tardy mist
proven horizon
#

what, the if-else or building it into the kernel?

tardy mist
#

both

#

this is a dirty test enviroment

proven horizon
#

good

#

i might be able to port over the hashmap used in psh later today if you want

tardy mist
#

sure

#

hashmaps are cool

#

and I accept anyy help

tardy mist
#

SOMEONE HELP ME

#

I HAVE NO CLUE WTF IS HAPPENING

#

seriously

#

my OS hangs on a single instruction

#

this one:

fallow pilot
#

well does rax point to valid page tables?

tardy mist
#

and there is no interrupt

#

and qemu flickers between paused and unpaused

tardy mist
fallow pilot
#

idk

tardy mist
fallow pilot
#

i didnt

tardy mist
fallow pilot
#

I set my dm's to be friends only

tardy mist
#

because I asked for help?

fallow pilot
#

no it was not because of you

proven horizon
#

Ded project

proven horizon
tardy mist
tardy mist
#

I hacked together an ELF loader

#

its horrible

#

it assumes that .code is phdr 1

#

it also doesnt do anything with the other phdrs

#

but works for my test binary

#

and probably nothing else lmao

#

anyways, this is not usermode yet

#

but I am in the perfect situation to start working on the syscall interface

#

so, syscalls

#

btw dont look at the code

#

youll cringe hard

tight summit
#

2035

tardy mist
#

first syscall I implemented is a printing one!

#

and thats it for today

wind mortar
#

16:81

#

🤔

proven horizon
#

17/17/2035 16:81troll

tardy mist
#

seems like Im decoding time incorrectly

#

or I need special flags for qemu to give the correct date

hollow leaf
proven horizon
fallow pilot
fallow pilot
regal gale
#

1301th message

woven tide
#

1302nd message

fallow pilot
#

1304th message

steady merlin
#

1305th message

old sapphire
#

Chain prevention! ⛓️💥

Mission failed! We'll get em next time..

fallow pilot
#

1307th message

steady merlin
#

1308th message

woven tide
#

1309th message

proven horizon
#

"Reminder" "remainder" and "reindeer" all look the goddamn same

#

Also why rain deer?

tardy mist
#

Raain deer

tardy mist
#

I do not thingók this is usable anymore

#

now it has both a flex cable and an LCD panel issue

#

I litterally dropped a salt lamp on it lmao

fallow pilot
tardy mist
#

worst accident ever

tardy mist
fallow pilot
#

how the fuck does that happen

tardy mist
#

cuz I forgot I have weak arms

fallow pilot
#

oh

tardy mist
#

very weak arms

#

well, now I can't multitask as well

#

I need to get a HDMI monitor now

#

well

tardy mist
fallow pilot
#

why do you already use VGA?

tardy mist
#

thats my second monitor

tardy mist
#

(pwease dont ban me for custom css usage)

old sapphire
#

ban for the windows 7 theme instead /j

tardy mist
#

ban for the usage of tone indicators

old sapphire
#

ban for the blurry photo

tardy mist
proven horizon
#

ban for not having an emoji font installed

tardy mist
proven horizon
#

true that meme

proven horizon
tardy mist
#

I have no motivation to work on anything

proven horizon
#

That is what depression looks like