#Retro Rocket OS - A BASIC powered Operating System (started 2009!)
1 messages ยท Page 3 of 1
but it isnt a crappy computer i run retro rocket on
its old, sure, but its more than good enough to run windows 10, or linux
i even used to do unreal engine dev on it, thats why it has 32gb ram lol
i just have no need for it to run windows or linux rn so os dev test rig it is
thats some very resource intensive games
nah just normal games
anything newer than cyberpunk 2077 is too new for it really
hah, standalone listen() test is horrible
load_module("e1000");
unsigned char ip[4];
dprintf("Waiting for net to be ready\n");
while (!gethostaddr(ip)) {
__asm__ volatile("pause");
};
dprintf("listening 2000\n");
int server = tcp_listen(0, 2000, 5);
int client = -1;
if (server < 0) {
dprintf("Listen failure\n");
} else {
dprintf("waiting for client connection\n");
while ((client = tcp_accept(server)) < 0) {
__asm__ volatile("pause");
};
dprintf("Sending reply\n");
send(client, "HELLORLD", 8);
uint64_t ticks = get_ticks();
while (get_ticks() - ticks < 3000) {
tcp_idle();
__asm__ volatile("pause");
}
dprintf("Closing client\n");
closesocket(client);
dprintf("Closing server\n");
closesocket(server);
}
Silksong:
going to add BASIC support for LISTEN and ACCEPT today.
then, first connection into it remotely
i might make a telnet server, for shits and giggles.
indie games dont count they run on microwaves
yeah
lol
ive changed the font to the BBC Micro 8x8 font
can fit a lot more vertically on screen now but i have another reason for this, VDU 23, x support
it looks very different to IBM 8x16 and might take some getting used to for some people
that last font looked like ass
congrats on switching
it was because it was bbc 8x8 stretched double height
this is the same font but at the aspect its supposed to be
zoomed in a bit
because discord's scaling of the image makes it unreadable without clicking
but you can see how the shape is right now?
they dont look so ass, obviously retro/oldschool but not ass
i never said this one was ass
this one's better
this palette hurts my eyes
cool
can there be licensing issues though
Black Myth Wukong
(or howevery you spell that; min system requirement includes a i5 8400, a hexacore cpu)
no, these fonts are not licensed like ttf fonts are
ok cool
they're just part of the os binary itself but not something anyone is asserting rights over
acorn went bust decades ago
tcp socket server in BASIC!
the name basic is clickbait atp (it's not basic at all anymore)
tcp server is insane
it is basic, see how simple a tcp server is?
its like 10 lines lol
admittedly that can only serve one request at a time, but its possible to make it scale simply by splitting the program in two, like a fork() model
server = SOCKLISTEN(NETINFO$("ip"), 2000, 5)
PRINT "Socket server listening on port 2000"
REPEAT
client = SOCKACCEPT(server)
IF client >= 0 THEN PROChandleConnection(client)
UNTIL INKEY$ <> ""
SOCKCLOSE server
END
DEF PROChandleConnection(client)
PRINT "Handling connection, HELLORLD!"
SOCKWRITE client, "HELLORLD!" + CHR$(10) + CHR$(13)
SLEEP 1 ' Give the write time to finish
SOCKCLOSE client
ENDPROC
@fork is this true
nice
i need to fix that need to do SLEEP 1
because SOCKWRITE does not block, it isnt guaranteed the data is sent to the client before you SOCKCLOSE without it
server = SOCKLISTEN(NETINFO$("ip"), 2000, 5)
PRINT "Socket server listening on port 2000"
REPEAT
client = SOCKACCEPT(server)
IF client >= 0 THEN PROChandleConnection(client)
UNTIL INKEY$ <> ""
SOCKCLOSE server
END
DEF PROChandleConnection(client)
PRINT "Handling connection, HELLORLD!"
SOCKWRITE client, "HELLORLD!" + CHR$(10) + CHR$(13)
SOCKFLUSH client ' Ensure data has been sent
SOCKCLOSE client
ENDPROC
there, new keyword SOCKFLUSH, thats better
wdym
drivers don't implement the TCP stack if that's what you mean, a network driver only has a function pointer to send an ethernet frame and sends incoming ethernet packets to ethernet_handle_frame()
a ok cool
@willow ginkgo can you add some kind of compatibility mode or emulator or something for microsofts ms basic? They've open sourced it under MIT a couple days ago.
Well at least I think that'd be pretty cool
probably not going to happen, it's more like BBC basic which was a much more advanced dialect, ms basic requires line numbers, doesn't have procedures, functions, while/endwhile etc
and Microsoft basic, the one they released, makes a lot of assumptions that it's in a 6502 environment with a 64k memory map
looks like it doesn't even have a divide operator lol
idk why you'd want to "emulate" it apart from as historical curiosity
Mostly that
just optimised BASIC keyword dispatch to make it O(1), eliminate a huge switch statement, and mean theres one point where you have to go when adding a new keyword rather than about 3 different call points
Are you using a jump table or what
yes
just done a ton of optimisations to the hot paths in BASIC
a webserver!
IF EXISTSVARI("client_socket") THEN
PROCprocessRequest
END
ENDIF
server = SOCKLISTEN(NETINFO$("ip"), 80, 5)
PRINT "Web server running. Press any key to terminate."
REPEAT
client = SOCKACCEPT(server)
IF client >= 0 THEN PROCspawnChild(client)
UNTIL INKEY$ <> ""
SOCKCLOSE server
END
DEF PROCspawnChild(client)
GLOBAL client_socket = client
CHAIN PROGRAM$, TRUE ' Spawn an async background instance
ENDPROC
DEF PROCprocessRequest
SOCKREAD client_socket, REQUEST$
VERB$ = TOKENIZE$(REQUEST$, " ") ' Get the request details
FILEPATH$ = TOKENIZE$(REQUEST$, " ")
IF FILEPATH$ = "/" THEN FILEPATH$ = "/index.html"
PRINT FILEPATH$
VERSION$ = REQUEST$
FILEPATH$ = "/system/webserver" + FILEPATH$
FH = OPENIN(FILEPATH$)
IF FH > -1 THEN
SOCKWRITE client_socket, "HTTP/1.0 200 OK"; CHR$(13); CHR$(10);
size = FILESIZE(FILEPATH$)
buffer = MEMALLOC(size)
SOCKWRITE client_socket, "Content-Length: "; size; CHR$(13); CHR$(10);
SOCKWRITE client_socket, "Connection: close"; CHR$(13); CHR$(10); CHR$(13); CHR$(10);
BINREAD FH, buffer, size
SOCKBINWRITE client_socket, buffer, size
SOCKFLUSH client_socket
MEMRELEASE buffer
SOCKCLOSE client_socket
CLOSE FH
ELSE
SOCKWRITE client_socket, "HTTP/1.0 404 Not Found"; CHR$(13); CHR$(10);
SOCKWRITE client_socket, "Content-Length: 0"; CHR$(13); CHR$(10);
SOCKWRITE client_socket, "Connection: close"; CHR$(13); CHR$(10); CHR$(13); CHR$(10);
SOCKFLUSH client_socket
SOCKCLOSE client_socket
ENDIF
ENDPROC
less than 50 lines of BASIC
hellorld?
watch the usagi centurion videos and youll understand
Once upon a time I made a typo, and that typo spawned some of the greatest things Iโve ever seen! I want to see your Hellorld!
Remember though:
- Must be in assembly or hexadecimal
- And preferably on a unique machine
Hellorld! Wiki:
https://github.com/Nakazoto/Hellorld/wiki
Centurion Wiki:
https://github.com/Nakazoto/CenturionComputer/wi...
thx
added a ton of new BASIC functions/keywords:
- FILESIZE - get size of a file by name without opening it
- MEMALLOC - allocate memory from the basic program's pool
- MEMRELEASE - release memory
- BINREAD - read raw binary buffer from file
- BINWRITE - write raw binary buffer from file
- SOCKBINREAD - read raw binary buffer from socket
- SOCKBINWRITE - write raw binary buffer to socket
hmm this is actually quickly becoming "the OS where making network software is easy"
that's hot work!
you have a 3d implementation
the os where making multiplayer shooters is easy 
working on a way to be able to redefine characters (VDU23,X) and draw text at any arbitrary graphics coordinate bypassing flanterms grid
everyone in the universe is using flanterm now
I'm using a heavily modified form, with extra features... flanterm can't do that thing above
nor can it report it's dirty-rect, which I use to improve graphics drawing performance
it didnt go crazy... i redefined character 32 ๐
lol
im adding support for the BBC Micro VDU keyword
its like ANSI, but Acorn's own rules
allows you to do crazy things like redefine character bitmaps
that's actually a really good looking font. Good to know when the need for a small bitmap font arises
todays stuff.... make sure you got sound on ๐
oh thats cool :p
lol nice
im still working on the BASIC interface and driver interface for it
but it will be done soon
chop chop
whats the usual thing to do.... something to do with an apple and black and white animation?

no no no, its Black and White Apple Animation, not Bad Apple!
lol yeah, generic copyright free witch and apple music
perfect!
load_module("ac97");
fs_directory_entry_t* entry = fs_get_file_info("/system/webserver/test.raw");
int16_t* data = kmalloc(entry->size);
fs_read_file(entry, 0, entry->size, (unsigned char*)data);
mixer_channel_t *music = mixer_open_channel();
mixer_set_gain(music, 64);
mixer_push(music, data, entry->size / sizeof(int16_t) / 2);
kfree(data);
^ my test code for the mixer
really getting into the code now ๐
void* wav_buffer;
size_t wav_size;
if (audio_wav_load("/system/webserver/test.wav", &wav_buffer, &wav_size)) {
mixer_stream_t *music = mixer_create_stream();
mixer_set_gain(music, 64);
mixer_push(music, wav_buffer, wav_size_to_samples(wav_size));
kfree(wav_buffer);
}
IT WORKS!!!
Sound support now done!
Gonna have a lot of fun with this ๐
ty ๐
this is one deep rabbit hole
now with codec support for loading MP3 files and FLAC files with SOUND LOAD:
add WAV or i will destroy the universe 
wav is built in... ๐
aac, ogg/vorbis, and opus?
awesome
there would need to be a good header only lib for each
ii tried first to get stb_vorbis working before mp3, but it wouldnt compile, it does stupid shit like #including a c file instead of a header file, not letting me override the allocator properly
adding ogg/vorbis ๐
wont be adding AAC for now, it isnt a good fit for a kernel module. huge libs only like libfaac and the format is patent encumbered
flac my beloved โค๏ธ
I'm adding adsr envelopes next with square, sine, sawtooth and triangle waves
for those who like it oldschool
OGG file loader, ENVELOPE and SOUND TONE.
You can now play basic square waves, sawtooth waves, sine waves, etc, and define ASDR envelopes!
https://retrorocket.dev/audio-basics.html#envelopes
https://retrorocket.dev/ENVELOPE.html
true
its really cool tho
there should be like a tracker or something
yeah it's doable
I'm not musically talented enough to make it nice
or demonstrate it
really need a way to pitch bend samples for a proper tracker
you could try to convert never gonna give you up
hahaha
i just converted the first few bars of bach
you know the famous church organ theme
REM The introduction to Bach's Tocatta and Fuges
REM Demonstration of ENVELOPE and SOUND TONE
ON ERROR PROCcontinue
MODLOAD "ac97"
ON ERROR OFF
REM Streams
STREAM CREATE lead1
STREAM CREATE lead2
STREAM CREATE lead3
REM ADSR envelopes
ENVELOPE CREATE 2, 1, 255, 128, 25,120, 220, 800, 0, 0, 0, 0, 0
ENVELOPE CREATE 3, 0, 220, 128, 10, 60, 180, 320, 0, 0, 0, 3,12
ENVELOPE CREATE 63, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0
REM tune
PROCchord(880, 20, 3)
PROCchord(784, 20, 3)
PROCchord(880, 100, 3)
PROCchord(100, 40, 63)
PROCchord(100, 40, 63)
PROCchord(784, 20, 2)
PROCchord(698, 20, 2)
PROCchord(659, 20, 2)
PROCchord(587, 20, 2)
PROCchord(554, 90, 2)
PROCchord(587, 90, 2)
REM wait for tune to leave buffer
SLEEP 6000
END
DEF PROCcontinue
ENDPROC
DEF PROCchord(rootHz, durCs, env)
SOUND TONE lead1, rootHz, durCs, env
SOUND TONE lead2, rootHz * 1.2599, durCs, env ' major 3rd
SOUND TONE lead3, rootHz * 1.4983, durCs, env ' perfect 5th
ENDPROC
youre welcome to try, im not musically inclined
i found the notes
gonna give it a go
never gonna give it up
never gonna let you down
๐
:(
MIDI player? 
No, canyon.mid on retro rocket!
add soundfont support too!
mods ahoy! anyone for a rickroll?
i found a rickroll .mod in protracker format ๐
enjoy!!!
i should do bad apple. just because.
love it
thats HDA driver support added, should cover most non-usb, non-hdmi audio devices out there
the video clip is literally windows xp google chrome experience
144p 2fps
lol
thats intentional
i could run the frames at like 90fps
but it would just give people seizures
its not a video, its just 5 frames taken from the video
and i intentionally pixelated the frames
^
rick2.png
real

fix hda driver bugs, was playing everything at 48000hz not 44100hz
now works perfectly
til 100hz makes a difference
to be fair if you are listening to music even the slightest change will feel weird
it makes a huge difference to audio
its 8.84% faster and higher pitch
if you confuse the two
fixed all my maths primitives, log, pow, etc.
These are way beyond my ability to understand, the concepts are closer to "pure maths" than even comp sci. I used a combination of freebsd sources, libm, and chatgpt to figure out better solutions, because XM playback was skewing pitches of notes high due to assumptions i made in my simple implementation of pow, exp and log. theyre closer to the bsd and libm impl now, lots of floating point bit twiddling, little of it is understand. but, if bsd does it... means its battle hardened.
also, where i can, i used builtins.
Listen to a 100Hz and a 200Hz tone
our hearing is kinda logarithmic
if you know what i mean
meaning a 200hz tone will sound significantly higher than a 100hz tone, but a 10100hz tone will not sound significantly higher than a 10000hz tone
- you have to multiply a frequency by 2 to go up one octave instead of adding to it
fair
Theres definitely an audible difference between 500Hz and 505Hz tone but tbh i wouldnโt know if I wasnโt presented both variants
audible, yes, significant, no
k
you thinking of decibels?
No
I'm thinking of frequencies
But that too is a logarithmic scale
44100 to 48000 is hugely noticeable though and then add on top another bug that pegged all the notes up the top of the scale in the xm player
it was like the naff recorder version lol
It's about a 4khz difference so probably
currently integrating mbedtls, so i can make ssl connections
once i have that my proof of concept will be to send a discord webhook!
well, it's integrated! I "just" need to test it now and debug any oofs
SSL works!!!
REM Socket test
HOST$ = "yahoo.com"
PRINT "Connecting to "; HOST$; " ";
IP$ = DNS$(HOST$)
PRINT " (IP: "; IP$; ")... ";
SSLCONNECT FD, IP$, 443, HOST$
PRINT "Connected! Socket descriptor="; FD
PRINT "Writing..."
SOCKWRITE FD, "GET / HTTP/1.0"; CHR$(13); CHR$(10); "Host: "; HOST$; CHR$(13); CHR$(10); CHR$(13); CHR$(10);
PRINT "Reading..."
SOCKREAD FD, TEST$
PRINT TEST$
PRINT "CLOSING"
SOCKCLOSE FD
PRINT "CLOSED"
bro doxxed yahoo
OH NOES i gave out yahoo's ip!
it was so secret, too!
taking a bit of a break from the really mind bending tls stuff, to add something simple
tree program!
wait do you have unicode support ?
also maybee add some color
Those are probably box drawing characters
oh
Well that was poorly worded, but cp437 fonts can support then too
https://github.com/viler-int10h/vga-text-mode-fonts have a look at the fonts in this repo, most (if not all) of them have those characters near the end.
flanterm maps Unicode to cp437
but in this os you can redefine font glyphs too
now changed the efi.fat image to a gzip compressed one. now the installer takes much less space, cuts the entire iso down to 24mb!
just needed to include zlib to decompress it
or rather, a subset of zlib
people keep asking, so i just had to
PRINT "Loading... ";
SPRITELOAD bad_apple, "/images/bad-apple.gif"
CLS
AUTOFLIP FALSE
GCOL &888888
RECTANGLE 0, 0, GRAPHICS_WIDTH - 1, GRAPHICS_HEIGHT - 1
REPEAT
PLOT bad_apple, GRAPHICS_CENTRE_X - 160, GRAPHICS_CENTRE_Y - 100
FLIP
SLEEP 66
ANIMATE NEXT bad_apple
UNTIL INKEY$ <> ""
AUTOFLIP TRUE
CLS
END
Hell yeah
nice lol
i was going to do the music too but there are copyright issues of embedding the mp3 for bad apple in retro rocket's iso
just record a video and thats it
- including the gif is already just as dicey legally speaking as the music
the gif is not associated with the original song
that was an art project someone did much later
and the gif is licensed freely or what
not exactly, reuse is tolerated, which is why everyone else uses it. the music is a different matter
it is a grey area
1994 power macintosh levels of framerate ๐ญ
nice tho
"generic girl with apple video"
can take the frame rate up much higher but the speed felt wrong
sleep can go as low as 5 or even be removed
fair
currently trying to make HDA work on real hardware
seems the firmware leaves it in a weird state
FW devs do be doing that
yup, "lets leave the device in bus mater mode, so it fails if you try it yourself, but leave all the codecs in D0 state"
Booting into Retro Rocket, my homebrew 64-bit operating system inspired by the BBC Micro.
After landing at the BASIC shell prompt, I type a single word: demo.
The OS responds with:
Harvesting apples....
Bringing the noise...
โฆand then unleashes a full audiovisual demo: heavy dubstep, a rotating 3D cube, and every face of that cube playing ...
HARVESTING APPLES
lol, innit
gdt innit 
GDT OK
it's funny that I added a sound mixer and 3d graphics to retro rocket before paging functions. backwards lol. never needed them
just use relocatable file headers 
lol, everything in retro rocket is identity mapped, the default mapping provided by limine covered everything I needed, until I started dealing with 64 bit mmio BARs
so I was fine just deep copying limines cr3, until now
ah
fairโข
vmm's are just kinda scary idk
thats probably another problem but yeah idk address spaces look evil
nvme support works! needs some testing, and has some weird crashes. dont risk it on real devices yet.
the installer looks like a certain linux tool but i forgot
its some old one idk
or new
i was inspired by linux text mode installers
nice
virtio support is now added!
yay
[1829]: xhci.dbg: device VID:PID=0627:0001 class=03/01/01 mps=64 (port=5 speed=3)
nice, thats a usb keyboard!
I've had enough of USB, it isn't working quite right. it's a job for Ron
fixed FOR to support double STEP/TO
currently adding REGEX SUPPORT to BASIC
which required my libc to have wide char stuff
https://retrorocket.dev/MATCH.html
REGEX ahoy!
I don't think your website should look like this...
thanks lol it shouldnt
it used to be github wiki, i guess that didnt convert right to doxygen
omg, thats 10,000 lines
let me make a new one
fixed! thanks for letting me know. the correct docs page is: https://retrorocket.dev/cpuid.html
not (cpubrand)
Yay!
i didnt write that all myself btw, i passed the old page thru chatgpt and told it to sumamrise, convert to markdown, and convert the values to decimals (cpuid command take decimal not hex)
no way i can write that quick lol
this is exactly what LLMs are good at imho, parsing and converting text from one form to another
added support for captures, so the i can finally write a HTTP lib using REGEX to process URL!
so ive spent like 4 days spelunking into the old code.
i wanted to make a BASIC library so i can PROCget a URL and then get the HTTP(S) content.
- to do that i needed a HTTP library. wrote it with LEFT$, RIGHT$, etc, it was awful.
- so i decided to integrate a regex lib
- tried 3 different regex libs until i found one that worked
- just to be able to parse urls better and split them!
- to find that my http lib doesnt work because i'd put a blank line in the BASIC and my parser was being a dick
- fixed that, to find that my http lib doesnt work because a REM statement with brackets and : in the text kills the parser (couldnt make this shit up)
- fixed THAT, so now at least i can split urls!
before that, ive had to integrate a TLS lib so i can make https connections
speaking of "captures"
do you have screenshots?
like make screenshot in the system
i could do this, but theres no way to save it in the livecd
only on an installed system
oh
add it for installed OS's idk
gonna start development of a package manager very soon!
https://retrorocket.dev/http.html
http request lib is done ๐
LIBRARY LIB$ + "/http"
PROChttp_get("http://neuron.brainbox.cc/test.txt")
PRINT "HTTP status code: "; FNhttp_result$("code")
PRINT "Response body:"
PRINT FNhttp_result$("body")
easy to use lib ๐
Lol nice
currently working on a way to initialise and format a ramdisk from BASIC without an existing FS, so that there can be a ramdisk initialised when you start the live cd, giving you a place to save files and experiment properly.
REM Create a 1GB RetroFS ramdisk
RD$ = EMPTYRAMDISK$(1024)
MOUNT "/ramdisk", RD$, "rfs"
PRINT "Created RAM disk"
i mean what use is a live cd of an os designed for programming and tinkering, if you cant change anything
this will also give us somewhere to fetch http requested files to
decided we need a bootup mascot image ๐
what's its name?
Gdt initter
rocky the retro rocket owl
he's an owl because the bbc micro logo was an owl
GDT, innit!
should i put retro rocket into #1341905166907215954 ?
Yeah itโs pretty awesome
The fact you can make drivers within your userspace is fucking insane
Yes
^
Itโs one of the most impressive feats Iโve seen here
Like thatโs way higher level than almost everyone
Even the seasoned devs donโt have that yet
I mean some have self hosting which I guess could count but still
this is because the userspace isnt a ring 3 userspace, and the security is handled by the language runtime
it lets me sidestep some stuff and do things that usually are the realm of microkernels
i'll cook up a submission later then ๐
Its how you do your userspace
I wasnโt necessarily talking about ring3
Imo thereโs nothing wrong with running things in the kernel
really glad to see you got a place by the way, was worried for you
Thank you man โค๏ธโค๏ธ Iโve been working 50 hour weeks along with school so itโs been rough
same
โค๏ธ
Love u guys
This is the only community I feel welcome and cared for in
Not even people at school or in my family are this supportive
Only you guys, my close friends irl, and my fiancee
Even tho my os is shit ๐ญ๐ญ๐ญ
have you considered beefing up security later by using ring 3?
Given the way he made the operating system Iโm assuming it would be a simple process
Just another GDT entry
not sure. it wouldnt be the default thats for sure. if i did, it would be something you enable for your child processes
that would be a neat way to do it
basically, you'd set the option, and it would build a page table for each or something
Command line argument Iโm assuming?
like right now you have CHAIN "filename", booleanval and the booleanval is true if you want to background the process, false or missing if you want to basically waitpid on it
Wait are the basic files executable after theyโre ran
Like do they become elfโs?
Or are they just done in real time
Do you have an executable format you use?
Or is it just interpreted basic
BASIC files are BASIC files, theyre interpreted
I see
compiled basic would be .... challenging
Yeah
Do you plan on supporting soemthing like a C compiler? Potentially self hosting?
if you want compiled code, the only option rn is kernel modules, dynamically loaded
unlikely i'd do that
self hosting means too close to posix/unix
which isnt really my goal
still havent decided how or if i'll allow kernel modules to extend basic, would be nice, but also means you have programs that dont run unless you load specific ko's
file descriptors and stuff too
file descriptors are the only thing thats posix-ish
in retro rocket
under basic is a posix-like libc-like open(), read(), write(), close()
Itโs kinda hard to do a lot of things without file descriptors
Yeah my syscalls are posix compat
Yeah itโll use an equivalent
like, NT handles are basically the same thing
there really isnt any sane way to do files without some kind of handles/descriptors, even the BBC Micro had them
ditto on classic Mac OS
My file descriptors are hella basic ๐ญ
Is your basic jit
i have shortcut functions in retro rocket's low level stuff, where i can give a file lookup result, which is a direct ptr to a vfs node, and then call a method to get a piece of a file.
so instead of opening a file, i hold a reference to it and say "give me x kilobytes from offset y"
its the same thing i guess, sorta, except theres no reference count
you should probably have re counting
you will run into many issues at somepoint without it
not for the low level file read
your fs WILL leak memory at some point if you dont have ref counting
low level file read is for stuff like early boot
yeah but you can still leak memory which isnt preferable
especially since memory is precious in early boot
nah you cant leak it
idk maybe im wrong
its not a hadle you open, its a vfs node, it exists while the file exists
heres an example from my installer
fs_directory_entry_t* info = fs_get_file_info(source);
if (info && !(info->flags & FS_DIRECTORY) && info->size > 0) {
void *file_contents = kmalloc(info->size);
if (!file_contents) {
return false;
}
bool read_success = fs_read_file(info, 0, info->size, file_contents);
if (!read_success) {
error_page("Error reading '%s' (%s)\n", source, fs_strerror(fs_get_error()));
kfree_null(&file_contents);
return false;
}
int fh = _open(destination, _O_APPEND);
if (fh < 0) {
error_page("Error opening '%s' for writing (%s)\n", destination, fs_strerror(fs_get_error()));
kfree_null(&file_contents);
return false;
}
if (_write(fh, file_contents, info->size) == -1) {
error_page("Error writing to '%s' (%s)\n", destination, fs_strerror(fs_get_error()));
kfree_null(&file_contents);
return false;
}
_close(fh);
kfree_null(&file_contents);
char message[MAX_STRINGLEN];
snprintf(message, MAX_STRINGLEN, "Copying '%s' -> '%s' (%lu bytes)\n", source, destination, info->size);
display_progress(message, progress + ((block_progress++) / 3));
return true;
}
the low level fs_get_file_info() and fs_read_file() are used to read the whole file in one slurp from source
and then posix-like handles to write it to destination
ohh then yeah youre fine
because i never made an fs_write_file()
was there rationale behind that choice tho?
by the time i got to fat32, retrofs, ram disks, i had the posix style open(... , O_CREAT)
yeah fair enough
they map to a low level analog of fs_write_file but it made sense to just not make it a public api
open(), read() and write() and close() map to BASIC: OPENIN, OPENOUT, OPENUP, READ$(), BINREAD, BINWRITE etc
clean. ๐
very nice design actually
good stuff
oh. yes.
100% AGREE
THAT SHIT WAS SO FUN
FELT SO GOOD
especially because im not really following any spec or standard, so i didnt feel like i was just writing out a script
that is probably my fav subsystem
same i made it all myself
the op table, everything
it was lots of dopamine
very very fun
I love function pointers
my entire driver system is a bunch of function ptrs
YES
Top 5 C feature
i mean every lang has it but
basically:
typedef void* (*get_directory)(void*);
typedef int (*mount_volume)(const char*, const char*);
typedef bool (*read_file)(void*, uint64_t, uint32_t, unsigned char*);
typedef bool (*write_file)(void*, uint64_t, uint32_t, unsigned char*);
typedef uint64_t (*create_file)(void*, const char*, size_t);
typedef bool (*truncate_file)(void*, size_t);
typedef uint64_t (*create_dir)(void*, const char*);
typedef bool (*delete_file)(void*, const char*);
typedef bool (*delete_dir)(void*, const char*);
typedef uint64_t (*get_free_space)(void*);
/* Prototypes for block storage device drivers (see storage_device_t) */
typedef int (*block_read)(void*, uint64_t, uint32_t, unsigned char*);
typedef int (*block_write)(void*, uint64_t, uint32_t, const unsigned char*);
typedef bool (*block_clear)(void*, uint64_t, uint32_t);
typedef struct filesystem_t {
char name[32];
mount_volume mount;
get_directory getdir;
read_file readfile;
write_file writefile;
create_file createfile;
truncate_file truncatefile;
create_dir createdir;
delete_file rm;
delete_dir rmdir;
get_free_space freespace;
struct filesystem_t* next;
} filesystem_t;
this is what i do
unerneath that, is a set of block device drivers, they just have read blocks, write blocks, trim blocks, get geometry
look how clean this is:
really nicely done, look at mine
what do u think of mine
@willow ginkgo
sorry for ping lol
it's nice
but I would typedef the functions
just makes it a bit less symbol soup
Kinda like I did the rw thing?
yup
https://forum.osdev.org/viewtopic.php?p=202444&sid=01ca74a050144f63211834d3a4ed56c5#p202444
just found a really really old post, the first time i call the OS "retro rocket"
really old screenshot lol
its interesting that ive started measuring kernel complexity by symbol count now
back then it had 381 symbols, now it has 5596 ๐ฎ
dang i just hit 1k
That would make sense
Nothing is third party in my OS besides Flanterm
I like suffering
bentobox only has 752 on x86-64 and 412 on aarch64
256 symbols on x86-64 are just the idt sooo
hah, same
i dont know if theyre exported symbols though
likely are
i need the third party stuff - no way im implementing my own compression, and definitely never my own TLS/SSL
then theres stb_image too
found a 16 year old bug in retro rocket last night
if you run the os for long enough, the keyboard buffer pointer wraps around
when it wraps around producer < consumer, and it thinks the buffer is full
because some things were treating it as a circular buffer when it wasnt quite
fix was simple enough, change some < to != in kgetc and kpeek etc. but, that went unnoticed for longer than some people on this server have been alive lol
dang that kernel is old
16?
how long ago did you start this thing
...16 years ago 
the bug was in the ps2 keyboard driver
i only noticed it when i started mapping hci usb inputs to ps2 make/break codes
because i was hammering in kilobytes of garbage by keyboard mashing
it feels like an eternity ago to me because i was 4 and i barely just touched my first computer
wow that long ago
working on usb stick boot right now
been too long that I've had to say "lol use this obsolete metal pizza to boot the os"
UEFI USB BOOT!
does that say toilet extensions
the red square is kind of blocking some text i think
joliet
yes! of course! skibbidi filesystem /j
genius :D
need to actually write docs now on how to burn the os to usb, and boot from usb
the usb image and the iso are now in the artifacts though ๐
https://github.com/brainboxdotcc/retro-rocket/actions/runs/18542273589
usb boot support noiw fully documented!
is it any easier to make an OS in baaic than in C?
well, you cant make a whole OS in any dialect of BASIC im aware of
ive still had to make the kernel in C and make a BASIC interpreter
ahh okay that makes more sense, i thought this whole thing was written in basic i was wondering how you did it ๐ญ
lol, that would be interesting to attempt
some of the BASICs support compilation to standalone executables (e.g. no separate runtime lib) but, they only compile for linux or windows, not freestanding environments
in retro rocket the entire userland is BASIC, right from the very first 'init' program
and you can even write drivers in BASIC if you want
that is cool as hell, im probably gonna do a similar thing with my kernel when i get the motivation to work on it again (maybe not with basic though), impressive as hell well done
thanks, what language would you use
i almost chose to use javascript because of people saying "you cant write an OS in javascript", was going to integrate libduktape
go seems pretty nice, i know it better than C at the very least and it can be freestanding with gcc
ah nice
id probably do this if i knew js ๐ญ
go is interesting.
haksell has monads. go has gonads

if you ever get the urge to help me out, i welcome PRs and especially userland programs, writing retro rocket BASIC is easy af
ill probably learn it, cause this OS is genuinely interesting to me so ill look into it ๐
luckily for everyone i took time to document the language an theres like 60 different examples already in /programs
BASIC was the beginners language before python
ill have a read through all this when im at my PC next, ill definitely be giving it a go asap
nice ๐
added a page on creating boot media ๐
symbol file is now gzipped, its 40k instead of 205k
means its faster to load off usb/iso, and means that little less to download from github
fixed my msi support, so devices can at last enable msi and msi-x!
one bitmask value was wrong
added pci_setup_multiple_interrupts, have plans for it at a later date
now have support for S5 sleep/power button shutdown ๐
this look AI generated so much
who? rocky the owl?
probably because he is? you offering your amazing art skills?
oh make sense
I'm a developer not an artist and I refuse to use "programmer art" in anything I present to the world. I commission, or I generate
fair
the only problem
is that using an AI generated mascot people tend more to thing the entire thing is low effort (which obviously your OS isen't)
meh, I think those people might get left behind as the world changes around them
LLMs and generative models are a tool like any other
and while some are harping on about "they be stealing my data" (but were never concerned when Google were making profiles of their entire lives and selling it to any bidder) others are innovating. I'm not sure the future is in openAI and spending trillions on destroying the world, but long term this research will bring benefits to development
well it's that this people might think you use AI in your code and well AI coded OS don't have a very good reputation rn :kekw:
ai found a bug in my code nobody here could,
it's oddly good at static analysis and analysing for issues. my IDT was off by one, and my ahci structs were misaligned, I had asked for help so many times and in the end I gave up and put my project away for a while. I was bored one afternoon and asked GPT if it could find the issue in the code stopping it booting on real hardware, pasted in the c files, boom, a couple hours later (it didn't work first time, had to iterate some) I had my os working for the first time on real machines
many people just outright dismiss LLMs as useless, hallucinatory, or plagiarism, but if you feed them your own content they are very powerful
well that cool
but the code in my os pre dates LLMs by a decade, that gives it some weight too as not just "AI generated"
yes but sadly some people don'r very look inside
they just read the readme or look at bit at thing and if they find something that look AI generated they call the whole thing AI ๐
i mean i can understand that you don't care about that kind of people
that probably what you should do actually
we create because we enjoy it
not to please someone who's got a stick up their ass and truly believes AI will take our jobs
I mean if you really think it will take your job, you were already replaceable by cheap foreign labour, or, you misunderstand the limits of LLMs and AI, there's always going to be a need for human creativity
and most importantly human review of generated output
because it messes up so often
Ive successfully used qwen3 to turn my awful hell of a "compile-and-run.sh" into a reasonably functional makefile without having to read too much into makefile syntax, it hasnโt broken yet
like I know exactly what I want and need to do, just not the syntax of the language
idk if thatโs considered vibecoding
nope, vibe coding is where you do "jesus take the wheel" and if it doesn't work you prompt it again and again until it compiles... russian roulette coding
I was doing that with GitHub copilot before it was cool
before chatgippity even existed that is
over time I found myself less and less reliant on it to build things, I guess thatโs how I accidentally learned how to code
also your os looks really cool
might see if I can contribute something :p maybe some random userland thing
(my own project is kinda stuck with a very intermittent and annoying bug)
if my basic skillz from being bored with a calculator in math class arenโt too rusty
all prs welcome, userland or kernel
I'm sure you're not too rusty
and thanks for the compliment ๐
now working on a virtio-net driver... but alongside it I now need a way to select a driver on a per subsystem basis with priority, so I can say like "load me a network driver compatible with my detected hardware" without having to load every single network driver and try them all
added a load order system, now you can go MODLOAD "net" and it will examine all network modules and load the ones you have
its fed from /system/config/loadorder.conf that looks like this:
[net]
1AF4 1041 * virtio_net
8086 100E * e1000
8086 107C * e1000
8086 153A * e1000
8086 10EA * e1000
10EC 8139 * rtl8139
[sound]
* * 0403 hda
* * 0401 ac97
[codecs]
* * * flac,mod,mp3,ogg,xm
toilet extensions 

have you seen the unicorn poopy potty ad?
no ๐
Buy at http://squattypotty.com - Pooping will never be the same. This Unicorn shows the effects of improper toilet posture and how it can affect your health. The Squatty Potty toilet stool has been featured on Shark Tank and Dr OZ show and has thousands of happy customers.
Press Contact - Bobby Edwards - [email protected]
The modern day...
need to return to the roadmap! i got a bunch of stuff added in to make a package manager so people can download/upload their BASIC programs! will be working on this
when the rocket is retro
please make it one big useless piece of trash where people can upload anything instead of "user repo" and "actual repo" like arch or whatever other distro does 
i mean this might actually be somewhat good but the problem is that there might be a lot of bad software on it
no quality control
I wasn't going to have strict review of uploads to it yet
basically just user ratings and reviews
more like an app store
there's no point blocking people's contributions, it's not big enough for that to make sense and all contributions are good for the project
the plan isn't a linux distro or anything like apt with it's internal politics
are you planning to upload anything? ๐
well yesn't
i wish i could but i still dunno basic
i still have that core 2 duo laptop what if i actually install rr on there
you could write drivers instead, thats C
for whar ๐
i think 99% of the stuff in my dell is proprietary and the non proprietary stuff you prolly made already
depression
lemme check on it
windows 7 taking long on an ssd
or maybe modern tech brainrotted me
"intel 82567LM gigabit network connection"
fancy
hmmmm its an e1000 similar
my e1000 driver wont work on it, but i bet its not far off
mayb
i wanna learn basic though im not gonna write drivers for an os idk how to navigate in
i think you made a documentation
absolute Docs
just added support for a ton of extra e1000 derived cards in the e1000 driver
[net]
1AF4 1041 * virtio_net
8086 100E * e1000
8086 107C * e1000
8086 153A * e1000
8086 10EA * e1000
8086 10F5 * e1000
8086 10CC * e1000
8086 10DE * e1000
8086 10D3 * e1000
8086 1502 * e1000
8086 150C * e1000
8086 15A2 * e1000
8086 15E3 * e1000
10EC 8139 * rtl8139
thats quite significant coverage
i cant test all these, only own one of them and emulate the other via qemu
so YMMV
Straight heat
Bro is a prodigy
o
i need to check if my core2 laptops card is in the list
been too mentally exhausted to progress the past few days. just been gaming instead.
i need to improve my logger tbh
add log levels and categories
right now everything is just dumped to a dprintf ringbuffer
is there an actual iso download for this or do i have to compile it myself
there is, or usb image
go to the github actions and grab it from the artifacts
https://github.com/brainboxdotcc/retro-rocket/actions/runs/18896881910
at the bottom @humble bison
the run.sh may need adjustments for your own use e.g. remove -vnc and the harddisk0
ah neat
massively improved the speed of pci scanning ๐
fire
really need to get around to my package management system
just use apt /j
that isn't an apt solution 
just use pacman
idk
why is this so difficult
it in the title
just add compiled program support 
the package manager has to be written in BASIC like the rest of the OS and download/install BASIC programs, and also allow submissions of new packages
no but seriously fair enough
it isn't actually very complicated client side I've just been lazy and a bit exhausted with dev
server side I need to make use of my day job skills, PHP, mysql, laravel
I already have client side support for https

nice
you been working on an os?
kilovolts ass
i wanna rewrite it in c++ for some reason
I keep getting the urge to add c++ support to my kernel, things like templates and containers make a lot of things nicer
and also race conditions i want to mess around with multiprocessing but it didnt like it
terminal emulator had a heart attack
i honestly wanna do it just because of namespaces
my dad taught me classes but i forgor
like this one
fire
discbrod
there are already a few os's in cc so it shouldnt be that bad
yeah it's only when you want stdlibc++ or exceptions things can get hairy
fair
Wait, did you make D++?
yup
nice! its a small world ๐
yea, I'm surprised I've found the guys who make the libraries I use in here tbh
This is such an niche server but still has so many creators of libraries that I use
yeah lol we all gravitate to making OSes in he end
i also made this back in the day
InspIRCd Internet Relay Chat Daemon is a modular, high performance IRC daemon combining stability and a rich and extensive C++ API with optional features such as SSL and permanent channels.
idk if thats something youll have used or heard of though
i havent contributed to that in decades though, i stepped back and let others take over
wait i tried to use that like a crap ton of time ago but then i got a stroke from it ๐ญ
no offense i was a 10 year old or smth
Crazy part is, it actually works lol
or you can move your toilet to be higher to like the point where its close to the ceiling, crap on the floor, and proceed to practice basketball throws
and/or not do the basketball part and not move the toilet and not crap on the floor
"missed... let's try that again*
when did this channel become discussion of how to poop, is this a subtle hint to do something so there's new technical chat
lol
I've improved the rendering time of sprites significantly by pre-swizzling the sprite buffer to the backbuffer/framebuffer pixel format, and also using traditional AND/OR with precalculated masks for transparent regions. makes things a LOT faster.
thinking of migrating the entire kernel/basic interpreter to strings with a length on the start (32 bit length) instead of null terminated. but this is a big thing, it will give me significant performance improvements in BASIC, but means a lot of changes. i dont need to really have null terminated strings everywhere as im not dealing with C at the user level
idk if it fits the project but what about a compressed BASIC mode, something like a bytecode or similar?
that could be cool
not like true bytecode tho
just the same BASIC code but for example 1 char per function
pretty soon tokens will need to be 16 bits
that wouldnt fit even just to represent keywords and operators, but I get the idea


thinking of something like this to quickly make constant string types from c strings
#define S(lit) \
({ \
_Static_assert(!__builtin_types_compatible_p(__typeof__(lit), char *), "S() requires a string literal"); \
_Static_assert(!__builtin_types_compatible_p(__typeof__(lit), const char *), "S() requires a string literal"); \
static const struct { \
uint32_t len; \
char data[sizeof(lit)]; \
} s = { (uint32_t)(sizeof(lit) - 1), (lit) }; \
(const string *)&s; \
})
then I can S("foo") and it will create an anonymous static struct containing the counted string
That bottom part will return a bad pointer though wont it?
Because the struct is only in the scope of your macro
It might return a bad pointer or cause undefined behavior because of aliasing shenanigans though (struct string and the anonymous type of the hidden variable s may or may not be allowed to alias).
In C, they are probably allowed to alias. In C++ I'm not so sure though.
it is fine in C
but in C++ would be UB because it's type punning
in practice it's fine on x64 which is my only target now and forever. but, I don't have to worry about it. the kernel is only C
my plan for the start of 2026 is to release a proper 1.0
i need to get package management working, and perhaps have a 'try now' on the website that launches a qemu instance and webscockify
it owl
Support Server for Retro Rocket OS is officially moved to discord.gg/brainbox - i am consolidating my projects into one place to make moderation easier.
https://discord.com/channels/537746810471448576/1473717424388833341
https://discord.com/channels/537746810471448576/1473717476641476649
https://discord.com/channels/537746810471448576/1473717524054016070
2K members, impressive
absolutely not all there for the os lol, I have many projects
Ik you're famous tbh
You don't get famous by building an OS.
famous pfff, I'm not famous lol
and I guess you can get famous by writing an os if you're billions to one lucky and right place right time like Linus torvalds
im making a try it now page where you can just click and get a short lived vm session to try it online
running from a snapshot, so you can change the drive contents etc
im going to make this system a separate foss project, so other hobby OS projects can benefit from it
yes 30 mins max per session
and boots you after 2 mins idle
https://github.com/brainboxdotcc/mission-control
https://discord.com/channels/440442961147199490/1478137330089852989
this is the first version
it will likely change a lot
im thinking of making this the front page blurb of retrorocket.dev
Do you remember when a computer was justโฆ a computer?
You turned it on, got a prompt, and typed what you wanted to do. No assistants listening in. No ads popping up. No endless background services sending telemetry somewhere you never agreed to.
Just you and the machine.
Computing used to feel direct. If you wanted something done, you told the computer exactly what to do and it did it. Fast, predictable, and under your control.
Retro Rocket brings that feeling back.
Itโs a modern system inspired by the straightforward machines many of us grew up with. Simple, responsive, and focused on the joy of actually using a computer rather than fighting with it.
No AI hype.
No subscriptions.
No nonsense.
Just a computer that does what you tell it.
Welcome back to computing.
sounds a bit too professional/hypeful, idk. If I saw that in the wild i might assume it to be vibe coded
just something about the writing style/paragraphs
the thing with No something. No something else. No whatever.
it makes me think this was written with AI
Its not X its Y is a very ai style writing
those are the things we want NO of lol
am I not allowed to be professional or have pride in my stuff tho?
seems to be too much "yeah it's my os idgaf if anyone uses it, they won't so why bother"
Thatโs probably it
I want to buck that trend, like I do with my other projects, put effort into SEO and visibility even if nobody cares
totally subjective but nowadays SEO effort almost feels like a negative to me?
like it feels like it takes away credibility
like how people said don't bother promoting a discord lib... then got butthurt because I did, and all their users came to my project 
what is the library in question?
neat
there were about 8 C++ libs when I started now there's only one active and popular
I think part of it is that I put effort into making it visible
the other part is, it's just well maintained and kept active
personally Iโm a discord.js user, idk if some string operation heavy thing like a discord bot could be fun in c++
then again I only have c experience and no c++
discord.js is like the standard
I'm not a big fan of js, it's not my favourite language
got its fair share of flaws but js is my guilty pleasure lmao
if I have to I will use it for web frontend
but I don't like react, Vue etc
they all feel over engineered
I love old computers
and making a good basic interpreter with tons of features from scratch was a fun challenge
been putting some thought into how to do event driven programs in BASIC.
BASICally (pun intended) you could register an interest in an event by name, the os will implement some names or you could broadcast your own to specific pids or broadcast to all or a group.... so you could do like
ON EVENT "something" PROCfoo
then you can e.g. just stick an infinite loop at the end of your program so it waits and triggers the events when they happen
would be cool to be able to register for socket readiness as EVENT like this.
sockets is first target of this, gonna be able to do epoll like events
Added support for RTL8169/8161/8168 and clones based on the driver in https://discord.com/channels/440442961147199490/1061407633745125397
now with support for e1000e ๐
Now with a sound driver for ASUS Xonar D1 sound device! i have no way to test it yet though. Got a card on order ๐
oof
for now the driver is guesswork and staring at how linux does it
but i wanted to make a driver for a sound device that isnt hda, and isnt ac97 and still works on modern machines
and isnt usb
fair
being as i got a driver for 8168 too, i could get my onboard networking running at last on my test machine so i dont have to rely on a pci e1000 network card
if i can get that working perfect, i have a spare pci slot i can put the sound card in
added support for DPCs ๐
so, i have 3 programs for retro rocket that i'd like to make, in no particular order:
- Dragonfly - A side scrolling fast paced shoot-em-up inspired by R-Type
- Voyager - A text mode web browser, with graphical enhancements powered by Retro Rocket's graphical terminal
- Crypt Paint III - A full screen paint program
I'll get to each one when motivation takes me, or perhaps even work on all 3 at once and flit between them. Now getting to the point where what Retro Rockt needs are two things only:
User facing programs, and drivers.
Kernel features can wait!
When i say 'graphical enhancements' for the text mode browser, what i mean is forms that actually behave like forms, instead of showing an input box like:
[_________]
it will actuall show an input box etc. Can do this by the ability to redefine characters on the fly, plus the ability to draw primitives to the screen.
and yes, https will be supported, as TLS is already something Retro Rocket BASIC can do
Dragonly is a modern reimagining of my first attempt many years ago: https://www.youtube.com/watch?v=yI46gN83oos
It had bad programmer art. It had example music from tracker libraries. It ran slow unless you had a pentium 2. But it was mine, it was my game and i wrote it, way back in 1998 :-)
A poor imitation of R-Type, the classic sideways scrolling shoot-em-up.
Written in turbo pascal.
crypt paint II is a reimagining of this, but with modern 32 bit colour, proper modern file loading etc:
https://www.youtube.com/watch?v=YrRIlAWKgvg
This was one of my first ever distributed and released programs back in 1997. Developed on the BBC Master 128K and available on one double-density double-sided 640K ADFS disk, It was available to the 8 Bit Software users group (8BS) where i released many of my earliest works before finding my way to PC development.
This program was pretty advan...
if anyone else has any ideas for any programs they'd like to make, feel free! i'll happily make them part of the OS, just send a PR ๐ check what you made works first though!
started on it ๐
progress!
Open Gl?
Is this running on tcg or kvm?
software rendered
the video is tcg, I had a nightmare of a time trying to get hardware virtualization working on windows, I use KVM when I run it on my Linux server
yeah it is isn't it
I spent a lot of time optimising the graphics stuff
gonna add enemies to it later
but I noticed an interpreter bug I should fix first
FOR X = 0 TO 500
PROCfoo
NEXT
END
DEF PROCfoo()
FOR Y = 0 TO 500
ENDPROC
NEXT
ENDPROC
this exhausts the FOR stack
when I do ENDPROC or end a function with = while inside a loop it doesn't clear the loop from the stack
do you need to use the word PROC at the beginning of procedure names?
yes. that's the BBC basic syntax
it does make the parser easier and it is much easier to read else you have the question of for example;
foo(j)
"am I looking at a call to foo function with parameter j, or am I looking at a reference to array foo fetching index j"
basically it forces variables and functions and procedures to all have their own individual namespaces
got a fix in for this, will test it properly when I'm home later
fixed, this also fixes a bug older than I am
BBC BASIC had this bug:
5 GOSUB 10
10 FOR X = 0 TO 10
20 RETURN
30 NEXT
BBC BASIC has undefined behaviour. some programs on some MOS versions run out of space (No room) others crash the interpreter
Retro Rocket BASIC programs have defined behaviour. this one is RETURN without GOSUB
that bug is 50 years old, not joking
and yeah I had to think about what it would do 
that's weird, why wouldn'tRETURN just break out of any loops it's in until it reaches the return gosub
i guess you'd have to ask the original developers of BBC BASIC, if theyre still alive 
gonna add enemies to dragonfly next, I keep getting the urge to do unrelated stuff like parallax background, but, gotta stay on track!
now with multi line shell repl!
multiple entry PATH$ 
decided on a solution to california and colorado's bullshit
basically, show the Apache 2.0 license during installation, because why not? and have a bit at the bottom that says 'i confirm im legally old enough to agree to this license' which makes you over 18, or a liar (and if you lie, that isnt my problem according to the silly regulation, and what they gonna do, im in the uk)
youre correct there, they cant sue me either
but they could sieze my domain names, hosting, etc
but can they really
if they somehow pull that off you can always just get a .uk tld
yes, if they wanted to, if you were a big enough financial pain in the ass, or they wanted to make an example of you sure
they cant seize that one
unlikely, but possible
i happen to like my .dev tld ๐
besides, its nothing i shouldnt do anyway, as i didnt even place the apache license txt into my iso before
which i really DO need to do
and if im placing it on the iso, may as well show it at install time
(then nobody can say they didnt know what license the project is under)
added push and pop to rocketsh, to push and pop the current directory ๐
unfortunately I live in the US, so I am slightly more worried
but I do think the chances they go after a hobby project are slim to none
I think my approach is reasonable, not ignoring the problem but also not directly asking for age
working on the assumption that the thing you're doing needs you to be over 18 (agreeing to software terms) while also acknowledging how silly the concept is
adding history to show the command history
that mean i can't use it ?
sure you can
if you tell the truth or not is not my concern, same as every other piece of software you agreed to the license to ๐
i did make the wording a bit less strict, too
centre_text("This software is licensed under the %sApache License 2.0%s\n", VGA_FG_YELLOW, VGA_RESET);
centre_text("You must review the license before continuing\n");
kprintf("\n");
size_t next_offset = render_license_page(license, fsi->size, offset, box_x, box_y, box_w, box_h);
gotoxy(0, box_y + box_h + 2);
centre_text("By continuing, you confirm that you are able to accept this agreement\n");
centre_text("and agree to the %sApache 2.0 license%s as shown above\n", VGA_FG_YELLOW, VGA_RESET);
its a lot less legalese ๐
oh okay
that actually a really good idea i might do the same
nice, would like to see what you come up with ๐
redid my site's theme, its now much prettier, less flashbang
no, and no. thats the idea
so you can poke around and do anything you want
technically, you can run a binary if its a kernel module, but thats not really 'a user facing executable'
i mean yeah
and BASIC can load and unload those modules
most home computers of the 80s had binary support
still makes sense to not support it
yeah
i didnt add an assembler though
considered it, but its not something i want to support because x86_64 asm is a nightmare
only support flat binaries๐ฅ
hah
true
kernel modules are ET_REL elf binaries
what about some sort of vm tho?
like an intermediary
something like RISC-V for example
hmm, i mean yeah, i could make a 6502 assembler for the luls
"heres your 64k of vm ram, go go go" ๐
not sure i have the time to make a risc-v emulator lol
i am on a quest to make a vm that interacts fully with the whole ram lmao
sort of a side project
lol sounds fun
for some of my projects
btw you can PEEK/POKE ram from BASIC
its really not because im trying to make it JIT
only one restriction: you cant POKE ram that isnt paged in and writeable, you cant POKE ram that isnt paged in and readable
you can also read and write IO ports
i guess, but youd have to find it
dayum

i suppose if someone exported a pointer variable into every basic program.... from a module... lol
have you tried the web version btw
couldn't try it since im on phone
but i will try it on qemu
tomorrow
damn
i want to distribute my doohickey OS some day
tho its totally not finished
heck on the new rewrite i haven't got to the kernel yet
im still finishing the bootloader
technically im not at 1.0 yet
im not even at a version yet๐ญ
but thats why im making more and more example programs, fun things, making the site nice and stuff
well, been at 0.0.1 for 17 years now
lol
just never bumped the version number
gotta add explosions next, then collision detection between enemy bullets and player!
that's so cool
managed to get whpx accel working in windows so now i can play it at a reasonable speed with sound!
is that a virtual gpu acceleration ?
no all software rendered
with sprite blitting and scaling
oh that cool
whpx is CPU virtualization like kvm on linux
so without it software rendering sucks balls
added a pixel perfect SPRITECOLLIDE function ๐
also SPRITEWIDTH and SPRITEHEIGHT functions so i dont have to have an array of sprite sizes defined by hand
along with some optimisations to the hot path for sprite rendering, sprite render is now visibly faster (and it wasnt slow to start with)
added support for DATA, RESTORE, DATASET, DATAREAD, DATAREAD$, and DATAREADR, going to use these to store enemy timings ๐
Reminds me of a bootsector game I wrote a long time ago
It was similar but using text mode
and also lacked like almost all the features
do you happen to be using whpx here?
yup
it was a pain to get it to work
c:\qemu\qemu-system-x86_64 -machine q35,accel=whpx -monitor stdio -smp 4 -cpu Westmere -m 4096 -drive id=disk,file=../../harddisk0,format=raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -drive file=rr.iso,media=cdrom,if=none,id=sata-cdrom -device ide-cd,drive=sata-cdrom,bus=ahci.1 -boot d -debugcon file:CON -netdev user,id=netuser,hostfwd=tcp::2000-:2000,hostfwd=tcp::2080-:80 -object filter-dump,id=dump,netdev=netuser,file=dump.dat -device e1000,netdev=netuser -audiodev dsound,id=snd0 -device intel-hda -device hda-output,audiodev=snd0 -drive id=nvme1,file=../../harddisk3,format=raw,if=none -device nvme,drive=nvme1,serial=nvme-rr0
the important bits are obviously accel=whpx and not so obviously -cpu Westmere
Im sure it was
if you do -cpu max it just refuses to start
I decided not to bother
i spent hours on it a few months back and gave up, then came back to it recently and got it working in minutes
I just run it in TCG and thats usually good enough for me; when I need more performance I boot up a VM
i usually run it remotely and vnc in, from a linux machine with kvm
but that doesnt let me test sound, and it really cant cope with fast moving graphics well
so for this i boot the iso image over a samba share
im adding a custom language definition for hljs on the retrorocket.dev website
does Retro Rocket OS support multi processing?
as in multitasking? yes
SMP? not quite, the code is there but its turned off as i havent had chance to test it fully, got other things to do first
it brings up APs and starts schedulers on them but the schedulers dont receive tasks
the IPI to hand them a task isnt implemented yet
made a new beginner tutorial for BASIC
feedback welcome on this ^ its aimed at people whove never programmed before
Cool
how
hljs's syntax highlight and language definition system is actually quite primitive
its just a bunch of arrays of keywords, and some regexes
so its 99% copy and pasting in the keyword lists from C
that cool
added MIN, MAX, MINR, MAXR, TICKS to BASIC and used it for precise frame timing in Dragonfly ๐
LIBRARY LIB$ + "/dragonfly/loading"
LIBRARY LIB$ + "/dragonfly/player_bullets"
LIBRARY LIB$ + "/dragonfly/enemy_bullets"
LIBRARY LIB$ + "/dragonfly/player_ship"
LIBRARY LIB$ + "/dragonfly/enemies"
LIBRARY LIB$ + "/dragonfly/parallax"
LIBRARY LIB$ + "/dragonfly/explosions"
LIBRARY LIB$ + "/dragonfly/hud"
LIBRARY LIB$ + "/dragonfly/audio"
CLS
GCOL 0
AUTOFLIP FALSE
game_ticks = 0
frame_len = 0
PROCl1_parallax()
PROCmusic_start()
REPEAT
game_ticks = FNframe(game_ticks)
UNTIL (INKEY$(CHR$(27)) <> "") OR (INKEY$("") = CHR$(27))
CLS
END
DEF FNframe(game_ticks)
start = TICKS
PROCl1_scroll_parallax()
PROCl1_draw_parallax_rear()
PROCmove_player_ship()
PROCmove_bullets()
PROCmove_enemies()
PROCmove_enemy_bullets()
PROCmove_explosions()
PROCcheck_enemy_bullet_collision_with_player()
PROCcheck_enemies_collision_with_player()
PROCdraw_bullets()
PROCdraw_enemy_bullets()
PROCdraw_enemies()
PROCdraw_player_ship()
PROCdraw_explosions()
PROCl1_draw_parallax_front()
PROCdraw_hud()
frame_len = TICKS - start
FLIP
SLEEP MAX(0, 16 - frame_len)
= game_ticks + 1
added a whole new bunch of keywords to retro rocket BASIC. they have wide reaching use, but i needed them for the shoot-em up:
- https://retrorocket.dev/ROTATE.html - Rotate a sprite's stored data 90 degrees
- https://retrorocket.dev/SPRITEROW.html - Extract a row from a sprite into a BASIC array
- https://retrorocket.dev/ARRAYFIND.html - Search an array for a value, and return the indicies of all matches into a second array of integers
I can use these to represent my level data as PNG files like the one below. doesn't look like much, but zoom in on desktop.
Once loaded, it can be rotated 90 degrees so each row represents a game tick, like those tapes in old automatic pipe organs where it had holes for notes. Using SPRITEROW gets me that row, i then call ARRAYFIND on that row for each colour representing enemy types. currently red, green and blue:
DEF PROCdo_spawns(moment)
row = moment / 4
IF row <= last_moment THEN ENDPROC
IF row >= SPRITEHEIGHT(level_data) THEN ENDPROC
SPRITEROW level_data, row, rowdata
last_moment = row
FOR e_type = 1 TO ENEMY_TYPE_COUNT
ARRAYFIND rowdata, enemy_colours(e_type), found_spawns, spawn_count
IF spawn_count > 0 THEN
FOR I = 0 TO spawn_count - 1
PROCalloc_enemy(e_type, GRAPHICS_WIDTH, found_spawns(I))
NEXT
ENDIF
NEXT
ENDPROC
what is thr PROC prefix ? to call funtions ?
PROC is procedure, FN is a function
FN may return a value, PROC cannot
oh okay
gaming
damn that peak
thats coming along nicely
thanks, yeah ๐
its very very hard to play via novnc though lol
the fact that it CAN be played there though?
also to-do: add csprng_random to return uniform distribution in range and fill buffer of arbitrary size
improved MT PRNG BASIC RND function so that it does not have modulo bias:
https://retrorocket.dev/RND.html
added SECRND, CSPRNG random, like RND just secure
https://retrorocket.dev/SECRND.html
and added SECSTR$ for using CSPRNG to generate secure random strings of characters with a user defined alphabet
https://retrorocket.dev/SECSTR.html
didn't realise retro rocket was on here. i think it's awesome! ๐ when i was at school, almost all the computers were bbc micros or masters. they hardly let me code on them though. ๐ but in 2014 or so, i got bbc basic for sdl on my phone and was blown away by the teletext sim, including the demo/test pages exactly as they were in the 80s, and the BBC COW graphical earth which was so awesome on tv in the 80s, some graphics demos i'd seen in the 80s plus 1 or 2 which needed GLSL shaders all done with BBC BASIC. oh and sky baby which i've actually used a few times. maybe you should import some of its example programs. ๐ i'm not sure how their licenses look these days, especially sky baby's, unfortunately. i much prefer sb to modern glitzy stargazing apps
hah, nice, a fellow beeb fan
unfortunately many programs wont work right
we do support 90% or so of BBC BASIC's behaviour, but we have different syntax for variable types
ohh yeah, % for floats. i did see that
BBC BASIC:
integer: % e.g. FOO% with special behaviour of A% through Z% stored below PAGE
float: no suffix
string: $ e.g. STRING$
RETRO ROCKET:
integer: no prefix
float: '#' e.g. 'PI#'
string: $
so where BBC BASIC defaults to real/float, we default to integer, as its saner
and suffix reals
right
also retro rocket basic has a more modern view of the way things should work, line numbers are discouraged
modularisation by LIBRARY is strongly encouraged too
bb4sdl doesn't even support line numbers iirc. modularization is pretty old-school though
no, me either
also ? and ! operators are not in retro rocket basic, i went for explicit PEEK/POKE instead
i did like ? and !, but they really complicate expression parsing and make for expressions that might accidentally poke ram, instead PEEK/POKE are explicit
ooh... i forgot about those. didn't like them either, i like explicit poke. unless it's forth where all stores go via !, but that's consistent and it doesn't complexify parsing
