#Kvass (vibecoden't)

1 messages · Page 13 of 1

raw prairie
#

But yeah I think what happened in #lounge-0 was a fluke lmfao

#

It got crazy 😭

#

I would like you to stay

frigid basin
#

nah just make your own C language but with russian keywords atp

ocean ore
#

russian c dialect

minor prairie
#

why?

astral pagoda
#
#define int число
#define return вернуть
minor prairie
#

число isn't void its prob an int (or some other int variant)

raw prairie
#

google keeps locking up

astral pagoda
#

for the amount of stupid I am

ocean ore
whole heath
ocean ore
#

😭

#

i didnt even notice

ocean ore
#

i shall ™™™•ª¡™£•¡•™¶£¡™ª•£º™¡ª£ªº™¡ªπ£¡™º–£πº¡™£–¡™ operating system

#

programming elf crap in bootloader still

#

have to go through string table

ocean ore
#

i wonder if i should focus on making my kernel for x86-64 too

#

i want to work on x86-64 for some reason

ocean ore
#

test OS best OS

#

this idiot better not explode on me when i start implementing the argument parser idioot

#

idiot

#

yo wait i think it will

#

why is it not in the greg section

#

:(

#

wait

#

wheres the stop marker

#

i forgot the stop marker 💀

#

REQUEST RESPONSE REQUEST RESPONSE REQUEST RESPONSE

#

I FORGOT THE STOP MARKER AGAIN

#

better

ocean ore
#

i loaded all the protocol stuffs

#

i think

#

idk i have basic crap for a hello world kernel

#

id say i boot it for my own sanity

ocean ore
#

im gonna do a rugpull and program my kernel for both ppc and x86-64 because i started to like x86-64 a bit

#

despite all the genuinely evil bullcrap they pull on me sometimes its pretty cool

#

Kvass (powerpc (32 bit) and x86-64 OS (+related crap))

#

MUAHAHAAHAHHAHAHAHAHA

#

i need to finish bootloader either way tho pain

#

pretty bold for a kernel that ONLY ACTUALLY EXISTED FOR ONE MONTH

ocean ore
#

so i just woke up but my mac has qemu so i decided to check

#

this is ppc64 qemu on default settings

#

with smp 2 trl

#

mac99 qemu explodes if i tell it more than one processor

#

if this is the same open firmware then i can cook trl

#

IT'S EMULATING A WHAT

#

i need to check their properties trl

#

GREGloader SMP

#

MUAHAHAHAHAHAHAHAHAHAHHAHAHA

#

ok so what im running is qemu-system-ppc64 -M pseries-9.2 -smp 2

#

pseries seems to be some reference platform used for linux development

#

it conveniently happens to use open firmware and support multiprocessing trl

#

my best bet for 32 bit though is mac99, i dont have the fancy power10 crap trl

ocean ore
#

im gonna go compile ppc64 gcc

#

i want science experiment rq trl

ocean ore
#

it is time

#

i must write that STUPID ASSEMBLY STUB

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

i know barely anything of powerpc assembly

#

wish me luck trl

#

arguments are passed in registers

#

the first 8 are at least

#

so i can use these first 8 arguments to pass the page table and other evil crap

#

this is the only one i need to pass anyway

#

maybe the kernel entry address

#

CRAP I FORGOT ABOUT THE ENTRY ADDRESS

#

routine is gonna be loading the new page tables into storage register, then clear all buffers and set the registers to 0

#

i shouldve bothered with a stack depresse

#

allocate some dedotated wham

#

1MB stack trl

raw prairie
#

Don’t you use the requests for this stuff?

#

So you don’t need to use arguments?

raw prairie
#

Just call the main function or jump to it?

ocean ore
#

i need to switch from the open firmware page tables and clear the tlb crap or something

raw prairie
#

That’s normal PSP1G_pspTrollar

ocean ore
#

switch from those to the page tables i made in the bootloader trl

raw prairie
#

On limine your meant to make your own page tables

ocean ore
#

but on limine the kernel is at least able to be booted, its different here i need to clear the idiots trl

raw prairie
#

True

ocean ore
#

the boot function needs arguments that are probably just a bunch of precompiled registers

#

im not gonna write my register builder idiot in ASSEMBLY 😭

#

especially on powerpc

#

that crap is almost foreign to me

#

actually crap

#

i have to pass 24+ registers

#

💀

#

im gonna have to powerpc assembly more than i wished to depresse

raw prairie
ocean ore
#

mac os 9 platinum looks like metallic greek architecture

#

it looks like architecture in general actually

#

also whoever placed the thumbsup reaction onto the kvass thread i am crashing out

ocean ore
#

500 mile struct declaration

#

wait why am i allowing user access

#

im gonna go light mode

#

its day today

#

@raw prairie im gonna go thank you for your stupid manual repository i dont have to bother digging through all of my folders to find ts 😭

ocean ore
#

i have to tolerate my really loud crappy gaming keyboard

#

these manuals still suck balls though

#

more ppc paging abuse

#

yall at least i dont need to write another mmu implementation in the kernel

#

:kekw:

#

code reuse

ocean ore
#

i still havent committed yet

#

legendary tier reference

#

abandon all hope ye who enter here trl

raw prairie
#

here be dragons

ocean ore
#

im gonna add the translation for this so nobody bothers

#

actually honestly im gonna keep it in latin

#

its for the greater good of humanity trl

ocean ore
#

i compiled all the segment crap and now i cna enter kernel

tropic tusk
#

also mostly pleasant to decode in an emulator

ocean ore
#

i never wrote it but it has a bunch of instructions

#

typical for RISC

tropic tusk
#

you have it backwards

#

RISC means it has less instructions

#

CISC means it has more

ocean ore
#

â

tropic tusk
#

though those are pretty pointless labels these days...

whole heath
tropic tusk
#

I'm aware

ocean ore
#

risc really means is that the instructions are simpler

#

imo

#

theres more of them but theyre simpler

tropic tusk
#

no

#

the intention was that there are no complex instructions at all

ocean ore
whole heath
#

The actual characteristics the make the distinction now are mostly things like insns with two ins and an out, and load/store being explicitly distinct from calculation instructions.

ocean ore
#

they make a bunch of sense imo

ocean ore
#

ok so i assume i should disable address translation before doing anything

#

i should go get the physical address of my assembly code trl

#

which the firmware is most likely willing to do that for me

#

MUAHAHAHAHAHHAHA

#

the firmware claims that my physical address is equal to the virtual one

#

how do i check and make sure its not BS'ing me

#

i could try to set a register value

#

that seems like a good idea

#

.!t qemu

swift bisonBOT
#
qemu

Run QEMU with following flags: -M accel=tcg,smm=off -d int -no-reboot -no-shutdown

ocean ore
#

ok so -d cpu is reg dump

#

👍

#

it prints a kiloton of logs

#

so beware

#

crap d cpu prints so much garbage it nearly explodes

#

you can do info registers in the qemu monitor

#

👍

#

dude

#

is a double word 64 bit nooo

#

im using some other reference to find documentation here

#

"word in memory addressed by EA is loaded into the low order 32 bits of rD"

#

powerpc is primarily 64 bit i guess

ocean ore
#

apparently powerpc registers dont seem to have letters to them

#

li 16, 0xFF loads 0xFF into r16

#

maybe they do

#

but my assembler is crashing out

tropic tusk
#
  • byte: 1 byte (8-bit)
  • halfword: 2 bytes (16-bit)
  • word: 4 bytes (32-bit)
  • doubleword: 8 bytes (64-bit)
tropic tusk
#

then you can use li r16, 0xff

ocean ore
#

thank you frfr letsgo

tropic tusk
#

np

ocean ore
#

lemme try adding it

tropic tusk
#

yeah you need -mregnames to use the r prefix

ocean ore
#

IBM evil

tropic tusk
#

the official syntax doesn't actually include it

#

iirc that shit's a GNU extension or something

ocean ore
tropic tusk
#

officially li 16, 0xff is how you would write it

#

however, you could just only use GNU as and not care

#

this is what I do

ocean ore
#

gnu as not being ass for once

tropic tusk
ocean ore
#

im worried my asm routine krilled itself

#

lemme try fixing it

#

EVIL li

#

power washer assembly would be nice if it worked

ocean ore
#

or whatever evil bullcrap llvm has

tropic tusk
#

pretty sure the llvm stack can do it too

#

GNU compatibility is kind of a goal there

ocean ore
#

true

#

so everyone uses gnu assembler trl

#

idk who at ibm thought of this cancer

#

because the assembly is very good actually

tropic tusk
#

I mean there's whatever the hell IBM XL C uses under the hood

ocean ore
#

IBM are the same people that made addi 3, 3, 3 a valid command

#

(add 3 to r3 and loads to r3 i think excuse me for my french nooo )

tropic tusk
#

yes iirc that's r3 = r3 + 3

ocean ore
#

fair enough

#

i like that it uses what x86 people would call intel syntax

#

its not pure cancer

raw prairie
#

Genuinly

tropic tusk
#

IBM

raw prairie
#

Fuck IBM

#

Lowkey

ocean ore
#

Kvass (powerpc (32 bit) (currently) OS (+related crap))

#

not

#

x86-64 whenever i do it

tough socket
#

people overdo the "cisc and risc are meaningless distinctions in the area of performance debates" and start saying "cisc and risc have NO MEANINGFUL DIFFERENCES anymore" which is obviously wrong

ocean ore
#

circus

#

im looking at openbsd code for power mac SMP

#

insanity

#

im not gonna bother w/ powerpc smp

#

maybe only on that fancy ibm emulated board

#

idk p series or something

#

i want to do this kernel on x86-64 too after all

#

(i renamed the thread because its not x86-64 YET)

barren sierra
#

(which is supposedly one of the homework assignments we'll get near the end of the semester)

ocean ore
#

ok so time to keep working on this

#

powerpc assembly is nice because motorola worked on it trl

#

idk m68k assembly

#

but currently powerwasher asm is pretty pleasant

ocean ore
#

no comments on this 😭

#

also for the powerpc illiterate people, lwz loads from a memory location from a register + offset

#

lwz [destination], [offset]([register with pointer])

#

its an array trl

#

most unexpected MSR bit

#

this is quite nice

#

i have a second routine happening in real mode (physical addressing)

#

i have to disable this crap, jump there and do a hopium

#

that it works trl

#

the dante's inferno quote fits trl

#

no im not gonna abandon hope

#

i ye entered here but im not abandoning hope trl

#

also crap how do i flip the bit off

#

andi wont work, that uses 16 bit integers

#

i have to do a lis and ori or something

ocean ore
#

guys i entered real mode

#

physical addressing

#

im gonna call it both for both the powerpc and x86 people

#

i have to invalidate the TLBs now

#

TLBs nuked

#

segment registers depresse

#

i need to wipe like all of the registers afterwards too

ocean ore
#

im in a predicament(TM) where IBS corporation decided to enable address translation as soon as i set the MSR

#

which is like, fair enough but uhhhhhhh

#

Dude

ocean ore
#

i did a funny

#

on interrupt a special register stores the MSR, and another one stores the instruction pointer

#

in my infinite wisdom, i will simply pretend to exit an interrupt trl

#
mtspr 26, r5  # SRR0 (instruction pointer)
mtspr 27, r29 # SRR1 (MSR)

# Enter stage 2

rfi
ocean ore
#

MY TEST KERNEL KEEPS ERRORING

#

THE ASSEMBLER IS EXPLODING nooo

#

PLEASE I BOOTED IT ALREADY STOP ERRORING

void wharf
#

😭

ocean ore
#

NO MY BOOTLOADER HEADERS ARE WRONG

#

AAAAAA I EVEN DID THE PAGING RIGHT

#

no elf parser

#

shut up the .GREG section does exist

#

what a POS

#

(point of sale)

void wharf
#

now I wanna work on my bl again lol

ocean ore
#

insanity

#

i somehow got the weirdest paging in computing (imo) better than i got my elf parser 😭

#

bruh string table died

#

THAT STUPID STRING TABLE CAUSED ME MORE PROBLEMS THAN THE REST OF THE BOOTLOADER nooo

ocean ore
#

my thing broke idk what to d

#

hmmmmmmmm

#

use debugger

ocean ore
#

sometimes id rather just execute the framebuffer

raw prairie
tough socket
#

and you could see clown vomit dance on the screen for like half a second

raw prairie
#

thats pretty cool tbh

minor prairie
#

on one hand

#

really?

#

but also like

#

cool as fuck

raw prairie
#

you have to setup dram controller

minor prairie
#

ohhhhhhhh

tough socket
#

i think it was because the motherboard had some vram soldered into it which was guaranteed to be there

#

but all of the ram sticks could be removed

#

so it was safer to use the former

ocean ore
#

anyways so i apparently did the right math to find the PTEG (i watched really closely over that stupid function) however i broke the part that actually fills the page

#

dont tell me i need even more surgical precision setting the page table entry depresse

tropic tusk
#

like clear IR and DR, set SRR1 to that, then set SRR0 to your real-mode code address, then rfi, and you are now at that address in real-mode

#

and ofc the opposite works as well

ocean ore
#

whatever i have another problem

#

also i cant find what API is apparently nooo

#

the API thing in the PTE

#

is it just the 6 bits after the segment register or something

#

i think ive determined it right because qemu does get a hit but something else is definitely really wrong because qemu refuses to emulate after that one memory access

ocean ore
#

i should try again trl

#

new struct 😭

#

RPN is genuinely evil nooo

#

i think its the one that i did wrong

#

actually i dont know whats dying on me

#

what tf nooo

ocean ore
#

yall my paging implementation was done cooked in the worst way

#

i was writing to the physical address of the page table instead of the virtual one trl

#

oops

grim lance
#

ALL YOU NEED IS MOV

ocean ore
#

i segfaulted qemu

#

ok so it apparently cant do a hit on the thingamabob

grim lance
ocean ore
#

OPEN FIRMWARE IS GENUINELY EVIL

#

DUDE

void wharf
#

what happened?

ocean ore
#

lemme explain

ocean ore
#

and i store my page tables at 0x10 00 00 00

#

they are 0x10 00 0 in physical memory

#

-# its easier for me to count numbers if theyre spaced sorry trl

#

anyways so a thing in there

#

a group idk

#

its supposed to be in 0x1AE3C0

#

they are in 0x100AE3C0 in virtual memory

#

so far so good

#

however open farts mapped them at 0x1AF3C0

#

ITS ONE PAGE TO THE RIGHT

#

WHO DOES THAT 😭

void wharf
#

why would it do that lol

ocean ore
void wharf
#

💀

ocean ore
#

this is utterly evil

#

im gonna go tell it to map -1 page to the left trl

#

sun microsystems doesnt deserve the praise 😭

#

maybe its a qemu thing

#

if its an everything thing thats good because my crappy fix works everywhere

#

if its on a real macintosh then im done DEAD

void wharf
ocean ore
#

hopium

#

it uses a supposedly accurate open firmware implementation

#

either used by sun or made by the inventor

ocean ore
#

somehow

#

idk trl

#

i have a translate function except if i had an incident with this i dont think i can trust it 😭

#

i told it to start one page left

#

time to test 😭

#

virtual memory works

#

physical time

#

i cant with ts

#

who made it

#

LMAO ITS TO THE RIGHT AGAIN

#

AHAHAHAHAHAHAHAHAHYAHAHHAHAHAHAHAHASGHJDGASDHJGASDGHJASDGHJASJDGHAJSGHDGHJASDGHJASHJDASGHJEDHGASD

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

happens to the best of us trl

void wharf
ocean ore
#

did i saver

#

save

#

maybe i should just do my accesses with -0x1000 except it might break some maps

#

still one page right

#

this is gotta be some sisyphean punishment or something

#

please speedi need this

#

DUDE

#

who made this

#

:(

#

ive made it worse

void wharf
#

oof

ocean ore
#

qemu: it's wrong, now cope trl

#

im thinking of just telling the mapper to subtract the pointer by a page

ocean ore
#

tomorrow im gonna go keep meatgrinding the stupid mmu crap

#

i do be wonder(TM) if my binary is loaded wrong too

#

i mean its loaded

#

its just that map sucks

raw prairie
raw prairie
ocean ore
#

it maps it one page to the left

ocean ore
ocean ore
#

today im gonna torture open farts

void wharf
ocean ore
ocean ore
void wharf
#

sadge

ocean ore
#

it breaks

#

idk maybe it will work now (hopium)

#

is there any way to detect QEMU

ocean ore
#

hm

#

how about a huge warning

#

the jank fixed the problem

#

why would you map anything at 0 anyway

#

actually no wait

#

some hash crap can randomly explode

#

i cant fix the problem anyway

#

if your kernel dies dont hold me accountable

#

wait crap i forgot to address the Innacuracy(TM) for the binary being loaded

#

because screw you that might be broken too trl

#

THATS ABSOLUTELY DONE FOR

#

OH No

#

OHIOWEFWKJLEFJKLWEJKLRFEWJKLFJKLWEFJKL

#

qemu's "100% accurate open firmware implementation" 💔

#

comply harder idiot

#

anyways i have to probably use map-in instead of map

#

map-in chooses the virtual address for me though

#

i cant anymore

void wharf
ocean ore
ocean ore
void wharf
ocean ore
#

if map-in is just as cooked id rather just make my MMU implementation map for the firmware

#

point of sale (POS) kiosk

#

yo so like map-in doesnt even exist

#

they ;oed

#

lied

#

what does mac os x do trl

#

what mac os does is it maps address virt to virt????

#

so what?? map physical address to the virtual one thinkong

ocean ore
#

ok so since i need this to run on QEMU im gonna actually just do the penultimate jank and rob OFW of its mmu crap trl

#

or not

#

i genuinely dont know

#

idiot broke

#

:(

#

for some reason the LENGTH broke the translator

#

💀

#

ok what though

#

i swear if those arguments are in reverse

#

THE ARGUMENTS ARE IN REVERSE

#

DUDEEEEEEEEEEEEEEEEEEEEEEEE

grim lance
#

me when stack:

ocean ore
#

you dont translate to 1 you jank implementation

#

💀

#

i suck at programming

#

IM TRANSLATING EVERYTHING TO 1

#

rpn stands for "real page number"

#

yo guys

#

i booted the kernel

#

@grim lance do you want an OS that sets a register to 0x4567 trl

ocean ore
#

ok nah

#

im gonna go make it write to framebuffer

ocean ore
#

macs run on 256 color by default

#

possibly influenced by some idiot at sun microsystems

#

so i have to make a palette for 256 colors

grim lance
#

just do standard VGA palette

ocean ore
#

bruhb

#

i wanna do RGB 3-3-2

#

standard vga palette sucks

grim lance
#

i think std vga is pretty good

#

it provides a wide range of shades n shit

ocean ore
#

lemme check what it actually is

ocean ore
#

i kinda forgot but i didnt like it (since it didnt work in my case 😭)

#

i mean thats ok colors

grim lance
#

it’s RGB 5-6-5

ocean ore
grim lance
ocean ore
#

whut

grim lance
#

oh no sorry

ocean ore
grim lance
#

i was reading the wrong section

#

am retarded

ocean ore
#

anyways so i can do a palette of 256 colors and the individual colors can be 24 bit

#

like the palette is an array of 256 24 bit colors

grim lance
#

so 256 RGB colours

ocean ore
#

yehs

#

idk i want to make a palette thats easy for software to translate to from like 32 bit colors or smth

#

3-3-2 seems reasonable imo

grim lance
#

isn’t 32bit just RGB with an alpha channel

ocean ore
#

still tho :trL:

#

what if i just pull of a NeXT and have it go grayscale

grim lance
#

better idea
2-2-2-2
rgbatrl

ocean ore
#

hm

#

what if the client program can choose trl

#

i should go check if the fart buffer even works

#

framebuffer no work

#

did i not map it properly

ocean ore
#

so my MMU implementation died, again

#

maybe its an open fartware thing

#

however the framebuffer address is physical

#

at least i know that letsgo

#

genius idea: store page tables in the framebuffer trl

ocean ore
#

its not working for no reason, literally nooo

#

this is evil

#

any vmem access i tell qemu to do it explodes

ocean ore
#

idk why its dying

#

im gonna go rewrite pteg finder trl

grim lance
ocean ore
#

anyways i rewrote my PTEG generator 9000

#

this should be it

#

nevermind this is not it

ocean ore
#

im getting a stroke from ts

ocean ore
#

GUYS I WROTE A SINGLE PIXEL

gloomy mist
# ocean ore

nice,now you gotta draw lines, triangles and boxes 😄

ocean ore
#

3d rendering on powerpc nooo

gloomy mist
#

don't you need to be able to draw lines and boxes for a window system?

raw prairie
void wharf
raw prairie
#

:p

#

speechbubble

ocean ore
#

ok so while i didnt type here, @raw prairie gave me this LSD trip (and/or) earthbound background for a demo to run in my test kernel :trel:

#

have QEMU mmu spam for proof

#

im gonna now have to add 3-3-2 8-bit RGB support to have it run on real macs, since they use the mode

#

however the problem is that i need a color palette

#

and so i need a generator trl

#

which i will make

ocean ore
astral pagoda
#

JOEBIDEN's PC KEKW

ocean ore
#

ok so im adding palette support for 8 bit color, currently i have 3-3-2 RGB and grayscale

#

you can make your own custom palette for your OS if you choose to trl

#

except you have to use it the entire time until you restart

#

unless i make a thing where you can re-enter the bootloader trl

#

wait that sounds useful actually

#

idk you can call for a different palette somehow ig

#

weird demo

#

something broke

#

😭 this color is so inaccurate

#

oh

#

the white is a color which id like to associate with a certain substance

#

but cant

#

anyway

#

im thinking of making a palette which is essentially HSV but mildly evil

ocean ore
ocean ore
#

so im gonna now add monochrome tints

#

awesome™

#

dont you want a [checks notes] DEC VT220 larp?

#

also theres straight up a palette request

#

in the framebuffer req you can ask it for a preferred palette, and then theres another palette request that has options for various palettes

#

if you choose a custom palette you have to set that palette in the palette req

#

if you choose monochrome you can pick a tint,

#

if you choose RGB 3-3-2 you can actually modify the brightness

#

since ive noticed the default brightness may suck balls

#

(i suggest you increase it by 0x10)

ocean ore
#

i cant with this

#

😭

#

mintsuki conspiracy theory

#

going nowhere

ocean ore
#

its only for the elites

ocean ore
#

copies are poopoochrome

gloomy mist
#

copies are poopoopoo

ocean ore
ocean ore
#

ok so after i run my test kernel on real hw im gonna really start working on kvass

#

im evil im declaring a struct inside a function

ocean ore
#

im reworking bootloader my binary doesnt want to be loaded anymore

void wharf
#

oof

ocean ore
#

at first i pulled a limine with the request having a pointer to the response, then apparently that might just fail badly so instead im just gonna have the response be in the request

#

doesnt limine actually store a struct instead of a pointer

#

no it stores a pointer

ocean ore
#

why are there two sizews

#

lemme redo

#

bettah

ocean ore
#

ok so i cant just have a struct in a struct named i

#

the struct is global

#

so i have to call it headerI or smth

#

greg_headerI pain

astral pagoda
#

s

#

greg_headerS

ocean ore
ocean ore
#

run this trl

#

im gonna upload source code for this first

ocean ore
grim lance
ocean ore
#

also no ISO you dont need one, you're getting a stuffit archive or something

grim lance
#

iso is more convenient to burn to cd

ocean ore
#

the boot process is gonna be brutally inconvenient trl

grim lance
ocean ore
#

you need to open firmware console

grim lance
#

ah

ocean ore
#

i do have one

#

im going to sleep though ima just do it tmrw trl

#

ok so my plan is to add

  • modules
  • memory map
    to the bootloader (currently)
#

i feel like boot args are a little dumb rn

#

maybe later

#

im gonna reuse the same broken config parser from borscht to specify what modules etc

ocean ore
#

not all sadly nooo

#

im thinking of the only argument that you really need to specify for gregloader being the config file you wanna use

#

i dont want to have a menu like in grub or smth

#

cba

grim lance
ocean ore
#

ok so im gonna go upload my test stuff, commit bootloader, then i work on both the kernel and the bootloader concurrently from now on because they depend on each other

#

im writing the docs in like 59000 years

ocean ore
#

i have to maintain repos on two servers because i have both trust issues and dont want to make anyone depressed 😭

#

@grim lance yo greg-test-kernel has iso image for macs

#

should work

#

you can burn it to a cd but you still have to figure out the open fartware console crap

ocean ore
#

the picture being in monochrome implies it being a copy trl

ocean ore
#

on wikipedia, the free encyclopedia

frigid basin
#

im pissed, what should I do

ocean ore
#

im gonna go play tf2

#

shoot people as fat russian man with spinny expensive gun

#

then become invulnerable by german psychotic doctor with dumb inventions

#

then shoot more people with expensive gun

#

im gonna go bill the red team the prices for my bullets so theyll go bankrupt afterwards

#

peak video game indeed pain

grim lance
#

sprigglediggle

ocean ore
#

since you people hate hash table paging so much, im gonna use a radix tree for literally everything in my os trl

#

first of all, device management trl

raw prairie
#

Like in memory block devices

ocean ore
#

i have radix crap for everything

#

and now time to implement it

whole heath
#

Radix trees are cool

#

I will now make a Radix tree impl because I want to and that's the only reason.

raw prairie
#

i need to make a generic radix tree at some point too

ocean ore
#

my vfs is gonna work on radix trees ||NOT||

raw prairie
#

just use a circular linked list

ocean ore
raw prairie
#

😭

ocean ore
#

its some weirdly intricate system of device management and hopium

ocean ore
#

its simpler

raw prairie
#

fym?

ocean ore
#

you allocate one page worth of tabes

#

tables

raw prairie
#

a circular linked list is way simpler

ocean ore
#

you need more entries? allocate another page

ocean ore
#

is it the one with like

#

a pointer for next entry and prev. entry??

raw prairie
#

heck the thread object that you schedule with

#

can have the pointers

#

so there is no extra allocations

raw prairie
ocean ore
#

oh

raw prairie
#

and you just loop though it

#

its perfect for round ronin

#

as it gets implemented for free

ocean ore
#

i guess

#

how am i supposed to implement priorities

raw prairie
#

many linked lists

ocean ore
#

what meme

raw prairie
#

just

#

have one for each prioirty

ocean ore
#

oh

raw prairie
#

like have a list of sleeping tasks

#

a list of important tasks

#

and you can have a task that its job is to wakeup sleeping tasks in the normal qeue

#

piroity could be for drivers and stuff

ocean ore
#

fair

raw prairie
#

if prioirty isnt empty go there until they are all blocked or sleeping

ocean ore
#

what if you just have a timer and every time a process is ran you just reset it to a higher value than the lower priority tasks trl

raw prairie
#

well a timer wouldnt run as a thread context

#

it would be an interupt context

#

but like your network driver may be under a thread

#

or usb

ocean ore
#

idek

#

ive never gotten to writing a real os before this crap, i only know somewhat basic crap like virtual memory

#

the algorithm insanity is uhhh, insanity

#

i feel like just making an order stack and every time it goes empty go through the proces lists and fill it up again

ocean ore
#

so i didnt work on this

#

RIP

#

ima try locking in tomorrow and getting a terminal emulator

tropic tusk
#

I wouldn't be shocked if flanterm doesn't work on ppc

minor prairie
#

because if it's le it should be fine

tropic tusk
#

BE of course

#

nothing older than POWER8 runs in LE by default

#

and LE mode in those older CPUs is kinda a hack

minor prairie
#

ah

tropic tusk
#

and none of the firmware or hardware expects you to use it

minor prairie
#

just try it ig

tropic tusk
#

it's not my OS lol, I was just commenting on the matter

minor prairie
#

oh 🥀

raw prairie
barren sierra
#

and also even if the default framebuffer backend doesn't work, write your own that does support BE

tropic tusk
# barren sierra why wouldn't it work

endianness problems, also iirc (but I could be wrong about this, haven't looked at it in ages) it doesn't support anything other than 32-bit color?

barren sierra
#

but i dont see it assuming LE anywhere

#

endianness issues kind of only arise when you convert between data types by bypassing C's type system, or I/O with external data

ocean ore
#

the mac framebuffer seems to be little endian

frigid basin
#

what happened to x86-64 in the thread title

ocean ore
#

especially grayscale and 8 bit

ocean ore
frigid basin
#

surely u didn't give up :D

#

or did u

ocean ore
#

no its called a "delay"

ocean ore
#

qemu doesnt emulate it im pretty sure 😭

barren sierra
ocean ore
#

nah i have 8 bit monochrome

#

also idk if i should really use flanterm

#

i mean it sounds like it would work but like

barren sierra
#

It's a full ansi terminal implementation!

#

Also flanterm can be made to work with other backends too

#

You can write a hardware accelerated renderer for it if you want

#

Or a VGA backend

ocean ore
#

ehhh fine ima bite the bullet and use the idiot trl

#

little endian (surprisingly) framebuffer of doom

ocean ore
#

from my understanding that would be like, loading textures and then telling the gpu to place them somewhere

ocean ore
barren sierra
#

Flanterm isn't just for kernel mode

ocean ore
#

idk i just have some concerns over some stuff like the init function being 50 miles long

#

its more of a mild inconvenience

ocean ore
#

im gonna go make a font format trl

#

or just use psf or something

ocean ore
#

im thinking of using this font for kvass

#

IBM please dont sue me

#

PC-IBM/PS2THIN4.F16

#

PS2THIN2 is also good

#

actually THIN4 is better

#

ima use PS2THIN4

ocean ore
#

gregloader is getting memory maps and page table info requests

#

i need those

#

(who doesn't)

#

obv on the first one, but i need the second one since powerpc page tables dont work like they do on x86 and since it is my bootloader i know how it works so im just gonna use the bootloader page tables

#

i see no reason why it would explode like it supposedly does on x86

#

also not reusing them would mean wasting TONS of ram

#

i want to reuse them for some reason

#

practically the bootloader only needs to share the crap used for picking hash table entries, htabmask, and the virtual address of the tables

#

how am i gonna map them without knowing anything

#

the request has a "map page tables where" thing too

#

if i ever port this bootloader to x86, it will not have crap like this

#

since x86 probably does not do this kind of crap

#

i should honestly just do one architecture specific request or something

#

instead of paging

ocean ore
#

ITS MARCH

#

PLEASE

#

ITS MARCH

#

i have my window opened im currently being fried

#

also im thinking of adding a greg_arch request instead of paging or whatever

#

since i need to give the kernel a bunch of other crap too

#

mmio locations for PCI configuration space crap, for example

ocean ore
#

im getting fried before the trees have leaves

#

😭

tropic tusk
#

that's not even that hot 😭

#

it hits like 110f (43c) over here frequently

barren sierra
#

where the fuck are you

#

I barely have 13 here and I'm in like the middle of the northern hemisphere (around the 45th parallel)

ocean ore
#

currently

#

im not gonna respond correctly to sane weather when i go back to europe

ocean ore
#

i remember when we got like 124c in may at some point and so the school bus had like literal ice cold bottles of water

#

😭

#

(they were all late)

tropic tusk
ocean ore
#

AZ

#

arizona moment

#

anyways so i somehow have to go and give my kernel mmu crap

raw prairie
#

It’s 70f in Florida rn

ocean ore
#

in sane measurements

raw prairie
#

70f=21.111 °C

ocean ore
#

cold

#

room temperature or something

raw prairie
#

Dawg that’s room temp

tropic tusk
#

hell nah

ocean ore
#

24 is room temperature imo trl

tropic tusk
#

room temp is like 80f (26c) - 84f (28c)

#

70f is chilly

ocean ore
#

mildly hot

ocean ore
#

im gonna go pass the kernel this absolute struct of all time

#

you get to ask the bootloader to map the page tables btw trl

#

i might use this same request thing for mapping the interrupts somewhere

raw prairie
#

The kernel should do interupts its self

#

Right?

ocean ore
#

well yes

raw prairie
#

Let me guess

ocean ore
#

but the interrupt vectors are at 0 physical

raw prairie
#

There is some power PC bullshit

ocean ore
ocean ore
#

yall openpic is gonna be genuinely brutal depresse

raw prairie
#

Or give a generic HHDM

#

Of like 256mb

ocean ore
ocean ore
#

In order to compete with Intel's Advanced Programmable Interrupt Controller (APIC), which had enabled the first Intel 486-based multiprocessor systems, in early 1995 AMD and Cyrix proposed as somewhat similar-in-purpose OpenPIC architecture supporting up to 32 processors. The OpenPIC architecture had at least declarative support from IBM and Com...

#

its an apic ripoff

#

its probably a multiprocessor thing

#

i guess its used for external device io too

#

IBM used a MPIC based on OpenPIC 1.0 in their RS/6000 F50 and one based on OpenPIC 1.2 in their RS/6000 S70. Both of these systems also used a dual 8259 on their PCI-ISA bridges.
POWER machines with the original intel pic 😭

#

i mean its not the primary one but its still funny

#

DUDE

#

omw to implement the most braindead obscure devices on planet earth

#

i mean thats the openpic

#

ibm has mpic based on it trl

ocean ore
#

i found the MPIC one

#

its more relevant because it mentions powerpc a few times

#

ok so ive noticed interrupts arent that important trl

#

we polling ps/2 with this one 🔥🔥🔥

#

ADB seems to be made to not use interrupts

raw prairie
#

Interrupts are very important

#

Esp for timers

ocean ore
#

powerpc has a timer interrupt

#

im pretty sure i know how to set up that one

#

or at least its documented

raw prairie
#

Yeah but you also need keyboard interupts

ocean ore
raw prairie
#

You will burn the CPU

ocean ore
#

MMIO of doom and evil

raw prairie
ocean ore
#

Apple Desktop Bus (ADB) is a proprietary bit-serial peripheral bus connecting low-speed devices to computers. It was introduced on the Apple IIGS in 1986 as a way to support low-cost devices like keyboards and mice, enabling them to be connected together in a daisy chain without the need for hubs or other devices. Apple Desktop Bus was quickly i...

#

if the mouse is known to be at address $D, the computer will periodically send out a 1-byte message on the bus

#

To a mouse this means "tell me the latest position changes"

#

we have to poll EVIL PS/2 with this one 🔥 🔥

safe silo
#

FFS

ocean ore
#

linux sources are unreadable

ocean ore
#

requests(TM)

#

ignore the broken-ish palette

#

2.5 gib of userspace

#

i reserve too much space for nothing

#

i should place the page tables right after the stack

tropic tusk
#

why do you need 256MB of framebuffer

ocean ore
#

/gen

#

im worrying over nothing but idk

tropic tusk
#

1920x1080 @ 32bpp is still only 8MB 😭

ocean ore
#

oh 😭

#

very big display

#

novidia rtx 8090

#

🔥

tropic tusk
#

and no PPC Mac would ever even be driving a display that large at that color depth anyways

tropic tusk
#

most of their GPUs don't even have that much VRAM in the first place

ocean ore
#

you can upgrade the GPU trl

#

stock probably also can but idk

#

not sure

tropic tusk
#

not if you're relying on OF to do anything

#

OF only supports specific models of GPUs with specific PCI ROMs

ocean ore
#

well im not after the bootloader so ehhhhhhh

ocean ore
#

oh right crap

#

OF supports only some gpus

tropic tusk
ocean ore
#

true true

#

after you set up framebuffer? pain

#

but anyway still tho

#

ima go rearrange it so i wont waste so much ram

#

virtual address space

#

whatever

tropic tusk
#

even 4K @ 32bpp is still only like 32MB 😭

ocean ore
#

64bpp trl

#

64bpp seems stupid

#

we see images on 32 bpp fine already

tropic tusk
#

yeah

ocean ore
#

isnt HDR something like more bpp

#

not exactly but idk

#

HDR is some fancy crap nobody ever has nooo

tropic tusk
#

yeah iirc it's like 10bpc / 40 (?) bpp

ocean ore
#

alpha channel ig

tropic tusk
#

idk if they drop the padding in 10bpc so it still fits in 4B

#

idk I'm not a big display nerd

#

all of my framebuffers are 16/32bpp and relatively low res meme

#

720x448 @ 16bpp for the win trl

ocean ore
#

my of default fb is 1024x768 (varies on mac model, i have an ibook) with 8 bit color (mandatory)

#

you can set a palette

#

i made an rgb 3-3-2 generator which made the white a bright yellow (not sure if thats a good thing 😭)

#

ATI cards have some modeset trickery which allows you to have 32 bpp color

#

but i think thats ATI card only

#

qemu allows you to have 32 bit color

tropic tusk
#

Radeon cards are really easy to mess with the framebuffer on yeah

#

their registers are very very well documented

ocean ore
#

idk ive not looked yet

#

but it does mess with the registers

tropic tusk
#

I do that on the Wii U and Xbox 360 trl

ocean ore
#

powerpc gaming console programmer experience vs powermac programmer experience

tropic tusk
ocean ore
#

its gotta converge somewhere tho

#

page tables trl

tropic tusk
#

nah, we all just the BATs trl

ocean ore
#

breh depresse

#

i use the page tables

#

i need those anyway

#

its not exactly a computer

#

i only have 4 of them (homebrewers these days with their 8 bats)

tropic tusk
#

yeah they're pretty necessary for doing a proper OS

ocean ore
#

mario kart is an operating system /hj

tropic tusk
#

thankfully I don't do much of that, bootloaders and other such low-level code ftw trl

ocean ore
#

i can map crap trl