mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Merge branch 'master' into sound-dev
This commit is contained in:
commit
16004d084b
33 changed files with 722 additions and 269 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -2,17 +2,17 @@
|
||||||
*.bin
|
*.bin
|
||||||
*.ZXE
|
*.ZXE
|
||||||
*.MAP
|
*.MAP
|
||||||
src/Boot/
|
/src/Boot
|
||||||
*.ELF
|
*.ELF
|
||||||
*.elf
|
*.elf
|
||||||
*.sys
|
*.sys
|
||||||
*.SYS
|
*.SYS
|
||||||
src/EFI/
|
/src/EFI
|
||||||
build/limine
|
/build/limine
|
||||||
build/ovmf
|
/build/ovmf
|
||||||
*.iso
|
*.iso
|
||||||
*.raw
|
*.raw
|
||||||
*.hdd
|
*.hdd
|
||||||
*.o
|
*.o
|
||||||
*.d
|
*.d
|
||||||
zealbooter/limine.h
|
/zealbooter/limine.h
|
||||||
|
|
|
@ -2,15 +2,13 @@
|
||||||
|
|
||||||
[![Discord](https://img.shields.io/discord/934200098144022609?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/rK6U3xdr7D) [![](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/Zeal-Operating-System/ZealOS/wiki)
|
[![Discord](https://img.shields.io/discord/934200098144022609?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/rK6U3xdr7D) [![](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/Zeal-Operating-System/ZealOS/wiki)
|
||||||
|
|
||||||
The Zeal Operating System is a modernized, professional fork of the 64-bit Temple Operating System. Guiding principles of development include transparency, full user control, and adherence to public-domain/open-source implementations.
|
The Zeal Operating System is a modernized fork of the 64-bit Temple Operating System. Guiding principles of development include transparency, full user control, and adherence to public-domain/open-source implementations.
|
||||||
|
|
||||||
![](/screenshots/screenshot2.png)
|
![](/screenshots/screenshot2.png)
|
||||||
|
|
||||||
ZealOS strives to be simple, documented, and require as little of a knowledge gap as possible. One person should be able to comprehend the entire system in at least a semi-detailed way within a few days of study.
|
ZealOS strives to be simple, documented, and require as little of a knowledge gap as possible. One person should be able to comprehend the entire system in at least a semi-detailed way within a few days of study.
|
||||||
Simplify, don't complicate; make accessible, don't obfuscate.
|
|
||||||
|
|
||||||
> The CIA encourages code obfuscation. They make it more complicated than necessary.\
|
**Simplify, don't complicate; make accessible, don't obfuscate.**
|
||||||
—Terry A. Davis
|
|
||||||
|
|
||||||
Features in development include:
|
Features in development include:
|
||||||
- [32-bit color VBE graphics](https://github.com/TempleProgramming/HolyGL)
|
- [32-bit color VBE graphics](https://github.com/TempleProgramming/HolyGL)
|
||||||
|
|
|
@ -64,7 +64,7 @@ umount_tempdisk
|
||||||
echo "Rebuilding kernel headers, kernel, OS, and building Distro ISO ..."
|
echo "Rebuilding kernel headers, kernel, OS, and building Distro ISO ..."
|
||||||
$QEMU_BIN_PATH/qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit
|
$QEMU_BIN_PATH/qemu-system-x86_64 -machine q35,accel=kvm -drive format=raw,file=$TMPDISK -m 1G -rtc base=localtime -smp 4 -device isa-debug-exit
|
||||||
|
|
||||||
LIMINE_BINARY_BRANCH="v4.x-branch-binary"
|
LIMINE_BINARY_BRANCH="v5.x-branch-binary"
|
||||||
|
|
||||||
if [ -d "limine" ]
|
if [ -d "limine" ]
|
||||||
then
|
then
|
||||||
|
@ -74,8 +74,7 @@ then
|
||||||
git remote set-head origin $LIMINE_BINARY_BRANCH
|
git remote set-head origin $LIMINE_BINARY_BRANCH
|
||||||
git switch $LIMINE_BINARY_BRANCH
|
git switch $LIMINE_BINARY_BRANCH
|
||||||
git pull
|
git pull
|
||||||
rm limine-deploy
|
rm limine
|
||||||
rm limine-version
|
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
@ -84,13 +83,13 @@ if [ ! -d "limine" ]; then
|
||||||
fi
|
fi
|
||||||
make -C limine
|
make -C limine
|
||||||
|
|
||||||
touch limine/Limine-HDD.HH
|
touch limine/Limine-BIOS-HDD.HH
|
||||||
echo "/*\$WW,1\$" > limine/Limine-HDD.HH
|
echo "/*\$WW,1\$" > limine/Limine-BIOS-HDD.HH
|
||||||
cat limine/LICENSE.md >> limine/Limine-HDD.HH
|
cat limine/LICENSE >> limine/Limine-BIOS-HDD.HH
|
||||||
echo "*/\$WW,0\$" >> limine/Limine-HDD.HH
|
echo "*/\$WW,0\$" >> limine/Limine-BIOS-HDD.HH
|
||||||
cat limine/limine-hdd.h >> limine/Limine-HDD.HH
|
cat limine/limine-bios-hdd.h >> limine/Limine-BIOS-HDD.HH
|
||||||
sed -i 's/const uint8_t/U8/g' limine/Limine-HDD.HH
|
sed -i 's/const uint8_t/U8/g' limine/Limine-BIOS-HDD.HH
|
||||||
sed -i "s/\[\]/\[$(grep -o "0x" ./limine/limine-hdd.h | wc -l)\]/g" limine/Limine-HDD.HH
|
sed -i "s/\[\]/\[$(grep -o "0x" ./limine/limine-bios-hdd.h | wc -l)\]/g" limine/Limine-BIOS-HDD.HH
|
||||||
|
|
||||||
mount_tempdisk
|
mount_tempdisk
|
||||||
echo "Extracting MyDistro ISO from vdisk ..."
|
echo "Extracting MyDistro ISO from vdisk ..."
|
||||||
|
@ -101,11 +100,11 @@ sudo cp -rf $TMPMOUNT/* $TMPISODIR
|
||||||
sudo rm $TMPISODIR/Boot/OldMBR.BIN 2> /dev/null
|
sudo rm $TMPISODIR/Boot/OldMBR.BIN 2> /dev/null
|
||||||
sudo rm $TMPISODIR/Boot/BootMHD2.BIN 2> /dev/null
|
sudo rm $TMPISODIR/Boot/BootMHD2.BIN 2> /dev/null
|
||||||
sudo mkdir -p $TMPISODIR/EFI/BOOT
|
sudo mkdir -p $TMPISODIR/EFI/BOOT
|
||||||
sudo cp limine/Limine-HDD.HH $TMPISODIR/Boot/Limine-HDD.HH
|
sudo cp limine/Limine-BIOS-HDD.HH $TMPISODIR/Boot/Limine-BIOS-HDD.HH
|
||||||
sudo cp limine/BOOTX64.EFI $TMPISODIR/EFI/BOOT/BOOTX64.EFI
|
sudo cp limine/BOOTX64.EFI $TMPISODIR/EFI/BOOT/BOOTX64.EFI
|
||||||
sudo cp limine/limine-cd-efi.bin $TMPISODIR/Boot/Limine-CD-EFI.BIN
|
sudo cp limine/limine-uefi-cd.bin $TMPISODIR/Boot/Limine-UEFI-CD.BIN
|
||||||
sudo cp limine/limine-cd.bin $TMPISODIR/Boot/Limine-CD.BIN
|
sudo cp limine/limine-bios-cd.bin $TMPISODIR/Boot/Limine-BIOS-CD.BIN
|
||||||
sudo cp limine/limine.sys $TMPISODIR/Boot/Limine.SYS
|
sudo cp limine/limine-bios.sys $TMPISODIR/Boot/Limine-BIOS.SYS
|
||||||
sudo cp ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF
|
sudo cp ../zealbooter/zealbooter.elf $TMPISODIR/Boot/ZealBooter.ELF
|
||||||
sudo cp ../zealbooter/Limine.CFG $TMPISODIR/Boot/Limine.CFG
|
sudo cp ../zealbooter/Limine.CFG $TMPISODIR/Boot/Limine.CFG
|
||||||
echo "Copying DVDKernel.ZXE over ISO Boot/Kernel.ZXE ..."
|
echo "Copying DVDKernel.ZXE over ISO Boot/Kernel.ZXE ..."
|
||||||
|
@ -113,13 +112,13 @@ sudo mv $TMPMOUNT/Tmp/DVDKernel.ZXE $TMPISODIR/Boot/Kernel.ZXE
|
||||||
sudo rm $TMPISODIR/Tmp/DVDKernel.ZXE 2> /dev/null
|
sudo rm $TMPISODIR/Tmp/DVDKernel.ZXE 2> /dev/null
|
||||||
umount_tempdisk
|
umount_tempdisk
|
||||||
|
|
||||||
xorriso -joliet "on" -rockridge "on" -as mkisofs -b Boot/Limine-CD.BIN \
|
xorriso -joliet "on" -rockridge "on" -as mkisofs -b Boot/Limine-BIOS-CD.BIN \
|
||||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
--efi-boot Boot/Limine-CD-EFI.BIN \
|
--efi-boot Boot/Limine-UEFI-CD.BIN \
|
||||||
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
-efi-boot-part --efi-boot-image --protective-msdos-label \
|
||||||
$TMPISODIR -o ZealOS-limine.iso
|
$TMPISODIR -o ZealOS-limine.iso
|
||||||
|
|
||||||
./limine/limine-deploy ZealOS-limine.iso
|
./limine/limine bios-install ZealOS-limine.iso
|
||||||
|
|
||||||
if [ "$TESTING" = true ]; then
|
if [ "$TESTING" = true ]; then
|
||||||
if [ ! -d "ovmf" ]; then
|
if [ ! -d "ovmf" ]; then
|
||||||
|
|
|
@ -578,9 +578,39 @@ U0 RotateMan(F64 d)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CTask *mouse_task = NULL;
|
||||||
|
CTask *game_task = Fs;
|
||||||
|
F64 mouse_scale = 32.0;
|
||||||
|
|
||||||
|
U0 MouseHandler()
|
||||||
|
{
|
||||||
|
Bool button;
|
||||||
|
I64 x;
|
||||||
|
|
||||||
|
while (MouseRawQueueFind(game_task))
|
||||||
|
{
|
||||||
|
button = mouse_hard.raw_bttns[0];
|
||||||
|
x = mouse_hard.raw_data.x;
|
||||||
|
|
||||||
|
if (button || x != 0)
|
||||||
|
MouseRawReset; // Mark mouse data as consumed
|
||||||
|
if (button)
|
||||||
|
MessagePostWait(game_task, MESSAGE_KEY_DOWN_UP, CH_SPACE, 0);
|
||||||
|
if (x != 0)
|
||||||
|
man_é += (x / mouse_scale) / MICRO_STEPS;
|
||||||
|
|
||||||
|
Sleep(10);
|
||||||
|
}
|
||||||
|
mouse_task = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
U0 CastleFrankenstein()
|
U0 CastleFrankenstein()
|
||||||
{
|
{
|
||||||
I64 sc;
|
I64 sc;
|
||||||
|
Bool is_raw = TRUE;
|
||||||
|
|
||||||
|
MouseRaw(is_raw);
|
||||||
|
mouse_task = Spawn(&MouseHandler, NULL, "MouseHandler");
|
||||||
|
|
||||||
MenuPush(
|
MenuPush(
|
||||||
"File {"
|
"File {"
|
||||||
|
@ -594,6 +624,9 @@ U0 CastleFrankenstein()
|
||||||
" Left(,,SC_CURSOR_LEFT);"
|
" Left(,,SC_CURSOR_LEFT);"
|
||||||
" Right(,,SC_CURSOR_RIGHT);"
|
" Right(,,SC_CURSOR_RIGHT);"
|
||||||
" Fire(,CH_SPACE);"
|
" Fire(,CH_SPACE);"
|
||||||
|
" MouseMode(,'m');"
|
||||||
|
" MouseScaleUp(,'+');"
|
||||||
|
" MouseScaleDown(,'-');"
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -618,6 +651,30 @@ U0 CastleFrankenstein()
|
||||||
Fire;
|
Fire;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'm':
|
||||||
|
if (is_raw)
|
||||||
|
{
|
||||||
|
is_raw = FALSE;
|
||||||
|
MouseRaw(is_raw);
|
||||||
|
Kill(mouse_task);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
is_raw = TRUE;
|
||||||
|
MouseRaw(is_raw);
|
||||||
|
mouse_task = Spawn(&MouseHandler, NULL, "MouseHandler");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '+':
|
||||||
|
case '=':
|
||||||
|
mouse_scale *= 0.9;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '-':
|
||||||
|
mouse_scale *= 1.1;
|
||||||
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
Init;
|
Init;
|
||||||
break;
|
break;
|
||||||
|
@ -664,6 +721,7 @@ fs_done:
|
||||||
}
|
}
|
||||||
|
|
||||||
CastleFrankenstein;
|
CastleFrankenstein;
|
||||||
|
MouseRaw(FALSE);
|
||||||
|