#Retro Rocket OS - A BASIC powered Operating System (started 2009!)
1 messages · Page 5 of 1
asm stub -> fred_ring0_entry -> IRQ() -> fxstor -> *bang*
Yes because the stack isn’t aligned
im trying 64, i'll let you know (i'd already put 64 in before you suggested)
when you are in the middle of a function, rsp ≡ 0 (mod 16)
right after a call, rsp ≡ 8 (mod 16)
then the compiler pushes something (rbp or whatever else) and rsp ≡ 0 (mod 16) again
if you offset everything by 8 bytes the compiler doesnt know and will maintain the (wrong) alignment
i think we're having some luck with 64
will let you all know for sure shortly on next run
btw its really great to see multiple people chatting in here 😄
i guess deep technical FRED stuff gets peoples blood pumping lol
it works 🙂
I think this is just because SIMICS don’t have the same network card?
it does but its a different revision or something
so it finds the driver, the driver issues a hard pass on that
and i didnt put init handling in for that lol
i'll add it now
we're FREDDED
multi-fredded? haha
GG
something to do with timer interrupt, idk yet
@light ice was the blue role only for you as the first fredder?
tidying up all the code a bit now 😄
Yes
And now it is my mission to infect the world with FRED
BEGIN THE INFECTION
no chance i could become blue to help infect? lol
/**
* @file fred.c ~~~~
* @author Craig Edwards ([email protected]) []
* @copyright Copyright (c) 2012-2026 []
* FRED: Flexible Return and Event Delivery []
* []
* Like Fred Dibnah at the foot of a mill chimney, this only [ ]
* works if every stack is there, upright, and built before [ ]
* lighting it! [_n__]
* -- https://en.wikipedia.org/wiki/Fred_Dibnah
*/
i decided on this instead of fred flintstone
aw
FRED is alot cleaner though isn’t it
It will also allow for more than 256 interrupts too
Given you demultiplex it

