#Progress on NanoShell

1 messages · Page 2 of 1

torn belfry
#

i actually just wanted to say about it, cool would test some polish in nano shell

#

lol

steep bramble
#

był y

#

fun

#

what is up with that � before the last word in the polish sentence?

steep bramble
#

ohhh i see

lean sigil
#

i think this is called en dash

steep bramble
#

yeah something like that

#

all of those replacement characters should be dashes?

#

or are there some different characters missing

lean sigil
#

no, there are some which should be quotes

#

like and

steep bramble
#

ahh fun

#

nailing all of the funky alphabets

#

and missing quotes and dashes

#

:^)

lean sigil
#

I'll probably not go that far

magic forge
#

isn't it the font's job to support it or am I missing something?

magic forge
#

the missing characters

lean sigil
#

and it does by placing a 0xFFFD glyph

#

i might add them though

#

i have to add each character manually

magic forge
#

ohh I see

lean sigil
#

You can now select text (via the keyboard for now) in the text input widget

lean sigil
#

New widget, the combo box! This has been sorely missing for a while now.

lean sigil
#

I've changed the theming dialog to include this and will probably continue sprucing it up to allow making your own theme soon

manic ember
#

yo this is fire

lean sigil
#

also, finally a preview of the theme you're selecting

manic ember
#

if I fork nanoshell and make it have a kernel, will you consider that outrageous

rough wyvern
#

he already is doing that

#

with nanoshell64

manic ember
#

ah

#

nice

rough wyvern
#

i mean

#

you can help too

magic forge
manic ember
#

nah

lean sigil
#

if you wish to make it have a small kernel and everything on top in user mode, be my guest

lean sigil
magic forge
#

I meant this, usually they're on the right

manic ember
lean sigil
#

It is intentional

magic forge
#

👍

lean sigil
#

eee wanted to port nanoshell to x86_64 at some point, but then changed his mind

#

so just warning you

manic ember
#

I probably wouldn't work on this

#

but its a fun idea for a future project

lean sigil
#

Fair

steep bramble
#

might try again

#

:^)

stoic mirage
#

this looks so cool

lean sigil
#

back then, I was not

#

You could contribute to that instead. #1061224194450407435 for more info

lean sigil
#

working on a color picker widget

lean sigil
#

it makes interesting patterns when the sat is fucked up

lean sigil
#

Yesterday I did some heavy optimization to the way NanoShell GUI applications wait for events. Instead of waking up every time the WM updates (right now, only in the case of single window applications), they wake up when an event is received. So they often don't even run at all waiting for events.

lean sigil
#

as a result, the CPU usage is much smaller. While before, with the system monitor, cabinet and taskbar open, it was hovering around 15%-20%, now it's 5-10%, which is a big improvement:

lean sigil
#

My OS finally has a tmpfs. The /temp directory is entirely hosted inside RAM. It has all the features of the ext2 file system.

lean sigil
#

Next on the chopping block would be revamping the file picker (it dates to around april) and adding symbolic links

dusk cargo
#

"/temp"

manic ember
#

animal cruelty

lean sigil
#

before you wonder "why the unstandard name?", well, everything is unstandard

brazen glacier
lean sigil
#

huh?

echo jacinth
formal geyser
#

huh?

lean sigil
#

anyways, yeah, as you can see, it works fine

#

it even tries to reveal what the file is; if it cannot do so, it shows a special icon

#

don't mind the mess of my Ext0 partition, but you can see, LinkTestLink is a link to a directory...

#

and I can enter it, no problem!

lone gust
#

Nice!

#

I might have asked this before, but I'm not sure. Are the icons self-drawn?

brazen glacier
#

So, your os, your standard

lean sigil
#

But I don't think anyone will try to clone my OS, so a "NanoShell-like" probably won't exist

lean sigil
#

finally using a slab allocator for my kernel heap, memory usage has dropped by a whopping three (!!) megabytes after just starting the WM

#

after browsing the ext2 file system for a bit but with a planned path with both the old allocator and the new slab allocator, the inode cache ended up growing the mem usage to:

  • 6.5M for the old allocator
  • 5.0M for the new allocator
near shuttle
#

that's some great improvements

#

good job! what style of allocator did you use before?

#

was it page frame?

lean sigil
#

