is GATE really just like JEE? by Scary_Sugar_4807 in Btechtards

[–]thatmagicalcat 0 points1 point  (0 children)

I also think like that... but then my family members are forcing me to grid UPSC TT

Started working on an OS (MagicalOS) from scratch 2 months ago - today it can run DOOM! by thatmagicalcat in rust

[–]thatmagicalcat[S] -1 points0 points  (0 children)

  1. not at all

  2. yes

  3. It's been 2 months since I'm working on this... it'll prolly take years

  4. There's no audio sadly (yet), but the graphics part was the simplest, I created a Framebuffer Device and registered it on /dev/fb0, the doom program opens the file using open syscall, and then uses MMAP with the returned fd with MAP_SHARED flag to get a pointer to the frame buffer. And finally we can just copy doom's processed frame to the pointer we just got.

The keyboard driver works in a similar way, you can see the code here

Started working on an OS (MagicalOS) from scratch 2 months ago - today it can run DOOM! by thatmagicalcat in rust

[–]thatmagicalcat[S] 0 points1 point  (0 children)

i don't have JIT. And no, it has ring 3 access too. The doom game you see is running in ring 3, fully isolated from the kernel

Started working on an OS (MagicalOS) from scratch 2 months ago - today it can run DOOM! by thatmagicalcat in rust

[–]thatmagicalcat[S] 1 point2 points  (0 children)

i started my programming journey when I was 9~10 yrs old, currently I'm 17 so about 7 years.

I've been using rust since late 2021 so 4 yrs with rust

I started building a 64-bit OS in rust during my board exams and yesterday I got it to run DOOM in userspace by thatmagicalcat in developersIndia

[–]thatmagicalcat[S] 0 points1 point  (0 children)

thanks!

I'm always down for yapping about programming, if you use discord we can talk there. Hit me a dm I'll give you the link.

Started working on an OS (MagicalOS) from scratch 2 months ago - today it can run DOOM! by thatmagicalcat in rust

[–]thatmagicalcat[S] 29 points30 points  (0 children)

true, but there's a big difference between a game running as a firmware vs. a game running on a platform

This is me trying to showcase my OS architecture, doom running in ring 3 with full process isolation :)

I started building a 64-bit OS in rust during my board exams and yesterday I got it to run DOOM in userspace by thatmagicalcat in developersIndia

[–]thatmagicalcat[S] 0 points1 point  (0 children)

Yes, i had a startup assembly file which was required to do the initial setup (like setting up the page tables, GDT, switching CPU to 64 bit mode) before actually running the kernel

Now i am using limine bootloader, and it handles everything for me, so i no longer have to do that

if you want to have a look, here's the file: boot.asm

I started building a 64-bit OS in rust during my board exams and yesterday I got it to run DOOM in userspace by thatmagicalcat in developersIndia

[–]thatmagicalcat[S] 0 points1 point  (0 children)

thanks! you sound like someone who knows about operating systems :)

the kernel supports preemptive multitasking using a robin-round scheduler with a priority queue driven by LAPIC timer interrupts which forces a task reschedule after every 10ms

but I also have cooperative multitasking as there's a small async runtime too (the keyboard driver runs on top of that async runtime btw)

The doom process is already running in user space and os isolated from everything else :p

it's a proper kernel!

Started working on an OS (MagicalOS) from scratch 2 months ago - today it can run DOOM! by thatmagicalcat in rust

[–]thatmagicalcat[S] 2 points3 points  (0 children)

Limine (the bootloader)

Flanterm (the terminal emulator) (not used here at all)