Feel free to drop a link to my implementation and blog post if you want
Being fred.c fred.h and fred.asm
sure! please give urls
A lot of the stuff in my patches was ripped from there
https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.c
https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.h
https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.asm
https://evalyngoemer.com/blog/2026/04/11/implementing-fred/
/**
* @file fred.c ~~~~
* @author Craig Edwards ([email protected]) []
* @copyright Copyright (c) 2012-2026 []
* FRED: Flexible Return and Event Delivery []
* []
* Like Fred Dibnah at the foot of a mill chimney, this only [ ]
* works if every stack is there, upright, and built before [ ]
* lighting it! [_n__]
* -- https://en.wikipedia.org/wiki/Fred_Dibnah
*
* Implemented with lots of assistance from Evalyn Goemer!
* References:
* https://evalyngoemer.com/blog/2026/04/11/implementing-fred/
* https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.c
* https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.h
* https://git.evalyngoemer.com/evalynOS/evalynOS/src/branch/main/kernel/src/arch/x86_64/drivers/fred/fred.asm
*/
there, good? 😄
yw 🙂 thank you!
Btw @willow ginkgo do you post on the OSDev Reddit?
I could have sworn I’ve seen some of your stuff there?
yeah every now and again
I’ve considered posting about my FRED stuff on there
But id just get mogged by shrekOS 😭
meh thats just an image loader
i dont understand what amuses people over on that sub
233 upvotes for a shrek image, but i struggle to get 40
Slop. They don’t understand anything technical so they just see oo shrek and like it
like how does a pic of of shrek beat astral
its a 16 bit real mode os using vga mode 13h made in 100% assembly. this took me a very long time and I just wanted to share my accomplishment uh...
https://www.reddit.com/r/osdev/comments/1s9mkjc/making_a_game_in_my_custom_language_in_my_os/
this was my last reddit post
you should write an osdev wiki page on it
who cares about porting terraria to your os if you can just slap a shrek png
havent seen the source, its likely 64k of .db and a pallette
not png
maybe i should make AuroraOS run on fred 🙏
its not too bad
first os to run bash on FRED
fred is quite nice
I just don’t have a fork in my old kernel lol
No you dont.
Just be warned @serene stirrup
You run bash --version
No?
i technically run neofetch, just that it doesnt display anything useful
exactly lol
I have to be someone to be the first to run something on FRED
Do you run Python?
@ infy quick port fred
Which one of us does it first 🙏
You ere considering it
I’m doing a rewrite and trying not to burn my self out
🥀
no you dont dare
Yes I would dare
Wat os did infy run now
btw what the fuhh is FRED
i just know its something that you port
It’s just a new interrupt mechanism
but have no idea what it actually is
That’s it
a better way of routing interrupts in place of IDT
yeah perhaps wrong word
It also takes in syscalls too
it replaces IDT
bet, so i just need to rewrite interrupt
its a lot simpler tbh
that is easy
And integrate it with the legacy stuff too
just create a interrupt.c file thats a wrapper
only one huge downside, rn only the very latest INTEL cpus support it
and then fred.c
. look here
not AMD yet but theyve pledged to join in
or look at my old impl for userspace & syscall stuff integrated
its really basic
if you want to add it to your OS you gotta use a clanker patch to qemu, have a very very new intel cpu, or use SIMICS
but how tf do i test it
You need one of these
And the only option when I made it was SIMICS
And well SIMICS
the only option i had patience for was simics 😄
we should get the mods to make this into a sticker
Trueeee
sounds easy
or well easier
It would need some edits to make it square tho
i dont want to compile qemu from source
It’s not bad
do you have qemu-fred
My PC can do it very fast
In your system still?
Yes but you need to build from source with clanker patches
And it’s dependent on my system
I update arch
I have to rebuild
💀
This is the specification of a new feature for the Intel® 64 instruction set called flexible return and event delivery (FRED). The feature defines new control-flow transitions (generally between privilege levels) that replace existing transitions (such as event delivery through the IDT and return using IRET). This document is a work in progres...
@serene stirrup you will need this tho
yes yes
now implement it before wicks

Honestly if it were on more CPUs it could make it less of a hastle to get into OSDev
Because I know like so many people who got tripped up on the idt
Yeah the only reason I haven't yet is because there's basically nothing to properly test on
SIMICS & Vibe coded QEMU or new intel laptops

worst case you patch it when sombody tests irl
Btw @latent tendon can you get that ISO. I got IRL stuff to do later and don’t wana have to wait when I’m tired etc
IDT never tripped me up, it was the stuff on top of it
IOAPIC and routing
Yeah but your not a noob lol
you can get by without that for the simplest of onboard stuff like keyboard, mouse
but the minute you start dealing with PCI(e) devices, you need it, AND also MSI(X)
we were all n00b once
IOAPIC isn’t too bad. It’s basically saying send this external IRQ to this internal one to this LAPIC making sure you read ACPI for any overrides
no the bad part is finding out where to tell ioapic to send it
which you need ACPI for
good job we have uacpi
sure, you can
AML is the hard part
where is the vibe coded qemu patches
the good thing is that for msi/msix you don't need io apic so you only really need io apic for ps2 on "modern" laptop hw with other devices being pcie
or if the device has a quirky msi but those weird devices aside
yeah, then there's the tons of different ways to do a timer
that one trips up newbies because so many PIT tutorials
yeah the timer situation on x86 is a mess
in the end i went with local apic timer
the only question left when you choose that path is what to calibrate it with
I’m not giving them to make you use SIMICS 
damn you have smth against me
Yes because your trying to take my spot
And saying I don’t have bash ported
coked
I’m just messing around

ik lol
@serene stirrup Your gonna wana test SIMICS anyways
you do have it ported
ehmm
ima also try and get bochs running
or how tf do you spell that
it always bochs stuff up?
😄
i think we're supposed to pronounce it "bocks" (box) but ive always read it in my head as "botch-es"
the way its written is too german for my english mind
you do have bash ported
but you don't have any functional bash ported
hmmm, people have been chatting about FRED since 2021
i didnt realise it was part of the X86-S spec
I can run loops and other built ins

