#NostaluxOS
1 messages ยท Page 1 of 1 (latest)
did some changes to the start screen
added some commadns
trying to add a filesystem to the OS
file system implemented
The NostaluxOS architecture is designed for retro-minimalism running on modern 64-bit
-
Core Architecture
64-Bit Long Mode: This core creates a dedicated 64-bit environment (entry.asm,stage2.asm), utilizing Paging and the Global Descriptor Table (GDT)
Custom Two-Stage Bootloader: A handcrafted assembly bootloader (MBR -> Stage 2) that manually loads the kernel payload from disk sectors, enables A20, and transitions CPU modes.
Ring 0 :The kernel currently operates entirely in Ring 0 (Supervisor Mode), granting it absolute control over all hardware resources. -
Shell and Visuals
Retro-Console Shell:An interactive command-line interface (shell.c) capable of parsing user inputs and executing system binaries.
VGA Text Mode Engine: 80x25 character display with 16 foreground/background colors.
Dynamic Theming: Thecolorandpalettecommands allow runtime modification of the visual environment.
ASCII Aesthetics: Includes a rendering engine for the "Nostalux" banner and grid background upon boot (background.c). -
Storage
In-Memory Volatile FS: A lightweight, RAM-resident filesystem (fs.c).
File Manipulation: Supports creating (touch), reading (cat), writing (write), appending (append), and deleting (rm) files.
WARNING: this storage is non-persistent. Rebooting purges the datastream. -
System Utilities
Command History: The system tracks the last 16 commands entered, accessible via thehistorycommand or Up/Down arrow keys (keyboard.c).
System Profiler: Thesysinfocommand reports detected memory usage and architecture details.
Kernel Logging: A circular debug buffer (syslog.c) accessible via thelogscommand, tracking system events and boot milestones.
cool, btw will be there an uefi bootloader
its been like a week or 2 but i was using codex
i stopped using it
now im just using the web editor on github
and it is on github
its open source
give a link
Yeah, give us the link
My first repository for my hobby os. Contribute to ProXgram/RetroOS development by creating an account on GitHub.
@warped canyon @worn schooner im changing from polling to interrupt
cool
what should i add next
i want to work more on ram and filesystem
oh get the filesystem done first, i mean that's what i would do
Do you have the basic systems like time?
link of?
The implementation is located in kernel/shell.c CMOS chip using I/O ports 0x70 and 0x71 to read the BCD values for seconds, minutes, hours, day, month, and year
@worn schooner OS
yes
https://github.com/ShaderHex/ShadeOS #1433902427740049610
the OS is very unorganized and very basic
sooo it has a game, a single snake game
but after making the OS 64-bit it bugged out so it's to be fixed after PIT
it has a small shell with few commands
kernel panic screen
just the basic ones to be honest
@worn schooner i will checjk
you ahve a monolithic kernel loaded via the Limine bootloader
@worn schooner 1. Remove the infinite tick-printing loop so the shell can start
2. Mask IRQ1 on the PIC. This prevents the keyboard from firing interrupts allowing your shell.c polling logic to read keys safely without crashing the CPU
#include "core/software/shell.h"
#include "core/PIT.h"
#include "core/idt.h"
#include "drivers/panic.h"
#include "drivers/hwinfo.h"
#include <limine.h>
void delay(int count) {
for (volatile int i = 0; i < count; i++);
}
void kmain() {
init_framebuffer();
if (memmap_request.response == NULL) {
print_string("Memmap not available!\n", 0xFFFFFFFF);
kpanic("NO MEMMAP");
}
print_memmap();
print_string("\n", 0xFFFFFFFF);
print_memory_info_detailed();
print_memory_info();
//pit_init(1000);
print_string("ShadeOS x86_64 Pre-release!\n", 0xFFFFFFFF);
pic_remap();
idt_init();
pit_init(1000);
asm volatile("sti");
uint64_t time = 0;
char buf[64];
while (true) {
uint64_t t = get_ticks();
int_to_string(t, buf);
print_string(buf, 0xFFFFFFFF);
print_string("\n", 0xFFFFFFFF);
delay(5000000);
}
shell_loop();
for (;;) {
asm("hlt");
}
}
this is your kernel.c
#include "core/software/shell.h"
#include "core/PIT.h"
#include "core/idt.h"
#include "drivers/panic.h"
#include "drivers/hwinfo.h"
#include <limine.h>
void delay(int count) {
for (volatile int i = 0; i < count; i++);
}
void kmain() {
init_framebuffer();
if (memmap_request.response == NULL) {
print_string("Memmap not available!\n", 0xFFFFFFFF);
kpanic("NO MEMMAP");
}
print_memmap();
print_string("\n", 0xFFFFFFFF);
print_memory_info_detailed();
print_memory_info();
print_string("ShadeOS x86_64 Pre-release!\n", 0xFFFFFFFF);
pic_remap();
idt_init();
pit_init(1000);
// Mask IRQ1 (Keyboard) to prevent crash on keypress.
// Since shell.c uses polling, we don't want the CPU to jump
// to an interrupt handler (which doesn't exist yet) when a key is pressed.
port_byte_out(0x21, port_byte_in(0x21) | 0x02);
asm volatile("sti");
// --- REMOVED BLOCKING LOOP HERE ---
// The old loop prevented shell_loop() from ever running.
shell_loop();
for (;;) {
asm("hlt");
}
}
begun work on gui
Cool
@worn schooner did u fix
I started rewriting the whole interrupt and apparently i just finished writing IDT and working on PIC then IRQ
nice
#1433902427740049610
nice, did you share source code yet
^^
yep
currently trying to get gui to work
I moved from polling to interrupt
and implemented ata
my next plan is to have a working gui
Cool, I'm pretty sure kernelspace shouldn't handle gui at all though.
So it might be better to reach userspace before starting with gui
yeah i should switch to ring 3 instead of ring 0
You should implement a scheduler
imma implement kmalloc first
๐ญ what ru doin you can't even think about gui when you haven't even got kmalloc
bruh
im going to be redo gui.demo.c to use linked lists and kmalloc instead of static array
kernel guis????
BRUH
yeah, then you need malloc too
...windows called
windows has a kernel based windowing system
bruh
In fact windows allows some apps to run on kernel space
Which is a big problem but its just for the sake of backward compatibility
anticheats
signed drivers, you mean
only signed drivers can run in kernel space, these anticheats just bundle a signed driver with an ioctl like interface
Are you sure about that? Well maybe i heard a wrong news, ive also heard that the gui runs on kernel space
wrong
I see ๐, how about the gui?
win32k.sys does run in kernel mode
but originally it was in user mode and was moved into kernel mode for performance reasons
and most people agree that was a mistake
Yeah since it can take down the whole OS
without this, we likely never would have had proper gaming on the NT line of OSes
cant really do DirectX without it
anyone else remember gaming on NT 4 and even 2000? with its "you need 2x as much ram, and there will be a massive reduction in performance"
I mean, didn't those two already have win32k.sys?
Quick progress. One day from kernel to userspace is crazy.
What are you on about?
Im continuing the temple
Show us an SS
Yes, let's see
whhhaat
in one day?
How is that even possible?
Well wow, it has been a while since I've seen an whole AI generated OS.
Damn
It's sad seeing though, so much opportunities to learn, so much knowledge all gone.
Timezone?
Maybe he used the same code from his recent OS?
This was so fast, for me implementing the interrupters alone took me 2-3 days
Check his repository.
It is overly commented, it has comments like "Fixed {issue} by doing {overly detailed explanation}". Everything with extreme SPAG and the files are 1k lines each. All without any proper structure inside a single folder.
I'm not judging him for using AI, just that for me I feel like it's so much knowledge lost and for me this project is not worth looking at.
gui_demo.c consist of syscalls? Interesting...
Using if else for showing apps.
Oh my
I spotted a function that's specifically for handling browser's click
System calls as well
This all in gui_demo.c
yea well AI has some quite interesting tweaks.
When i first tried to make an os I had to search "how to make windows" and yes english is not my first language. There were no Ai so learning such a thing was much harder (it was pre covid)
There's a difference between learning how to make an OS and just asking AI to "make an os" and makes it do it for you.
True, but AI could really be a useful tool if you use it right
only if you already know the topic
or if you wanna search inside a big doc
So you're implying that saying "make me an OS" is how you use it right?
No!
I mean asking Ai about some specific part let's say you want to implement PIT, you dont ask it "make me a PIT for my OS" you ask it to describe it and then later when you check the osdev PIT page, its going to be easier for you to understand
This.
AI is not capable of making an OS
This is what it would spit out.
it is
This OS is completely AI made.
I have tried making a simple Minecraft 2d game with pygame as a challenge a year ago and it didnt go well
i made it do my elf loader bc i felt too lazy to write
and from what i can see, it should be correct
and integrated correctly with my os
Lol it seems like its capable enough.
Like this OS is completely AI generated.
I have tried making an OS before with gpt 3, and it ended up bad
bruh what
Well seems like it haha
use GH copilot + sonnet 4.5
@split hare what AI did you use for this OS?
Im in third world country, most of the AI's doesnt work here
USA?
Just chatgpt, deepseek and Gemini and from what I can tell deepseek performs better still not that good
USA isn't a third world country
i remember some ppl said it became one
Anyways my point is you can use AI to describe how some part of something works just not "make something"
it can make something from scratch
Well I guess he's a good prompt writer haha
tho you have to describe it VERY well, and help sometimes
Yeah but I dont suggest that
and use agents to write code
Oh yes, you need to know about that something otherwise letting AI do everything blindly will cost you a lot of time
yep
This is misleading. It can't "create". It can however regurgitate the contents of really bad internet tutorials, like half incorrectly, and then generate you a readme with a bunch of emojis on a bulleted list talking about how blazing fast and modern it is
That's what happens to people who try to AI generate an OS
depends what AI you use
some AIs are now being trained on actual production code
basically some devs are getting hired to create some real production code to train AIs on
They've been doing that for years lol
Pretty sure at least 30% of black ops 7 is written with AI. Since it didn't bother them to put AI generated banners
They are completely useless still if you want to do anything delicate and sophisticated, except for maybe as an supplement to your editor for doing tedious repetitive code editing tasks
I would never ever trust them with program generation
Even if I could I still wouldn't because I actually enjoy things and am not a society-polluting bloodsucking productivity demon lizard person with no soul
(and big corps said the AIs will replace devs)
The big corps are evil
and have trillions invested in AI
so yeah they'd say that
and then the "AI Devs" nuke amazon and microsoft
I don't think it's as satisfying as getting something to work by yourself
It also makes you stupid
Oh gosh windows break for every 5-6 updates here. For some reason it decides to remove the VMD driver
The future the AI bros are salivating over involves the average IQ (including theirs) dropping by 20 points globally
Don't you all think that's because an AI generated code? I mean clearly they don't purposely do it for every update in a while
Okay okay this os is purely ai generated
But im just finding out how far an ai can go
With building such a project
LLMs literally won't even get us to that level of dystopia though they're a plateaued dead end and the biggest bubble ever is gonna pop when it becomes common knowledge that they invested trillions to make a code editing tool that randomly makes mistakes and doesn't do what you tell it, about 5% better
And that it's not getting any better from here with current knowledge
I'm curious, what kind of AI do you use?
Kind of
No
Lol
It's very trivial
They've been able to do this for like 2 years already with no improvement
We've seen a million AI generated projects almost identical to this
My gpt is oddly dumb. It makes mistake on basic maths calculations
Plus AI's wasn't allowed in my country until 2024
absolutely not
ai built this from scratch\
it did not need any help
It did it without needing to do ANY work
it was purely ai generated
the dynamic memory, gdt, gui, ring 3, everything
it is just ai
i didnt even review the changes
One prob though
@wet knot everything it was hitting it
You dont know what it does
and its shitty code
which dosent work
it simulates everything
no ipc
no real userspace impl
so you think it works
but really its just a big if else statement
ik
im amazed how far it has come
but fr this project is trash, both you and me can say so
that was the goal of it
to see how far it can go
but yes it is trash
its not even a real filesystem
But at least it was able to make a nice bootable gui
its really impressive
because years ago ai would not even be able to boot it
damn its really trash
its not even real ring 3 ๐ญ
loool
its running on one single kmain
so it's just a kernel gui
it didnt even properly implement a scheduler and ipc
thats crazy
yeah its just a kernel gui with thousands of lines of code
@wet knot the ai was hallucinating bruh
Ai choose the simplest path
Yes
Thats what im saying
it literally said it was ring 3 ๐ญ
It used cosmos haha
I also have used AI sometimes.
to make docs. to help with drivers and collating reference manuals
and even tried to get it to make programs in retro rocket basic (it sucks at this)
and, to identify bugs
don't let it fix them, but it seemed good at finding them
I don't use any agentic bullcrap or any integrated coding ones. just ChatGPT plus.
I use it when the error is too long and unreadable so it points it out for me
I am no longer going to change the code
this project is officially closed
im going to be starting a real non-ai generated project
should i just make a new thread?
yes
im just gonna overwrite the intro