Page 1 of 1

KLIKA-OS

Posted: Wed Nov 27, 2019 3:45 pm
by zpasalic
Description:

KLIKA-OS is small OS written in C and Asm. Some notable features:
  • x86_64
  • 2MB pages
  • Scheduler (kernel and user space)
  • Syscalls
  • Blocking calls e.g. window_get_message (task WAIT state)
  • Drivers: mouse, keyboard, vesa, ata, fat 12/16/32
  • Double buffered vesa graphics
  • GUI (window, button, label, image) in users space
How to run

Repository https://github.com/klikaba/klika-os already contains pre built CD and HD images. See readme.md for instructions how to run it with QEMU or VBox.

Contains small library for user apps. Code for basic GUI app looks like:

Code: Select all

#include <klika_os.h>
#include <windows.h>

#define MSG_USER_WIN (WINDOW_USER_MESSAGE + 1)

int main() {
	message_t msg;
	window_t *window = window_create(100, 100, 300, 300, "Simple Application", MSG_USER_WIN);

	while(window_get_message(window, &msg)) { 
		window_dispatch(window, &msg);
	}
	return 0;
}
More details can be found here: https://github.com/klikaba/klika-os

Re: KLIKA-OS

Posted: Sun Nov 29, 2020 1:49 pm
by SpaceAcoustics
This looks really awesome!

Re: KLIKA-OS

Posted: Fri Dec 11, 2020 10:36 am
by eekee
The crisp drop shadows and clean lines make me nostlagic. I like it. :)

Re: KLIKA-OS

Posted: Fri Dec 11, 2020 9:31 pm
by BenLunt
Hi zpasalic,

May I ask you what you used to format the FAT32 partition of your disk.img file?
( https://github.com/klikaba/klika-os/blo ... s/disk.img )

The first FAT entry is 0xFFFF_FFFF instead of 0x0FFF_FFFF.

This is something that is mis-understood some times, and I wish to clarify.

The MS Fat Specification (not so) clearly states on page 18:
The first reserved cluster, FAT[0], contains the BPB_Media byte value in its low 8 bits, and all other bits are set to 1. For example, if the BPB_Media value is 0xF8, for FAT12 FAT[0] = 0x0FF8, for FAT16 FAT[0] = 0xFFF8, and for FAT32 FAT[0] = 0x0FFFFFF8. The second reserved cluster, FAT[1], is set by FORMAT to the EOC mark. On FAT12 volumes, it is not used and is simply always contains an EOC mark. For FAT16 and FAT32, the file system driver may use the high two bits of the FAT[1] entry for dirty volume flags (all other bits, are always left set to 1). Note that the bit location is different for FAT16 and FAT32, because they are the high 2 bits of the entry.
It states that "all other bits are set to 1" but then shows "FAT32 FAT[0] = 0x0FFF_FFF8". When it states "all other bits are set to 1", I take that as all other bits in a standard FAT32 entry, which only uses 28 of the 32 bits.

Further down the page, it even shows the two high bits being uses as flags, using bits 26 and 27 as the high bits.

I am just asking, because I have seen a few places (incorrectly) say that the first FAT32 entry is 0xFFFF_FFFF instead of 0x0FFF_FFFF. I am wondering what you used to format the partition with.

Thanks,
Ben

Re: KLIKA-OS

Posted: Fri Dec 11, 2020 10:10 pm
by klange
I want to note for the users posting replies with questions that this thread is over a year old, the OP has no other posts, and the linked repository has not seen a new commit since February.

Re: KLIKA-OS

Posted: Sat Dec 12, 2020 8:45 am
by eekee
Oh goodness! I thought I might have seen it before, but sometimes I need waking up. Thanks Klange. Sorry for the noise.

Re: KLIKA-OS

Posted: Sat Dec 12, 2020 9:37 am
by BenLunt
Ya, I didn't look at the date of the original post either. Sorry.