Yeah FRED is x86S if they did it properly lol
btw is it kernel shell still
My new kernel will show you
I will make a proper VFS
And make fork work
It’s not that bad
I’m gonna make paging code and slab allocator soon
and vmem
Then I can whip up AP init and scheduler stuff and then crap our a VFS
And then I’m like 80% the way there
imagine retro rocket!
a kernel language 
many retrorocket
lol
or get a VM that supports it
no i meant get a kvm vm that uses a new cpu
You
prob from some dedi-server provider
oh
that isnt a bad idea
now with dump command 😄
But none of them suport it
And would be more expensive than a laptop
20€ or less vs 1k€
it depends
Diamond rapids isn’t even out yet lol
There are no server CPUs with it
Only laptop ones
Being pantherlske
updatd my interrupt docs page
Lenovo Japan has announced the update of the Lenovo ThinkPad X13 line. The new Lenovo ThinkPad X13 Gen 7 laptop is a refresh of last year's X13 Gen 6, adopting Intel Panther Lake and AMD Ryzen 400.
i think if i had one of these i'd likely be doing mucn more than osdev on it
There are cheaper models
I’ve seen go down to 800 USD
On Best Buy
Thinkpads are just hella expensive
my current thinkpad is old, but overspecced for what i do
i do most of my osdev on my home server, thats why you see it via tightvnc
now run retrorocket inside of retrorocket
lmao
hmm just had a crazy thought, wouldit be possible to run one CPU of an SMP system with an IDT and another with FRED
No thats actually one of my goals
at the same time
Run AuroraOS inside of AuroraOS
retro rocket doesnt run native programs, so it cant virtualise
but it can start its own shell from within its shell
😄
I think so
idk why anyone would want to
Though I don’t know why
yeah lol
Unless it’s a big.little design
for shits and giggles
That for some reason dropped FRED on some cores
i get the feeling FRED is one of these things where some point in the future intel or amd will declare theyre deprecating IDT (not removing) and the word 'deprecating' will get everyone in a flap "but my os doesnt do this yet"
It is behind a feature bit
So it’s honestly fine
They don’t need to deprecate it
Just put it on the slow paths after a few generations
Same with real mode etc
IDT is already the slow path

lol theres a pattern in my thread subscriptions
wide name, narrow name, wide name....
just make a c to basic transpiler and transpile qemu /s
Compile qemu into a RR kernel module /j
I mean I could lol
that would be silly, like a doom module
"because I can"
You could implement the doom engine in BASIC and then just have that run the WAD
Kernel modules just turn into the standard way of porting applications to retro rocket lol
ROCKETSH> MODLOAD "linux"
bash-5.03$

For those who would die in a non-posix environment and retro rocket is the last os on earth:
I should alias it to "ls" because that's the first thing anyone tries to type at the command prompt
Lol
I need to stop getting side tracked with new shiny and get a 1.0 stabilised
fixing up the irc client
IRC client docs page
connected to the osdev irc channel on libera and had a long chat
That's cool, nice work
ty 🙂
there are a problem when i try to launch in the web retro rocket os
maybe!
might have to just run your own for now,.I'll check the log later
ah there we go, fixed
I had left my own copy running and it was holding the lock on the harddisk0 file
the next retro rocket project:
a web browser
going to be called Voyager and of course it will be written in Retro Rocket BASIC.
is it possible to rewrite retro rocket OS in basic or this is impossible
Not impossible, but it'd take a Retro Rocket Basic LLVM frontend or smth
oh ok
what will be the scope of the browser
web pages