but i just use slabs for allocations less than 1024 bytes in size (not 2048, since my design isn't the best and I need to store metadata in the first few bytes of the page)

lean sigil
versed trout
#

Damn

lone gust
lean sigil
#

I'm trying to port halfix, a simple x86 emulator in C99 that I recently heard about

#

goddamn

#

its super slow

#

and it crashed system monitor

rough wyvern
#

use TinyEMU

lean sigil
#

(that's a "light" version of Windows XP which is a 44mb iso)

lean sigil
#

well as long as it doesnt require any complicated apis i'm down

#

like termios

rough wyvern
#

sdl but can be ported

#

it's relatively simple

lean sigil
rough wyvern
#

not that I know

valid kiln
#

lol

#

pretty cool

lean sigil
versed star
#

eck yo

umbral fossil
#

ayoooooooooooooo

lean sigil
#

I also tried booting an image of NT 4 but it gets stuck at "NTDETECT V4.0 Detecting Hardware..." with a bios message something like "int 13 parameters out of bounds 0000 0000 0001"

#

fyi this is apparently the bochs BIOS

versed trout
#

did you not try running nanoshell in nanoshell yet?

lean sigil
versed trout
#

mine worked in it lmao

#

much more basic tho

lean sigil
lean sigil
#

Icons on the desktop -- Need to evaluate the performance and optimize it but it seems to work for now.

#

there is a new desktop window that behaves as if it were the background, so now the background is drawn by the desktop window

#

if the desktop window is gone, poof, you have no background and there is no screen clearing

lean sigil
#

PNG support added: icons are loaded from actual PNGs now, and to celebrate this occasion, I've acquired a new wallpaper.

#

Thanks to @\qookei for the help implementing the PNG decoder.

lean sigil
#

Port of Super Mario 64 🤣

lost jackal
#

real

lean sigil
#

dang, not compiling with -fno-mmx -fno-sse did a world of difference

#

now it runs decently at 480p, and near flawlessly at 240p

charred forge
#

absolutely amazing dude
never heard of anyone porting mario 64 to their os until now

fossil wadi
#

just

#

wow

#

is this gpu accelerated or

valid kiln
#

i doubt it is

fossil wadi
#

still amazing

vestal temple
fossil wadi
#

they are a huge company surely they wouldnt care about one person doing something very minor

vestal temple
#

We criminalized copyright infringement, it doesn't even matter of Nintendo cares.

fossil wadi
#

ah okay, makes sense in your situation then

#

sorry i didnt have previous context

lean sigil
#

So the only copyright infringement is me using the Mario 64 ROM to build it. The sources are available on github, but of course, without Nintendo's parts

#

Also who's "we"?

vestal temple
#

The country I live in.

lean sigil
#

Pretty much every developed country has

vestal temple
#

In most places, there's additional requirements for copyright infringement to be criminal, such as financial gain.

lean sigil
#

One more thing, if Nintendo really cared they would have taken down the actual decompilation of SM64.

vestal temple
#

Nintendo only really cares about things that happen here.

lean sigil
lean sigil
#

I think they'll care tbh

fossil wadi
#

real

lean sigil
umbral fossil
#

is that GUI a separate ELF or is it built in?

upper sage
lean sigil
lean sigil
#

It's an OS for slightly older PCs too (early 2Ks)

upper sage
#

Ah nice

lean sigil
lean sigil
#

Just pushed some bug fixes to NanoShell......... such stupid bugs

manic ember
#

spill the beans

#

we demand postmortem

royal elbow
#

i demand a 1500 word postmortem detailing the exact failure causes

lean sigil
manic ember
#

inb4 I am stoopid 500 times over

lean sigil
#

The second bug also involved renaming, but in the ext2 driver, previously I was trying to add the new entry with an inode of 0 (perhaps originally it was in the order it is now, but I swapped them to reduce the amount of failure handling code)

#

the old code looked something like this

int Ext2RenameDirectoryEntry(Ext2FileSystem* pFS, Ext2InodeCacheUnit* pOldUnit, Ext2InodeCacheUnit* pNewUnit, const char* pOldName, const char* pNewName)
{
    uint32_t inodeNo       = 0;
    uint8_t  typeIndicator = 0;
    int result;
    
    // add the new entry.
    result = Ext2AddDirectoryEntry(pFS, pNewUnit, pNewName, inodeNo, typeIndicator);
    if (result < 0)
        return result;
    
    // remove the old entry. Make sure to not actually delete the inode.
    return Ext2RemoveDirectoryEntry(pFS, pOldUnit, pOldName, true, true, false, 0, &inodeNo, &typeIndicator);
}```
#

as you can see, the inodeNo of 0 is used which is BAD

#

the fix was to swap them around and introduce failure cases in case Ext2AddDirectoryEntry couldn't add the entry for whatever reason

#

which is to just try to add the old one back, if that failed, then "oh dear"

#

my hash table implementation stores a list of buckets which are linked lists of elements

#

when removing, I wasn't updating the pFirst reference, so it was keeping a stale pointer as its pFirst

#

which is obviously very bad when an element that was already erased is being erased again (which this code don't expect)

#

so it was trying to pass NULL to the device write function

#

the memory leak was in the resize function, the code previously looked as follows:

#

this reallocates the bucket items when adding into the new hash table, so it puts whole new bucket items (pointing to the same data though) into the new hash table

#

but the old ones are not being freed

#

the fix was to perform the move manually

#

which looks like this

#

the last bug I fixed was that the taskbar's CPU/MEM graph and clock would freeze when you opened the taskbar settings menu from it. The fix was simple, in the window timer tick function, just return if the window is marked frozen

#

this prevents the window manager from trying to issue events to the window (which are going to be dropped because the window is marked frozen)

#

not sure why, but it wasn't sending events anymore

lean sigil
#

I wanna also update the fonts to be nicer to look at

#

both the current system font and "new font" (unused)

umbral fossil
#

like a custom compiler that compiles together the std lib for this specific OS

#

(for example i686-nanoshellos-gcc)

lean sigil
#

font update

jovial cliff
#

i love the look of this

lean sigil
#

A slowdown of the stuff that goes on behind the scenes of the NanoShell window manager

#

Done using a slowed down QEMU (with -icount 3 iirc)

#

The most satisfying part is when a window is restored from maximization and everything else pops in bit by bit

umbral fossil
# lean sigil

what kind of optimizations NanoshellOS has? (graphics-wise). It seems like it has some kind of chunks rendering system?

lean sigil
#

It's basically a "cookie cutter" mechanism

#

You start with one rectangle from which you cut out other rectangles and their area won't be included anymore

#

Also, fast graphics routines

#

Helps that my video backend is essentially hardcoded to 32-bit color

#

My memcpy implementation is implemented like "read a bunch, write a bunch"-- all GP regs including EBP are used

#

Also all writes to the main frame buffer are mirrored to a region in RAM which is very useful to handle cursor drawing

lean sigil
#

it's nanoshell's second birthday tomorrow, so after I write the second year document, I might actually create a new FAT driver for the system

lean sigil
sturdy swallow
#

Nice, congrats on the 2 years

lean sigil
#

What the hell is going on?

#

Nevermind

lone gust
#

Average stack overflow question be like

gleaming cairn
lean sigil
#

Hey guys.

Today I announce that NanoShell will begin the process of migrating to MS-DOS.

With the stability of Windows 95, NanoShell/MS-DOS will finally be able to compete with the REAL operating systems, MS-DOS and OS/2.

Additionally, Microsoft Internet Exploder will be ported to NanoShell, coming out this Jule.

Welcome to the new NanoShell.

lean sigil
#

Found this little gem produced by clang... wth

#

Code ain't doing anything like that

lean sigil
#

nanoshells kernel is going to suck a wiiiiittle bit less

#

i'm going to allow multiple dispatchers to the same IRQ number

#

boron actually supports this already by way of the interrupt object

#

background: I got this drive to actually make a networking stack for this OS, admittedly will be kinda shit

#

but boron's a little stuck on the boilerplate

#

and i don't wanna let this drive go to waste

sturdy swallow
#

sounds cool, keen to see your progress 😄

lean sigil
#

Just tested the OS a few days ago. It still runs on real hardware! It didn't run great here, but that's mostly because this computer isn't fast

#

It's a pentium D at 3.0ghz, with 1GB of DDR2

lean sigil
#

looooong ass time no see

#

i stumbled across a font design that i apparently scrapped or something

#

so i decided to try to make it usable

#

something like this might end up being the new font of nanoshell

#

also i was thinking of revamping the kernel task and mutex system. for the heck of it

#

could backport some stuff from boron

lean sigil
#

especially the "SafeLock"

#

it's like a spinlock but bad

lean sigil
#

if it's not going to be the font for nanoshell it's definitely going to be the font for boron

lean sigil
#

oh a bit late, but happy 3rd birthday, nanoshell!

#

but that's a limitation of the emulator I ported rather than a limitation of nanoshell itself

#

I need to port a more competent emulator

lean sigil
sturdy swallow
#

thats cool, hows the performance?

fossil wadi
lean sigil
#

A bit stuttery but that's what you have to deal with when you have millisecond resolution timers and also the OS doesn't have any kind of priority management and timer stuff like Boron does

sturdy swallow
#

ah it was never going to be blazingly fast, it working at all (and being playable) is still cool