nah, http, https with tls 1.3, images, enhanced text browser
think like elinks with images and forms
I'm going to convert html to an enhanced form of markdown then render that
this will let the browser render html, markdown, text
no js, no css, not really a "chrome like" browser
because that's a time sink and a cause of frustration and an impossible mountain to climb alone
I suppose yeah the language has all the features for it but it doesn't compile to native atm
yeah you'd need an llvm frontend or something
Basic JIT when 
I'm not making one lol it's already fast
made a nicer cpuid system for detecting Fred, ERMS etc
and added a new memcpy variant for screen backbuffer copying on systems that don't have ERMS, they fall back to SSE2
added ARRSORT and ARRSORTBY to BASIC and now using them in the 3D demos 😄
adding map types. basically a basic-accessible hashmap
cool
Retro Rocket OS - A BASIC powered Operating System (started 2009!)
I'm sick of virtue signalling about AI. ^ This title change should be enough here.
What was the title before lol
just didn't have the started 2009 in
I decided it better to put that than stick any pro or a anti AI label in here. I do use AI, for docs, analysis, reverse engineering drivers, searching standards etc, but obviously if the project has been about since 2009 it can't really be vibe coded 
added:
MEMREALLOCMEMCOPYMEMMOVEMEMSET
as BASIC calls
also fixed:
SOCKBINREAD keyword offered no way of returning the actual number of bytes read, so now:
SOCKBINREAD integer-socket, integer-buffer, integer-length [, length-read-variable]
buf = MEMALLOC(4096)
SOCKBINREAD client, buf, 4096, amount_read
REM ... process buffer ...
MEMRELEASE buf
ive come up with a way to make my string representation binary safe, without migrating everything from C strings to counted strings
i'm using this to escape binary inputs 'at the border' for socket functions
which will be needed when it comes to downloading images to memory to display them
colour list and libraries/http improvements!
made quite a few under the hood improvements to how I concatenate BASIC strings and how I fill them into the arena
it's a ton faster now again
so cool
it tempting you to make any programs in it at all? 😁
cpu percentages now in proclist 🙂
made dir use human readable sizes
adding better detection of BASIC programs without needing execute attributes or mime types
do you calculate cpu % based on cpu cycle or cpu time ?
CPU time, but not wall clock. percentage of the scheduler loop spent in each runnable process
it's a bit different and a bit odd compared to how you'd do it with interrupts because the task switching isn't timer driven
it's done on a rolling average of the last 32 samples with samples taken every 150ms
oh cool
static void proc_update_cpu_usage(void) {
uint32_t runnable = 0;
const uint8_t cpu = logical_cpu_id();
for (process_t* cur = proc_list[cpu]; cur; cur = cur->sched_next) {
if (cur->state == PROC_RUNNING) {
runnable++;
}
}
for (process_t* cur = proc_list[cpu]; cur; cur = cur->sched_next) {
uint32_t sample = 0;
if (runnable && cur->state == PROC_RUNNING) {
sample = 100 / runnable;
}
cur->cpu_percent = ((cur->cpu_percent * 31) + sample) / 32;
}
}
uint32_t proc_cpu_percent(pid_t pid)
{
uint32_t perc = 0;
process_t* proc = NULL;
lock_spinlock(&combined_proc_lock);
proc_id_t* id = hashmap_get(process_by_pid, &(proc_id_t){ .id = pid });
if (id) {
proc = id->proc;
}
if (proc) {
perc = proc->cpu_percent;
}
unlock_spinlock(&combined_proc_lock);
return perc;
}
proc_update_cpu_usage runs off a 150hz timer attached to the 1khz interrupt, task switches do not, they can run a lot faster
proc_cpu_percent is the helper BASIC uses
added TCP fast retransmit, and send now honours peer MSS
added window scaling to TCP
ive finally made it so that TCP errors can surface up to BASIC
also improved how i find free FDs in the FD table:
int tcp_allocate_fd(tcp_conn_t* conn) {
__m128i all_ones = _mm_set1_epi32(-1);
for (size_t word = 0; word < FD_WORD_COUNT; word += 2) {
__m128i v = _mm_load_si128((const __m128i*)&fd_used[word]);
__m128i eq = _mm_cmpeq_epi32(v, all_ones);
int mask = _mm_movemask_ps(_mm_castsi128_ps(eq));
if (mask != 0xf) {
uint64_t free_bits = ~fd_used[word];
if (free_bits != 0) {
unsigned bit = __builtin_ctzll(free_bits);
size_t index = (word << 6) + bit;
fd_used[word] |= 1ULL << bit;
fd[index] = conn;
return (int)index;
}
free_bits = ~fd_used[word + 1];
if (free_bits != 0) {
unsigned bit = __builtin_ctzll(free_bits);
size_t index = ((word + 1) << 6) + bit;
fd_used[word + 1] |= 1ULL << bit;
fd[index] = conn;
return (int)index;
}
}
}
return -1;
}
uses SSE2 and a bitmask of available fd slots:
_Static_assert((FD_MAX & (FD_MAX - 1)) == 0, "FD_MAX must be a power of two");
#define FD_WORD_BITS (sizeof(uint64_t) * 8)
#define FD_WORD_COUNT (FD_MAX / FD_WORD_BITS)
static tcp_conn_t* fd[FD_MAX] __attribute__((aligned(16))) = { 0 };
static uint64_t fd_used[FD_WORD_COUNT] __attribute__((aligned(16))) = { 0 };
can search 128 slots at a time
once its found a value with a free bit it uses CTZLL to find out which bit, and allocates there
if youre curious, FD_MAX is currently 1024.
can now restrict keywords in child programs!
https://retrorocket.dev/RESTRICT.html
can now directly use this as a shell builtin to sandbox a program against anything that can change the system
but i should have called it sudont 
like sudo but in reverse
Might have to include that in my list of funny startup messages 
do it lol
or rather sudo it

what funny starup messages do you have already?
(I need to convert this to an array of char pointers)
csn I suggest some more for you lol
Yes lol
- ask your doctor if Serpyntyne is right for you
- side effects may include loss of scalp and penis
- I'm gonna make my own os! with blackjack! and hookers!
- try new berry flavour
@uncut quiver ^ 
- this kernel error is an off duty Bolivian traffic warden
- so long, and thanks for all the fish
- ring 0 to rule them and in the darkness bind them
can you do the reverse
only allow some keywords
I'll do all these, although the middle two I'll edit so they're not vulgar lol
not atm, that would be a pain for the user to define lol
theres only a small handful of "unsafe" keywords/functions, and a slightly larger set of "change" functions/keywords (MKDIR, DELETE etc)
yeah but you could then make your sandbox program only use a list of authorised keyword
this will avoid that you forget to restrict a keyword when you add more
i wont forget 😄
i dont think i need any more unsafe keywords now tbh
99% of what im making now is basic libs, in basic, instead of new keywords
added support for uefi boot from cdrom
and csm boot from usb
also added a new BASIC lib called multidim
I just can't help myself. I just keep adding more and more to this demo in my operating system, written from scratch and powered by BASIC.
Feedback welcome, like, share and subscribe for more crazy shenanigans!
😄
ive improved the performance of symbolication, and profiling
it is now fast enough that for many functions i can run it with profiling on and the performance difference is maybe 2x to 3x speed decrease instead of 20x to 30x
it can even profile interrupts 😄
added docs for profiling
managed to make retro rocket basic 10x faster
literally ten times
😄
every time around the scheduler loop i was checking for pending DPCs and timers
it only needs to happen once per millisecond
added support for the £ symbol on en-GB keymap (or any othe symbol anyone may want) - keymaps now let you redefine glyphs
lots of new keymaps
How to shoot yourself in the foot with Retro Rocket BASIC (Inspired by: https://www-users.york.ac.uk/~ss44/joke/foot.htm)
You CHAIN a program called GUN, dynamically LIBRARY in ballistic maths, and draw a perfectly animated foot sprite while a multitasking routine calculates the trajectory in real time. Halfway through, you RESTRICT yourself from using anything dangerous, forget to DERESTRICT, and the shot silently fails. You spend an hour debugging before realising the gun worked perfectly—you just sandboxed the bullet.
performance testing
voyager has begun.
ive removed Retro Rocket BASIC's hard cap of MAX_STRINGLEN on strings. now a string can be in theory as long as the allocator will allow at any given time
during testing i managed to make a string nearly 3mb long
combined with automatic scaling of the temp arena, managed to generate a 17mb string 😄
That is sick
If your doing capability systems having max memory/string limits could be a cool feature too maybe?
yeah that's a good idea, I'll get to it eventually
Want to try printing my 40mib qemu log 
lmao, gotta get it into a string first
well technically not. the list command will dump that file just fine
but if you want to PRINT it in one instruction... lol
Lol
I've added support for different memory models when you start a program
CHAIN "program" MEMORY HUGE|LARGE|MEDIUM|SMALL
It affects the size of the buddy allocator default arena basically how big any one object like an array or string can be. defaults to 64mb (what it was before), this is MEDIUM.
SMALL = 32MB
MEDIUM = 64MB
LARGE = 128MB
HUGE= 256MB
buddy allocator can always grow more arenas, always has been able to do that but this lets you raise the size for big scalars and arrays in a program.
I'll add DAMN as 512Mb
“My Mom” 8gb
MY MOM 16Gb
you could but youd have to raise a define in the buddy allocator c file
good luck even filling 64mb with BASIC lol
i have to make massive arrays and stuff to fill it
I will shove it with as many copies of the Bible as I can
One weak many strong
you will have to make sure to write it to disk though if its the bible
because jesus saves
I do wonder if I could try and port my kgz library to RR basic and do the decompression there, wonder how slow it would be given you have to read of a bit stream and do a bunch of tree magic and shit
that would be fun
but your fastest approach is likely MEMALLOC, PEEK and POKE
although numeric arrays are really quick
There is a lot of fancy bit shifting stuff to get stuff out of the streak and flip endianess where needed
Because some stuff has to be read one way or the other
https://git.sr.ht/~evalyn/kgz/tree
take a look and tell me if it would be worth giving a crack at it later if im bored XD
this is a direct port of a benchmark written for a 2mhz 6502 running BBC BASIC
i had to adjust the sample sizes because it was completing in under 1ms and causing divide by zero
Oooo neat
this is on a Ryzen 7 5800X on windows with WHPX under qemu
this ones my own benchmark, i use it to compare old vs new when i make an interpreter change to make sure i havent made anything worse
a bunch of loops and allocations and string growth and floating point ops, ran 5 times and averaged
for that one smaller is better
lol 96mb string
How is that even possibile lol
Do u have any doc? I am curios abt it
REM This is supposed to crash.
A$ = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
A$ = A$ + A$
B$ = A$
MB = 0
ON ERROR PROCfail
REPEAT
B$ = B$ + A$
UNTIL FALSE
END
DEF PROCfail
PRINT "Grow reached its limit at a "; LEN(B$) / 1024 / 1024; " MB string"
PRINT "Memory use: "; MEMPROGRAM
PRINT "Memory peak: "; MEMPEAK
END
ENDPROC
it just does that until it cant any more 😄
which bit do you want docs on? i got lots of docs 😄
Drivers mainly
oh.... one sec 😄
If possible
Oki
i got this
but as for source code, everything has doxygen blocks
Thx
lots of good examples in here
theres also this config file which says which aliases try to load which files
https://github.com/brainboxdotcc/retro-rocket/blob/master/os/system/config/loadorder.conf
damn so impressive
started work on a memory tracer, allows for leak checking and will give be backtraces to leaking callers
got it working, got some small memory leaks to solve maybe.
added BIGNUM support, uses mbedtls bignum under the hood
voyager now converting html to markdown ready for parse 🙂
added font scaling/flipping to GRAPHPRINT
testing something ive not tried before.... one copy of retro rocket connecting to the web server of another 😄
nice...
currently adding simple path mtu discovery, adding icmp error handlers, and actually validating the ipv4 checksum of inbound packets
icmp error handlers are simple callback where the tcp system can be told by icmp if a port or host is unreachable to bubble errors up the stack
basically this
void tcp_handle_icmp_unreachable(ip_packet_t *quoted_ip, uint8_t code, uint16_t mtu)
{
tcp_segment_t *quoted_tcp = (tcp_segment_t *)((uint8_t *)quoted_ip + quoted_ip->ihl * 4);
tcp_byte_order_in(quoted_tcp);
tcp_conn_t *conn = tcp_find(*((uint32_t *)"ed_ip->src_ip), *((uint32_t *)"ed_ip->dst_ip), quoted_tcp->src_port, quoted_tcp->dst_port);
if (!conn) {
return;
}
switch (code) {
case ICMP_NET_UNREACHABLE:
case ICMP_HOST_UNREACHABLE:
tcp_set_close_code(conn, TCP_CONNECTION_LOST);
break;
case ICMP_PROTOCOL_UNREACHABLE:
tcp_set_close_code(conn, TCP_CONNECTION_ABORTED);
break;
case ICMP_PORT_UNREACHABLE:
tcp_set_close_code(conn, TCP_CONNECTION_REFUSED);
break;
case ICMP_FRAGMENTATION_NEEDED:
if (mtu > sizeof(ip_packet_t) + sizeof(tcp_segment_t)) {
uint16_t path_mss = mtu - sizeof(ip_packet_t) - sizeof(tcp_segment_t);
if (path_mss < conn->peer_mss) {
conn->peer_mss = path_mss;
}
}
break;
default:
break;
}
}
...
icmp_register_unreachable_handler(PROTOCOL_TCP, tcp_handle_icmp_unreachable);
finally removed LGETLASTCPUID and LCPUID
added MAKESPRITE to create sprites from memory
https://retrorocket.dev/MAKESPRITE.html
??
already have!
😄
the kernel is a lightweight C kernel that runs a ring 0 BASIC interpreter built for systems level work
welcome to the crazy thread
currently adding spectrum analyser to the audio system so BASIC can do VU meters and visualisations
Subtractive synthesis when
added SIGN$, VERIFY, COMPRESS and DECOMPRESS basic functions:
SIGN$: Signs a binary blob and returns the signature blob signed by ECDSA key https://retrorocket.dev/SIGNS.html
VERIFY: Verifies a binary blob and signature, when given the binary blob file, signature file and signing cert https://retrorocket.dev/VERIFY.html
COMPRESS: gzip compression of binary blobs https://retrorocket.dev/COMPRESS.html
DECOMPRESS: gzip decompression of binary blobs https://retrorocket.dev/DECOMPRESS.html
Dude OS is older than me
yeah os is almost old enough to drink
I'm currently working on a new thing where in the RESTRICT keyword if you put RESTRICT MEMORY you can only do memory primitives within regions you allocated with MEMALLOC, and, you can only MEMRELEASE a region you allocated with MEMALLOC
basically enables memory safety for raw memory operations
i decided to keep the MEMRELEASE check regardless of if RESTRICT MEMORY is on or not
theres never any benefit to freeing memory that doesnt match a previous allocation exactly, its a bug at best, and a heap corruption at worst.
it also helps catch double frees
https://retrorocket.dev/RESTRICT.html
updated docs on RESTRICT
finally some common sense
Colorado’s proposed OS-level age verification bill - SB26-051 has triggered an unexpected backlash from the Linux and open-source community.
Developers warned that the original wording appeared broad enough to potentially affect Linux distributions, public code repositories like GitHub, and even container systems such as Docker.
Now lawmaker...
decided to add a read-only ext2 driver
will be yet another foreign file system it will be able to read files from
woooo ext2!
added new keyword to enumerate registered devices from BASIC
that lets me make a devices command like this, and/or enumerate the device list to check if a sound device is loaded before trying to load one instead of needing on-error chains.
can finally, 16 years late, specify partitions to mount specific partition ids 😄
🔥
now added support for LINUX LVM2 volumes when mounting ext2/3!
not sure ive seen this anywhere else yet in hobby OSes
apart from ofc those that are linux forks
improved how i handle GUIDs in LVM2 and GPT partition tables/volumes
and also added a walk callback for volume walk which i'll use to expose a list of volumes on a device to BASIC
but that can wait till tomorrow. its late.
added vols command, VOL$() and VOLCOUNT() functions for enumerating available volumes on a block device
bro continue like this and your the next linux i swear
sure, the next linux with no users lol
do pub and you will find users
the plan is to get to 1.0 then do that
1.0 just needs the package manager and a basic web browser
by not being a 'desktop' OS, i hopefully wont be competing in the same space for gfx drivers
most of what retro rocket does, it can do effectively with just VESA/GOP
one good reason to eventually go to native graphics though is multi monitor
waiting on a new replacement SSD for my raid array, until I've got that I'm not compiling much
raid 0? how faster is it i wonder
raid 6 on a hardware array
i may be able to do a raid on a 20 year old machine 
but I take no risks
2 80 GiB IDE HDDs
if it degrades I shut down noisy services and wait till it's got replacement disks
lol, epic autocorrect
... services I shit down
interesting, i've never had a disk degrade on me really
only one but speed wise only
it works fine its just slow as hell
its not that old either tho
it just sucks
I have 4x 512gb sff SSD. I get through maybe one a year
yeah, on my main pc i have my main 480GiB SSD and a 4tb hdd
i can't really raid them
on that 20 year old machine tho
i think it does support raids
iirc it had something about that on the bios
yeah older machines usually can raid sata
they expose the sata array as one disk via ahci usually
this is IDE tho
raids should implement checksums like cd roms ngl
do you still have easy access to working ide disks? or do you use an ide CF adaptor
yeah i just have to open the pc
actually its not that easy
the IDE cables are basically stone
28 years of crust ig
move them too much and they snap?
no but they need a lot of force for removal
i have to get an extra fan for that pc tho
it has one intake and no outgoing fans
I have my server for compiling and running qemu on, and a spare pc that has retro rocket permanently installed, that is about 15 years old
nice
i have my main pc and a 2 laptops made into servers
i use them for holding my web page and occasional minecraft servers for friends
thinking about it all my devices have ssh installed
even my phone
I shut my MC server down until I have replacement disk
it loves to continually write
true
i run a fabric server with some optimization mods
still runs like crap
I run mostly vanilla paper with dynmap and a custom anti grief module
well on the way to making most string access in the BASIC interpreter uses counted strings
yay, new drive is in
root@neuron:/home/brain# ssacli ctrl slot=0 ld all show status
logicaldrive 1 (953.82 GB, RAID 6): Recovering, 67.67% complete
interesting raid
it's a hp410i raid controller
ive removed tons and tons of strlen calls from basic, moving to counted spans. the idea is that pretty much any string is immutable, if you change it you make a copy.
this has sped up the interpreter by about 16%
gonna spend some time testing the new basic sfuff
then I am a bit closer to 1.0
raid is repaired now, so one less issue to fight
haven't checked in here in a while, how goes it?
not really done much for a few weeks, giving some attention to my other projects for a bit
ahhh
fair
been working on this mostly
https://discord.com/channels/440442961147199490/1516821583757578361
then next is likely D++ lib needs some love too
Oooo
Finally found someone that likes C++
I like parts of C++ and hate other parts
I use c++ pragmatically,I don't consider it an "oop" language
when I see over use of objects and classes and inheritence where templates or just namespaces will do, it grinds my gears
this is my latest part of that project
https://github.com/brainboxdotcc/beholder/blob/main/nsfwd/main.cpp
I started this field 1 month ago.i Wana to study more about it
which field, os dev?
Os dev
I don't know the roadmap of it.can you guide me

