summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2025-01-24 10:38:36 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2025-01-24 10:38:36 +0100
commit7b4bd3577a31d0f0adc7371840642791ae1567f4 (patch)
tree1a8afc973aaa739d0d763315cad2fd376d1cea9c
ADD: Open version, with important changes kept out.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
-rw-r--r--.clang-format16
-rw-r--r--.editorconfig16
-rw-r--r--.gitattributes1
-rw-r--r--.gitignore245
-rw-r--r--CODEOWNERS4
-rw-r--r--Doxyfile2824
-rw-r--r--LICENSE674
-rw-r--r--ReadMe.md29
l---------boot1
-rw-r--r--build_gcc.sh3
-rw-r--r--compile_flags.txt16
-rwxr-xr-xdebug_ahci.sh10
-rwxr-xr-xdebug_ata.sh10
-rw-r--r--dev/Boot/BootKit/BitManip.h20
-rw-r--r--dev/Boot/BootKit/BootKit.h398
-rw-r--r--dev/Boot/BootKit/BootThread.h43
-rw-r--r--dev/Boot/BootKit/Device.h37
-rw-r--r--dev/Boot/BootKit/EPM.h9
-rw-r--r--dev/Boot/BootKit/HW/ATA.h58
-rw-r--r--dev/Boot/BootKit/HW/SATA.h46
-rw-r--r--dev/Boot/BootKit/Platform.h32
-rw-r--r--dev/Boot/BootKit/Protocol.h10
-rw-r--r--dev/Boot/BootKit/Rsrc/zka_disk.rsrc116
-rw-r--r--dev/Boot/BootKit/Rsrc/zka_has_disk.rsrc116
-rw-r--r--dev/Boot/BootKit/Rsrc/zka_no_disk.rsrc116
-rw-r--r--dev/Boot/BootKit/Support.h173
-rw-r--r--dev/Boot/DownloadOVMF.ps14
-rw-r--r--dev/Boot/Mod/.keep0
-rw-r--r--dev/Boot/Mod/NetBoot/.hgkeep0
-rw-r--r--dev/Boot/Mod/NetBoot/Boot.S28
-rw-r--r--dev/Boot/Mod/NetBoot/NetBoot.cc20
-rw-r--r--dev/Boot/Mod/NetBoot/NetBoot.h31
-rw-r--r--dev/Boot/Mod/NetBoot/build.json24
-rw-r--r--dev/Boot/Mod/SysChk/.hgkeep0
-rw-r--r--dev/Boot/Mod/SysChk/Boot.S22
-rw-r--r--dev/Boot/Mod/SysChk/Module.cc36
-rw-r--r--dev/Boot/Mod/SysChk/amd64.json25
-rw-r--r--dev/Boot/Mod/SysChk/arm64.json26
-rw-r--r--dev/Boot/ReadMe.md20
-rw-r--r--dev/Boot/amd64-desktop.make116
-rw-r--r--dev/Boot/arm64-desktop.make112
-rw-r--r--dev/Boot/arm64-mobile.make113
-rw-r--r--dev/Boot/gdbinit3
-rw-r--r--dev/Boot/src/.gitkeep0
-rw-r--r--dev/Boot/src/BootFileReader.cc206
-rw-r--r--dev/Boot/src/BootString.cc92
-rw-r--r--dev/Boot/src/BootSupport.cc82
-rw-r--r--dev/Boot/src/BootTextWriter.cc169
-rw-r--r--dev/Boot/src/BootThread.cc217
-rw-r--r--dev/Boot/src/BootloaderRsrc.rsrc25
-rw-r--r--dev/Boot/src/HEL/64X000/.gitkeep0
-rw-r--r--dev/Boot/src/HEL/64X000/Boot64x0.S35
-rw-r--r--dev/Boot/src/HEL/AMD64/BootAPI.S60
-rw-r--r--dev/Boot/src/HEL/AMD64/BootATA.cc283
-rw-r--r--dev/Boot/src/HEL/AMD64/BootPlatform.cc106
-rw-r--r--dev/Boot/src/HEL/AMD64/BootSATA.cc20
-rw-r--r--dev/Boot/src/HEL/AMD64/EFIBootStartup.cc306
-rw-r--r--dev/Boot/src/HEL/ARM64/.gitkeep0
-rw-r--r--dev/Boot/src/HEL/ARM64/BootAPI.S12
-rw-r--r--dev/Boot/src/HEL/ARM64/BootPlatform.cc37
-rw-r--r--dev/Boot/src/HEL/ARM64/CoreBootStartup.S40
-rw-r--r--dev/Boot/src/HEL/ARM64/EFIBootStartup.cc220
-rw-r--r--dev/Boot/src/HEL/POWER/.gitkeep0
-rw-r--r--dev/Boot/src/HEL/POWER/CoreBootStartup.S34
-rw-r--r--dev/Boot/src/New+Delete.cc60
-rw-r--r--dev/Boot/src/Root/EFI/STARTUP.NSH2
-rw-r--r--dev/Hints/CompilerHint.h25
-rw-r--r--dev/Kernel/ArchKit/ArchKit.h92
-rw-r--r--dev/Kernel/CFKit/GUIDWizard.h24
-rw-r--r--dev/Kernel/CFKit/GUIDWrapper.h60
-rw-r--r--dev/Kernel/CFKit/Property.h54
-rw-r--r--dev/Kernel/CFKit/Utils.h55
-rw-r--r--dev/Kernel/CompilerKit/CompilerKit.h13
-rw-r--r--dev/Kernel/CompilerKit/Detail.h27
-rw-r--r--dev/Kernel/CompilerKit/Version.h7
-rw-r--r--dev/Kernel/FSKit/Defines.h12
-rw-r--r--dev/Kernel/FSKit/HPFS.h30
-rw-r--r--dev/Kernel/FSKit/IndexableProperty.h63
-rw-r--r--dev/Kernel/FSKit/NeFS.h440
-rw-r--r--dev/Kernel/FirmwareKit/.gitkeep0
-rw-r--r--dev/Kernel/FirmwareKit/EFI.h11
-rw-r--r--dev/Kernel/FirmwareKit/EFI/API.h106
-rw-r--r--dev/Kernel/FirmwareKit/EFI/EFI.h922
-rw-r--r--dev/Kernel/FirmwareKit/EFI/NS.h20
-rw-r--r--dev/Kernel/FirmwareKit/GPT.h57
-rw-r--r--dev/Kernel/FirmwareKit/Handover.h108
-rw-r--r--dev/Kernel/HALKit/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/AMD64/CPUID.h86
-rw-r--r--dev/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cc126
-rw-r--r--dev/Kernel/HALKit/AMD64/HalAPICController.cc39
-rw-r--r--dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc279
-rw-r--r--dev/Kernel/HALKit/AMD64/HalApplicationProcessorGNU.s8
-rw-r--r--dev/Kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm77
-rw-r--r--dev/Kernel/HALKit/AMD64/HalBoot.asm28
-rw-r--r--dev/Kernel/HALKit/AMD64/HalCPUAMD64.cc101
-rw-r--r--dev/Kernel/HALKit/AMD64/HalCommonAPI.asm82
-rw-r--r--dev/Kernel/HALKit/AMD64/HalControlRegister.s45
-rw-r--r--dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc235
-rw-r--r--dev/Kernel/HALKit/AMD64/HalDebugOutput.cc145
-rw-r--r--dev/Kernel/HALKit/AMD64/HalDebugPort.cc40
-rw-r--r--dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc126
-rw-r--r--dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm410
-rw-r--r--dev/Kernel/HALKit/AMD64/HalKernelMain.cc110
-rw-r--r--dev/Kernel/HALKit/AMD64/HalKernelPanic.cc90
-rw-r--r--dev/Kernel/HALKit/AMD64/HalPagingMgrAMD64.cc168
-rw-r--r--dev/Kernel/HALKit/AMD64/HalRoutineWait.s11
-rw-r--r--dev/Kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc52
-rw-r--r--dev/Kernel/HALKit/AMD64/HalTimerAMD64.cc86
-rw-r--r--dev/Kernel/HALKit/AMD64/HalUtils.asm26
-rw-r--r--dev/Kernel/HALKit/AMD64/Hypervisor.h25
-rw-r--r--dev/Kernel/HALKit/AMD64/MBCI/HalMBCI.cc7
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/DMA.cc82
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/Database.cc11
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/Device.cc139
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/Express.cc11
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/IO.cc7
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/Iterator.cc41
-rw-r--r--dev/Kernel/HALKit/AMD64/PCI/PCI.cc7
-rw-r--r--dev/Kernel/HALKit/AMD64/Paging.h99
-rw-r--r--dev/Kernel/HALKit/AMD64/Processor.h326
-rw-r--r--dev/Kernel/HALKit/AMD64/ReadMe.md8
-rw-r--r--dev/Kernel/HALKit/AMD64/Storage/ATA-DMA.cc38
-rw-r--r--dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc195
-rw-r--r--dev/Kernel/HALKit/AMD64/Storage/SATA-DMA.cc316
-rwxr-xr-xdev/Kernel/HALKit/AMD64/make_ap_blob.sh3
-rw-r--r--dev/Kernel/HALKit/ARM64/APM/APM+IO.cc37
-rw-r--r--dev/Kernel/HALKit/ARM64/ApplicationProcessor.h19
-rw-r--r--dev/Kernel/HALKit/ARM64/HalACPIFactoryInterface.cc31
-rw-r--r--dev/Kernel/HALKit/ARM64/HalApplicationProcessor.cc136
-rw-r--r--dev/Kernel/HALKit/ARM64/HalDebugOutput.cc83
-rw-r--r--dev/Kernel/HALKit/ARM64/HalKernelMain.cc52
-rw-r--r--dev/Kernel/HALKit/ARM64/HalKernelPanic.cc80
-rw-r--r--dev/Kernel/HALKit/ARM64/HalPageInternal.S5
-rw-r--r--dev/Kernel/HALKit/ARM64/HalPagingMgrARM64.cc86
-rw-r--r--dev/Kernel/HALKit/ARM64/HalSchedulerCoreARM64.cc24
-rw-r--r--dev/Kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc35
-rw-r--r--dev/Kernel/HALKit/ARM64/HalTimerARM64.cc14
-rw-r--r--dev/Kernel/HALKit/ARM64/MBCI/MBCI.cc7
-rw-r--r--dev/Kernel/HALKit/ARM64/Paging.h120
-rw-r--r--dev/Kernel/HALKit/ARM64/Processor.h86
-rw-r--r--dev/Kernel/HALKit/ARM64/ReadMe.md3
-rw-r--r--dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc84
-rw-r--r--dev/Kernel/HALKit/AXP/CR.s11
-rw-r--r--dev/Kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp0
-rw-r--r--dev/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp24
-rw-r--r--dev/Kernel/HALKit/AXP/HAL.s13
-rw-r--r--dev/Kernel/HALKit/AXP/Processor.h7
-rw-r--r--dev/Kernel/HALKit/AXP/README1
-rw-r--r--dev/Kernel/HALKit/AXP/README.TXT1
-rw-r--r--dev/Kernel/HALKit/AXP/SYSCALL.s10
-rw-r--r--dev/Kernel/HALKit/AXP/VM.s5
-rw-r--r--dev/Kernel/HALKit/POWER/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/POWER/AP.h39
-rw-r--r--dev/Kernel/HALKit/POWER/APM/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/POWER/HalAP.cc40
-rw-r--r--dev/Kernel/HALKit/POWER/HalDebugOutput.cc27
-rw-r--r--dev/Kernel/HALKit/POWER/HalStartSequence.s14
-rw-r--r--dev/Kernel/HALKit/POWER/HalThread.cc8
-rw-r--r--dev/Kernel/HALKit/POWER/HalVirtualMemory.cc49
-rw-r--r--dev/Kernel/HALKit/POWER/MBCI/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/POWER/MBCI/HalMBCIHost.cc8
-rw-r--r--dev/Kernel/HALKit/POWER/Processor.h62
-rw-r--r--dev/Kernel/HALKit/POWER/ReadMe.md4
-rw-r--r--dev/Kernel/HALKit/RISCV/.keep0
-rw-r--r--dev/Kernel/HALKit/RISCV/AP.h36
-rw-r--r--dev/Kernel/HALKit/RISCV/APM/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/RISCV/HalAP.cc40
-rw-r--r--dev/Kernel/HALKit/RISCV/ReadMe.md4
-rw-r--r--dev/Kernel/HALKit/RISCV/Storage/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/X86S/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/X86S/ACPI/.gitkeep0
-rw-r--r--dev/Kernel/HALKit/X86S/Storage/.gitkeep0
-rw-r--r--dev/Kernel/KernelKit/CodeMgr.h37
-rw-r--r--dev/Kernel/KernelKit/DebugOutput.h211
-rw-r--r--dev/Kernel/KernelKit/Defines.h15
-rw-r--r--dev/Kernel/KernelKit/DeviceMgr.h140
-rw-r--r--dev/Kernel/KernelKit/DriveMgr.h191
-rw-r--r--dev/Kernel/KernelKit/FileMgr.h392
-rw-r--r--dev/Kernel/KernelKit/HardwareThreadScheduler.h149
-rw-r--r--dev/Kernel/KernelKit/Heap.h86
-rw-r--r--dev/Kernel/KernelKit/IDylibObject.h48
-rw-r--r--dev/Kernel/KernelKit/IPEFDylibObject.h106
-rw-r--r--dev/Kernel/KernelKit/LPC.h70
-rw-r--r--dev/Kernel/KernelKit/LoaderInterface.h34
-rw-r--r--dev/Kernel/KernelKit/LockDelegate.h69
-rw-r--r--dev/Kernel/KernelKit/MSDOS.h52
-rw-r--r--dev/Kernel/KernelKit/PCI/DMA.h81
-rw-r--r--dev/Kernel/KernelKit/PCI/DMA.inl20
-rw-r--r--dev/Kernel/KernelKit/PCI/Database.h38
-rw-r--r--dev/Kernel/KernelKit/PCI/Device.h80
-rw-r--r--dev/Kernel/KernelKit/PCI/Express.h11
-rw-r--r--dev/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl54
-rw-r--r--dev/Kernel/KernelKit/PCI/IO.h59
-rw-r--r--dev/Kernel/KernelKit/PCI/Iterator.h43
-rw-r--r--dev/Kernel/KernelKit/PCI/PCI.h59
-rw-r--r--dev/Kernel/KernelKit/PE.h143
-rw-r--r--dev/Kernel/KernelKit/PECodeMgr.h24
-rw-r--r--dev/Kernel/KernelKit/PEF.h117
-rw-r--r--dev/Kernel/KernelKit/PEFCodeMgr.h72
-rw-r--r--dev/Kernel/KernelKit/Semaphore.h43
-rw-r--r--dev/Kernel/KernelKit/ThreadLocalStorage.h69
-rw-r--r--dev/Kernel/KernelKit/ThreadLocalStorage.inl99
-rw-r--r--dev/Kernel/KernelKit/Timer.h81
-rw-r--r--dev/Kernel/KernelKit/User.h86
-rw-r--r--dev/Kernel/KernelKit/UserProcessScheduler.h341
-rw-r--r--dev/Kernel/KernelKit/UserProcessScheduler.inl51
-rw-r--r--dev/Kernel/KernelKit/XCOFF.h51
-rw-r--r--dev/Kernel/KernelRsrc.rsrc25
-rwxr-xr-xdev/Kernel/MoveAll.ARM64.sh7
-rwxr-xr-xdev/Kernel/MoveAll.X64.sh7
-rw-r--r--dev/Kernel/NetworkKit/IP.h83
-rw-r--r--dev/Kernel/NetworkKit/IPC.h106
-rw-r--r--dev/Kernel/NetworkKit/LTE.h16
-rw-r--r--dev/Kernel/NetworkKit/MAC.h29
-rw-r--r--dev/Kernel/NetworkKit/NetworkDevice.h83
-rw-r--r--dev/Kernel/NetworkKit/NetworkDevice.inl32
-rw-r--r--dev/Kernel/NewKit/Array.h58
-rw-r--r--dev/Kernel/NewKit/ArrayList.h58
-rw-r--r--dev/Kernel/NewKit/Atom.h46
-rw-r--r--dev/Kernel/NewKit/Crc32.h23
-rw-r--r--dev/Kernel/NewKit/CxxAbi.h28
-rw-r--r--dev/Kernel/NewKit/Defines.h188
-rw-r--r--dev/Kernel/NewKit/ErrorOr.h77
-rw-r--r--dev/Kernel/NewKit/Function.h53
-rw-r--r--dev/Kernel/NewKit/Json.h151
-rw-r--r--dev/Kernel/NewKit/KString.h94
-rw-r--r--dev/Kernel/NewKit/KernelPanic.h64
-rw-r--r--dev/Kernel/NewKit/Macros.h149
-rw-r--r--dev/Kernel/NewKit/MutableArray.h239
-rw-r--r--dev/Kernel/NewKit/New.h20
-rw-r--r--dev/Kernel/NewKit/NewKit.h20
-rw-r--r--dev/Kernel/NewKit/OwnPtr.h94
-rw-r--r--dev/Kernel/NewKit/PageMgr.h81
-rw-r--r--dev/Kernel/NewKit/Pair.h14
-rw-r--r--dev/Kernel/NewKit/Pmm.h44
-rw-r--r--dev/Kernel/NewKit/Ref.h108
-rw-r--r--dev/Kernel/NewKit/Stream.h58
-rw-r--r--dev/Kernel/NewKit/Utils.h29
-rw-r--r--dev/Kernel/NewKit/Variant.h70
-rw-r--r--dev/Kernel/POSIXKit/signal.h20
-rw-r--r--dev/Kernel/POSIXKit/unix_layer.h13
-rw-r--r--dev/Kernel/ReadMe.md3
-rw-r--r--dev/Kernel/StorageKit/AHCI.h33
-rw-r--r--dev/Kernel/StorageKit/ATA.h39
-rw-r--r--dev/Kernel/StorageKit/NVME.h34
-rw-r--r--dev/Kernel/StorageKit/PRDT.h36
-rw-r--r--dev/Kernel/StorageKit/SCSI.h11
-rw-r--r--dev/Kernel/StorageKit/StorageKit.h22
-rw-r--r--dev/Kernel/SystemKit/SwapDisk.h48
-rw-r--r--dev/Kernel/SystemKit/TeamScheduler.h20
-rw-r--r--dev/Kernel/amd64-desktop.make85
-rw-r--r--dev/Kernel/arm64-desktop.make64
-rw-r--r--dev/Kernel/doc/Explicit Partition Map.pdfbin0 -> 12364 bytes
-rw-r--r--dev/Kernel/doc/SPECIFICATION.md63
-rw-r--r--dev/Kernel/doc/TODO-LIST.md25
-rw-r--r--dev/Kernel/obj/.hgkeep0
-rw-r--r--dev/Kernel/power64-cb.make4
-rw-r--r--dev/Kernel/riscv64-cb.make0
-rw-r--r--dev/Kernel/src/ACPIFactoryInterface.cc96
-rw-r--r--dev/Kernel/src/Array.cc7
-rw-r--r--dev/Kernel/src/ArrayList.cc7
-rw-r--r--dev/Kernel/src/Atom.cc10
-rw-r--r--dev/Kernel/src/BitMapMgr.cc186
-rw-r--r--dev/Kernel/src/CodeMgr.cc28
-rw-r--r--dev/Kernel/src/Crc32.cc83
-rw-r--r--dev/Kernel/src/CxxAbi-AMD64.cc90
-rw-r--r--dev/Kernel/src/CxxAbi-ARM64.cc107
-rw-r--r--dev/Kernel/src/Defines.cc7
-rw-r--r--dev/Kernel/src/DeviceMgr.cc7
-rw-r--r--dev/Kernel/src/DriveMgr+IO.cc96
-rw-r--r--dev/Kernel/src/DriveMgr.cc230
-rw-r--r--dev/Kernel/src/ErrorOr.cc12
-rw-r--r--dev/Kernel/src/FS/HPFS.cc22
-rw-r--r--dev/Kernel/src/FileMgr.cc52
-rw-r--r--dev/Kernel/src/GUIDWizard.cc72
-rw-r--r--dev/Kernel/src/GUIDWrapper.cc11
-rw-r--r--dev/Kernel/src/HardwareThreadScheduler.cc219
-rw-r--r--dev/Kernel/src/Heap.cc301
-rw-r--r--dev/Kernel/src/IDylibObject.cc15
-rw-r--r--dev/Kernel/src/IPEFDylibObject.cc103
-rw-r--r--dev/Kernel/src/IndexableProperty.cc57
-rw-r--r--dev/Kernel/src/Json.cc10
-rw-r--r--dev/Kernel/src/KString.cc217
-rw-r--r--dev/Kernel/src/KernelMain.cc102
-rw-r--r--dev/Kernel/src/LPC.cc34
-rw-r--r--dev/Kernel/src/LockDelegate.cc12
-rw-r--r--dev/Kernel/src/MutableArray.cc7
-rw-r--r--dev/Kernel/src/Network/IPAddr.cc129
-rw-r--r--dev/Kernel/src/Network/IPCAddr.cc0
-rw-r--r--dev/Kernel/src/Network/IPCMsg.cc102
-rw-r--r--dev/Kernel/src/Network/NetworkDevice.cc35
-rw-r--r--dev/Kernel/src/New+Delete.cc50
-rw-r--r--dev/Kernel/src/OwnPtr.cc7
-rw-r--r--dev/Kernel/src/PEFCodeMgr.cc268
-rw-r--r--dev/Kernel/src/PRDT.cc24
-rw-r--r--dev/Kernel/src/PageMgr.cc110
-rw-r--r--dev/Kernel/src/Pmm.cc98
-rw-r--r--dev/Kernel/src/Property.cc45
-rw-r--r--dev/Kernel/src/Ref.cc7
-rw-r--r--dev/Kernel/src/Semaphore.cc69
-rw-r--r--dev/Kernel/src/SoftwareTimer.cc39
-rw-r--r--dev/Kernel/src/Storage/AHCIDeviceInterface.cc35
-rw-r--r--dev/Kernel/src/Storage/ATADeviceInterface.cc88
-rw-r--r--dev/Kernel/src/Storage/NVMEDeviceInterface.cc28
-rw-r--r--dev/Kernel/src/Storage/SCSIDeviceInterface.cc11
-rw-r--r--dev/Kernel/src/Stream.cc12
-rw-r--r--dev/Kernel/src/System/SwapDisk.cc47
-rw-r--r--dev/Kernel/src/ThreadLocalStorage.cc67
-rw-r--r--dev/Kernel/src/Timer.cc19
-rw-r--r--dev/Kernel/src/User.cc188
-rw-r--r--dev/Kernel/src/UserProcessScheduler.cc607
-rw-r--r--dev/Kernel/src/UserProcessTeam.cc58
-rw-r--r--dev/Kernel/src/Utils.cc219
-rw-r--r--dev/Kernel/src/Variant.cc33
-rw-r--r--dev/LibSCI/CompilerHint.h25
-rw-r--r--dev/LibSCI/GPU.h52
-rw-r--r--dev/LibSCI/LPC.h56
-rw-r--r--dev/LibSCI/Macros.h56
-rw-r--r--dev/LibSCI/SCI.h293
-rw-r--r--dev/LibSCI/doc/LibSCI.drawio28
-rw-r--r--dev/LibSCI/libsci.json20
-rw-r--r--dev/LibSCI/src/GPU.cc10
-rw-r--r--dev/LibSCI/src/LPC.cc10
-rw-r--r--dev/LibSCI/src/LibSCI+IO.asm50
-rw-r--r--dev/LibSCI/src/Makefile16
-rw-r--r--dev/LibSCI/src/SCI.cc45
-rw-r--r--dev/Mod/ACPI/ACPI.h88
-rw-r--r--dev/Mod/ACPI/ACPIFactoryInterface.h60
-rw-r--r--dev/Mod/AHCI/.gitkeep0
-rw-r--r--dev/Mod/AHCI/AHCI.h365
-rw-r--r--dev/Mod/APM/APM.h37
-rw-r--r--dev/Mod/ATA/ATA.h156
-rw-r--r--dev/Mod/CoreGfx/AccessibilityMgr.h41
-rw-r--r--dev/Mod/CoreGfx/FBMgr.h150
-rw-r--r--dev/Mod/CoreGfx/MathMgr.h29
-rw-r--r--dev/Mod/CoreGfx/TextMgr.h178
-rw-r--r--dev/Mod/GPRS/.keepme0
-rw-r--r--dev/Mod/HPET/.gitkeep0
-rw-r--r--dev/Mod/HPET/Defines.h42
-rw-r--r--dev/Mod/IEEE802/.gitkeep0
-rw-r--r--dev/Mod/LTE/LTE.h40
-rw-r--r--dev/Mod/MBCI/Interface.h10
-rw-r--r--dev/Mod/MBCI/MBCI.h84
-rw-r--r--dev/Mod/MFlash/MFlash.h21
-rw-r--r--dev/Mod/NVME/NVME.h113
-rw-r--r--dev/Mod/OHCI/.gitkeep0
-rw-r--r--dev/Mod/ReadMe.md12
-rw-r--r--dev/Mod/SCSI/.gitkeep0
-rw-r--r--dev/Mod/SCSI/SCSI.h15
-rw-r--r--dev/Mod/WiFi/.gitkeep0
-rw-r--r--dev/Mod/XHCI/.gitkeep0
-rw-r--r--dev/Mod/XHCI/Defines.h70
-rw-r--r--dev/Usr/.keepme0
-rw-r--r--dev/Usr/External/.gitkeep0
-rw-r--r--dev/Usr/LibCompress/API.h18
-rw-r--r--dev/Usr/LibCompress/LCCompress.s7
-rw-r--r--dev/Usr/LibCompress/LCDecompress.s7
-rw-r--r--dev/Usr/LibSystem/.keepme0
-rw-r--r--dev/Usr/LibWS/.keepme0
-rw-r--r--doc/DDK.pdfbin0 -> 24997 bytes
-rw-r--r--doc/EPM.pdfbin0 -> 12517 bytes
-rw-r--r--doc/GUI-System.drawio34
-rw-r--r--doc/MFlash.pdfbin0 -> 25005 bytes
-rw-r--r--doc/NeFS.pdfbin0 -> 13466 bytes
-rw-r--r--doc/OS-Design.drawio25
-rw-r--r--doc/OS-Scheduler-Design.drawio25
-rw-r--r--doc/OS-Timer-Design.drawio49
-rw-r--r--doc/SCHED-DESIGN.drawio34
-rw-r--r--doc/ZXD.drawio31
l---------kernel1
-rwxr-xr-xmake_docs.sh5
l---------modules1
-rw-r--r--public/frameworks/.keep0
-rw-r--r--public/tools/.keep0
-rw-r--r--public/tools/make_app/Common.h19
-rw-r--r--public/tools/make_app/Framework.h17
-rw-r--r--public/tools/make_app/Steps.h14
-rw-r--r--public/tools/make_app/dist/.keep0
-rw-r--r--public/tools/make_app/make_app.json12
-rw-r--r--public/tools/make_app/src/CommandLine.cc80
-rw-r--r--public/tools/open/dist/.keep0
-rw-r--r--public/tools/open/open.json13
-rw-r--r--public/tools/open/src/CommandLine.cc49
-rwxr-xr-xrelease_ahci.sh9
-rwxr-xr-xrelease_ata.sh9
-rw-r--r--res/zka-disk.svg20
-rw-r--r--res/zka-has-disk.svg30
-rw-r--r--res/zka-no-disk.svg30
-rwxr-xr-xrun_debugger.sh3
-rwxr-xr-xrun_format.sh16
-rwxr-xr-xsetup_amd64.sh5
-rwxr-xr-xsetup_arm64.sh5
l---------syscalls1
-rw-r--r--tests/.keep0
-rw-r--r--tests/dev/.keep0
-rw-r--r--tests/fs/.keep0
-rw-r--r--tests/net/.keep0
-rw-r--r--tests/process/.keep0
l---------usr1
399 files changed, 27958 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..fb3cacb1
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,16 @@
+---
+BasedOnStyle: Microsoft
+AccessModifierOffset: '-4'
+AlignAfterOpenBracket: Align
+AlignConsecutiveMacros: 'true'
+AlignConsecutiveAssignments: 'true'
+AlignConsecutiveDeclarations: 'true'
+BinPackParameters: 'false'
+ColumnLimit: '0'
+Language: Cpp
+NamespaceIndentation: All
+PointerAlignment: Left
+ReflowComments: 'true'
+SortIncludes: 'false'
+UseTab: Always
+...
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..ef6cea07
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+root = true
+
+[*.{cpp,hpp}]
+indent_size = 4
+tab_width = 4
+indent_style = space
+
+[*.{pro,pri}]
+indent_size = 4
+tab_width = 4
+indent_style = space
+
+[*.{md,markdown}]
+indent_size = 2
+tab_width = 2
+indent_style = space
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..62544950
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..d55396d1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,245 @@
+syntax: glob
+
+xcuserdata/
+
+*.hmap
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+*/xcuserdata/*
+*.xcworkspacedata
+
+public/tools/make_app/dist/make_app
+
+minoskrnl/minoskrnl.xcodeproj/project.xcworkspace/xcshareddata/
+
+html/
+latex/
+
+public/tools/src.fwrk
+
+.cmake/
+.qtc_clangd/
+CMakeCache.txt
+CMakeFiles/
+build.ninja
+cmake_install.cmake
+qtcsettings.cmake
+
+*.exec
+*.rom
+
+tools/drvsign
+
+*.sigg
+
+NvVars
+
+x86_64/
+
+*.epm
+*.app
+
+*.com
+*.log
+*.slo
+*.lo
+*.o
+*.a
+*.la
+*.lai
+*.so
+*.so.*
+*.dll
+*.dylib
+
+build
+
+# Qt-es
+object_script.*.Release
+object_script.*.Debug
+*_plugin_import.cpp
+/.qmake.cache
+/.qmake.stash
+*.pro.user
+*.pro.user.*
+*.qbs.user
+*.qbs.user.*
+*.moc
+moc_*.cpp
+moc_*.h
+qrc_*.cpp
+ui_*.h
+*.qmlc
+*.jsc
+*build-*
+*.qm
+*.prl
+
+# Qt unit tests
+target_wrapper.*
+
+# QtCreator
+*.autosave
+
+# QtCreator Qml
+*.qmlproject.user
+*.qmlproject.user.*
+
+# QtCreator CMake
+CMakeLists.txt.user*
+
+# QtCreator 4.8< compilation database
+compile_commands.json
+
+# QtCreator local machine specific files for imported projects
+*creator.user*
+
+*_qmlcache.qrc
+
+
+CMakeLists.txt.user
+
+limine-deploy
+
+.DS_Store
+
+### Eclipse ###
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.settings/
+.loadpath
+.recommenders
+
+.vscode/settings.json
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# PyDev specific (Python IDE for Eclipse)
+*.pydevproject
+
+# CDT-specific (C/C++ Development Tooling)
+.cproject
+
+# CDT- autotools
+.autotools
+
+# Java annotation processor (APT)
+.factorypath
+
+# PDT-specific (PHP Development Tools)
+.buildpath
+
+# sbteclipse plugin
+.target
+
+# Tern plugin
+.tern-project
+
+# TeXlipse plugin
+.texlipse
+
+# STS (Spring Tool Suite)
+.springBeans
+
+# Code Recommenders
+.recommenders/
+
+# Annotation Processing
+.apt_generated/
+.apt_generated_test/
+
+# Scala IDE specific (Scala & Java development for Eclipse)
+.cache-main
+.scala_dependencies
+.worksheet
+
+# Uncomment this line if you wish to ignore the project description file.
+# Typically, this file would be tracked if it contains build/dependency configurations:
+#.project
+
+### Eclipse Patch ###
+# Spring Boot Tooling
+.sts4-cache/
+
+# End of https://www.toptal.com/developers/gitignore/api/eclipse
+
+# Prerequisites
+*.d
+
+.vs/
+.idea/
+*.out
+*.iso
+
+# Object files
+*.bin
+*.o
+*.ko
+*.obj
+*.elf
+*.sys
+
+*.fd
+*.EFI
+
+# Launch executable
+*.iso
+*.img
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libs
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Dyld Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
+
+.fleet/
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 00000000..3fe27ace
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1,4 @@
+# BootZ, LibSCI and ZKA are owned by Amlal.
+/dev/Kernel/ @amlel-el-mahrouss
+/dev/Boot/ @amlel-el-mahrouss
+/dev/LibSCI/ @amlel-el-mahrouss
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 00000000..670c8dbb
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,2824 @@
+# Doxyfile 1.9.8
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+#
+# Note:
+#
+# Use doxygen to compare the used configuration file with the template
+# configuration file:
+# doxygen -x [configFile]
+# Use doxygen to compare the used configuration file with the template
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
+# doxygen -x_noenv [configFile]
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "Kernel"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = 2.0.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
+# sub-directories (in 2 levels) under the output directory of each output format
+# and will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
+# control the number of sub-directories.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# Controls the number of sub-directories that will be created when
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
+# level increment doubles the number of directories, resulting in 4096
+# directories at level 8 which is the default and also the maximum value. The
+# sub-directories are organized in 2 levels, the first level always has a fixed
+# number of 16 directories.
+# Minimum value: 0, maximum value: 8, default value: 8.
+# This tag requires that the tag CREATE_SUBDIRS is set to YES.
+
+CREATE_SUBDIRS_LEVEL = 8
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
+# English messages), Korean, Korean-en (Korean with English messages), Latvian,
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
+# Swedish, Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:^^"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias
+# to insert newlines (in the resulting output). You can put ^^ in the value part
+# of an alias to insert a newline as if a physical newline was in the original
+# file. When you need a literal { or } or , in the value part of an alias you
+# have to escape them by means of a backslash (\), this can lead to conflicts
+# with the commands \{ and \} for these it is advised to use the version @{ and
+# @} or use a double escape (\\{ and \\})
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
+# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to
+# generate identifiers for the Markdown headings. Note: Every identifier is
+# unique.
+# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a
+# sequence number starting at 0 and GITHUB use the lower case version of title
+# with any whitespace replaced by '-' and punctuation characters removed.
+# The default value is: DOXYGEN.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+MARKDOWN_ID_STYLE = DOXYGEN
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which effectively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS = 1
+
+# If the TIMESTAMP tag is set different from NO then each generated page will
+# contain the date or date and time when the page was generated. Setting this to
+# NO can help when comparing the output of multiple runs.
+# Possible values are: YES, NO, DATETIME and DATE.
+# The default value is: NO.
+
+TIMESTAMP = NO
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Kernel
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = YES
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# will also hide undocumented C++ concepts if enabled. This option has no effect
+# if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
+
+CASE_SENSE_NAMES = SYSTEM
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
+# will show which file needs to be included to use the class.
+# The default value is: YES.
+
+SHOW_HEADERFILE = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file. See also section "Changing the
+# layout of pages" for information.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as documenting some parameters in
+# a documented function twice, or documenting parameters that don't exist or
+# using markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
+# function parameter documentation. If set to NO, doxygen will accept that some
+# parameters have no documentation without warning.
+# The default value is: YES.
+
+WARN_IF_INCOMPLETE_DOC = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong parameter
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is
+# set to YES then this flag will automatically be disabled. See also
+# WARN_IF_INCOMPLETE_DOC
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
+# undocumented enumeration values. If set to NO, doxygen will accept
+# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: NO.
+
+WARN_IF_UNDOC_ENUM_VAL = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves
+# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not
+# write the warning messages in between other messages but write them at the end
+# of a run, in case a WARN_LOGFILE is defined the warning messages will be
+# besides being in the defined file also be shown at the end of a run, unless
+# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case
+# the behavior will remain as with the setting FAIL_ON_WARNINGS.
+# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# See also: WARN_LINE_FORMAT
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# In the $text part of the WARN_FORMAT command it is possible that a reference
+# to a more specific place is given. To make it easier to jump to this place
+# (outside of doxygen) the user can define a custom "cut" / "paste" string.
+# Example:
+# WARN_LINE_FORMAT = "'vi $file +$line'"
+# See also: WARN_FORMAT
+# The default value is: at line $line of file $file.
+
+WARN_LINE_FORMAT = "at line $line of file $file"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr). In case the file specified cannot be opened for writing the
+# warning and error messages are written to standard error. When as file - is
+# specified the warning and error messages are written to standard output
+# (stdout).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = ./ \
+ ./NewKernel/ \
+ ./Usr/ \
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, .cc, .ccm,
+# *.cpp, *.cppm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl,
+# *.ddl, *.odl, *.h, *.hh, *.h, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, *.php,
+# *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be
+# provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ .cc \
+ .ccm \
+ *.cpp \
+ *.cppm \
+ *.c++ \
+ *.c++m \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.idl \
+ *.ddl \
+ *.odl \
+ *.h \
+ *.hh \
+ *.h \
+ *.hpp \
+ *.h++ \
+ *.ixx \
+ *.l \
+ *.cs \
+ *.d \
+ *.php \
+ *.php4 \
+ *.php5 \
+ *.phtml \
+ *.inc \
+ *.m \
+ *.markdown \
+ *.md \
+ *.mm \
+ *.dox \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f18 \
+ *.f \
+ *.for \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.ice
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = meta/
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# ANamespace::AClass, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = ./ReadMe.md
+
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER = 72
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
+# that should be ignored while generating the index headers. The IGNORE_PREFIX
+# tag works for classes, function and member names. The entity will be placed in
+# the alphabetical list under the first letter of the entity name that remains
+# after removing the prefix.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# Note: Since the styling of scrollbars can currently not be overruled in
+# Webkit/Chromium, the styling will be left out of the default doxygen.css if
+# one or more extra stylesheets have been specified. So if scrollbar
+# customization is desired it has to be added explicitly. For an example see the
+# documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET = meta/css/doxygen-awesome.css
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme.
+# Possible values are: LIGHT always generate light mode output, DARK always
+# generate dark mode output, AUTO_LIGHT automatically set the mode according to
+# the user preference, use light mode if no preference is set (the default),
+# AUTO_DARK automatically set the mode according to the user preference, use
+# dark mode if no preference is set and TOGGLE allow to user to switch between
+# light and dark mode via a button.
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE = LIGHT
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a color-wheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use gray-scales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be
+# dynamically folded and expanded in the generated HTML source code.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_CODE_FOLDING = YES
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag determines the URL of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDURL =
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# on Windows. In the beginning of 2021 Microsoft took the original page, with
+# a.o. the download links, offline the HTML help workshop was already many years
+# in maintenance mode). You can download the HTML help workshop from the web
+# archives at Installation executable (see:
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# The SITEMAP_URL tag is used to specify the full URL of the place where the
+# generated documentation will be placed on the server by the user during the
+# deployment of the documentation. The generated sitemap is called sitemap.xml
+# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL
+# is specified no sitemap is generated. For information about the sitemap
+# protocol see https://www.sitemaps.org
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SITEMAP_URL =
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine tune the look of the index (see "Fine-tuning the output"). As an
+# example, the default style sheet generated by doxygen has an example that
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
+# Since the tree basically has the same information as the tab index, you could
+# consider setting DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = YES
+
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
+# area (value NO) or if it should extend to the full height of the window (value
+# YES). Setting this to YES gives a layout similar to
+# https://docs.readthedocs.io with more room for contents, but less room for the
+# project logo, title, and description. If either GENERATE_TREEVIEW or
+# DISABLE_INDEX is set to NO, this option has no effect.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FULL_SIDEBAR = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
+# addresses.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+OBFUSCATE_EMAILS = YES
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT = png
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+# Note that the different versions of MathJax have different requirements with
+# regards to the different settings, so it is possible that also other MathJax
+# settings have to be changed when switching between the different MathJax
+# versions.
+# Possible values are: MathJax_2 and MathJax_3.
+# The default value is: MathJax_2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_VERSION = MathJax_2
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. For more details about the output format see MathJax
+# version 2 (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
+# (see:
+# http://docs.mathjax.org/en/latest/web/components/output.html).
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
+# is the name for Mathjax version 3, for MathJax version 2 this will be
+# translated into HTML-CSS) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment. The default value is:
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH =
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# for MathJax version 2 (see
+# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# For example for MathJax version 3 (see
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+# MATHJAX_EXTENSIONS = ams
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME =
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
+# the generated LaTeX document. The header should contain everything until the
+# first chapter. If it is left blank doxygen will generate a standard header. It
+# is highly recommended to start with a default header using
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
+# and then modify the file new_header.tex. See also section "Doxygen usage" for
+# information on how to generate the default header that doxygen normally uses.
+#
+# Note: Only use a user-defined header if you know what you are doing!
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. The following
+# commands have a special meaning inside the header (and footer): For a
+# description of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
+# the generated LaTeX document. The footer should contain everything after the
+# last chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer. See also section "Doxygen
+# usage" for information on how to generate the default footer that doxygen
+# normally uses. Note: Only use a user-defined footer if you know what you are
+# doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# The LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error.
+# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch
+# mode nothing is printed on the terminal, errors are scrolled as if <return> is
+# hit at every error; missing files that TeX tries to input or request from
+# keyboard input (\read on a not open input stream) cause the job to abort,
+# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,
+# but there is no possibility of user interaction just like in batch mode,
+# SCROLL In scroll mode, TeX will stop only for missing files to input or if
+# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at
+# each error, asking for user intervention.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to Sqlite3 output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_SQLITE3 tag is set to YES doxygen will generate a Sqlite3
+# database with symbols found by doxygen stored in tables.
+# The default value is: NO.
+
+GENERATE_SQLITE3 = NO
+
+# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be
+# put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put
+# in front of it.
+# The default directory is: sqlite3.
+# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
+
+SQLITE3_OUTPUT = sqlite3
+
+# The SQLITE3_OVERWRITE_DB tag is set to YES, the existing doxygen_sqlite3.db
+# database file will be recreated with each doxygen run. If set to NO, doxygen
+# will warn if an a database file is already found and not modify it.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
+
+SQLITE3_RECREATE_DB = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of
+# RECURSIVE has no effect here.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH = NewKernel/
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces
+# will be listed in the class and namespace index. If set to NO, only the
+# inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the topic index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to diagram generator tools
+#---------------------------------------------------------------------------
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
+# subgraphs. When you want a differently looking font in the dot files that
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
+# Edge and Graph Attributes specification</a> You need to make sure dot is able
+# to find the font, which can be done by putting it in a standard location or by
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font. Default graphviz fontsize is 14.
+# The default value is: fontname=Helvetica,fontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
+
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
+# arrows shapes.</a>
+# The default value is: labelfontname=Helvetica,labelfontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
+
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
+# around nodes set 'shape=plain' or 'shape=plaintext' <a
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
+# The default value is: shape=box,height=0.2,width=0.4.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
+
+# You can set the path where dot can find font specified with fontname in
+# DOT_COMMON_ATTR and others dot attributes.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will
+# generate a graph for each documented class showing the direct and indirect
+# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and
+# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case
+# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the
+# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.
+# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance
+# relations will be shown as texts / links.
+# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.
+# The default value is: YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes. Explicit enabling a collaboration graph,
+# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the
+# command \collaborationgraph. Disabling a collaboration graph can be
+# accomplished by means of the command \hidecollaborationgraph.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies. Explicit enabling a group
+# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means
+# of the command \groupgraph. Disabling a directory graph can be accomplished by
+# means of the command \hidegroupgraph. See also the chapter Grouping in the
+# manual.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+DOT_UML_DETAILS = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_WRAP_THRESHOLD = 17
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO,
+# can be accomplished by means of the command \includegraph. Disabling an
+# include graph can be accomplished by means of the command \hideincludegraph.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set
+# to NO, can be accomplished by means of the command \includedbygraph. Disabling
+# an included by graph can be accomplished by means of the command
+# \hideincludedbygraph.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories. Explicit enabling a directory graph, when
+# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command
+# \directorygraph. Disabling a directory graph can be accomplished by means of
+# the command \hidedirectorygraph.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
+# of child directories generated in directory dependency graphs by dot.
+# Minimum value: 1, maximum value: 25, default value: 1.
+# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
+
+DIR_GRAPH_MAX_DEPTH = 1
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# https://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file or to the filename of jar file
+# to be used. If left blank, it is assumed PlantUML is not used or called during
+# a preprocessing step. Doxygen will generate a warning when it encounters a
+# \startuml command in this case and will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
+# graphical representation for inheritance and collaboration diagrams is used.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
+# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc temporary
+# files.
+# The default value is: YES.
+
+DOT_CLEANUP = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will
+# use a built-in version of mscgen tool to produce the charts. Alternatively,
+# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,
+# specifying prog as the value, doxygen will call the tool as prog -T
+# <outfile_format> -o <outputfile> <inputfile>. The external tool should support
+# output file formats "png", "eps", "svg", and "ismap".
+
+MSCGEN_TOOL =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/ReadMe.md b/ReadMe.md
new file mode 100644
index 00000000..7bbdea32
--- /dev/null
+++ b/ReadMe.md
@@ -0,0 +1,29 @@
+<!-- README of NeKernel -->
+
+# New Kernel Architecture (NeKernel)
+
+NeKernel is designed for servers, desktop, mobile and workstations.
+
+## Requirements
+
+- MinGW/GCC for the Kernel, Boot Loader and the LibSCI.
+- Netwide Assembler for the x64 assembly files (in case you're compiling for AMD64).
+
+### Installation
+
+Clone repository:
+
+```
+git clone git@github.com:mediaswirl/nekernel.git
+cd kernel-services
+```
+
+</br>
+
+And then select the makefile (arm64 and amd64 are stable and EFI based) to execute:
+
+```
+make -f amd64-efi.make all
+```
+
+###### Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. All rights reserved.
diff --git a/boot b/boot
new file mode 120000
index 00000000..f791066d
--- /dev/null
+++ b/boot
@@ -0,0 +1 @@
+dev/Boot/ \ No newline at end of file
diff --git a/build_gcc.sh b/build_gcc.sh
new file mode 100644
index 00000000..ad04ecc8
--- /dev/null
+++ b/build_gcc.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+# This file should configure a freestanding mingw32 target if needed by the developer.
diff --git a/compile_flags.txt b/compile_flags.txt
new file mode 100644
index 00000000..564d29a8
--- /dev/null
+++ b/compile_flags.txt
@@ -0,0 +1,16 @@
+-Idev/Kernel
+-Idev/
+-Idev/LibSCI
+-Idev/Boot/
+-Iprivate/tools
+-Idev/Boot/BootKit
+-std=c++20
+-D__ZKA_AMD64__
+-D__MINOSKRNL__
+-D__FSKIT_INCLUDES_NEFS__
+-D__ZKA_ED__
+-xc++
+-D__AHCI__
+-D__x86_64__
+-D__aarch64__
+-DZKA_USE_MBCI_FLASH \ No newline at end of file
diff --git a/debug_ahci.sh b/debug_ahci.sh
new file mode 100755
index 00000000..de40043a
--- /dev/null
+++ b/debug_ahci.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export AHCI_SUPPORT=1
+export DEBUG_SUPPORT=1
+
+cd dev/Kernel
+make -f amd64-desktop.make all
+cd ../Boot
+make -f amd64-desktop.make all
+make -f amd64-desktop.make run-efi-amd64-ahci \ No newline at end of file
diff --git a/debug_ata.sh b/debug_ata.sh
new file mode 100755
index 00000000..d0b4dadd
--- /dev/null
+++ b/debug_ata.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export ATA_PIO_SUPPORT=1
+export DEBUG_SUPPORT=1
+
+cd dev/Kernel
+make -f amd64-desktop.make all
+cd ../Boot
+make -f amd64-desktop.make all
+make -f amd64-desktop.make run-efi-amd64-ata \ No newline at end of file
diff --git a/dev/Boot/BootKit/BitManip.h b/dev/Boot/BootKit/BitManip.h
new file mode 100644
index 00000000..08421d6e
--- /dev/null
+++ b/dev/Boot/BootKit/BitManip.h
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __BITMANIP_H__
+#define __BITMANIP_H__
+
+/// File: BitManip.h
+/// Purpose: Bit manipulation helpers, based on coreboot-dev.
+
+#define bk_set_bit(X, O) X = (1 << O) | X
+#define bk_clear_bit(X, O) X = ~(1 << O) & X
+#define bk_toogle(X, O) X = (1 << O) ^ X
+#define bk_lsb(X) X = X & -X
+#define bk_msb(X) X = -(mp_lsb(X)) & X
+#define bk_look_for_bit(X, O) (1 << O) | X
+
+#endif // ifndef __BITMANIP_H__
diff --git a/dev/Boot/BootKit/BootKit.h b/dev/Boot/BootKit/BootKit.h
new file mode 100644
index 00000000..5a537448
--- /dev/null
+++ b/dev/Boot/BootKit/BootKit.h
@@ -0,0 +1,398 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/***********************************************************************************/
+/// @file BootKit.h
+/// @brief Bootloader Application Programming Interface.
+/***********************************************************************************/
+
+#pragma once
+
+#include <BootKit/HW/ATA.h>
+#include <FirmwareKit/EPM.h>
+#include <CompilerKit/Version.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <BootKit/Rsrc/zka_disk.rsrc>
+#include <BootKit/Rsrc/zka_no_disk.rsrc>
+#include <BootKit/Rsrc/zka_has_disk.rsrc>
+
+/// include NeFS header and Support header as well.
+
+#include <FSKit/NeFS.h>
+#include <BootKit/Support.h>
+
+/***********************************************************************************/
+/// Include other APIs.
+/***********************************************************************************/
+
+#include <NewKit/Defines.h>
+#include <Mod/ATA/ATA.h>
+
+#include <FirmwareKit/EFI.h>
+
+/***********************************************************************************/
+/// Framebuffer helpers.
+/***********************************************************************************/
+
+namespace EFI
+{
+ EXTERN void ThrowError(const WideChar* errorCode,
+ const WideChar* reason) noexcept;
+} // namespace EFI
+
+namespace Boot
+{
+ class BTextWriter;
+ class BFileReader;
+ class BootThread;
+ class BVersionString;
+
+ typedef Char* PEFImagePtr;
+ typedef Char* PEImagePtr;
+
+ typedef WideChar CharacterTypeUTF16;
+ typedef Char CharacterTypeUTF8;
+
+ using namespace Kernel;
+
+ /**
+ * @brief BootKit Text Writer class
+ * Writes to UEFI StdOut.
+ */
+ class BTextWriter final
+ {
+ BTextWriter& _Write(const Long& num);
+
+ public:
+ BTextWriter& Write(const Long& num);
+ BTextWriter& Write(const Char* str);
+ BTextWriter& Write(const CharacterTypeUTF16* str);
+ BTextWriter& WriteCharacter(CharacterTypeUTF16 c);
+ BTextWriter& Write(const UChar* str);
+
+ template <typename T>
+ BTextWriter& operator<<(T elem)
+ {
+ this->Write(elem);
+ return *this;
+ }
+
+ public:
+ explicit BTextWriter() = default;
+ ~BTextWriter() = default;
+
+ public:
+ BTextWriter& operator=(const BTextWriter&) = default;
+ BTextWriter(const BTextWriter&) = default;
+ };
+
+ Kernel::SizeT BCopyMem(CharacterTypeUTF16* dest, CharacterTypeUTF16* src, const Kernel::SizeT len);
+
+ Kernel::SizeT BSetMem(CharacterTypeUTF8* src, const CharacterTypeUTF8 byte, const Kernel::SizeT len);
+
+ /// String length functions.
+
+ /// @brief get string length.
+ Kernel::SizeT BStrLen(const CharacterTypeUTF16* ptr);
+
+ /// @brief set memory with custom value.
+ Kernel::SizeT BSetMem(CharacterTypeUTF16* src, const CharacterTypeUTF16 byte, const Kernel::SizeT len);
+
+ /**
+ * @brief BootKit File Reader class
+ * Reads the Firmware Boot partition and filesystem.
+ */
+ class BFileReader final
+ {
+ public:
+ explicit BFileReader(const CharacterTypeUTF16* path,
+ EfiHandlePtr ImageHandle);
+ ~BFileReader();
+
+ public:
+ Void ReadAll(SizeT until, SizeT chunk = kib_cast(4), UIntPtr out_address = 0UL);
+
+ enum
+ {
+ kOperationOkay,
+ kNotSupported,
+ kEmptyDirectory,
+ kNoSuchEntry,
+ kIsDirectory,
+ kTooSmall,
+ kCount,
+ };
+
+ /// @brief error code getter.
+ /// @return the error code.
+ Int32& Error();
+
+ /// @brief blob getter.
+ /// @return the blob.
+ VoidPtr Blob();
+
+ /// @breif Size getter.
+ /// @return the size of the file.
+ UInt64& Size();
+
+ public:
+ BFileReader& operator=(const BFileReader&) = default;
+ BFileReader(const BFileReader&) = default;
+
+ private:
+ Int32 mErrorCode{kOperationOkay};
+ VoidPtr mBlob{nullptr};
+ CharacterTypeUTF16 mPath[kPathLen];
+ BTextWriter mWriter;
+ EfiFileProtocol* mFile{nullptr};
+ UInt64 mSizeFile{0};
+ EfiFileProtocol* mRootFs;
+ };
+
+ typedef UInt8* BlobType;
+
+ class BVersionString final
+ {
+ public:
+ static const CharacterTypeUTF8* The()
+ {
+ return BOOTLOADER_VERSION;
+ }
+ };
+
+ /***********************************************************************************/
+ /// Provide some useful processor features.
+ /***********************************************************************************/
+
+#ifdef __EFI_x86_64__
+
+ /***
+ * Common processor instructions.
+ */
+
+ EXTERN_C void rt_out8(UInt16 port, UInt8 value);
+ EXTERN_C void rt_out16(UInt16 port, UInt16 value);
+ EXTERN_C void rt_out32(UInt16 port, UInt32 value);
+ EXTERN_C UInt8 rt_in8(UInt16 port);
+ EXTERN_C UInt16 In16(UInt16 port);
+ EXTERN_C UInt32 rt_in32(UInt16 port);
+
+ EXTERN_C void rt_hlt();
+ EXTERN_C void rt_cli();
+ EXTERN_C void rt_sti();
+ EXTERN_C void rt_cld();
+ EXTERN_C void rt_std();
+
+#endif // __EFI_x86_64__
+
+ static inline const UInt32 kRgbRed = 0x000000FF;
+ static inline const UInt32 kRgbGreen = 0x0000FF00;
+ static inline const UInt32 kRgbBlue = 0x00FF0000;
+ static inline const UInt32 kRgbBlack = 0x00000000;
+ static inline const UInt32 kRgbWhite = 0x00FFFFFF;
+
+#define kBKBootFileMime "boot-x/file"
+#define kBKBootDirMime "boot-x/dir"
+
+ /// @brief BootKit Drive Formatter.
+ template <typename BootDev>
+ class BDiskFormatFactory final
+ {
+ public:
+ /// @brief File entry for **BDiskFormatFactory**.
+ struct BFileDescriptor final
+ {
+ Char fFileName[kNeFSNodeNameLen];
+ Int32 fKind;
+ };
+
+ public:
+ explicit BDiskFormatFactory() = default;
+ explicit BDiskFormatFactory(BootDev dev)
+ : fDiskDev(dev)
+ {
+ }
+
+ ~BDiskFormatFactory() = default;
+
+ ZKA_COPY_DELETE(BDiskFormatFactory);
+
+ /// @brief Format disk using partition name and blob_list.
+ /// @param Partition part_name the target partition name.
+ /// @param blob_list blobs array.
+ /// @param blob_cnt blobs array count.
+ /// @retval True disk has been formatted.
+ /// @retval False failed to format.
+ Boolean Format(const Char* part_name, BFileDescriptor* blob_list, SizeT blob_cnt);
+
+ /// @brief check if partition is good.
+ Bool IsPartitionValid() noexcept
+ {
+ fDiskDev.Leak().mBase = (kNeFSRootCatalogStartAddress);
+ fDiskDev.Leak().mSize = BootDev::kSectorSize;
+
+ Char buf[BootDev::kSectorSize] = {0};
+
+ fDiskDev.Read(buf, BootDev::kSectorSize);
+
+ NFS_ROOT_PARTITION_BLOCK* blockPart = reinterpret_cast<NFS_ROOT_PARTITION_BLOCK*>(buf);
+
+ BTextWriter writer;
+
+ for (SizeT indexMag = 0UL; indexMag < kNeFSIdentLen; ++indexMag)
+ {
+ if (blockPart->Ident[indexMag] != kNeFSIdent[indexMag])
+ return false;
+ }
+
+ if (blockPart->DiskSize != this->fDiskDev.GetDiskSize() ||
+ blockPart->DiskSize < 1 ||
+ blockPart->SectorSize != BootDev::kSectorSize ||
+ blockPart->Version != kNeFSVersionInteger ||
+ blockPart->StartCatalog == 0)
+ {
+ return false;
+ }
+ else if (blockPart->PartitionName[0] == 0)
+ {
+ return false;
+ }
+
+ writer.Write(L"BootZ: Partition: ").Write(blockPart->PartitionName).Write(L" is healthy.\r");
+
+ return true;
+ }
+
+ private:
+ /// @brief Write all of the requested catalogs into the filesystem.
+ /// @param blob_list the blobs.
+ /// @param blob_cnt the number of blobs to write.
+ /// @param part the NeFS partition block.
+ Boolean WriteCatalogList(BFileDescriptor* blob_list, SizeT blob_cnt, NFS_ROOT_PARTITION_BLOCK& part)
+ {
+ BFileDescriptor* blob = blob_list;
+ Lba startLba = part.StartCatalog;
+ BTextWriter writer;
+
+ NFS_CATALOG_STRUCT catalogKind{0};
+
+ constexpr auto cNeFSCatalogPadding = 4;
+
+ catalogKind.PrevSibling = startLba;
+ catalogKind.NextSibling = (startLba + sizeof(NFS_CATALOG_STRUCT) * cNeFSCatalogPadding);
+
+ /// Fill catalog kind.
+ catalogKind.Kind = blob->fKind;
+ catalogKind.Flags |= kNeFSFlagCreated;
+ catalogKind.CatalogFlags = kNeFSStatusUnlocked;
+
+ --part.FreeCatalog;
+ --part.FreeSectors;
+
+ CopyMem(catalogKind.Name, blob->fFileName, StrLen(blob->fFileName));
+
+ fDiskDev.Leak().mBase = startLba;
+ fDiskDev.Leak().mSize = sizeof(NFS_CATALOG_STRUCT);
+
+ fDiskDev.Write((Char*)&catalogKind, sizeof(NFS_CATALOG_STRUCT));
+
+ writer.Write(L"BootZ: Wrote directory: ").Write(blob->fFileName).Write(L"\r");
+
+ return true;
+ }
+
+ private:
+ BootDev fDiskDev;
+ };
+
+ /// @brief Format disk.
+ /// @param Partition Name
+ /// @param Blobs.
+ /// @param Number of blobs.
+ /// @retval True disk has been formatted.
+ /// @retval False failed to format.
+ template <typename BootDev>
+ inline Boolean BDiskFormatFactory<BootDev>::Format(const Char* part_name,
+ BDiskFormatFactory::BFileDescriptor* blob_list,
+ SizeT blob_cnt)
+ {
+ if (!blob_list || !blob_cnt)
+ return false; /// sanity check
+
+ /// @note A catalog roughly equal to a sector.
+
+ constexpr auto kMinimumDiskSize = kNeFSMinimumDiskSize; // at minimum.
+
+ /// @note also look at EPM headers, for free part blocks.
+
+ if (fDiskDev.GetDiskSize() < kMinimumDiskSize)
+ {
+ fb_init();
+
+ FBDrawBitMapInRegion(zka_no_disk, ZKA_NO_DISK_WIDTH, ZKA_NO_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - ZKA_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_NO_DISK_HEIGHT) / 2);
+ EFI::ThrowError(L"Drive-Too-Tiny", L"Can't format a NeFS partition here.");
+ return false;
+ }
+
+ NFS_ROOT_PARTITION_BLOCK part{0};
+
+ CopyMem(part.Ident, kNeFSIdent, kNeFSIdentLen - 1);
+ CopyMem(part.PartitionName, part_name, StrLen(part_name));
+
+ part.Version = kNeFSVersionInteger;
+ part.CatalogCount = blob_cnt;
+ part.Kind = kNeFSHardDrive;
+ part.SectorSize = 512;
+ part.FreeCatalog = fDiskDev.GetSectorsCount() / sizeof(NFS_CATALOG_STRUCT);
+ part.SectorCount = fDiskDev.GetSectorsCount();
+ part.FreeSectors = fDiskDev.GetSectorsCount();
+ part.StartCatalog = kNeFSCatalogStartAddress;
+ part.DiskSize = fDiskDev.GetDiskSize();
+ part.Flags = kNeFSPartitionTypeBoot | kNeFSPartitionTypeStandard;
+
+ fDiskDev.Leak().mBase = kNeFSRootCatalogStartAddress;
+ fDiskDev.Leak().mSize = sizeof(NFS_ROOT_PARTITION_BLOCK);
+
+ fDiskDev.Write((Char*)&part, sizeof(NFS_ROOT_PARTITION_BLOCK));
+
+ BTextWriter writer;
+
+ writer << "partition name: " << part.PartitionName << "\n";
+ writer << "start: " << part.StartCatalog << "\n";
+ writer << "number of catalogs: " << part.CatalogCount << "\n";
+ writer << "free catalog: " << part.FreeCatalog << "\n";
+ writer << "free sectors: " << part.FreeSectors << "\n";
+ writer << "sector size: " << part.SectorSize << "\n";
+
+#ifdef BOOTZ_EPM_SUPPORT
+ BOOT_BLOCK_STRUCT epm_boot{0};
+
+ const auto kFsName = "NeFS";
+ const auto kBlockName = "OS";
+
+ CopyMem(epm_boot.Fs, reinterpret_cast<VoidPtr>(const_cast<Char*>(kFsName)), StrLen(kFsName));
+
+ epm_boot.FsVersion = kNeFSVersionInteger;
+ epm_boot.LbaStart = kNeFSRootCatalogStartAddress;
+ epm_boot.LbaEnd = fDiskDev.GetDiskSize();
+ epm_boot.SectorSz = part.SectorSize;
+ epm_boot.Kind = kEPMZkaOS;
+ epm_boot.NumBlocks = part.CatalogCount;
+
+ CopyMem(epm_boot.Name, reinterpret_cast<VoidPtr>(const_cast<Char*>(kBlockName)), StrLen(kBlockName));
+ CopyMem(epm_boot.Magic, reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), StrLen(kEPMMagic));
+
+ fDiskDev.Leak().mBase = kEPMBootBlockLba; // always always resies at zero block.
+ fDiskDev.Leak().mSize = sizeof(BOOT_BLOCK_STRUCT);
+
+ fDiskDev.Write((Char*)&epm_boot, sizeof(BOOT_BLOCK_STRUCT));
+
+ writer.Write(L"BootZ: Drive has been formatted Successfully.\r");
+#endif
+
+ return YES;
+ }
+} // namespace Boot
diff --git a/dev/Boot/BootKit/BootThread.h b/dev/Boot/BootKit/BootThread.h
new file mode 100644
index 00000000..d310d830
--- /dev/null
+++ b/dev/Boot/BootKit/BootThread.h
@@ -0,0 +1,43 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/PE.h>
+#include <KernelKit/MSDOS.h>
+#include <FirmwareKit/Handover.h>
+
+namespace Boot
+{
+ using namespace Kernel;
+
+ class BootThread;
+
+ /// @brief Bootloader Thread class.
+ class BootThread final
+ {
+ public:
+ explicit BootThread() = delete;
+ ~BootThread() = default;
+
+ explicit BootThread(Kernel::VoidPtr blob);
+
+ BootThread& operator=(const BootThread&) = default;
+ BootThread(const BootThread&) = default;
+
+ Int32 Start(HEL::BootInfoHeader* handover, BOOL is_own_stack);
+ void SetName(const char* name);
+ const char* GetName();
+ bool IsValid();
+
+ private:
+ Char fBlobName[255] = {"BootThread"};
+ VoidPtr fStartAddress{nullptr};
+ VoidPtr fBlob{nullptr};
+ UInt8* fStack{nullptr};
+ HEL::BootInfoHeader* fHandover{nullptr};
+ };
+} // namespace Boot
diff --git a/dev/Boot/BootKit/Device.h b/dev/Boot/BootKit/Device.h
new file mode 100644
index 00000000..bbb0ce89
--- /dev/null
+++ b/dev/Boot/BootKit/Device.h
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Mod/ATA/ATA.h>
+#include <Mod/AHCI/AHCI.h>
+
+using namespace Kernel;
+
+/// @brief Device type.
+class Device
+{
+public:
+ explicit Device() = default;
+ virtual ~Device() = default;
+
+ ZKA_MOVE_DEFAULT(Device);
+
+ struct Trait
+ {
+ SizeT mBase{1024};
+ SizeT mSize{1024};
+ };
+
+ virtual Trait& Leak() = 0;
+
+ virtual Device& Read(Char* Buf, const SizeT& SecCount) = 0;
+ virtual Device& Write(Char* Buf, const SizeT& SecCount) = 0;
+};
+
+typedef Device BootDevice;
+typedef Device NetworkDevice;
+typedef Device DiskDevice;
diff --git a/dev/Boot/BootKit/EPM.h b/dev/Boot/BootKit/EPM.h
new file mode 100644
index 00000000..778f4f5f
--- /dev/null
+++ b/dev/Boot/BootKit/EPM.h
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <FirmwareKit/EPM.h>
diff --git a/dev/Boot/BootKit/HW/ATA.h b/dev/Boot/BootKit/HW/ATA.h
new file mode 100644
index 00000000..c58bbd61
--- /dev/null
+++ b/dev/Boot/BootKit/HW/ATA.h
@@ -0,0 +1,58 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Mod/ATA/ATA.h>
+#include <BootKit/Device.h>
+
+using namespace Kernel;
+
+class BootDeviceATA final : public Device
+{
+public:
+ enum
+ {
+ kPrimary = ATA_PRIMARY_IO,
+ kSecondary = ATA_SECONDARY_IO,
+ };
+
+ explicit BootDeviceATA() noexcept;
+ ~BootDeviceATA() = default;
+
+ ZKA_COPY_DELETE(BootDeviceATA);
+
+ enum
+ {
+ kSectorSize = kATASectorSize
+ };
+
+ struct ATATrait final : public Device::Trait
+ {
+ UInt16 mBus{kPrimary};
+ UInt8 mMaster{0};
+ Boolean mErr{false};
+
+ operator bool()
+ {
+ return !mErr;
+ }
+ };
+
+public:
+ operator bool();
+
+ SizeT GetSectorsCount() noexcept;
+ SizeT GetDiskSize() noexcept;
+
+ BootDeviceATA& Read(Char* Buf, const SizeT& SecCount) override;
+ BootDeviceATA& Write(Char* Buf, const SizeT& SecCount) override;
+
+ ATATrait& Leak() override;
+
+private:
+ ATATrait mTrait;
+};
diff --git a/dev/Boot/BootKit/HW/SATA.h b/dev/Boot/BootKit/HW/SATA.h
new file mode 100644
index 00000000..a7ece124
--- /dev/null
+++ b/dev/Boot/BootKit/HW/SATA.h
@@ -0,0 +1,46 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <Mod/AHCI/AHCI.h>
+
+class BootDeviceSATA final
+{
+public:
+ explicit BootDeviceSATA() noexcept;
+ ~BootDeviceSATA() = default;
+
+ ZKA_COPY_DEFAULT(BootDeviceSATA);
+
+ struct SATATrait final
+ {
+ Kernel::SizeT mBase{1024};
+ Kernel::Boolean mErr{false};
+ Kernel::Boolean mDetected{false};
+
+ operator bool()
+ {
+ return !this->mErr;
+ }
+ };
+
+ operator bool()
+ {
+ return this->Leak().mDetected;
+ }
+
+ BootDeviceSATA& Read(Kernel::WideChar* Buf, const Kernel::SizeT& SecCount);
+ BootDeviceSATA& Write(Kernel::WideChar* Buf, const Kernel::SizeT& SecCount);
+
+ SATATrait& Leak();
+
+private:
+ SATATrait mTrait;
+};
+
+#define kAHCISectorSz 4096
diff --git a/dev/Boot/BootKit/Platform.h b/dev/Boot/BootKit/Platform.h
new file mode 100644
index 00000000..517c0b57
--- /dev/null
+++ b/dev/Boot/BootKit/Platform.h
@@ -0,0 +1,32 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/**
+ @file Platform.h
+ @brief Platform specific code.
+*/
+
+#ifdef __x86_64__
+
+#ifdef __cplusplus
+#ifndef EXTERN_C
+#define EXTERN_C extern "C"
+#endif
+#else
+#ifndef EXTERN_C
+#define EXTERN_C extern
+#endif
+#endif // __cplusplus
+
+EXTERN_C void rt_halt();
+EXTERN_C void rt_cli();
+EXTERN_C void rt_sti();
+EXTERN_C void rt_cld();
+EXTERN_C void rt_std();
+
+#endif /* ifdef __x86_64__ */
diff --git a/dev/Boot/BootKit/Protocol.h b/dev/Boot/BootKit/Protocol.h
new file mode 100644
index 00000000..4bb16649
--- /dev/null
+++ b/dev/Boot/BootKit/Protocol.h
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <FirmwareKit/EFI.h>
+#include <FirmwareKit/Handover.h>
diff --git a/dev/Boot/BootKit/Rsrc/zka_disk.rsrc b/dev/Boot/BootKit/Rsrc/zka_disk.rsrc
new file mode 100644
index 00000000..ce980b7b
--- /dev/null
+++ b/dev/Boot/BootKit/Rsrc/zka_disk.rsrc
@@ -0,0 +1,116 @@
+#define ZKA_DISK_HEIGHT 110
+#define ZKA_DISK_WIDTH 110
+
+// array size is 36300
+static const unsigned int zka_disk[] = {
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x333333, 0x565656, 0x636363, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6a6a6a, 0x5f5f5f, 0x4d4d4d, 0x2b2b2b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x6a6a6a, 0x3b3b3b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3d3d3d, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x252525, 0x676767, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x606060, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x3d3d3d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x616161, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x525252, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x242424, 0x767676, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7e7e7e, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4e4e4e, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x3f3f3f, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x666666, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x555555, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x222222, 0x7c7c7c, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x6d6d6d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x868686, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x515151, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x404040, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6a6a6a, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x828282, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x727272, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x383838, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x8e8e8e, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x414141, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6e6e6e, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x5c5c5c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x868686, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x787878, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x373737, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x959595, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0x444444, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x707070, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0x5e5e5e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8b8b8b, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0x7c7c7c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x363636, 0xa7a7a7, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0x9c9c9c, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0x636363, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8e8e8e, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0x818181, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x343434, 0xacacac, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xa3a3a3, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x909090, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0x868686, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x313131, 0xb0b0b0, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xa9a9a9, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0x494949, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0x6a6a6a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x929292, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0x8c8c8c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2e2e2e, 0xb4b4b4, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xafafaf, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x505050, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0x4b4b4b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0x6e6e6e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x939393, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0x929292, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2a2a2a, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x464646, 0x464646, 0x454545, 0x454545, 0x454545, 0x454545, 0x444444, 0x444444, 0x444444, 0x444444, 0x434343, 0x434343, 0x434343, 0x434343, 0x424242, 0x424242, 0x424242, 0x414141, 0x414141, 0x414141, 0x414141, 0x404040, 0x404040, 0x404040, 0x404040, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0x3b3b3b, 0x3b3b3b, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x393939, 0x393939, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x343434, 0x343434, 0x343434, 0x343434, 0x333333, 0x333333, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x868686, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa3a3a3, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x999999, 0x979797, 0x979797, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa3a3a3, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x999999, 0x979797, 0x979797, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xc6c6c6, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x868686, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x565656, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x9a9a9a, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa3a3a3, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x797979, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x999999, 0x979797, 0x979797, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x353535, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xbfbfbf, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x7f7f7f, 0xbababa, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x626262, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3a3a3a, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x464646, 0x464646, 0x454545, 0x454545, 0x454545, 0x454545, 0x444444, 0x444444, 0x444444, 0x444444, 0x434343, 0x434343, 0x434343, 0x424242, 0x424242, 0x424242, 0x424242, 0x414141, 0x414141, 0x414141, 0x414141, 0x404040, 0x404040, 0x404040, 0x404040, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0x3b3b3b, 0x3b3b3b, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x393939, 0x393939, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x272727, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020
+}; \ No newline at end of file
diff --git a/dev/Boot/BootKit/Rsrc/zka_has_disk.rsrc b/dev/Boot/BootKit/Rsrc/zka_has_disk.rsrc
new file mode 100644
index 00000000..bdc0bb99
--- /dev/null
+++ b/dev/Boot/BootKit/Rsrc/zka_has_disk.rsrc
@@ -0,0 +1,116 @@
+#define ZKA_HAS_DISK_HEIGHT 110
+#define ZKA_HAS_DISK_WIDTH 110
+
+// array size is 36300
+static const unsigned int zka_has_disk[] = {
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x333333, 0x565656, 0x636363, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6a6a6a, 0x5f5f5f, 0x4d4d4d, 0x2b2b2b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x6a6a6a, 0x3b3b3b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3d3d3d, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x252525, 0x676767, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x606060, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x3d3d3d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x616161, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x525252, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x242424, 0x767676, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7e7e7e, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4e4e4e, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x3f3f3f, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x666666, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x555555, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x222222, 0x7c7c7c, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x6d6d6d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x868686, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x515151, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x404040, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6a6a6a, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x89948e, 0x7ba08a, 0x6eaa87, 0x6cab87, 0x6cab87, 0x6caa87, 0x6caa87, 0x6da888, 0x799f8a, 0x89938e, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x828282, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x8c9590, 0x72ab88, 0x61b883, 0x52c37f, 0x4bc87e, 0x4ac77e, 0x4ac67e, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c37f, 0x46c17f, 0x46c180, 0x45c07f, 0x4cba82, 0x5cb085, 0x6fa58a, 0x8c9490, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x727272, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x383838, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x899d90, 0x69b686, 0x4ecb7e, 0x4dca7e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x47c37f, 0x47c280, 0x46c180, 0x46c080, 0x45bf80, 0x44bf81, 0x43be81, 0x43bd81, 0x42bc81, 0x62ac89, 0x869a91, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x8e8e8e, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x86a390, 0x61be83, 0x4ecb7d, 0x4dca7d, 0x4cca7e, 0x4bc87e, 0x4bc87e, 0x4ac77e, 0x4ac67e, 0x49c57e, 0x48c47f, 0x48c37f, 0x47c37f, 0x46c17f, 0x46c180, 0x45c080, 0x45bf80, 0x44be80, 0x43bd80, 0x42bc80, 0x42bc81, 0x41ba81, 0x41ba81, 0x40b981, 0x57af87, 0x839d92, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x414141, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6e6e6e, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x929e96, 0x68bb87, 0x4fcd7e, 0x4ecc7d, 0x4ecb7e, 0x4dca7e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x4ac67f, 0x49c57f, 0x48c480, 0x47c380, 0x47c280, 0x46c180, 0x46c080, 0x45bf80, 0x44bf81, 0x43be81, 0x43bd81, 0x42bc81, 0x42bb82, 0x41ba82, 0x40b982, 0x40b882, 0x3fb882, 0x3eb782, 0x5fab8b, 0x919b97, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x5c5c5c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x868686, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x88a893, 0x55c97f, 0x4ecc7d, 0x4ecb7d, 0x4dca7d, 0x4cc97e, 0x4bc87e, 0x4bc87e, 0x4ac77e, 0x4ac67e, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x46c180, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x42bc80, 0x42bb81, 0x41ba81, 0x41ba81, 0x40b981, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3db482, 0x45b185, 0x83a195, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x787878, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x373737, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x7bb48f, 0x4fcd7d, 0x4fcc7d, 0x4ecb7d, 0x4dcb7e, 0x4cca7e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x49c57f, 0x49c47f, 0x48c480, 0x47c37f, 0x47c280, 0x46c180, 0x46c080, 0x45bf80, 0x44bf81, 0x43bd81, 0x43bd81, 0x42bc81, 0x42bb82, 0x41ba82, 0x40b982, 0x3fb882, 0x3fb882, 0x3eb682, 0x3eb683, 0x3db583, 0x3cb483, 0x3cb383, 0x3bb284, 0x74a693, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x959595, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0x76b88e, 0x4fcd7d, 0x4ecc7d, 0x4ecb7d, 0x4dca7d, 0x4cca7e, 0x4bc87e, 0x4bc87e, 0x4ac77e, 0x4ac67f, 0x49c57e, 0x48c47f, 0x48c37f, 0x47c37f, 0x46c17f, 0x46c180, 0x45c080, 0x45bf80, 0x44be80, 0x43bd81, 0x42bc81, 0x42bc81, 0x41ba81, 0x41ba81, 0x40b981, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3db583, 0x3cb383, 0x3bb383, 0x3ab283, 0x3ab183, 0x39b083, 0x6fa893, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0x444444, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x707070, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0x79ba90, 0x4fcd7d, 0x4fcd7e, 0x4ecb7e, 0x4dcb7e, 0x4dca7e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x4ac67f, 0x49c47f, 0x48c480, 0x47c380, 0x47c280, 0x46c180, 0x46c080, 0x45bf80, 0x44bf81, 0x43bd81, 0x43bd81, 0x42bc81, 0x42bb82, 0x41ba82, 0x40b982, 0x40b882, 0x3fb883, 0x3eb682, 0x3eb683, 0x3db583, 0x3cb483, 0x3cb383, 0x3bb284, 0x3ab184, 0x3ab184, 0x39af84, 0x38af85, 0x6da894, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0x5e5e5e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8b8b8b, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0x7db892, 0x4fcd7d, 0x4ecc7d, 0x4ecb7d, 0x4dca7d, 0x4cc97e, 0x4bc87e, 0x4bc87e, 0x4ac67e, 0x4ac67e, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x46c180, 0x45bf80, 0x44bf80, 0x43be80, 0x43bd80, 0x42bc80, 0x42bb81, 0x41ba81, 0x40ba81, 0x3fb881, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3cb482, 0x3cb382, 0x3bb383, 0x3ab183, 0x3ab183, 0x39b083, 0x39af84, 0x38ae84, 0x37ad84, 0x36ac84, 0x74a897, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0x7c7c7c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x363636, 0xa7a7a7, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0x90b39d, 0x4fcd7d, 0x4fcc7d, 0x4ecb7d, 0x4dcb7e, 0x4cc97e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c480, 0x47c27f, 0x47c280, 0x46c180, 0x45c080, 0x44bf80, 0x44be81, 0x43bd81, 0x43bd81, 0x42bb81, 0x41bb82, 0x41ba82, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3eb683, 0x3db483, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x3ab084, 0x39af84, 0x38af84, 0x37ad84, 0x37ad85, 0x36ac85, 0x36ab85, 0x8aa99f, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0x9c9c9c, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xa2afa6, 0x56ca80, 0x4ecc7d, 0x4ecb7d, 0x4dca7d, 0x4cc97e, 0x4bc87e, 0x4bc87e, 0x4ac67e, 0x4ac67f, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x46c180, 0x45bf80, 0x44bf80, 0x43be80, 0x43bd81, 0x42bc81, 0x42bb81, 0x41ba81, 0x40ba81, 0x40b881, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3db483, 0x3cb383, 0x3bb383, 0x3ab183, 0x3ab183, 0x39b083, 0x39af84, 0x38ae84, 0x37ad84, 0x36ac84, 0x36ac85, 0x35ab85, 0x35aa85, 0x3ea988, 0xa2aba8, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0x70c28e, 0x4fcc7e, 0x4ecb7e, 0x4dcb7e, 0x4cca7e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c480, 0x47c380, 0x47c280, 0x46c180, 0x45c080, 0x45bf80, 0x44be81, 0x43bd81, 0x43bd81, 0x42bc81, 0x42bb82, 0x41ba82, 0x40b982, 0x3fb882, 0x3fb783, 0x3eb682, 0x3eb683, 0x3db583, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x3ab084, 0x39af84, 0x38af85, 0x38ae85, 0x37ad85, 0x36ac85, 0x36ab85, 0x35aa85, 0x34a986, 0x34a886, 0x63aa96, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0x636363, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8e8e8e, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0x9bb6a5, 0x4ecc7d, 0x4dcb7d, 0x4cca7d, 0x4cc97e, 0x4bc87e, 0x4bc77e, 0x4ac67e, 0x49c67e, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x46c080, 0x45bf80, 0x44bf80, 0x43be80, 0x43bd81, 0x42bc80, 0x42bb81, 0x41ba81, 0x40b981, 0x3fb881, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x3ab183, 0x39b083, 0x38af84, 0x37ae84, 0x37ad84, 0x36ac84, 0x36ab85, 0x35aa85, 0x34aa85, 0x34a985, 0x33a885, 0x32a785, 0x32a686, 0x9baea9, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0x818181, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x343434, 0xacacac, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0x68c68b, 0x4ecb7d, 0x4dcb7e, 0x4cc97e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c480, 0x47c27f, 0x47c280, 0x46c180, 0x45c080, 0x44bf80, 0x44be81, 0x43bd81, 0x43bd81, 0x42bb81, 0x41bb82, 0x41ba82, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3eb683, 0x3db483, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x3ab084, 0x39af84, 0x38af85, 0x37ad84, 0x37ad85, 0x36ac85, 0x36ab85, 0x35aa85, 0x34a986, 0x33a886, 0x33a886, 0x32a686, 0x32a687, 0x57a993, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xa3a3a3, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xa0baaa, 0x4dcb7d, 0x4dca7d, 0x4cc97e, 0x4bc87e, 0x4bc77e, 0x4ac67e, 0x4ac67f, 0x49c57e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x46c080, 0x45bf80, 0x44bf80, 0x43be80, 0x43bd81, 0x42bc81, 0x42bb81, 0x41ba81, 0x40b981, 0x3fb881, 0x3fb882, 0x3eb782, 0x3eb682, 0x3db582, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x3ab184, 0x39b083, 0x38af84, 0x38ae84, 0x37ad84, 0x36ac84, 0x36ab85, 0x35aa85, 0x35aa85, 0x34a985, 0x33a886, 0x32a786, 0x32a686, 0x31a586, 0x31a486, 0x30a386, 0x9eb2ad, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0x72c592, 0x4dcb7e, 0x4cc97e, 0x4cc97e, 0x4bc87e, 0x4bc77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c480, 0x47c280, 0x47c280, 0x46c180, 0x45c080, 0x45bf81, 0x44be81, 0x43bd81, 0x43bd81, 0x42bb81, 0x42bb82, 0x41ba82, 0x40b982, 0x3fb882, 0x3fb783, 0x3eb682, 0x3eb683, 0x3db483, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x3ab084, 0x39af84, 0x38af85, 0x37ad85, 0x37ad85, 0x36ac85, 0x36ab85, 0x35aa85, 0x34a986, 0x33a886, 0x33a886, 0x32a686, 0x32a687, 0x31a587, 0x30a487, 0x30a387, 0x60aa99, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x909090, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xb3bbb6, 0x50c97f, 0x4cc97e, 0x4bc87e, 0x4bc77e, 0x4ac67e, 0x49c57e, 0x48c47e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x43bd81, 0x42bc80, 0x41bb81, 0x41ba81, 0x40b981, 0x3fb881, 0x3fb782, 0x3eb682, 0x3eb682, 0x3db582, 0x3cb482, 0x3bb383, 0x3bb283, 0x3ab183, 0x3ab083, 0x39af83, 0x38af84, 0x37ae84, 0x51b894, 0x8ed1b9, 0x50b694, 0x35aa85, 0x34a985, 0x33a885, 0x33a885, 0x32a785, 0x32a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa387, 0x2ea187, 0x32a289, 0xb4b9b8, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0x868686, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x313131, 0xb0b0b0, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0x92c2a5, 0x4cc97e, 0x4cc97e, 0x4bc77e, 0x4ac77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c380, 0x47c27f, 0x46c280, 0x46c080, 0x45c080, 0x44bf80, 0x44be81, 0x43bd81, 0x43bc81, 0x42bb81, 0x41bb82, 0x40ba82, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3db583, 0x3cb483, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x39b084, 0x39af84, 0x38ae85, 0x6bc3a4, 0xf4fcf6, 0xfbfffa, 0xf3fbf5, 0x54b797, 0x34a986, 0x33a886, 0x33a786, 0x32a686, 0x31a686, 0x31a587, 0x30a487, 0x2fa387, 0x2fa287, 0x2ea187, 0x2ea088, 0x86b2a9, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xa9a9a9, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0x74c695, 0x4bc87e, 0x4bc77e, 0x4ac67e, 0x49c67f, 0x48c47f, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x45c080, 0x45bf80, 0x44bf80, 0x43bd80, 0x43bd81, 0x42bc81, 0x42bb81, 0x41ba81, 0x40b981, 0x3fb881, 0x3fb882, 0x3eb682, 0x3eb682, 0x3db582, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x3ab184, 0x39af83, 0x38af84, 0x37ae84, 0x6ac3a3, 0xf4fcf5, 0xfafff8, 0xfafff8, 0xfafff8, 0x9ed7c3, 0x33a886, 0x32a786, 0x32a686, 0x31a586, 0x30a486, 0x30a386, 0x2fa387, 0x2ea187, 0x2ea187, 0x2da087, 0x2d9f88, 0x61aa9c, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0x494949, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0x57c885, 0x4bc77e, 0x4ac77f, 0x4ac67f, 0x49c57f, 0x48c47f, 0x48c380, 0x47c280, 0x47c280, 0x46c080, 0x45c080, 0x44bf80, 0x44be81, 0x43bd81, 0x43bc81, 0x42bb81, 0x41bb82, 0x40b982, 0x40b982, 0x3fb882, 0x3fb783, 0x3eb683, 0x3db583, 0x3db483, 0x3cb483, 0x3bb383, 0x3bb284, 0x3ab184, 0x3ab084, 0x39af84, 0x38ae85, 0x6ac3a3, 0xf5fdf5, 0xf9fff7, 0xf9fff7, 0xf9fff7, 0xf9fff6, 0x83cbb4, 0x33a786, 0x32a686, 0x32a687, 0x31a587, 0x30a487, 0x2fa387, 0x2fa288, 0x2ea187, 0x2ea088, 0x2d9f88, 0x2c9f88, 0x3ea28f, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0x6a6a6a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x929292, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xb9c4be, 0x4bc77e, 0x4ac67e, 0x49c57e, 0x48c47e, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x43bd81, 0x42bc80, 0x41bb81, 0x41ba81, 0x40b981, 0x3fb881, 0x3fb782, 0x3eb682, 0x3db682, 0x3db582, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x39b083, 0x39af83, 0x38af84, 0x37ae84, 0x6ac2a2, 0xf1fcf2, 0xf8fff5, 0xf7fff5, 0xf7fff5, 0xf7fff4, 0xc3e8d7, 0x36a987, 0x32a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2a9c88, 0xbcc2c1, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0x8c8c8c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2e2e2e, 0xb4b4b4, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xa9c7b6, 0x4ac77f, 0x49c67f, 0x49c57f, 0x48c47f, 0x48c380, 0x47c280, 0x46c180, 0x46c080, 0x45c080, 0x44bf80, 0x44be81, 0x43bd81, 0x43bc81, 0x42bb81, 0x41ba82, 0x40b982, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3db583, 0x3cb483, 0x3cb383, 0x3bb283, 0x3bb284, 0x3ab184, 0x39b084, 0x38af84, 0x38ae85, 0x69c2a1, 0xf2fcf1, 0xf7fff4, 0xf7fff4, 0xf7fff3, 0xf7fff3, 0xc4e8d7, 0x39aa89, 0x32a686, 0x31a587, 0x31a487, 0x30a487, 0x2fa387, 0x2fa287, 0x2ea187, 0x2ea088, 0x2d9f88, 0x2c9e88, 0x2b9d88, 0x2b9d89, 0x2a9c89, 0xa6beba, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xafafaf, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x505050, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0x99c8ad, 0x49c57f, 0x48c47f, 0x48c47f, 0x47c37f, 0x47c27f, 0x46c17f, 0x45c080, 0x45bf80, 0x44bf80, 0x43bd80, 0x43bd81, 0x42bc81, 0x41bb81, 0x4cbe88, 0x6dca9e, 0x40b882, 0x3fb882, 0x3eb682, 0x3db682, 0x3db582, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x3ab184, 0x39af83, 0x38af84, 0x37ae84, 0x69c2a1, 0xeffcef, 0xf6fff3, 0xf5fff2, 0xf5fff2, 0xf5fff1, 0xc3e8d5, 0x39aa8a, 0x32a686, 0x31a586, 0x30a486, 0x30a386, 0x2fa387, 0x2ea187, 0x2ea187, 0x2da087, 0x2d9f88, 0x2c9e88, 0x2b9d88, 0x2a9c88, 0x2a9c89, 0x299a88, 0x93bab4, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0x4b4b4b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0x93caab, 0x49c57f, 0x48c47f, 0x48c380, 0x47c280, 0x47c280, 0x46c080, 0x45c081, 0x44bf81, 0x44be81, 0x43bd81, 0x43bc81, 0x42bb81, 0x63c898, 0xe7f8ec, 0xf9fff7, 0xcdeedb, 0x4bbc8b, 0x3eb683, 0x3db583, 0x3cb483, 0x3cb483, 0x3bb283, 0x3bb284, 0x3ab184, 0x39b084, 0x38af84, 0x38ae85, 0x65c1a0, 0xeffcee, 0xf5fff1, 0xf5fff1, 0xf5fff1, 0xf5fff1, 0xc2e8d5, 0x3aaa8a, 0x32a686, 0x32a687, 0x31a487, 0x30a487, 0x2fa387, 0x2fa288, 0x2ea187, 0x2ea088, 0x2d9f88, 0x2c9f88, 0x2b9d88, 0x2b9d89, 0x2a9c89, 0x2a9b89, 0x299a89, 0x89b8b1, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0x6e6e6e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x939393, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0x8cc9a7, 0x48c47f, 0x47c27f, 0x46c27f, 0x46c17f, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x43bd81, 0x42bb80, 0x41bb81, 0x40ba81, 0xb8e6cd, 0xf7fff5, 0xf7fff5, 0xf7fff4, 0xd2f1de, 0x48b989, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x39b083, 0x39af83, 0x38af84, 0x37ad84, 0x64c19e, 0xecfbec, 0xf4fff0, 0xf3ffef, 0xf3ffef, 0xf3ffee, 0xc5ead5, 0x3aa989, 0x31a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2ea187, 0x2d9f87, 0x2c9f87, 0x2b9e87, 0x2b9d88, 0x2a9c88, 0x2a9b88, 0x299a88, 0x289a89, 0x279889, 0x81b5ae, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0x929292, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2a2a2a, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0x79b493, 0x48c380, 0x47c280, 0x46c180, 0x45c080, 0x45c080, 0x44be80, 0x44be81, 0x43bd81, 0x42bc81, 0x41bb81, 0x41ba82, 0x40b982, 0xb9e7cd, 0xf7fff3, 0xf7fff3, 0xf6fff3, 0xf6fff3, 0xd0f0db, 0x47b78a, 0x3bb283, 0x3bb284, 0x3ab084, 0x39b084, 0x38af84, 0x38ae85, 0x65c19e, 0xedfceb, 0xf3ffee, 0xf3ffee, 0xf2ffee, 0xf2ffee, 0xc3ead4, 0x3aaa8a, 0x32a686, 0x31a587, 0x30a487, 0x30a487, 0x2fa287, 0x2fa287, 0x2ea187, 0x2da088, 0x2c9f88, 0x2c9e88, 0x2b9d88, 0x2b9d89, 0x2a9b89, 0x299b89, 0x299a89, 0x289989, 0x279889, 0x699f98, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x316749, 0x47c280, 0x46c17f, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x43bd81, 0x42bb81, 0x41bb81, 0x40ba81, 0x40b981, 0x3fb881, 0x59c192, 0xebfbeb, 0xf5fff1, 0xf4fff1, 0xf4fff1, 0xf4fff0, 0xcceed8, 0x43b588, 0x39b084, 0x39af83, 0x38af84, 0x37ad84, 0x65c19e, 0xebfce9, 0xf2ffed, 0xf1ffec, 0xf1ffec, 0xf1ffec, 0xc2ead3, 0x39a98a, 0x32a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2ea187, 0x2d9f87, 0x2c9f88, 0x2b9e88, 0x2b9d88, 0x2a9c88, 0x2a9b89, 0x299a88, 0x289a89, 0x289889, 0x279889, 0x269789, 0x22524d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2f5d44, 0x46c180, 0x45c080, 0x45c081, 0x44bf81, 0x44be81, 0x43bd81, 0x42bc81, 0x42bb81, 0x41ba82, 0x40b982, 0x40b982, 0x3fb882, 0x3fb783, 0x62c498, 0xe9fbe9, 0xf4ffef, 0xf3ffef, 0xf3ffef, 0xf3ffee, 0xcbeed7, 0x42b489, 0x38af84, 0x38ae85, 0x63c09d, 0xeafce8, 0xf1ffec, 0xf1ffec, 0xf0ffeb, 0xf0ffeb, 0xc3ebd3, 0x3aaa8a, 0x32a686, 0x31a587, 0x30a487, 0x30a487, 0x2fa387, 0x2fa288, 0x2ea187, 0x2da088, 0x2d9f88, 0x2c9e88, 0x2b9d88, 0x2b9d89, 0x2a9c89, 0x2a9b89, 0x299a89, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x224a46, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x294838, 0x45c080, 0x44bf80, 0x44be80, 0x43bd80, 0x43bc81, 0x42bb81, 0x41bb81, 0x40ba81, 0x40b981, 0x3fb881, 0x3fb782, 0x3eb682, 0x3db582, 0x3cb482, 0x60c398, 0xe7fae7, 0xf2ffed, 0xf1ffec, 0xf1ffec, 0xf1ffeb, 0xc9edd5, 0x3eb088, 0x63c09c, 0xe8fbe6, 0xefffea, 0xefffe9, 0xefffe9, 0xeeffe9, 0xc2ead1, 0x39a989, 0x31a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2ea087, 0x2d9f87, 0x2c9f88, 0x2b9e88, 0x2b9d88, 0x2a9c88, 0x2a9b88, 0x299a88, 0x289989, 0x279889, 0x279889, 0x269789, 0x26968a, 0x25958a, 0x213a38, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x24302a, 0x45c081, 0x44be80, 0x44be81, 0x43bd81, 0x42bc81, 0x41bb81, 0x41ba82, 0x40b982, 0x40b982, 0x3fb782, 0x3eb783, 0x3db683, 0x3db583, 0x3cb483, 0x3cb383, 0x61c299, 0xe9fce7, 0xf0ffeb, 0xf0ffeb, 0xf0ffea, 0xf0ffea, 0xc9eed5, 0xe9fce6, 0xefffe9, 0xefffe9, 0xeeffe8, 0xeeffe8, 0xc1ead0, 0x3aaa8a, 0x32a686, 0x31a587, 0x30a487, 0x30a487, 0x2fa287, 0x2fa287, 0x2ea187, 0x2da088, 0x2c9f88, 0x2c9e88, 0x2b9d88, 0x2b9d89, 0x2a9b89, 0x299b89, 0x299a89, 0x28998a, 0x279889, 0x27978a, 0x26968a, 0x25968a, 0x25948a, 0x202928, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x41b279, 0x43bd80, 0x43bc81, 0x42bb81, 0x41bb81, 0x40ba81, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3db582, 0x3cb482, 0x3cb483, 0x3bb383, 0x3bb283, 0x3ab183, 0x60c19a, 0xe6fbe4, 0xeeffe9, 0xeeffe8, 0xeeffe8, 0xedffe7, 0xedffe7, 0xedffe7, 0xedffe6, 0xecffe6, 0xc1eacf, 0x39a98a, 0x32a686, 0x31a586, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2ea087, 0x2d9f87, 0x2c9f88, 0x2b9e88, 0x2b9d88, 0x2a9c88, 0x2a9b89, 0x299a88, 0x289989, 0x279889, 0x279889, 0x269789, 0x26968a, 0x25958a, 0x24948a, 0x238880, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x44976e, 0x43bd81, 0x42bc81, 0x42bb81, 0x41ba82, 0x40b982, 0x40b982, 0x3fb782, 0x3eb783, 0x3eb683, 0x3db583, 0x3cb483, 0x3cb384, 0x3bb283, 0x3ab284, 0x3ab084, 0x39b084, 0x5fc099, 0xe5fbe3, 0xedffe7, 0xedffe7, 0xedffe6, 0xedffe6, 0xecffe5, 0xecffe5, 0xc0ebce, 0x3aaa8a, 0x32a686, 0x31a587, 0x30a487, 0x30a487, 0x2fa287, 0x2fa288, 0x2ea188, 0x2da088, 0x2d9f88, 0x2c9e88, 0x2b9d88, 0x2b9d89, 0x2a9b89, 0x2a9b89, 0x299a89, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x26968a, 0x25948a, 0x24948b, 0x2b726d, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x343434, 0x343434, 0x343434, 0x343434, 0x333333, 0x333333, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0x86b9a0, 0x41bb81, 0x41ba81, 0x40b981, 0x40b981, 0x3fb881, 0x3eb782, 0x3eb682, 0x3db582, 0x3cb482, 0x3cb383, 0x3bb283, 0x3bb283, 0x3ab183, 0x39b083, 0x38af83, 0x38ae84, 0x37ad84, 0x5ebe99, 0xe3fbe0, 0xebffe4, 0xebffe3, 0xebffe3, 0xeaffe3, 0xc3eccf, 0x39a989, 0x31a586, 0x30a486, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9d88, 0x2a9c88, 0x299b88, 0x299a88, 0x289989, 0x279889, 0x279789, 0x269689, 0x26968a, 0x25958a, 0x24948a, 0x23938a, 0x23928a, 0x5f8986, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xaeb8b3, 0x43bb82, 0x41ba82, 0x40b982, 0x40b882, 0x3fb782, 0x3eb783, 0x3db583, 0x3db583, 0x3cb483, 0x3cb383, 0x3bb283, 0x3ab184, 0x39b084, 0x39b084, 0x38ae84, 0x38ae85, 0x37ad85, 0x36ac85, 0x5cbd99, 0xe3fcdf, 0xeaffe2, 0xeaffe2, 0xc2ecce, 0x3bab8a, 0x31a686, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2ea287, 0x2ea087, 0x2da088, 0x2c9f88, 0x2c9e88, 0x2b9d88, 0x2b9c89, 0x2a9b89, 0x299b89, 0x289989, 0x28998a, 0x279889, 0x27978a, 0x26968a, 0x25958a, 0x24948a, 0x24948b, 0x23928b, 0x26928b, 0x808584, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0x64b891, 0x40b982, 0x3fb882, 0x3fb782, 0x3eb682, 0x3db582, 0x3cb482, 0x3cb483, 0x3bb283, 0x3bb283, 0x3ab183, 0x39b084, 0x38af84, 0x38ae84, 0x37ad84, 0x37ad84, 0x36ab84, 0x35ab85, 0x34aa85, 0x55b996, 0x8ed3b3, 0x85cfaf, 0x38a989, 0x31a686, 0x30a486, 0x30a486, 0x2fa386, 0x2fa287, 0x2ea187, 0x2da087, 0x2d9f87, 0x2c9f88, 0x2b9d88, 0x2b9d88, 0x2a9c88, 0x2a9b89, 0x299a88, 0x289989, 0x279889, 0x279889, 0x269689, 0x26968a, 0x25958a, 0x24948a, 0x23938a, 0x23928b, 0x22918b, 0x468d89, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0x98b7a9, 0x40b882, 0x3fb782, 0x3eb783, 0x3db583, 0x3db583, 0x3cb483, 0x3cb384, 0x3bb283, 0x3ab184, 0x3ab084, 0x39b084, 0x38ae84, 0x38ae85, 0x37ad85, 0x36ac85, 0x36ab85, 0x35aa86, 0x34a986, 0x34a986, 0x33a786, 0x32a786, 0x32a686, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2fa288, 0x2ea088, 0x2da088, 0x2c9f88, 0x2c9e88, 0x2b9d88, 0x2b9c89, 0x2a9b89, 0x299b89, 0x289989, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x25958a, 0x25948a, 0x24948b, 0x23928b, 0x23928b, 0x22918b, 0x758887, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0x57b68c, 0x3db682, 0x3db582, 0x3cb482, 0x3cb383, 0x3bb283, 0x3ab283, 0x39b083, 0x39b084, 0x38af84, 0x38ae84, 0x37ad84, 0x36ac84, 0x36ab84, 0x35ab85, 0x34a985, 0x34a985, 0x33a885, 0x33a786, 0x32a686, 0x31a586, 0x30a486, 0x30a486, 0x2fa286, 0x2fa287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9d88, 0x2a9b88, 0x299b88, 0x289a88, 0x289989, 0x279889, 0x279789, 0x269689, 0x25968a, 0x24948a, 0x24948a, 0x23938a, 0x23928b, 0x22918a, 0x22918b, 0x3f8e89, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0x98b6a9, 0x3db583, 0x3db583, 0x3cb483, 0x3cb383, 0x3bb283, 0x3ab184, 0x39b084, 0x39af84, 0x38ae84, 0x38ae85, 0x37ad85, 0x36ac85, 0x35ab85, 0x35aa86, 0x34a985, 0x34a886, 0x33a786, 0x32a786, 0x31a686, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2ea187, 0x2ea088, 0x2da088, 0x2c9f88, 0x2c9e88, 0x2b9d88, 0x2b9c89, 0x2a9b89, 0x299a89, 0x289989, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x25958a, 0x24948a, 0x24938b, 0x23928b, 0x23928b, 0x22918b, 0x23918b, 0x738887, 0x868686, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0x5fb491, 0x3cb383, 0x3bb283, 0x3ab283, 0x3ab183, 0x39b084, 0x38af84, 0x38ae84, 0x37ad84, 0x37ac85, 0x36ab84, 0x35ab85, 0x34aa85, 0x34a985, 0x33a885, 0x33a786, 0x32a686, 0x31a586, 0x30a486, 0x30a487, 0x2fa387, 0x2fa287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9d88, 0x2a9c88, 0x299b89, 0x299a89, 0x289989, 0x279889, 0x279789, 0x269689, 0x25968a, 0x25958a, 0x24948a, 0x23938a, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x498d89, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xa4b4ad, 0x40b385, 0x3bb284, 0x3ab184, 0x39b084, 0x39b084, 0x38ae84, 0x38ae85, 0x37ad85, 0x36ac85, 0x35ab85, 0x35aa86, 0x34a986, 0x34a986, 0x33a786, 0x32a786, 0x32a686, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2fa288, 0x2ea088, 0x2da088, 0x2c9f88, 0x2c9e89, 0x2b9d88, 0x2b9c89, 0x2a9b89, 0x299b89, 0x289989, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x25958b, 0x24948b, 0x24948b, 0x23928b, 0x23928b, 0x22918b, 0x22918b, 0x29918b, 0x7f8988, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0x89b2a2, 0x39b083, 0x39b084, 0x38af84, 0x38ae84, 0x37ad84, 0x36ac84, 0x35ab84, 0x35aa85, 0x34a985, 0x34a985, 0x33a885, 0x32a786, 0x31a686, 0x31a586, 0x30a486, 0x30a386, 0x2fa286, 0x2ea287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9c88, 0x2a9b88, 0x299b88, 0x289a88, 0x289989, 0x279889, 0x279789, 0x269689, 0x25958a, 0x24948a, 0x24948a, 0x23938a, 0x23928b, 0x22918a, 0x22918b, 0x22918b, 0x22918b, 0x6e8a89, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0x72b19a, 0x39af84, 0x38ae84, 0x38ae85, 0x37ac85, 0x36ac85, 0x35ab85, 0x35aa86, 0x34a985, 0x34a886, 0x33a786, 0x32a786, 0x31a586, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2ea188, 0x2da088, 0x2da088, 0x2c9e88, 0x2c9e88, 0x2b9d88, 0x2a9c89, 0x299b89, 0x299a89, 0x289989, 0x28998a, 0x27978a, 0x26978a, 0x26968a, 0x25958a, 0x24948a, 0x24938b, 0x23928b, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x5d8d8b, 0x888888, 0x888888, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0x6daf98, 0x37ad84, 0x36ac85, 0x35ab84, 0x35aa85, 0x34a985, 0x34a985, 0x33a885, 0x32a786, 0x32a686, 0x31a586, 0x30a486, 0x30a387, 0x2fa287, 0x2fa287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9c88, 0x2a9b88, 0x299b89, 0x289a89, 0x289989, 0x279889, 0x279789, 0x269689, 0x25958a, 0x24948a, 0x24948a, 0x23938a, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x22918b, 0x568d8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0x73ae9a, 0x36ac85, 0x35ab85, 0x35aa86, 0x34a986, 0x34a886, 0x33a786, 0x32a786, 0x31a686, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2ea188, 0x2da088, 0x2da088, 0x2c9f88, 0x2c9e89, 0x2b9d88, 0x2a9c89, 0x2a9b89, 0x299a89, 0x289989, 0x28998a, 0x27988a, 0x27978a, 0x26968a, 0x25958b, 0x24948b, 0x24938b, 0x23928b, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x588f8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0x7aad9d, 0x34a985, 0x34a985, 0x33a785, 0x32a786, 0x31a686, 0x31a586, 0x30a486, 0x30a387, 0x2fa286, 0x2ea287, 0x2ea187, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9c88, 0x2a9b88, 0x299b88, 0x289a89, 0x289989, 0x279889, 0x279789, 0x269689, 0x25958a, 0x24948a, 0x24948a, 0x23938a, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x22918b, 0x608e8b, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0x90ada4, 0x3da989, 0x33a786, 0x32a686, 0x31a586, 0x31a587, 0x30a487, 0x30a387, 0x2fa287, 0x2ea188, 0x2da088, 0x2d9f88, 0x2c9e88, 0x2c9e88, 0x2b9d88, 0x2a9c89, 0x299b89, 0x299a89, 0x289989, 0x28988a, 0x27978a, 0x26978a, 0x25968a, 0x25958b, 0x24948a, 0x24938b, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x2c918b, 0x758f8d, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xa2acaa, 0x5fa894, 0x31a586, 0x30a486, 0x30a387, 0x2fa287, 0x2fa287, 0x2ea087, 0x2da087, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2b9c88, 0x2a9b88, 0x299b89, 0x289a89, 0x289989, 0x279889, 0x27978a, 0x269689, 0x25958a, 0x24948a, 0x24948a, 0x23938a, 0x23928b, 0x22918b, 0x22918b, 0x22918b, 0x4c918d, 0x868e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0x8eaaa3, 0x4fa590, 0x30a387, 0x2fa287, 0x2ea188, 0x2da088, 0x2d9f88, 0x2c9e88, 0x2c9e89, 0x2b9d88, 0x2a9c89, 0x2a9b89, 0x299a89, 0x289989, 0x28988a, 0x27978a, 0x26978a, 0x26968a, 0x25958b, 0x24948b, 0x24938b, 0x23928b, 0x22918b, 0x22918b, 0x43928d, 0x7b9190, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0x93a8a3, 0x5ea394, 0x36a08a, 0x2c9f87, 0x2c9e88, 0x2b9d88, 0x2a9c88, 0x299b88, 0x299a89, 0x289989, 0x289989, 0x279889, 0x269789, 0x269689, 0x25958a, 0x24948a, 0x24938a, 0x23928a, 0x23928b, 0x2d918b, 0x53928f, 0x819291, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0x89a49f, 0x62a195, 0x389d8b, 0x2a9c89, 0x299b89, 0x299a89, 0x289989, 0x28988a, 0x27978a, 0x26968a, 0x25958a, 0x25958a, 0x24948a, 0x36948d, 0x599491, 0x7d9594, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0x9ba2a1, 0x8ea09d, 0x809e9a, 0x749c97, 0x689b95, 0x679a94, 0x729a96, 0x7e9997, 0x889998, 0x949998, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xc6c6c6, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x868686, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x565656, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x9a9a9a, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa3a3a3, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x797979, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x999999, 0x979797, 0x979797, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x353535, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xbfbfbf, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x7f7f7f, 0xbababa, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x626262, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3a3a3a, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x464646, 0x464646, 0x454545, 0x454545, 0x454545, 0x454545, 0x444444, 0x444444, 0x444444, 0x444444, 0x434343, 0x434343, 0x434343, 0x424242, 0x424242, 0x424242, 0x424242, 0x414141, 0x414141, 0x414141, 0x414141, 0x404040, 0x404040, 0x404040, 0x404040, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0x3b3b3b, 0x3b3b3b, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x393939, 0x393939, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x272727, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020
+}; \ No newline at end of file
diff --git a/dev/Boot/BootKit/Rsrc/zka_no_disk.rsrc b/dev/Boot/BootKit/Rsrc/zka_no_disk.rsrc
new file mode 100644
index 00000000..31689e63
--- /dev/null
+++ b/dev/Boot/BootKit/Rsrc/zka_no_disk.rsrc
@@ -0,0 +1,116 @@
+#define ZKA_NO_DISK_HEIGHT 110
+#define ZKA_NO_DISK_WIDTH 110
+
+// array size is 36300
+static const unsigned int zka_no_disk[] = {
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x333333, 0x565656, 0x636363, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6d6d6d, 0x6a6a6a, 0x5f5f5f, 0x4d4d4d, 0x2b2b2b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x707070, 0x6a6a6a, 0x3b3b3b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3d3d3d, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x727272, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x252525, 0x676767, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x757575, 0x606060, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x777777, 0x787878, 0x777777, 0x777777, 0x3d3d3d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x616161, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x7a7a7a, 0x7b7b7b, 0x525252, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x242424, 0x767676, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x7c7c7c, 0x7d7d7d, 0x7c7c7c, 0x7c7c7c, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7f7f7f, 0x808080, 0x7e7e7e, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4e4e4e, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x828282, 0x818181, 0x828282, 0x828282, 0x3f3f3f, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x666666, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x858585, 0x555555, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x222222, 0x7c7c7c, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x868686, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x878787, 0x6d6d6d, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x393939, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x8a8a8a, 0x868686, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x515151, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x8c8c8c, 0x404040, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6a6a6a, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x8f8f8f, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x828282, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0xa69a77, 0xbea35a, 0xc0a458, 0xa69a77, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x919191, 0x727272, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x383838, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0xab9d77, 0xebb626, 0xffbe0c, 0xffbd0c, 0xffbd0c, 0xffbc0c, 0xecb524, 0xaa9c78, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x949494, 0x8e8e8e, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0xa49b83, 0xfcbc0f, 0xfebc0c, 0xffbc0c, 0xfebc0b, 0xffbb0c, 0xfebb0b, 0xffba0b, 0xfcb90e, 0xa49b83, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x969696, 0x414141, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x6e6e6e, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0xe8b52c, 0xffbd0c, 0xffbc0c, 0xffbc0c, 0xffbb0c, 0xffbb0c, 0xffba0b, 0xffba0c, 0xffb90b, 0xe8b22c, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x999999, 0x5c5c5c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x868686, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0xbca66b, 0xfebb0b, 0xffbb0b, 0xfeba0b, 0xffba0b, 0xfeba0b, 0xffb90b, 0xfeb80b, 0xffb80b, 0xfeb80b, 0xffb70b, 0xbda46a, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x9b9b9b, 0x787878, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x373737, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0xa09f9b, 0xf3b81e, 0xffbb0c, 0xffbb0c, 0xffba0b, 0xffba0c, 0xffb90b, 0xffb90b, 0xffb80b, 0xffb80b, 0xffb70b, 0xffb70b, 0xf3b31d, 0xa09e9b, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x9e9e9e, 0x959595, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xcbac5c, 0xffba0b, 0xfeba0b, 0xffb90b, 0xfeb90b, 0xffb80b, 0xfeb80b, 0xffb70b, 0xfeb70a, 0xffb60b, 0xfeb60a, 0xffb60a, 0xfeb50a, 0xccaa5b, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0xa0a0a0, 0xa1a1a1, 0x444444, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x707070, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xaaa699, 0xfab914, 0xffba0c, 0xffb90b, 0xffb90c, 0xffb80b, 0xffb80b, 0xffb70b, 0xffb70b, 0xffb60b, 0xffb60b, 0xffb50b, 0xffb50b, 0xffb40a, 0xfab313, 0xa9a498, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0xa3a3a3, 0xa4a4a4, 0x5e5e5e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8b8b8b, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xd9b14c, 0xfeb80b, 0xfeb80b, 0xfeb70b, 0xffb70b, 0xfeb60a, 0xfeb60a, 0xfeb60a, 0xffb50a, 0xfeb50a, 0xfeb40a, 0xfeb40a, 0xfeb30a, 0xfeb30a, 0xfeb20a, 0xd9ac4a, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0xa5a5a5, 0xa6a6a6, 0x7c7c7c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x363636, 0xa7a7a7, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xb5aa91, 0xfeb80d, 0xffb80b, 0xffb80b, 0xffb70b, 0xffb70b, 0xffb60b, 0xffb60b, 0xffb50a, 0xffb50b, 0xffb40a, 0xffb40a, 0xffb30a, 0xffb30a, 0xffb20a, 0xffb20a, 0xfeb10c, 0xb5aa92, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0xa8a8a8, 0xa9a9a9, 0x9c9c9c, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xe6b43a, 0xffb70b, 0xfeb60a, 0xffb60b, 0xfeb60a, 0xffb50a, 0xfeb50a, 0xffb40a, 0xfeb40a, 0xffb40a, 0xfeb30a, 0xffb20a, 0xfeb20a, 0xffb20a, 0xfeb109, 0xffb109, 0xfeb009, 0xe6ae39, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0xababab, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xc2b085, 0xffb70b, 0xffb70b, 0xffb60b, 0xffb60b, 0xffb50b, 0xffb50b, 0xffb40a, 0xffb40b, 0xffb30a, 0xffb30a, 0xffb20a, 0xffb20a, 0xffb10a, 0xffb10a, 0xffb00a, 0xffb00a, 0xffaf0a, 0xffaf0a, 0xc2ae85, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0xaeaeae, 0x636363, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x8e8e8e, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb1b0af, 0xf1b526, 0xfeb50a, 0xffb50a, 0xfeb40a, 0xfeb40a, 0xfeb40a, 0xffb30a, 0xfeb30a, 0xfeb20a, 0xfeb209, 0xfeb10a, 0xfeb109, 0xfeb009, 0xfeb009, 0xfeb009, 0xfeaf09, 0xfeaf09, 0xfeae09, 0xfeae09, 0xf1ad25, 0xb1b0af, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0xb0b0b0, 0x818181, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x343434, 0xacacac, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xd0b472, 0xffb60b, 0xffb50a, 0xffb50b, 0xffb40a, 0xffb40a, 0xffb30a, 0xffb30a, 0xffb20a, 0xdc9e15, 0x90712e, 0x91712e, 0xdd9c15, 0xffb00a, 0xffaf09, 0xffaf0a, 0xffae09, 0xffae09, 0xffad09, 0xffad09, 0xffac09, 0xd0b071, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xb3b3b3, 0xa3a3a3, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x545454, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb8b5ae, 0xf8b519, 0xffb40a, 0xfeb40a, 0xffb30a, 0xfeb30a, 0xffb20a, 0xfeb20a, 0xffb10a, 0xfeb109, 0x564f40, 0x444444, 0x444444, 0x564e3e, 0xfeaf09, 0xfeae09, 0xffae09, 0xfead09, 0xfead09, 0xfeac08, 0xffac09, 0xfeab08, 0xf8ac17, 0xb8b5ae, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0xb5b5b5, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xdcb660, 0xffb40a, 0xffb40b, 0xffb30a, 0xffb30a, 0xffb20a, 0xffb20a, 0xffb10a, 0xffb10a, 0xeba510, 0x444444, 0x434343, 0x434343, 0x424242, 0xeca30f, 0xffad09, 0xffad09, 0xffac09, 0xffac09, 0xffac09, 0xffab09, 0xffab09, 0xffaa09, 0xdcb15e, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0xb8b8b8, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x909090, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xc1b9a8, 0xfcb30f, 0xfeb20a, 0xfeb20a, 0xfeb109, 0xfeb10a, 0xfeb009, 0xfeb009, 0xfeb009, 0xfeaf09, 0xe6a110, 0x424242, 0x424242, 0x414141, 0x414141, 0xe69e10, 0xfeac08, 0xfeac08, 0xfeab08, 0xfeab08, 0xfeaa08, 0xfeaa08, 0xfea908, 0xfea908, 0xfca90d, 0xc1b8a8, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0xbababa, 0x868686, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x313131, 0xb0b0b0, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xe6b74c, 0xffb30a, 0xffb20a, 0xffb20a, 0xffb10a, 0xffb10a, 0xffb009, 0xffb00a, 0xffaf09, 0xffaf09, 0xe7a010, 0x414141, 0x414141, 0x414141, 0x404040, 0xe79e10, 0xffab09, 0xffab09, 0xffaa08, 0xffaa09, 0xffa908, 0xffa908, 0xffa808, 0xffa808, 0xffa808, 0xe7af4b, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xbdbdbd, 0xa9a9a9, 0x2a2a2a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x525252, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xcbbc9b, 0xfeb209, 0xffb10a, 0xfeb109, 0xffb009, 0xfeb009, 0xffaf09, 0xfeaf09, 0xfeae09, 0xfeae09, 0xffae09, 0xe69f10, 0x404040, 0x3f3f3f, 0x3f3f3f, 0x3e3e3e, 0xe69d0f, 0xfeaa08, 0xfeaa08, 0xfea908, 0xfea908, 0xfea808, 0xfea808, 0xfea707, 0xfea708, 0xfea607, 0xfea607, 0xcbba9b, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0xbfbfbf, 0x494949, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x727272, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xf1b533, 0xffb10a, 0xffb10a, 0xffb00a, 0xffb00a, 0xffaf09, 0xffaf0a, 0xffae09, 0xffae09, 0xffad09, 0xffad09, 0xe79e10, 0x3f3f3f, 0x3e3e3e, 0x3e3e3e, 0x3d3d3d, 0xe79c10, 0xffaa08, 0xffa909, 0xffa908, 0xffa808, 0xffa808, 0xffa708, 0xffa708, 0xffa608, 0xffa608, 0xffa608, 0xf1ab31, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0xc2c2c2, 0x6a6a6a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x929292, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xd6be89, 0xfeb009, 0xfeaf09, 0xfeaf09, 0xfeae09, 0xfeae09, 0xfeae09, 0xfead09, 0xfead08, 0xfeac09, 0xfeac08, 0xfeab08, 0xe69d0f, 0x3d3d3d, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0xe69b0e, 0xfea808, 0xfea808, 0xfea707, 0xfea708, 0xfea607, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea307, 0xd6ba89, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0xc4c4c4, 0x8c8c8c, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2e2e2e, 0xb4b4b4, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc9c8c6, 0xf8b321, 0xffb00a, 0xffaf09, 0xffaf09, 0xffae09, 0xffae09, 0xffad09, 0xffad09, 0xffac09, 0xffac09, 0xffab09, 0xffab09, 0xe79c0f, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0x3b3b3b, 0xe69a0e, 0xffa708, 0xffa708, 0xffa608, 0xffa608, 0xffa608, 0xffa508, 0xfea507, 0xffa407, 0xffa407, 0xffa307, 0xfea307, 0xf8a71f, 0xc8c7c5, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xc7c7c7, 0xc7c7c7, 0xc8c8c8, 0xc7c7c7, 0xafafaf, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x505050, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xe1be76, 0xfeaf09, 0xfeae09, 0xfeae09, 0xffad09, 0xfead09, 0xfeac09, 0xfeac08, 0xffac09, 0xfeab08, 0xfeab08, 0xfeaa08, 0xfeaa08, 0xe69b0e, 0x3b3b3b, 0x3a3a3a, 0x3a3a3a, 0x393939, 0xe5990e, 0xfea607, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea207, 0xfea207, 0xfea106, 0xfea107, 0xe0b774, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0xc9c9c9, 0xcacaca, 0x4b4b4b, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x717171, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xd0cbc2, 0xfbb117, 0xffae09, 0xffae09, 0xffad09, 0xffad09, 0xffac09, 0xffac09, 0xffab09, 0xffab09, 0xffaa08, 0xffaa09, 0xffa908, 0xffa909, 0xe69a0e, 0x3a3a3a, 0x393939, 0x393939, 0x383838, 0xe6980e, 0xffa608, 0xffa508, 0xffa507, 0xffa408, 0xffa407, 0xffa407, 0xffa307, 0xffa307, 0xffa207, 0xffa207, 0xffa107, 0xffa107, 0xfba315, 0xd0cbc2, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0xcdcdcd, 0xcdcdcd, 0xcccccc, 0xcdcdcd, 0x6e6e6e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x939393, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xe9bc60, 0xfead09, 0xfeac08, 0xfeac09, 0xfeac08, 0xfeab08, 0xfeab08, 0xfeaa08, 0xfeaa08, 0xfea908, 0xfea908, 0xfea808, 0xfea808, 0xfea808, 0xe5990d, 0x383838, 0x373737, 0x373737, 0x363636, 0xe5970d, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea206, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xe9b45f, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0xcecece, 0xcfcfcf, 0x929292, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x2a2a2a, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xb0a691, 0xfdad0c, 0xffad09, 0xffac09, 0xffac09, 0xffab09, 0xffab09, 0xffaa08, 0xffaa08, 0xffa908, 0xffa908, 0xfea808, 0xffa808, 0xffa708, 0xffa708, 0xe5980e, 0x373737, 0x363636, 0x363636, 0x353535, 0xe6960d, 0xfea407, 0xffa307, 0xfea307, 0xffa207, 0xfea207, 0xffa107, 0xfea106, 0xffa007, 0xfea006, 0xffa007, 0xfe9f06, 0xff9f06, 0xfe9e06, 0xfd9e09, 0xb0a491, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0xa5a5a5, 0x292929, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xb88010, 0xfeac08, 0xffab09, 0xfeab08, 0xfeaa08, 0xfeaa08, 0xfea908, 0xfea908, 0xfea808, 0xfea808, 0xfea808, 0xfea707, 0xfea708, 0xfea607, 0xfea607, 0xf8a208, 0x3a3834, 0x353535, 0x353535, 0x393733, 0xf89f08, 0xfea207, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9d06, 0xfe9d06, 0xfe9d05, 0xfe9c06, 0xb7740e, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x523f1b, 0xffac09, 0xffab09, 0xffab09, 0xffaa08, 0xffaa09, 0xffa908, 0xffa908, 0xffa808, 0xffa808, 0xffa708, 0xffa708, 0xffa608, 0xffa608, 0xffa508, 0xffa508, 0xffa407, 0xa9751b, 0x353434, 0x353533, 0xab7519, 0xffa207, 0xffa207, 0xffa107, 0xffa107, 0xffa007, 0xffa007, 0xffa007, 0xfe9f06, 0xff9f06, 0xff9e06, 0xff9e06, 0xfe9d06, 0xff9d06, 0xff9c06, 0xff9c06, 0xfe9b06, 0x523b1a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd38f0d, 0xfeaa08, 0xfeaa08, 0xfea908, 0xfea908, 0xfea808, 0xfea808, 0xfea708, 0xfea707, 0xfea607, 0xfea607, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xe9970a, 0xea970b, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9d05, 0xfe9d06, 0xfe9c05, 0xfe9c06, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xd3810a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x715318, 0xffaa08, 0xffaa08, 0xffa908, 0xffa908, 0xffa808, 0xffa808, 0xffa708, 0xffa708, 0xffa608, 0xffa608, 0xffa507, 0xffa508, 0xfea407, 0xffa407, 0xffa307, 0xffa307, 0xfea207, 0xffa207, 0xffa207, 0xffa107, 0xfea106, 0xffa007, 0xfea006, 0xff9f07, 0xfe9f06, 0xff9e06, 0xfe9e06, 0xff9e06, 0xfe9d06, 0xff9d06, 0xfe9c06, 0xff9c06, 0xfe9b05, 0xff9b06, 0xfe9a05, 0xff9a05, 0xfe9905, 0xff9905, 0x704b16, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x27241f, 0xe89b0b, 0xfea908, 0xfea808, 0xfea808, 0xfea708, 0xfea707, 0xfea608, 0xfea607, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea207, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9d06, 0xfe9d06, 0xfe9c05, 0xfe9c06, 0xfe9b05, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9804, 0xfe9705, 0xe78b07, 0x27241f, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4c4c4c, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x464646, 0x464646, 0x454545, 0x9f7627, 0xffa908, 0xffa808, 0xffa808, 0xffa708, 0xffa708, 0xffa608, 0xffa608, 0xffa508, 0xffa508, 0xffa407, 0xffa408, 0xffa307, 0xffa307, 0xffa207, 0xffa207, 0xffa207, 0xffa107, 0xffa107, 0xffa007, 0xffa007, 0xff9f07, 0xff9f06, 0xff9e06, 0xff9e06, 0xff9e06, 0xff9d06, 0xff9d06, 0xff9c06, 0xff9c06, 0xfe9b06, 0xff9b06, 0xff9a05, 0xff9a06, 0xfe9905, 0xff9905, 0xff9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9605, 0x996620, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x393939, 0x393939, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x343434, 0x343434, 0x343434, 0x343434, 0x333333, 0x333333, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xbbb4a6, 0xfba80e, 0xfea708, 0xfea607, 0xfea607, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea207, 0xfea206, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xe4910b, 0xa97016, 0xa97016, 0xe69009, 0xfe9d06, 0xfe9c05, 0xfe9c05, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9704, 0xfe9704, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xf99409, 0x92897d, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xe2ad4c, 0xffa708, 0xffa708, 0xfea608, 0xffa608, 0xffa507, 0xffa508, 0xfea407, 0xffa407, 0xfea307, 0xffa307, 0xfea207, 0xffa207, 0xfea107, 0xffa107, 0xfea006, 0xffa007, 0xfe9f06, 0xff9f06, 0xab7115, 0x2f2e2d, 0x2c2c2c, 0x2c2c2c, 0x2d2c2b, 0xac7014, 0xfe9c06, 0xff9b06, 0xfe9b05, 0xff9a06, 0xfe9a05, 0xff9a05, 0xfe9905, 0xff9905, 0xfe9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9605, 0xff9605, 0xfe9504, 0xfe9504, 0xfe9404, 0xff9404, 0xcf8f38, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xc2b399, 0xfea609, 0xfea607, 0xfea507, 0xfea507, 0xfea407, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea206, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xf99b07, 0x322f2a, 0x2b2b2b, 0x2b2b2b, 0x2a2a2a, 0x292929, 0x332f28, 0xfc9905, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9705, 0xfe9704, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9304, 0xfd9204, 0x9b8971, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xecaa33, 0xffa608, 0xffa508, 0xffa508, 0xffa407, 0xffa407, 0xffa307, 0xffa307, 0xffa207, 0xffa207, 0xffa107, 0xffa107, 0xffa007, 0xffa007, 0xffa006, 0xff9f07, 0xfe9e06, 0xff9e06, 0xff9e06, 0xe18d0b, 0x2b2b2b, 0x2a2a2a, 0x2a2a2a, 0x292929, 0x292929, 0x282828, 0xe18b0a, 0xff9a06, 0xfe9905, 0xff9905, 0xfe9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9605, 0xff9605, 0xfe9504, 0xff9505, 0xfe9404, 0xff9404, 0xfe9304, 0xff9304, 0xfe9204, 0xff9204, 0xfe9104, 0xe18f25, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xccb284, 0xfea407, 0xfea407, 0xfea407, 0xfea307, 0xfea307, 0xfea207, 0xfea206, 0xfea107, 0xfea106, 0xfea006, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9d05, 0xfe9d06, 0xfe9c05, 0xfb9a06, 0x2f2c28, 0x292929, 0x282828, 0x282828, 0x272727, 0x302c25, 0xfb9705, 0xfe9805, 0xfe9704, 0xfe9704, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9303, 0xfe9204, 0xfe9203, 0xfe9103, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe9003, 0xa88960, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xbab9b7, 0xf5a821, 0xfea407, 0xffa407, 0xffa307, 0xffa307, 0xfea207, 0xffa207, 0xffa107, 0xffa107, 0xfea006, 0xffa007, 0xfe9f06, 0xff9f06, 0xfe9e06, 0xff9e06, 0xfe9d06, 0xff9d06, 0xfe9c06, 0xff9c06, 0xfe9c06, 0xff9b06, 0xa66c13, 0x282828, 0x272727, 0x272727, 0x262626, 0xa96b12, 0xfe9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9605, 0xff9605, 0xfe9504, 0xff9504, 0xfe9404, 0xff9404, 0xfe9304, 0xff9304, 0xfe9204, 0xff9204, 0xfe9104, 0xfe9104, 0xfe9003, 0xff9004, 0xfe8f03, 0xfe8f03, 0xed8d16, 0x878684, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xd5b06e, 0xfea307, 0xfea307, 0xfea207, 0xfea206, 0xfea207, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9d06, 0xfe9d06, 0xfe9c05, 0xfe9c06, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xc0780e, 0x6e4c1b, 0x714d1a, 0xc2780d, 0xfe9705, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9204, 0xfe9203, 0xfe9104, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe9003, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e03, 0xfe8d03, 0xb68850, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xf8a517, 0xffa307, 0xffa207, 0xffa207, 0xffa107, 0xffa107, 0xffa007, 0xffa007, 0xff9f06, 0xff9f07, 0xff9e06, 0xff9e06, 0xff9d06, 0xff9d06, 0xff9d06, 0xff9c06, 0xff9c06, 0xff9b06, 0xfe9b05, 0xff9a06, 0xff9a05, 0xff9a06, 0xfe9905, 0xff9905, 0xff9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9605, 0xff9605, 0xfe9504, 0xff9505, 0xfe9404, 0xff9404, 0xfe9304, 0xff9304, 0xfe9204, 0xff9204, 0xfe9104, 0xff9104, 0xfe9004, 0xff9004, 0xfe8f03, 0xff8f03, 0xfe8e03, 0xff8e03, 0xfe8d03, 0xff8d03, 0xfe8d03, 0xf38c0f, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xceb282, 0xfea206, 0xfea106, 0xfea106, 0xfea006, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9e06, 0xfe9d05, 0xfe9d06, 0xfe9c05, 0xfe9c05, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9704, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9203, 0xfe9204, 0xfe9103, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe9003, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e02, 0xfe8d03, 0xfe8d02, 0xfe8d02, 0xfe8c02, 0xfe8c02, 0xfe8b02, 0xfe8b02, 0xa7865e, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xd9af69, 0xfea107, 0xffa107, 0xfea006, 0xffa007, 0xfe9f06, 0xff9f06, 0xfe9e06, 0xff9e06, 0xfe9d06, 0xff9d06, 0xfe9c06, 0xff9c06, 0xfe9b06, 0xff9b06, 0xfe9a05, 0xff9a05, 0xfe9a05, 0xff9905, 0xfe9805, 0xff9805, 0xfe9805, 0xff9705, 0xfe9705, 0xff9605, 0xfe9604, 0xff9605, 0xfe9504, 0xfe9504, 0xfe9404, 0xff9404, 0xfe9304, 0xfe9304, 0xfe9204, 0xff9204, 0xfe9103, 0xfe9104, 0xfe9003, 0xfe9004, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e03, 0xfe8d03, 0xfe8d03, 0xfe8c03, 0xfe8c03, 0xfe8b02, 0xfe8b03, 0xfe8a02, 0xfe8a02, 0x824f13, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xd7ae6c, 0xfea006, 0xfe9f06, 0xfe9f06, 0xfe9e06, 0xfe9e06, 0xfe9e06, 0xfe9d05, 0xfe9d06, 0xfe9c05, 0xfe9c06, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9705, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9204, 0xfe9204, 0xfe9203, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe9003, 0xfe8f03, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e03, 0xfe8d02, 0xfe8d03, 0xfe8c02, 0xfe8c02, 0xfe8b02, 0xfe8b02, 0xfe8a02, 0xfe8a02, 0xfe8902, 0xfe8902, 0x7e4c13, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xc8b596, 0xff9f06, 0xff9f07, 0xfe9e06, 0xff9e06, 0xff9d06, 0xff9d06, 0xfe9c06, 0xff9c06, 0xff9b06, 0xff9b06, 0xfe9a05, 0xff9a06, 0xfe9a05, 0xff9905, 0xfe9905, 0xff9805, 0xfe9805, 0xff9705, 0xfe9705, 0xff9605, 0xfe9605, 0xff9605, 0xfe9504, 0xff9504, 0xfe9404, 0xff9404, 0xfe9304, 0xff9304, 0xfe9204, 0xff9204, 0xfe9104, 0xff9104, 0xfe9003, 0xff9004, 0xfe8f03, 0xff8f03, 0xfe8e03, 0xff8e03, 0xfe8d03, 0xff8d03, 0xfe8c03, 0xff8c03, 0xfe8b03, 0xfe8b03, 0xfe8a02, 0xff8a03, 0xfe8902, 0xfe8902, 0xfe8902, 0xff8802, 0x4c351a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xeca433, 0xfe9d06, 0xfe9d05, 0xfe9c06, 0xfe9c05, 0xfe9c05, 0xfe9b05, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9704, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9203, 0xfe9204, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe9003, 0xfe8f03, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e02, 0xfe8d03, 0xfe8d02, 0xfe8c03, 0xfe8c02, 0xfe8b02, 0xfe8b02, 0xfe8b02, 0xfe8a02, 0xfe8a02, 0xfe8902, 0xfe8902, 0xfe8801, 0xfe8802, 0xfe8701, 0xe17b0a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xbeb7ad, 0xf3a224, 0xfe9c06, 0xff9c06, 0xfe9b06, 0xff9b06, 0xfe9a05, 0xff9a05, 0xfe9905, 0xff9905, 0xfe9805, 0xff9805, 0xfe9705, 0xff9705, 0xfe9705, 0xff9605, 0xfe9604, 0xff9505, 0xfe9504, 0xff9404, 0xfe9404, 0xff9404, 0xfe9304, 0xfe9304, 0xfe9204, 0xff9204, 0xfe9103, 0xfe9104, 0xfe9003, 0xff9004, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e03, 0xfe8d03, 0xfe8d03, 0xfe8c03, 0xfe8c03, 0xfe8b02, 0xfe8b03, 0xfe8a02, 0xfe8a02, 0xfe8902, 0xfe8902, 0xfe8802, 0xfe8802, 0xfe8702, 0xfe8702, 0xf6870a, 0x5d472f, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4d4d4d, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xbbb5ac, 0xe2a549, 0xfe9b05, 0xfe9a05, 0xfe9a05, 0xfe9905, 0xfe9905, 0xfe9805, 0xfe9805, 0xfe9704, 0xfe9705, 0xfe9604, 0xfe9604, 0xfe9504, 0xfe9504, 0xfe9404, 0xfe9404, 0xfe9304, 0xfe9304, 0xfe9204, 0xfe9204, 0xfe9103, 0xfe9103, 0xfe9103, 0xfe9003, 0xfe8f03, 0xfe8f03, 0xfe8f03, 0xfe8e03, 0xfe8e03, 0xfe8d03, 0xfe8d02, 0xfe8d03, 0xfe8c02, 0xfe8b02, 0xfe8b02, 0xfe8b02, 0xfe8a02, 0xfe8a02, 0xfe8902, 0xfe8902, 0xfe8801, 0xfe8802, 0xfe8701, 0xfe8702, 0xfa8605, 0xd08635, 0x91867a, 0x393939, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x4c4c4c, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xc3af90, 0xc7ad88, 0xc5ac87, 0xc5ac87, 0xc4aa85, 0xc4aa85, 0xc2a884, 0xc1a783, 0xc1a682, 0xc0a681, 0xbfa580, 0xbea480, 0xbea37f, 0xbda27e, 0xbca17d, 0xbba07d, 0xbb9f7c, 0xba9f7b, 0xb99e7a, 0xb89d7a, 0xb89c79, 0xb79b78, 0xb59976, 0xb59976, 0xb49875, 0xb49875, 0xb29673, 0xb29673, 0xb19472, 0xb19472, 0xaf9370, 0xaf9270, 0xae916f, 0xad906e, 0xac8f6d, 0xac8e6c, 0xab8d6c, 0xaa8d6b, 0xa98c6a, 0xa98b69, 0xa88a69, 0xa2896e, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x5a5a5a, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x595959, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xc6c6c6, 0xd1d1d1, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x868686, 0x868686, 0x848484, 0x848484, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x6f6f6f, 0x6d6d6d, 0x565656, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x9a9a9a, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa3a3a3, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x797979, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcbcbcb, 0xcbcbcb, 0xc9c9c9, 0xc9c9c9, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb2b2b2, 0xb0b0b0, 0xb0b0b0, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x999999, 0x979797, 0x979797, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x848484, 0x848484, 0x828282, 0x828282, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x353535, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0xbfbfbf, 0xcfcfcf, 0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc2c2c2, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xababab, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x949494, 0x949494, 0x929292, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7b7b7b, 0x7b7b7b, 0x797979, 0x797979, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x464646, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x464646, 0xcfcfcf, 0xcfcfcf, 0xcdcdcd, 0xcdcdcd, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1, 0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb6b6b6, 0xb6b6b6, 0xb4b4b4, 0xb4b4b4, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5, 0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0x9f9f9f, 0x9f9f9f, 0x9d9d9d, 0x9d9d9d, 0x9b9b9b, 0x9b9b9b, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090, 0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x888888, 0x888888, 0x868686, 0x868686, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474, 0x737373, 0x727272, 0x717171, 0x6f6f6f, 0x676767, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x7f7f7f, 0xbababa, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8, 0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc0c0c0, 0xc0c0c0, 0xbebebe, 0xbebebe, 0xbcbcbc, 0xbcbcbc, 0xbababa, 0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3, 0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac, 0xababab, 0xa9a9a9, 0xa9a9a9, 0xa7a7a7, 0xa7a7a7, 0xa5a5a5, 0xa5a5a5, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e, 0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797, 0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x909090, 0x909090, 0x8e8e8e, 0x8e8e8e, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989, 0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282, 0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b, 0x7a7a7a, 0x797979, 0x777777, 0x777777, 0x757575, 0x757575, 0x737373, 0x727272, 0x717171, 0x626262, 0x484848, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x3a3a3a, 0x4b4b4b, 0x4b4b4b, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x4a4a4a, 0x494949, 0x494949, 0x494949, 0x494949, 0x484848, 0x484848, 0x484848, 0x484848, 0x474747, 0x474747, 0x474747, 0x464646, 0x464646, 0x464646, 0x464646, 0x454545, 0x454545, 0x454545, 0x454545, 0x444444, 0x444444, 0x444444, 0x444444, 0x434343, 0x434343, 0x434343, 0x424242, 0x424242, 0x424242, 0x424242, 0x414141, 0x414141, 0x414141, 0x414141, 0x404040, 0x404040, 0x404040, 0x404040, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3f3f3f, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3e3e3e, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3d3d3d, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3c3c3c, 0x3b3b3b, 0x3b3b3b, 0x3b3b3b, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x3a3a3a, 0x393939, 0x393939, 0x393939, 0x393939, 0x383838, 0x383838, 0x383838, 0x383838, 0x373737, 0x373737, 0x373737, 0x373737, 0x363636, 0x363636, 0x363636, 0x353535, 0x353535, 0x353535, 0x353535, 0x272727, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020,
+ 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020, 0x202020
+}; \ No newline at end of file
diff --git a/dev/Boot/BootKit/Support.h b/dev/Boot/BootKit/Support.h
new file mode 100644
index 00000000..a69c4c99
--- /dev/null
+++ b/dev/Boot/BootKit/Support.h
@@ -0,0 +1,173 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/// @file Support.h
+/// @brief Purpose of this file is to help port libs into the bootloader.
+
+#ifndef __aarch64__
+#include <string.h>
+#endif
+
+#define kLongMax ((long)(~0UL >> 1))
+#define kLongMin (~kLongMax)
+
+#ifdef __ZBAOSLDR__
+
+/// @brief memset definition in C++.
+/// @param dst destination pointer.
+/// @param byte value to fill in.
+/// @param len length of of src.
+EXTERN_C void* memset(void* dst, int byte, long long unsigned int len);
+
+/// @brief memcpy definition in C++.
+/// @param dst destination pointer.
+/// @param src source pointer.
+/// @param len length of of src.
+EXTERN_C void* memcpy(void* dst, const void* src, long long unsigned int len);
+
+/// @brief strlen definition in C++.
+EXTERN_C size_t strlen(const char* whatToCheck);
+
+/// @brief strcmp definition in C++.
+EXTERN_C int strcmp(const char* whatToCheck, const char* whatToCheckRight);
+
+#else
+
+#include <string.h>
+
+#endif // __ZBAOSLDR__
+
+#define SetMem(dst, c, sz) memset(dst, c, sz)
+#define MoveMem(dst, src, sz) memcpy(dst, src, sz)
+#define CopyMem(dst, src, sz) memcpy(dst, src, sz)
+#define StrLen(src) strlen(src)
+#define StrCmp(dst, src) strcmp(dst, src)
+
+inline int IsSpace(int c)
+{
+ return c == ' ';
+}
+
+inline int StringNCompare(const char* destination, const char* source, long length)
+{
+ long err = 0;
+
+ for (long i = 0UL; i < length; ++i)
+ {
+ if (source[i] != destination[i])
+ ++err;
+ }
+
+ return err;
+}
+
+inline long StringToLong(const char* nptr, char** endptr, int base)
+{
+ const char *p = nptr, *endp;
+ bool is_neg = 0, overflow = 0;
+
+ /* Need unsigned so (-kLongMin) can fit in these: */
+ unsigned long n = 0UL, cutoff;
+ int cutlim;
+
+ if (base < 0 || base == 1 || base > 36)
+ {
+ return 0L;
+ }
+
+ endp = nptr;
+
+ while (IsSpace(*p))
+ p++;
+
+ if (*p == '+')
+ {
+ p++;
+ }
+ else if (*p == '-')
+ {
+ is_neg = 1, p++;
+ }
+ if (*p == '0')
+ {
+ p++;
+ /* For strtol(" 0xZ", &endptr, 16), endptr should point to 'x';
+ * pointing to ' ' or '0' is non-compliant.
+ * (Many implementations do this wrong.) */
+ endp = p;
+ if (base == 16 && (*p == 'X' || *p == 'x'))
+ {
+ p++;
+ }
+ else if (base == 2 && (*p == 'B' || *p == 'b'))
+ {
+ /* C23 standard supports "0B" and "0b" prefixes. */
+ p++;
+ }
+ else if (base == 0)
+ {
+ if (*p == 'X' || *p == 'x')
+ {
+ base = 16, p++;
+ }
+ else if (*p == 'B' || *p == 'b')
+ {
+ base = 2, p++;
+ }
+ else
+ {
+ base = 8;
+ }
+ }
+ }
+ else if (base == 0)
+ {
+ base = 10;
+ }
+
+ cutoff = (is_neg) ? -(kLongMin / base) : kLongMax / base;
+ cutlim = (is_neg) ? -(kLongMin % base) : kLongMax % base;
+
+ while (1)
+ {
+ int c;
+ if (*p >= 'A')
+ c = ((*p - 'A') & (~('a' ^ 'A'))) + 10;
+ else if (*p <= '9')
+ c = *p - '0';
+ else
+ break;
+ if (c < 0 || c >= base)
+ break;
+ endp = ++p;
+ if (overflow)
+ {
+ /* endptr should go forward and point to the non-digit character
+ * (of the given base); required by ANSI standard. */
+ if (endptr)
+ continue;
+ break;
+ }
+ if (n > cutoff || (n == cutoff && c > cutlim))
+ {
+ overflow = 1;
+ continue;
+ }
+ n = n * base + c;
+ }
+
+ if (endptr)
+ *endptr = (char*)endp;
+
+ if (overflow)
+ {
+ return ((is_neg) ? kLongMin : kLongMax);
+ }
+
+ return (long)((is_neg) ? -n : n);
+}
diff --git a/dev/Boot/DownloadOVMF.ps1 b/dev/Boot/DownloadOVMF.ps1
new file mode 100644
index 00000000..5a2c5f0e
--- /dev/null
+++ b/dev/Boot/DownloadOVMF.ps1
@@ -0,0 +1,4 @@
+$client = new-object System.Net.WebClient
+$output = "$PSScriptRoot\OVMF.fd"
+
+$client.DownloadFile("https://retrage.github.io/edk2-nightly/bin/DEBUGX64_OVMF.fd", $output)
diff --git a/dev/Boot/Mod/.keep b/dev/Boot/Mod/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/Mod/.keep
diff --git a/dev/Boot/Mod/NetBoot/.hgkeep b/dev/Boot/Mod/NetBoot/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/Mod/NetBoot/.hgkeep
diff --git a/dev/Boot/Mod/NetBoot/Boot.S b/dev/Boot/Mod/NetBoot/Boot.S
new file mode 100644
index 00000000..fbd6f497
--- /dev/null
+++ b/dev/Boot/Mod/NetBoot/Boot.S
@@ -0,0 +1,28 @@
+;; /*
+;; * ========================================================
+;; *
+;; * BootZ
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+.code64
+.intel_syntax noprefix
+
+#define kTypeDriver 101
+#define kArchAmd64 122
+#define kHandoverMagic 0xBADCC
+
+.section .ldr
+
+.quad kHandoverMagic
+.word kTypeDriver
+
+.text
+
+.extern main
+.global __main
+
+__main:
+ ret
diff --git a/dev/Boot/Mod/NetBoot/NetBoot.cc b/dev/Boot/Mod/NetBoot/NetBoot.cc
new file mode 100644
index 00000000..18251e69
--- /dev/null
+++ b/dev/Boot/Mod/NetBoot/NetBoot.cc
@@ -0,0 +1,20 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <Mod/NetBoot/NetBoot.h>
+#include <BootKit/BootKit.h>
+
+EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover)
+{
+#ifdef __ZKA_AMD64__
+ return kEfiFail;
+#else
+ return kEfiOk;
+#endif
+}
diff --git a/dev/Boot/Mod/NetBoot/NetBoot.h b/dev/Boot/Mod/NetBoot/NetBoot.h
new file mode 100644
index 00000000..2375ef18
--- /dev/null
+++ b/dev/Boot/Mod/NetBoot/NetBoot.h
@@ -0,0 +1,31 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define kNetBootINetMagic "NETB"
+#define kNetBootINetMagicLength 4
+
+/// @brief the internet header is used to download updates OTA.
+typedef struct NetBootInternetHeader
+{
+ Kernel::Char NB1; /// magic char 1 'N'
+ Kernel::Char NB2; /// magic char 2 'E'
+ Kernel::Char NB3; /// magic char 3 'T'
+ Kernel::Char NB4; /// magic char 4 'B'
+
+ Kernel::Char PatchName[255]; /// example: Modjo
+ Kernel::Int32 PatchLength; /// the patch length.
+ Kernel::Char PatchTarget[255]; /// the target file.
+ Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
+ Kernel::Boolean Preflight; /// is it a preflight packet.
+ Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget**
+} NetBootInternetHeader;
diff --git a/dev/Boot/Mod/NetBoot/build.json b/dev/Boot/Mod/NetBoot/build.json
new file mode 100644
index 00000000..9df27b3c
--- /dev/null
+++ b/dev/Boot/Mod/NetBoot/build.json
@@ -0,0 +1,24 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../Kernel", "../../../", "./"],
+ "sources_path": [".cc", "*.S"],
+ "output_name": "netboot.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17,--image-base,0x10000000,-e,ModuleMain"
+ ],
+ "cpp_macros": [
+ "__MINOSKRNL__",
+ "__ZBAOSLDR__",
+ "__ZKA_AMD64__",
+ "kNetBootVersionHighest=0x0100",
+ "kNetBootVersionLowest=0x0100",
+ "kNetBootVersion=0x0100"
+ ]
+}
diff --git a/dev/Boot/Mod/SysChk/.hgkeep b/dev/Boot/Mod/SysChk/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/Mod/SysChk/.hgkeep
diff --git a/dev/Boot/Mod/SysChk/Boot.S b/dev/Boot/Mod/SysChk/Boot.S
new file mode 100644
index 00000000..b5795450
--- /dev/null
+++ b/dev/Boot/Mod/SysChk/Boot.S
@@ -0,0 +1,22 @@
+;; /*
+;; * ========================================================
+;; *
+;; * BootZ
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+#ifdef __ZKA_AMD64__
+.code64
+.intel_syntax noprefix
+#endif
+
+#define kTypeDriver 101
+#define kArchAmd64 122
+#define kHandoverMagic 0xBADCC
+
+.section .ldr
+
+.quad kHandoverMagic
+.word kTypeDriver
diff --git a/dev/Boot/Mod/SysChk/Module.cc b/dev/Boot/Mod/SysChk/Module.cc
new file mode 100644
index 00000000..0297b177
--- /dev/null
+++ b/dev/Boot/Mod/SysChk/Module.cc
@@ -0,0 +1,36 @@
+/*
+ * ========================================================
+ *
+ * NetBoot
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <BootKit/BootKit.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <FirmwareKit/EFI.h>
+#include <FirmwareKit/EFI/API.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/MSDOS.h>
+#include <KernelKit/PE.h>
+#include <KernelKit/PEF.h>
+#include <NewKit/Macros.h>
+#include <NewKit/Ref.h>
+#include <BootKit/BootThread.h>
+#include <Mod/CoreGfx/FBMgr.h>
+
+EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover)
+{
+#ifdef __ZKA_AMD64__
+ Boot::BDiskFormatFactory<BootDeviceATA> partition_factory;
+
+ if (partition_factory.IsPartitionValid())
+ return kEfiOk;
+
+ return kEfiFail;
+#else
+ return kEfiOk;
+#endif
+}
diff --git a/dev/Boot/Mod/SysChk/amd64.json b/dev/Boot/Mod/SysChk/amd64.json
new file mode 100644
index 00000000..2c079889
--- /dev/null
+++ b/dev/Boot/Mod/SysChk/amd64.json
@@ -0,0 +1,25 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../Kernel", "../../../", "./"],
+ "sources_path": ["*.cc", "*.S", "../../src/HEL/AMD64/*.cc", "../../src/HEL/AMD64/*.S", "../../src/*.cc"],
+ "output_name": "syschk.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fPIC",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17,--image-base,0x10000000,-e,ModuleMain"
+ ],
+ "cpp_macros": [
+ "__MINOSKRNL__",
+ "__ZBAOSLDR__",
+ "__BOOTLDR_STANDALONE__",
+ "__ZKA_AMD64__",
+ "kChkVersionHighest=0x0100",
+ "kChkVersionLowest=0x0100",
+ "kChkVersion=0x0100"
+ ]
+}
diff --git a/dev/Boot/Mod/SysChk/arm64.json b/dev/Boot/Mod/SysChk/arm64.json
new file mode 100644
index 00000000..46cfb081
--- /dev/null
+++ b/dev/Boot/Mod/SysChk/arm64.json
@@ -0,0 +1,26 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "../../", "../../../Kernel", "../../../", "./"],
+ "sources_path": ["*.cc", "*.S", "../../src/HEL/ARM64/*.cc", "../../src/HEL/ARM64/*.S", "../../src/*.cc"],
+ "output_name": "syschk.sys",
+ "compiler_flags": [
+ "-ffreestanding",
+ "-nostdlib",
+ "-std=c++20",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-fuse-ld=lld",
+ "-Wl,-subsystem:efi_application,-entry:ModuleMain",
+ "-target aarch64-unknown-windows"
+ ],
+ "cpp_macros": [
+ "__MINOSKRNL__",
+ "__ZBAOSLDR__",
+ "__BOOTLDR_STANDALONE__",
+ "__ZKA_ARM64__",
+ "kChkVersionHighest=0x0100",
+ "kChkVersionLowest=0x0100",
+ "kChkVersion=0x0100"
+ ]
+}
diff --git a/dev/Boot/ReadMe.md b/dev/Boot/ReadMe.md
new file mode 100644
index 00000000..bb0b6ec3
--- /dev/null
+++ b/dev/Boot/ReadMe.md
@@ -0,0 +1,20 @@
+# BootZ (Zeta Bootloader Architecture)
+
+You need:
+
+- MinGW for the Kernel and bootloader.
+- Netwide Assembler to output COFF object code.
+
+Start by cloning the repo:
+
+```
+git clone git@github.com:amlel-el-mahrouss/zka-dev.git
+```
+
+And then execute:
+
+```
+make all
+```
+
+##### Copyright, Amlal EL Mahrouss, all rights reserved.
diff --git a/dev/Boot/amd64-desktop.make b/dev/Boot/amd64-desktop.make
new file mode 100644
index 00000000..c264143c
--- /dev/null
+++ b/dev/Boot/amd64-desktop.make
@@ -0,0 +1,116 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the bootloader makefile.
+##################################################
+
+CC_GNU=x86_64-w64-mingw32-g++
+LD_GNU=x86_64-w64-mingw32-ld
+
+WINDRES=x86_64-w64-mingw32-windres
+
+ADD_FILE=touch
+COPY=cp
+HTTP_GET=wget
+
+# Select this for Windows.
+ifneq ($(findstring CYGWIN_NT-10.0,$(shell uname)), )
+EMU=qemu-system-x86_64w.exe
+else
+# this for NT distributions
+EMU=qemu-system-x86_64 -net none
+endif
+
+ifeq ($(NEWS_MODEL), )
+ZKA_MODEL=-DkMachineModel="\"ZkaOS\""
+endif
+
+BIOS=OVMF.fd
+IMG=epm-master-1.img
+IMG_2=epm-master-2.img
+
+EMU_FLAGS=-net none -smp 4 -m 8G -M q35 \
+ -bios $(BIOS) -drive \
+ file=fat:rw:src/Root/,index=2,format=raw \
+ -d int
+
+LD_FLAGS=-e Main --subsystem=10
+
+STANDALONE_MACRO=-D__BOOTLDR_STANDALONE__
+OBJ=*.o
+
+REM=rm
+REM_FLAG=-f
+
+FLAG_ASM=-f win64
+FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mno-red-zone -D__MINOSKRNL__ -D__ZBAOSLDR__ \
+ -DEFI_FUNCTION_WRAPPER -I./ -I../Kernel -I../ -c -nostdlib -fno-rtti -fno-exceptions \
+ -std=c++20 -DBOOTZ_GPT_SUPPORT -DBOOTZ_EPM_SUPPORT -D__HAVE_ZKA_APIS__ -DZBA_USE_FB -D__ZKA_AMD64__ -D__ZKA__ -DZKA_AUTO_FORMAT
+
+BOOTLOADER=zbaosldr.exe
+KERNEL=minoskrnl.exe
+SYSCHK=syschk.sys
+STARTUP=startup.sys
+SCIKIT=libSCI.dylib
+
+.PHONY: invalid-recipe
+invalid-recipe:
+ @echo "=== ERROR ==="
+ @echo "=> Use make compile-<arch> instead."
+
+.PHONY: all
+all: compile-amd64
+ mkdir -p src/Root/EFI/BOOT
+ $(LD_GNU) $(OBJ) $(LD_FLAGS) -o src/$(BOOTLOADER)
+ $(COPY) src/$(BOOTLOADER) src/Root/EFI/BOOT/BOOTX64.EFI
+ $(COPY) src/$(BOOTLOADER) src/Root/EFI/BOOT/ZBAOSLDR.EFI
+ $(COPY) ../Kernel/$(KERNEL) src/Root/$(KERNEL)
+ $(COPY) ./Mod/SysChk/$(SYSCHK) src/Root/$(SYSCHK)
+ $(COPY) ../LibSCI/$(SCIKIT) src/Root/$(SCIKIT)
+ $(COPY) src/$(BOOTLOADER) src/Root/$(BOOTLOADER)
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+.PHONY: compile-amd64
+compile-amd64:
+ $(WINDRES) src/BootloaderRsrc.rsrc -O coff -o BootloaderRsrc.o
+ $(CC_GNU) $(ZKA_MODEL) $(STANDALONE_MACRO) $(FLAG_GNU) $(DEBUG) \
+ $(wildcard src/HEL/AMD64/*.cc) \
+ $(wildcard src/HEL/AMD64/*.S) \
+ $(wildcard src/*.cc)
+
+.PHONY: run-efi-amd64-ahci
+run-efi-amd64-ahci:
+ $(EMU) $(EMU_FLAGS) -hda $(IMG) -s -S
+
+.PHONY: run-efi-amd64-ata
+run-efi-amd64-ata:
+ $(EMU) $(EMU_FLAGS) -device piix3-ide,id=ide -drive id=disk,file=$(IMG),format=raw,if=none -device ide-hd,drive=disk,bus=ide.0 -s -S
+
+# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta specs.
+.PHONY: epm-img
+epm-img:
+ qemu-img create -f raw $(IMG) 4G
+
+.PHONY: efi
+efi:
+ $(HTTP_GET) https://retrage.github.io/edk2-nightly/bin/DEBUGX64_OVMF.fd -O OVMF.fd
+
+BINS=*.bin
+EXECUTABLES=zbaosldr.exe minoskrnl.exe OVMF.fd
+
+TARGETS=$(REM_FLAG) $(OBJ) $(BIN) $(IMG) $(IMG_2) $(EXECUTABLES)
+
+.PHONY: clean
+clean:
+ $(REM) $(TARGETS)
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "epm-img: Format a disk using the Explicit Partition Map."
+ @echo "gpt-img: Format a disk using the Explicit Partition Map."
+ @echo "clean: clean bootloader."
+ @echo "bootloader-amd64: Build bootloader. (PC AMD64)"
+ @echo "run-efi-amd64-<ahci, ata>: Run bootloader. (PC AMD64)"
diff --git a/dev/Boot/arm64-desktop.make b/dev/Boot/arm64-desktop.make
new file mode 100644
index 00000000..1a3d6b69
--- /dev/null
+++ b/dev/Boot/arm64-desktop.make
@@ -0,0 +1,112 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the bootloader makefile.
+##################################################
+
+CC_GNU = clang++
+LD_GNU = lld-link
+
+ADD_FILE=touch
+COPY=cp
+HTTP_GET=wget
+
+# Select this for Windows.
+ifneq ($(findstring CYGWIN_NT-10.0,$(shell uname)), )
+EMU=qemu-system-aarch64w.exe
+else
+# this for NT distributions
+EMU=qemu-system-aarch64
+endif
+
+ifeq ($(NEWS_MODEL), )
+ZKA_MODEL=-DkMachineModel="\"ZKA\""
+endif
+
+BIOS=OVMF.fd
+IMG=epm-master-1.img
+IMG_2=epm-slave.img
+IMG_3=epm-master-2.img
+
+EMU_FLAGS=-net none -smp 4 -m 8G -cpu max -M virt \
+ -bios $(BIOS) \
+ -drive id=disk,file=$(IMG),format=raw,if=none \
+ -drive \
+ file=fat:rw:src/Root/,index=2,format=raw \
+ -no-shutdown -no-reboot -cpu cortex-a72 -device virtio-gpu-pci
+
+LD_FLAGS=-subsystem:efi_application -entry:Main /nodefaultlib
+
+STANDALONE_MACRO=-D__BOOTLDR_STANDALONE__
+OBJ=*.o
+
+REM=rm
+REM_FLAG=-f
+
+FLAG_ASM=-f win64
+FLAG_GNU=-fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__ZKA_ARM64__ -fno-rtti -fno-exceptions -I./ \
+ -target aarch64-unknown-windows \
+ -std=c++20 -DBOOTZ_EPM_SUPPORT -DZBA_USE_FB -D__FSKIT_USE_NEFS__ -D__BOOTLDR_STANDALONE__ -D__MINOSKRNL__ -D__ZBAOSLDR__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../ -I../Kernel
+
+BOOT_LOADER=zbaosldr.exe
+KERNEL=minoskrnl.exe
+SYSCHK=syschk.sys
+STARTUP=startup.sys
+
+.PHONY: invalid-recipe
+invalid-recipe:
+ @echo "invalid-recipe: Use make compile-<arch> instead."
+
+.PHONY: all
+all: compile
+ mkdir -p src/Root/EFI/BOOT
+ $(LD_GNU) $(OBJ) $(LD_FLAGS) /out:src/$(BOOT_LOADER)
+ $(COPY) src/$(BOOT_LOADER) src/Root/EFI/BOOT/BOOTAA64.EFI
+ $(COPY) src/$(BOOT_LOADER) src/Root/EFI/BOOT/BootZ.EFI
+ $(COPY) ../Kernel/$(KERNEL) src/Root/$(KERNEL)
+ $(COPY) ./Mod/SysChk/$(SYSCHK) src/Root/$(SYSCHK)
+ $(COPY) src/$(BOOT_LOADER) src/Root/$(BOOT_LOADER)
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+.PHONY: compile
+compile:
+ $(RESCMD)
+ $(CC_GNU) $(ZKA_MODEL) $(STANDALONE_MACRO) $(FLAG_GNU) $(DEBUG) \
+ $(wildcard src/HEL/ARM64/*.cc) \
+ $(wildcard src/HEL/ARM64/*.S) \
+ $(wildcard src/*.cc)
+
+.PHONY: run
+run:
+ $(EMU) $(EMU_FLAGS)
+
+# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta.
+.PHONY: epm-img
+epm-img:
+ qemu-img create -f raw $(IMG) 10G
+ qemu-img create -f raw $(IMG_2) 4G
+ qemu-img create -f raw $(IMG_3) 4G
+
+.PHONY: efi
+efi:
+ $(HTTP_GET) https://retrage.github.io/edk2-nightly/bin/DEBUGAARCH64_QEMU_EFI.fd -O OVMF.fd
+
+BINS=*.bin
+EXECUTABLES=zbaosldr.exe minoskrnl.exe OVMF.fd
+
+TARGETS=$(REM_FLAG) $(OBJ) $(BIN) $(IMG) $(IMG_2) $(EXECUTABLES)
+
+.PHONY: clean
+clean:
+ $(REM) $(TARGETS)
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "epm-img: Format a disk using the Explicit Partition Map."
+ @echo "gpt-img: Format a disk using the Explicit Partition Map."
+ @echo "clean: clean bootloader."
+ @echo "bootloader-amd64: Build bootloader. (PC AMD64)"
+ @echo "run: Run bootloader. (PC AMD64)"
diff --git a/dev/Boot/arm64-mobile.make b/dev/Boot/arm64-mobile.make
new file mode 100644
index 00000000..45fd03e9
--- /dev/null
+++ b/dev/Boot/arm64-mobile.make
@@ -0,0 +1,113 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the bootloader makefile.
+##################################################
+
+CC_GNU = clang++
+LD_GNU = lld-link
+
+ADD_FILE=touch
+COPY=cp
+HTTP_GET=wget
+
+# Select this for Windows.
+ifneq ($(findstring CYGWIN_NT-10.0,$(shell uname)), )
+EMU=qemu-system-aarch64w.exe
+else
+# this for NT distributions
+EMU=qemu-system-aarch64
+endif
+
+ifeq ($(NEWS_MODEL), )
+ZKA_MODEL=-DkMachineModel="\"ZKA\""
+endif
+
+BIOS=OVMF.fd
+IMG=epm-master-1.img
+IMG_2=epm-slave.img
+IMG_3=epm-master-2.img
+
+EMU_FLAGS=-net none -smp 4 -m 8G -cpu max -M virt-9.1 \
+ -bios $(BIOS) \
+ -drive id=disk,file=$(IMG),format=raw,if=none \
+ -drive \
+ file=fat:rw:src/Root/,index=1,format=raw \
+ -device virtio-tablet-pci \
+ -no-shutdown -no-reboot -cpu cortex-a72 -device virtio-gpu-pci
+
+LD_FLAGS=-subsystem:efi_application -entry:Main /nodefaultlib
+
+STANDALONE_MACRO=-D__BOOTLDR_STANDALONE__
+OBJ=*.o
+
+REM=rm
+REM_FLAG=-f
+
+FLAG_ASM=-f win64
+FLAG_GNU=-fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__ZKA_ARM64__ -fno-rtti -fno-exceptions -I./ \
+ -target aarch64-unknown-windows \
+ -std=c++20 -DBOOTZ_EPM_SUPPORT -DkExpectedWidth=320 -DkExpectedHeight=480 -D__FSKIT_USE_NEFS__ -D__BOOTLDR_STANDALONE__ -D__MINOSKRNL__ -D__ZBAOSLDR__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../ -I../Kernel
+
+BOOT_LOADER=zbaosldr.exe
+KERNEL=minoskrnl.exe
+SYSCHK=syschk.sys
+STARTUP=startup.sys
+
+.PHONY: invalid-recipe
+invalid-recipe:
+ @echo "invalid-recipe: Use make compile-<arch> instead."
+
+.PHONY: all
+all: compile
+ mkdir -p src/Root/EFI/BOOT
+ $(LD_GNU) $(OBJ) $(LD_FLAGS) /out:src/$(BOOT_LOADER)
+ $(COPY) src/$(BOOT_LOADER) src/Root/EFI/BOOT/BOOTAA64.EFI
+ $(COPY) src/$(BOOT_LOADER) src/Root/EFI/BOOT/BootZ.EFI
+ $(COPY) ../Kernel/$(KERNEL) src/Root/$(KERNEL)
+ $(COPY) ./Mod/SysChk/$(SYSCHK) src/Root/$(SYSCHK)
+ $(COPY) src/$(BOOT_LOADER) src/Root/$(BOOT_LOADER)
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+.PHONY: compile
+compile:
+ $(RESCMD)
+ $(CC_GNU) $(ZKA_MODEL) $(STANDALONE_MACRO) $(FLAG_GNU) $(DEBUG) \
+ $(wildcard src/HEL/ARM64/*.cc) \
+ $(wildcard src/HEL/ARM64/*.S) \
+ $(wildcard src/*.cc)
+
+.PHONY: run
+run:
+ $(EMU) $(EMU_FLAGS)
+
+# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta.
+.PHONY: epm-img
+epm-img:
+ qemu-img create -f raw $(IMG) 10G
+ qemu-img create -f raw $(IMG_2) 4G
+ qemu-img create -f raw $(IMG_3) 4G
+
+.PHONY: efi
+efi:
+ $(HTTP_GET) https://retrage.github.io/edk2-nightly/bin/DEBUGAARCH64_QEMU_EFI.fd -O OVMF.fd
+
+BINS=*.bin
+EXECUTABLES=zbaosldr.exe minoskrnl.exe OVMF.fd
+
+TARGETS=$(REM_FLAG) $(OBJ) $(BIN) $(IMG) $(IMG_2) $(EXECUTABLES)
+
+.PHONY: clean
+clean:
+ $(REM) $(TARGETS)
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "epm-img: Format a disk using the Explicit Partition Map."
+ @echo "gpt-img: Format a disk using the Explicit Partition Map."
+ @echo "clean: clean bootloader."
+ @echo "bootloader-amd64: Build bootloader. (PC AMD64)"
+ @echo "run-efi-amd64: Run bootloader. (PC AMD64)"
diff --git a/dev/Boot/gdbinit b/dev/Boot/gdbinit
new file mode 100644
index 00000000..9522f6e8
--- /dev/null
+++ b/dev/Boot/gdbinit
@@ -0,0 +1,3 @@
+set disassemble-next-line on
+b Main
+target remote localhost:1234
diff --git a/dev/Boot/src/.gitkeep b/dev/Boot/src/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/src/.gitkeep
diff --git a/dev/Boot/src/BootFileReader.cc b/dev/Boot/src/BootFileReader.cc
new file mode 100644
index 00000000..df089bf1
--- /dev/null
+++ b/dev/Boot/src/BootFileReader.cc
@@ -0,0 +1,206 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: FileReader.cc
+ Purpose: New Boot FileReader,
+ Read complete file and store it in a buffer.
+
+------------------------------------------- */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+#include <FirmwareKit/Handover.h>
+#include <FirmwareKit/EFI/API.h>
+#include <Mod/CoreGfx/TextMgr.h>
+
+/// @file BootFileReader
+/// @brief Bootloader File reader.
+/// BUGS: 0
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+///
+///
+/// @name BFileReader class
+/// @brief Reads the file as a blob.
+///
+///
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/***
+ @brief File Reader constructor.
+*/
+Boot::BFileReader::BFileReader(const CharacterTypeUTF16* path,
+ EfiHandlePtr ImageHandle)
+{
+ if (path != nullptr)
+ {
+ SizeT index = 0UL;
+ for (; path[index] != L'\0'; ++index)
+ {
+ mPath[index] = path[index];
+ }
+
+ mPath[index] = 0;
+ }
+
+ /// Load protocols with their GUIDs.
+
+ EfiGUID guidEfp = EfiGUID(EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID);
+
+ EfiSimpleFilesystemProtocol* efp = nullptr;
+
+ EfiLoadImageProtocol* img = nullptr;
+ EfiGUID guidImg = EfiGUID(EFI_LOADED_IMAGE_PROTOCOL_GUID);
+
+ if (BS->HandleProtocol(ImageHandle, &guidImg, (void**)&img) != kEfiOk)
+ {
+ mWriter.Write(L"BootZ: Handle-Protocol: No-Such-Protocol").Write(L"\r");
+ this->mErrorCode = kNotSupported;
+ }
+
+ if (BS->HandleProtocol(img->DeviceHandle, &guidEfp, (void**)&efp) != kEfiOk)
+ {
+ mWriter.Write(L"BootZ: Handle-Protocol: No-Such-Protocol").Write(L"\r");
+ this->mErrorCode = kNotSupported;
+ return;
+ }
+
+ /// Start doing disk I/O
+
+ if (efp->OpenVolume(efp, &mRootFs) != kEfiOk)
+ {
+ mWriter.Write(L"BootZ: Fetch-Protocol: No-Such-Volume").Write(L"\r");
+ this->mErrorCode = kNotSupported;
+ return;
+ }
+
+ EfiFileProtocol* fileFs = nullptr;
+
+ if (mRootFs->Open(mRootFs, &fileFs, mPath, kEFIFileRead, kEFIReadOnly) !=
+ kEfiOk)
+ {
+ mWriter.Write(L"BootZ: Fetch-Protocol: No-Such-Path: ")
+ .Write(mPath)
+ .Write(L"\r");
+ this->mErrorCode = kNotSupported;
+
+ fb_render_string("BootZ: PLEASE RECOVER YOUR MINKRNL INSTALL.", 40, 10, RGB(0xFF, 0xFF, 0xFF));
+
+ mRootFs->Close(mRootFs);
+
+ return;
+ }
+
+ mSizeFile = 0;
+ mFile = fileFs;
+ mErrorCode = kOperationOkay;
+}
+
+Boot::BFileReader::~BFileReader()
+{
+ if (this->mFile)
+ {
+ this->mFile->Close(this->mFile);
+ this->mFile = nullptr;
+ }
+
+ if (this->mRootFs)
+ {
+ this->mRootFs->Close(this->mRootFs);
+ this->mRootFs = nullptr;
+ }
+
+ if (this->mBlob)
+ {
+ BS->FreePool(this->mBlob);
+ this->mBlob = nullptr;
+ }
+
+ BSetMem(this->mPath, 0, kPathLen);
+}
+
+/**
+ @brief Reads all of the file into a buffer.
+ @param **readUntil** size of file
+ @param **chunkToRead** chunk to read each time.
+*/
+Void Boot::BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr out_address)
+{
+ UInt32 szInfo = sizeof(EfiFileInfo);
+
+ EfiFileInfo newPtrInfo{};
+
+ EfiGUID kFileInfoGUID = EFI_FILE_INFO_GUID;
+
+ if (mFile->GetInfo(mFile, &kFileInfoGUID, &szInfo, &newPtrInfo) == kEfiOk)
+ {
+ readUntil = newPtrInfo.FileSize;
+ mWriter.Write(L"BootZ: File size: ").Write(readUntil).Write("\r");
+ }
+
+ if (readUntil == 0)
+ {
+ mErrorCode = kNotSupported;
+ return;
+ }
+
+ if (mBlob == nullptr)
+ {
+ if (!out_address)
+ {
+ if (auto err = BS->AllocatePool(EfiLoaderCode, readUntil, (VoidPtr*)&mBlob) !=
+ kEfiOk)
+ {
+ mWriter.Write(L"*** error: ").Write(err).Write(L" ***\r");
+ EFI::ThrowError(L"OutOfMemory", L"Out of memory.");
+ }
+ }
+ else
+ {
+ mBlob = (VoidPtr)out_address;
+ }
+ }
+
+ mWriter.Write(L"*** Bytes to read: ").Write(readUntil).Write(L" ***\r");
+
+ UInt64 bufSize = chunkToRead;
+ UInt64 szCnt = 0UL;
+
+ while (szCnt < readUntil)
+ {
+ auto res = mFile->Read(mFile, &bufSize, (VoidPtr)(&((Char*)mBlob)[szCnt]));
+
+ szCnt += bufSize;
+
+ if (res == kBufferTooSmall)
+ {
+ bufSize = chunkToRead;
+ }
+ }
+
+ mSizeFile = szCnt;
+ mErrorCode = kOperationOkay;
+}
+
+/// @brief error code getter.
+/// @return the error code.
+Int32& Boot::BFileReader::Error()
+{
+ return mErrorCode;
+}
+
+/// @brief blob getter.
+/// @return the blob.
+VoidPtr Boot::BFileReader::Blob()
+{
+ return mBlob;
+}
+
+/// @breif Size getter.
+/// @return the size of the file.
+UInt64& Boot::BFileReader::Size()
+{
+ return mSizeFile;
+}
diff --git a/dev/Boot/src/BootString.cc b/dev/Boot/src/BootString.cc
new file mode 100644
index 00000000..afd95790
--- /dev/null
+++ b/dev/Boot/src/BootString.cc
@@ -0,0 +1,92 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: BootString.cc
+ Purpose: BootZ string library
+
+ Revision History:
+
+
+
+------------------------------------------- */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+
+/// BUGS: 0
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Kernel::SizeT Boot::BCopyMem(CharacterTypeUTF16* dest, CharacterTypeUTF16* src, const Kernel::SizeT len)
+{
+ if (!dest || !src)
+ return 0;
+
+ SizeT index = 0UL;
+ for (; index < len; ++index)
+ {
+ dest[index] = src[index];
+ }
+
+ return index;
+}
+
+Kernel::SizeT Boot::BStrLen(const CharacterTypeUTF16* ptr)
+{
+ if (!ptr)
+ return 0;
+
+ Kernel::SizeT cnt = 0;
+
+ while (*ptr != (CharacterTypeUTF16)0)
+ {
+ ++ptr;
+ ++cnt;
+ }
+
+ return cnt;
+}
+
+Kernel::SizeT Boot::BSetMem(CharacterTypeUTF16* src, const CharacterTypeUTF16 byte, const Kernel::SizeT len)
+{
+ if (!src)
+ return 0;
+
+ Kernel::SizeT cnt = 0UL;
+
+ while (*src != 0)
+ {
+ if (cnt > len)
+ break;
+
+ *src = byte;
+ ++src;
+
+ ++cnt;
+ }
+
+ return cnt;
+}
+
+Kernel::SizeT Boot::BSetMem(CharacterTypeUTF8* src, const CharacterTypeUTF8 byte, const Kernel::SizeT len)
+{
+ if (!src)
+ return 0;
+
+ Kernel::SizeT cnt = 0UL;
+
+ while (*src != 0)
+ {
+ if (cnt > len)
+ break;
+
+ *src = byte;
+ ++src;
+
+ ++cnt;
+ }
+
+ return cnt;
+}
diff --git a/dev/Boot/src/BootSupport.cc b/dev/Boot/src/BootSupport.cc
new file mode 100644
index 00000000..99e44531
--- /dev/null
+++ b/dev/Boot/src/BootSupport.cc
@@ -0,0 +1,82 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/BootKit.h>
+#include <FirmwareKit/EFI/API.h>
+#include <FirmwareKit/EFI/EFI.h>
+#include <FirmwareKit/Handover.h>
+#include <BootKit/Support.h>
+#include <KernelKit/MSDOS.h>
+#include <KernelKit/PE.h>
+
+#ifdef __BOOTLDR_STANDALONE__
+
+/// @brief memset definition in C++.
+/// @param dst destination pointer.
+/// @param byte value to fill in.
+/// @param len length of of src.
+EXTERN_C VoidPtr memset(void* dst, int byte, long long unsigned int len)
+{
+ for (size_t i = 0UL; i < len; ++i)
+ {
+ ((int*)dst)[i] = byte;
+ }
+
+ return dst;
+}
+
+/// @brief memcpy definition in C++.
+/// @param dst destination pointer.
+/// @param src source pointer.
+/// @param len length of of src.
+EXTERN_C VoidPtr memcpy(void* dst, const void* src, long long unsigned int len)
+{
+ for (size_t i = 0UL; i < len; ++i)
+ {
+ ((int*)dst)[i] = ((int*)src)[i];
+ }
+
+ return dst;
+}
+
+/// @brief strlen definition in C++.
+EXTERN_C size_t strlen(const char* whatToCheck)
+{
+ SizeT len = 0;
+
+ while (whatToCheck[len] != 0)
+ {
+ ++len;
+ }
+
+ return len;
+}
+
+/// @brief strcmp definition in C++.
+EXTERN_C int strcmp(const char* whatToCheck, const char* whatToCheckRight)
+{
+ if (!whatToCheck || *whatToCheck == 0)
+ return 0;
+
+ SizeT len = 0;
+
+ while (whatToCheck[len] == whatToCheckRight[len])
+ {
+ if (whatToCheck[len] == 0)
+ return 0;
+
+ ++len;
+ }
+
+ return len;
+}
+
+/// @brief something specific to the Microsoft's ABI, When the stack grows too big.
+EXTERN_C void ___chkstk_ms(void)
+{
+}
+
+#endif
diff --git a/dev/Boot/src/BootTextWriter.cc b/dev/Boot/src/BootTextWriter.cc
new file mode 100644
index 00000000..b972deb0
--- /dev/null
+++ b/dev/Boot/src/BootTextWriter.cc
@@ -0,0 +1,169 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: BootTextWriter.cc
+ Purpose: BootZ string library
+
+ Revision History:
+
+
+
+------------------------------------------- */
+
+#include <FirmwareKit/EFI/API.h>
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+/// BUGS: 0 ///
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+@brief puts wrapper over EFI ConOut.
+*/
+Boot::BTextWriter& Boot::BTextWriter::Write(const CharacterTypeUTF16* str)
+{
+#ifdef __DEBUG__
+ if (!str || *str == 0)
+ return *this;
+
+ CharacterTypeUTF16 strTmp[2];
+ strTmp[1] = 0;
+
+ for (size_t i = 0; str[i] != 0; i++)
+ {
+ if (str[i] == '\r')
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+
+ strTmp[0] = '\n';
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ else
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ }
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
+
+/// @brief UTF-8 equivalent of Write (UTF-16).
+/// @param str the input string.
+Boot::BTextWriter& Boot::BTextWriter::Write(const Char* str)
+{
+#ifdef __DEBUG__
+ if (!str || *str == 0)
+ return *this;
+
+ CharacterTypeUTF16 strTmp[2];
+ strTmp[1] = 0;
+
+ for (size_t i = 0; str[i] != 0; i++)
+ {
+ if (str[i] == '\r')
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+
+ strTmp[0] = '\n';
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ else
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ }
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
+
+Boot::BTextWriter& Boot::BTextWriter::Write(const UChar* str)
+{
+#ifdef __DEBUG__
+ if (!str || *str == 0)
+ return *this;
+
+ CharacterTypeUTF16 strTmp[2];
+ strTmp[1] = 0;
+
+ for (size_t i = 0; str[i] != 0; i++)
+ {
+ if (str[i] == '\r')
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+
+ strTmp[0] = '\n';
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ else
+ {
+ strTmp[0] = str[i];
+ ST->ConOut->OutputString(ST->ConOut, strTmp);
+ }
+ }
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
+
+/**
+@brief putc wrapper over EFI ConOut.
+*/
+Boot::BTextWriter& Boot::BTextWriter::WriteCharacter(CharacterTypeUTF16 c)
+{
+#ifdef __DEBUG__
+ EfiCharType str[2];
+
+ str[0] = c;
+ str[1] = 0;
+ ST->ConOut->OutputString(ST->ConOut, str);
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
+
+Boot::BTextWriter& Boot::BTextWriter::Write(const Long& x)
+{
+#ifdef __DEBUG__
+ this->_Write(x);
+ this->Write("h");
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
+
+Boot::BTextWriter& Boot::BTextWriter::_Write(const Long& x)
+{
+#ifdef __DEBUG__
+ UInt64 y = (x > 0 ? x : -x) / 16;
+ UInt64 h = (x > 0 ? x : -x) % 16;
+
+ if (y)
+ this->_Write(y);
+
+ /* fail if the hex number is not base-16 */
+ if (h > 16)
+ {
+ this->WriteCharacter('?');
+ return *this;
+ }
+
+ if (y < 0)
+ y = -y;
+
+ const char cNumbers[] = "0123456789ABCDEF";
+
+ this->WriteCharacter(cNumbers[h]);
+#endif // ifdef __DEBUG__
+
+ return *this;
+}
diff --git a/dev/Boot/src/BootThread.cc b/dev/Boot/src/BootThread.cc
new file mode 100644
index 00000000..4b7dfdfb
--- /dev/null
+++ b/dev/Boot/src/BootThread.cc
@@ -0,0 +1,217 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/BootThread.h>
+#include <BootKit/Support.h>
+#include <BootKit/BootKit.h>
+#include <FirmwareKit/EFI/API.h>
+
+#include <KernelKit/PEF.h>
+#include <KernelKit/PE.h>
+#include <KernelKit/MSDOS.h>
+#include <CFKit/Utils.h>
+#include <Mod/CoreGfx/TextMgr.h>
+
+/// @brief External boot services symbol.
+EXTERN EfiBootServices* BS;
+
+/// @note BootThread doesn't parse the symbols so doesn't nullify them, .bss is though.
+
+namespace Boot
+{
+ EXTERN_C Int32 rt_jump_to_address(VoidPtr code, HEL::BootInfoHeader* handover, UInt8* stack);
+
+ BootThread::BootThread(VoidPtr blob)
+ : fBlob(blob), fStartAddress(nullptr)
+ {
+ // detect the format.
+ const Char* blob_bytes = reinterpret_cast<char*>(fBlob);
+
+ BTextWriter writer;
+
+ if (!blob_bytes)
+ {
+ // failed to provide a valid pointer.
+ return;
+ }
+
+ if (blob_bytes[0] == kMagMz0 &&
+ blob_bytes[1] == kMagMz1)
+ {
+ LDR_EXEC_HEADER_PTR header_ptr = CFKit::ldr_find_exec_header(blob_bytes);
+ LDR_OPTIONAL_HEADER_PTR opt_header_ptr = CFKit::ldr_find_opt_exec_header(blob_bytes);
+
+ if (!header_ptr || !opt_header_ptr)
+ return;
+
+#ifdef __ZKA_AMD64__
+ if (header_ptr->mMachine != kPeMachineAMD64 ||
+ header_ptr->mSignature != kPeSignature)
+ {
+ writer.Write("BootZ: Not a PE32+ executable.\r");
+ return;
+ }
+#elif defined(__ZKA_ARM64__)
+ if (header_ptr->mMachine != kPeMachineARM64 ||
+ header_ptr->mSignature != kPeSignature)
+ {
+ writer.Write("BootZ: Not a PE32+ executable.\r");
+ return;
+ }
+#endif // __ZKA_AMD64__ || __ZKA_ARM64__
+
+ if (opt_header_ptr->mSubsystem != kZKASubsystem)
+ {
+ writer.Write("BootZ: Not a ZKA Subsystem executable.\r");
+ return;
+ }
+
+ writer.Write("BootZ: PE32+ executable detected (ZKA Subsystem).\r");
+
+ auto numSecs = header_ptr->mNumberOfSections;
+
+ writer.Write("BootZ: Major Linker Ver: ").Write(opt_header_ptr->mMajorLinkerVersion).Write("\r");
+ writer.Write("BootZ: Minor Linker Ver: ").Write(opt_header_ptr->mMinorLinkerVersion).Write("\r");
+ writer.Write("BootZ: Major Subsystem Ver: ").Write(opt_header_ptr->mMajorSubsystemVersion).Write("\r");
+ writer.Write("BootZ: Minor Subsystem Ver: ").Write(opt_header_ptr->mMinorSubsystemVersion).Write("\r");
+ writer.Write("BootZ: Magic: ").Write(header_ptr->mSignature).Write("\r");
+
+ constexpr auto cPageSize = 512;
+
+ EfiPhysicalAddress loadStartAddress = opt_header_ptr->mImageBase;
+ loadStartAddress += opt_header_ptr->mBaseOfData;
+
+ writer.Write("BootZ: Image base: ").Write(loadStartAddress).Write("\r");
+
+ auto numPages = opt_header_ptr->mSizeOfImage / cPageSize;
+ BS->AllocatePages(AllocateAddress, EfiLoaderData, numPages, &loadStartAddress);
+
+ LDR_SECTION_HEADER_PTR sectPtr = (LDR_SECTION_HEADER_PTR)(((Char*)opt_header_ptr) + header_ptr->mSizeOfOptionalHeader);
+
+ constexpr auto sectionForCode = ".text";
+ constexpr auto sectionForNewLdr = ".ldr";
+ constexpr auto sectionForBSS = ".bss";
+
+ for (SizeT sectIndex = 0; sectIndex < numSecs; ++sectIndex)
+ {
+ LDR_SECTION_HEADER_PTR sect = &sectPtr[sectIndex];
+
+ SetMem((VoidPtr)(loadStartAddress + sect->mVirtualAddress), 0, sect->mSizeOfRawData);
+
+ if (StrCmp(sectionForCode, sect->mName) == 0)
+ {
+ fStartAddress = (VoidPtr)((UIntPtr)loadStartAddress + opt_header_ptr->mAddressOfEntryPoint);
+ writer.Write("BootZ: Executable entry address: ").Write((UIntPtr)fStartAddress).Write("\r");
+ }
+ else if (StrCmp(sectionForNewLdr, sect->mName) == 0)
+ {
+ struct HANDOVER_INFORMATION_STUB
+ {
+ UInt64 HandoverMagic;
+ UInt32 HandoverType;
+ UInt32 HandoverPad;
+ UInt32 HandoverArch;
+ }* handover_struc = (struct HANDOVER_INFORMATION_STUB*)((UIntPtr)fBlob + sect->mPointerToRawData);
+
+ if (handover_struc->HandoverMagic != kHandoverMagic &&
+ handover_struc->HandoverType != HEL::kTypeKernel)
+ {
+#ifdef __ZKA_AMD64__
+ if (handover_struc->HandoverArch != HEL::kArchAMD64)
+ {
+ fb_render_string("BootZ: Not an handover header, bad CPU...", 40, 10, RGB(0xFF, 0xFF, 0xFF));
+ ::EFI::Stop();
+ }
+#endif
+
+#ifdef __ZKA_ARM64__
+ if (handover_struc->HandoverArch != HEL::kArchARM64)
+ {
+ fb_render_string("BootZ: Not an handover header, bad CPU...", 40, 10, RGB(0xFF, 0xFF, 0xFF));
+ ::EFI::Stop();
+ }
+#endif
+ fb_render_string("BootZ: Not an handover header...", 40, 10, RGB(0xFF, 0xFF, 0xFF));
+
+ ::EFI::Stop();
+ }
+ }
+
+ writer.Write("BootZ: Raw offset: ").Write(sect->mPointerToRawData).Write(" of ").Write(sect->mName).Write("\r");
+
+ CopyMem((VoidPtr)(loadStartAddress + sect->mVirtualAddress), (VoidPtr)((UIntPtr)fBlob + sect->mPointerToRawData), sect->mSizeOfRawData);
+ }
+ }
+ else if (blob_bytes[0] == kPefMagic[0] &&
+ blob_bytes[1] == kPefMagic[1] &&
+ blob_bytes[2] == kPefMagic[2] &&
+ blob_bytes[3] == kPefMagic[3])
+ {
+ // ========================================= //
+ // PEF executable detected.
+ // ========================================= //
+
+ fStartAddress = nullptr;
+ writer.Write("BootZ: PEF executable detected, won't load it.\r");
+ writer.Write("BootZ: note: PEF executables aren't loadable by default.\r");
+ }
+ else
+ {
+ writer.Write("BootZ: Invalid Executable.\r");
+ }
+
+ fStack = new UInt8[mib_cast(16)];
+ }
+
+ /// @note handover header has to be valid!
+ Int32 BootThread::Start(HEL::BootInfoHeader* handover, Bool own_stack)
+ {
+ HEL::HandoverProc err_fn = [](HEL::BootInfoHeader* rcx) -> Int32 {
+ fb_render_string("BootZ: Invalid Boot Image...", 50, 10, RGB(0xFF, 0xFF, 0xFF));
+ ::EFI::Stop();
+
+ return NO;
+ };
+
+ if (!fStartAddress)
+ {
+ err_fn(handover);
+ }
+
+ fHandover = handover;
+
+ if (own_stack)
+ {
+ rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(16) - 1]);
+ }
+ else
+ {
+ if (fStack)
+ delete[] fStack;
+
+ fStack = nullptr;
+
+ return reinterpret_cast<HEL::HandoverProc>(fStartAddress)(fHandover);
+ }
+
+ return kEfiOk;
+ }
+
+ const Char* BootThread::GetName()
+ {
+ return fBlobName;
+ }
+
+ Void BootThread::SetName(const Char* name)
+ {
+ CopyMem(fBlobName, name, StrLen(name));
+ }
+
+ bool BootThread::IsValid()
+ {
+ return fStartAddress != nullptr;
+ }
+} // namespace Boot
diff --git a/dev/Boot/src/BootloaderRsrc.rsrc b/dev/Boot/src/BootloaderRsrc.rsrc
new file mode 100644
index 00000000..cb68da9a
--- /dev/null
+++ b/dev/Boot/src/BootloaderRsrc.rsrc
@@ -0,0 +1,25 @@
+#include "../../Kernel/CompilerKit/Version.h"
+
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904E4"
+ BEGIN
+ VALUE "CompanyName", "Amlal EL Mahrouss"
+ VALUE "FileDescription", "ZKA OS Loader."
+ VALUE "FileVersion", BOOTLOADER_VERSION
+ VALUE "InternalName", "zbaosldr"
+ VALUE "LegalCopyright", "Copyright (C) 2024, Amlal EL Mahrouss all rights reserved."
+ VALUE "OriginalFilename", "zbaosldr.exe"
+ VALUE "ProductName", "zbaosldr"
+ VALUE "ProductVersion", BOOTLOADER_VERSION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1252
+ END
+END
diff --git a/dev/Boot/src/HEL/64X000/.gitkeep b/dev/Boot/src/HEL/64X000/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/src/HEL/64X000/.gitkeep
diff --git a/dev/Boot/src/HEL/64X000/Boot64x0.S b/dev/Boot/src/HEL/64X000/Boot64x0.S
new file mode 100644
index 00000000..6fd087b6
--- /dev/null
+++ b/dev/Boot/src/HEL/64X000/Boot64x0.S
@@ -0,0 +1,35 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.section .boot_hdr
+.align 4
+
+/* BootZ boot header begin for a 64x000 Kernel. */
+
+boot_hdr_mag:
+ .ascii "CB"
+boot_hdr_name:
+ // it has to match ten bytes.
+ .asciz "zbaosldr\0\0"
+boot_hdr_ver:
+ .word 0x104
+boot_hdr_proc:
+ .long bootloader_start
+
+/* BootZ boot header end */
+
+.extern bootloader_main
+.extern bootloader_stack
+
+.globl bootloader_start
+bootloader_start:
+ psh 4 /* real address of .Laddr */
+ ldi 0,(bootloader_stack-bootloader_start)(4) /* stack address location */
+ mv 19,0 /* use user defined stack */
+ jrl
+
+ bl bootloader_main
+ blr
diff --git a/dev/Boot/src/HEL/AMD64/BootAPI.S b/dev/Boot/src/HEL/AMD64/BootAPI.S
new file mode 100644
index 00000000..963ef46a
--- /dev/null
+++ b/dev/Boot/src/HEL/AMD64/BootAPI.S
@@ -0,0 +1,60 @@
+.global rt_jump_to_address
+.global rt_reset_hardware
+
+.text
+
+.intel_syntax noprefix
+
+/**
+ @brief this function setups a stack and then jumps to
+ a function */
+rt_jump_to_address:
+ mov rbx, rcx
+ mov rcx, rdx
+ push rbx
+ push rdx
+ mov rsp, r8
+ push rax
+ jmp rbx
+
+ pop rdx
+ pop rbx
+ pop rax
+
+ ret
+
+rt_reset_hardware:
+ /* dont raise any interrupts. (except ofc NMIs.) */
+ cli
+ /* remap PIC */
+wait_gate1:
+ in al,0x64
+ and al,2
+ jnz wait_gate1
+ mov al,0x0D1
+ out 0x64,al
+wait_gate2:
+ in al,0x64
+ and al,2
+ jnz wait_gate2
+ mov al,0x0FE
+ out 0x60,al
+
+ /* trigger triple fault, by writing to cr4 */
+
+ mov rax, 0
+ lidt [rax]
+
+reset_wait:
+ jmp reset_wait
+
+.global boot_write_cr3
+.global boot_read_cr3
+
+boot_read_cr3:
+ mov rax, rax
+ ret
+
+boot_write_cr3:
+ mov cr3, rcx
+ ret
diff --git a/dev/Boot/src/HEL/AMD64/BootATA.cc b/dev/Boot/src/HEL/AMD64/BootATA.cc
new file mode 100644
index 00000000..ca0f79e6
--- /dev/null
+++ b/dev/Boot/src/HEL/AMD64/BootATA.cc
@@ -0,0 +1,283 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file BootATA.cc
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief ATA driver.
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @copyright Copyright (c) Amlal EL Mahrouss
+ *
+ */
+
+#include <FirmwareKit/EFI.h>
+#include <BootKit/BootKit.h>
+#include <BootKit/HW/ATA.h>
+
+/// bugs: 0
+
+using namespace Boot;
+
+#define kATADataLen 256
+
+static Boolean kATADetected = false;
+static Int32 kATADeviceType = kATADeviceCount;
+static UInt16 kATAData[kATADataLen] = {0};
+
+Boolean boot_ata_detected(Void);
+
+STATIC Boolean boot_ata_wait_io(UInt16 IO)
+{
+ for (int i = 0; i < 400; i++)
+ rt_in8(IO + ATA_REG_STATUS);
+
+ATAWaitForIO_Retry:
+ auto statRdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if ((statRdy & ATA_SR_BSY))
+ goto ATAWaitForIO_Retry;
+
+ATAWaitForIO_Retry2:
+ statRdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if (statRdy & ATA_SR_ERR)
+ return false;
+
+ if (!(statRdy & ATA_SR_DRDY))
+ goto ATAWaitForIO_Retry2;
+
+ return true;
+}
+
+Void boot_ata_select(UInt16 Bus)
+{
+ if (Bus == ATA_PRIMARY_IO)
+ rt_out8(Bus + ATA_REG_HDDEVSEL, ATA_PRIMARY_SEL);
+ else
+ rt_out8(Bus + ATA_REG_HDDEVSEL, ATA_SECONDARY_SEL);
+}
+
+Boolean boot_ata_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster)
+{
+ if (boot_ata_detected())
+ return true;
+
+ BTextWriter writer;
+
+ UInt16 IO = Bus;
+
+ boot_ata_select(IO);
+
+ // Bus init, NEIN bit.
+ rt_out8(IO + ATA_REG_NEIN, 1);
+
+ // identify until it's good.
+ATAInit_Retry:
+ auto statRdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if (statRdy & ATA_SR_ERR)
+ {
+ writer.Write(
+ L"BootZ: ATA: Not an IDE based drive.\r");
+
+ return false;
+ }
+
+ if ((statRdy & ATA_SR_BSY))
+ goto ATAInit_Retry;
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_IDENTIFY);
+
+ /// fetch serial info
+ /// model, speed, number of sectors...
+
+ boot_ata_wait_io(IO);
+
+ for (SizeT indexData = 0ul; indexData < kATADataLen; ++indexData)
+ {
+ kATAData[indexData] = Kernel::HAL::rt_in16(IO + ATA_REG_DATA);
+ }
+
+ OutBus =
+ (Bus == ATA_PRIMARY_IO) ? BootDeviceATA::kPrimary : BootDeviceATA::kSecondary;
+
+ OutMaster = (Bus == ATA_PRIMARY_IO) ? ATA_MASTER : ATA_SLAVE;
+
+ return true;
+}
+
+Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, SizeT SectorSz, SizeT Size)
+{
+ Lba /= SectorSz;
+
+ UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
+
+ boot_ata_wait_io(IO);
+ boot_ata_select(IO);
+
+ rt_out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
+
+ rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz));
+
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
+ rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
+ rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_READ_PIO);
+
+ boot_ata_wait_io(IO);
+
+ for (SizeT IndexOff = 0; IndexOff < Size; ++IndexOff)
+ {
+ boot_ata_wait_io(IO);
+ Buf[IndexOff] = Kernel::HAL::rt_in16(IO + ATA_REG_DATA);
+ boot_ata_wait_io(IO);
+ }
+}
+
+Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, SizeT SectorSz, SizeT Size)
+{
+ Lba /= SectorSz;
+
+ UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
+
+ boot_ata_wait_io(IO);
+ boot_ata_select(IO);
+
+ rt_out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
+
+ rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz));
+
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
+ rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
+ rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_WRITE_PIO);
+
+ boot_ata_wait_io(IO);
+
+ for (SizeT IndexOff = 0; IndexOff < Size; ++IndexOff)
+ {
+ boot_ata_wait_io(IO);
+ rt_out16(IO + ATA_REG_DATA, Buf[IndexOff]);
+ boot_ata_wait_io(IO);
+ }
+
+ boot_ata_wait_io(IO);
+}
+
+/// @check is ATA detected?
+Boolean boot_ata_detected(Void)
+{
+ return kATADetected;
+}
+
+/***
+ *
+ *
+ * @brief ATA Device class.
+ *
+ *
+ */
+
+/**
+ * @brief ATA Device constructor.
+ * @param void none.
+ */
+BootDeviceATA::BootDeviceATA() noexcept
+{
+ if (boot_ata_init(ATA_PRIMARY_IO, true, this->Leak().mBus,
+ this->Leak().mMaster) ||
+ boot_ata_init(ATA_SECONDARY_IO, true, this->Leak().mBus,
+ this->Leak().mMaster))
+ {
+ kATADetected = true;
+ }
+}
+/**
+ * @brief Is ATA detected?
+ */
+BootDeviceATA::operator bool()
+{
+ return boot_ata_detected();
+}
+
+/**
+ @brief Read Buf from disk
+ @param Sz Sector size
+ @param Buf buffer
+*/
+BootDeviceATA& BootDeviceATA::Read(CharacterTypeUTF8* Buf, const SizeT& SectorSz)
+{
+ if (!boot_ata_detected())
+ {
+ Leak().mErr = true;
+ return *this;
+ }
+
+ this->Leak().mErr = false;
+
+ if (!Buf || SectorSz < 1)
+ return *this;
+
+ boot_ata_read(this->Leak().mBase, this->Leak().mBus, this->Leak().mMaster,
+ Buf, SectorSz, this->Leak().mSize);
+
+ return *this;
+}
+
+/**
+ @brief Write Buf into disk
+ @param Sz Sector size
+ @param Buf buffer
+*/
+BootDeviceATA& BootDeviceATA::Write(CharacterTypeUTF8* Buf, const SizeT& SectorSz)
+{
+ if (!boot_ata_detected())
+ {
+ Leak().mErr = true;
+ return *this;
+ }
+
+ Leak().mErr = false;
+
+ if (!Buf || SectorSz < 1 || this->Leak().mSize < 1)
+ {
+ Leak().mErr = true;
+ return *this;
+ }
+
+ boot_ata_write(this->Leak().mBase, this->Leak().mBus, this->Leak().mMaster,
+ Buf, SectorSz, this->Leak().mSize);
+
+ return *this;
+}
+
+/**
+ * @brief ATA trait getter.
+ * @return BootDeviceATA::ATATrait& the drive config.
+ */
+BootDeviceATA::ATATrait& BootDeviceATA::Leak()
+{
+ return mTrait;
+}
+
+/***
+ @brief Getter, gets the number of sectors inside the drive.
+*/
+SizeT BootDeviceATA::GetSectorsCount() noexcept
+{
+ return (kATAData[61] << 16) | kATAData[60];
+}
+
+SizeT BootDeviceATA::GetDiskSize() noexcept
+{
+ return this->GetSectorsCount() * BootDeviceATA::kSectorSize;
+}
diff --git a/dev/Boot/src/HEL/AMD64/BootPlatform.cc b/dev/Boot/src/HEL/AMD64/BootPlatform.cc
new file mode 100644
index 00000000..5cf6aae3
--- /dev/null
+++ b/dev/Boot/src/HEL/AMD64/BootPlatform.cc
@@ -0,0 +1,106 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+
+#ifdef __BOOTLDR_STANDALONE__
+
+using namespace Boot;
+
+EXTERN_C void rt_hlt()
+{
+ asm volatile("hlt");
+}
+
+EXTERN_C void rt_cli()
+{
+ asm volatile("cli");
+}
+
+EXTERN_C void rt_sti()
+{
+ asm volatile("sti");
+}
+
+EXTERN_C void rt_cld()
+{
+ asm volatile("cld");
+}
+
+EXTERN_C void rt_std()
+{
+ asm volatile("std");
+}
+
+EXTERN_C void rt_out8(UInt16 port, UInt8 value)
+{
+ asm volatile("outb %%al, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+}
+
+EXTERN_C void rt_out16(UInt16 port, UInt16 value)
+{
+ asm volatile("outw %%ax, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+}
+
+EXTERN_C void rt_out32(UInt16 port, UInt32 value)
+{
+ asm volatile("outl %%eax, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+}
+
+EXTERN_C UInt8 rt_in8(UInt16 port)
+{
+ UInt8 value;
+ asm volatile("inb %1, %%al"
+ : "=a"(value)
+ : "Nd"(port)
+ : "memory");
+
+ return value;
+}
+
+EXTERN_C UInt16 rt_in16(UInt16 port)
+{
+ UInt16 value;
+ asm volatile("inw %%dx, %%ax"
+ : "=a"(value)
+ : "d"(port));
+
+ return value;
+}
+
+EXTERN_C UInt32 rt_in32(UInt16 port)
+{
+ UInt32 value;
+ asm volatile("inl %1, %%eax"
+ : "=a"(value)
+ : "Nd"(port)
+ : "memory");
+
+ return value;
+}
+
+#else
+
+#include <HALKit/AMD64/Processor.h>
+
+void rt_hlt()
+{
+ Kernel::HAL::rt_halt();
+}
+
+#endif // __BOOTLDR_STANDALONE__
diff --git a/dev/Boot/src/HEL/AMD64/BootSATA.cc b/dev/Boot/src/HEL/AMD64/BootSATA.cc
new file mode 100644
index 00000000..c5de670f
--- /dev/null
+++ b/dev/Boot/src/HEL/AMD64/BootSATA.cc
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file BootAHCI.cc
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief SATA support for BootZ.
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @copyright Copyright (c) Amlal EL Mahrouss
+ *
+ */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/HW/SATA.h>
diff --git a/dev/Boot/src/HEL/AMD64/EFIBootStartup.cc b/dev/Boot/src/HEL/AMD64/EFIBootStartup.cc
new file mode 100644
index 00000000..81d2d076
--- /dev/null
+++ b/dev/Boot/src/HEL/AMD64/EFIBootStartup.cc
@@ -0,0 +1,306 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/BootKit.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <FirmwareKit/EFI.h>
+#include <FirmwareKit/EFI/API.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/MSDOS.h>
+#include <KernelKit/PE.h>
+#include <KernelKit/PEF.h>
+#include <NewKit/Macros.h>
+#include <NewKit/Ref.h>
+#include <BootKit/BootThread.h>
+#include <Mod/CoreGfx/FBMgr.h>
+
+// Makes the compiler shut up.
+#ifndef kMachineModel
+#define kMachineModel "ZkaOS"
+#endif // !kMachineModel
+
+#ifndef kExpectedWidth
+#define kExpectedWidth (1280)
+#endif
+
+#ifndef kExpectedHeight
+#define kExpectedHeight (720)
+#endif
+
+/** Graphics related. */
+
+STATIC EfiGraphicsOutputProtocol* kGop = nullptr;
+STATIC UInt16 kGopStride = 0U;
+STATIC EfiGUID kGopGuid;
+
+EXTERN_C Void rt_reset_hardware();
+
+EXTERN EfiBootServices* BS;
+
+/**
+ @brief Finds and stores the GOP object.
+*/
+STATIC Bool boot_init_fb() noexcept
+{
+ kGopGuid = EfiGUID(EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID);
+ kGop = nullptr;
+
+ if (BS->LocateProtocol(&kGopGuid, nullptr, (VoidPtr*)&kGop) != kEfiOk)
+ return No;
+
+ kGopStride = 4;
+
+ for (SizeT i = 0; i < kGop->Mode->MaxMode; ++i)
+ {
+ EfiGraphicsOutputProtocolModeInformation* infoPtr = nullptr;
+ UInt32 sz = 0U;
+
+ kGop->QueryMode(kGop, i, &sz, &infoPtr);
+
+ if (infoPtr->HorizontalResolution == kExpectedWidth &&
+ infoPtr->VerticalResolution == kExpectedHeight)
+ {
+ kGop->SetMode(kGop, i);
+ return Yes;
+ }
+ }
+
+ return No;
+}
+
+EXTERN EfiBootServices* BS;
+
+/// @brief Main EFI entrypoint.
+/// @param image_handle Handle of this image.
+/// @param sys_table The system table of it.
+/// @return nothing, never returns.
+EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr image_handle,
+ EfiSystemTable* sys_table)
+{
+ InitEFI(sys_table); ///! Init the EFI library.
+
+ HEL::BootInfoHeader* handover_hdr =
+ new HEL::BootInfoHeader();
+
+ UInt32 map_key = 0;
+ UInt32 size_struct_ptr = sizeof(EfiMemoryDescriptor);
+ EfiMemoryDescriptor* struct_ptr = nullptr;
+ UInt32 sz_desc = sizeof(EfiMemoryDescriptor);
+ UInt32 rev_desc = 0;
+
+#ifdef ZBA_USE_FB
+ if (!boot_init_fb())
+ return 1; ///! Init the GOP.
+
+ for (SizeT index_vt = 0; index_vt < sys_table->NumberOfTableEntries;
+ ++index_vt)
+ {
+ Char* vendor_table = reinterpret_cast<Char*>(
+ sys_table->ConfigurationTable[index_vt].VendorTable);
+
+ // ACPI's 'RSD PTR', which contains the ACPI SDT (MADT, FACP...)
+ if (vendor_table[0] == 'R' && vendor_table[1] == 'S' &&
+ vendor_table[2] == 'D' && vendor_table[3] == ' ' &&
+ vendor_table[4] == 'P' && vendor_table[5] == 'T' &&
+ vendor_table[6] == 'R' && vendor_table[7] == ' ')
+ {
+ handover_hdr->f_HardwareTables.f_VendorPtr = (VoidPtr)vendor_table;
+ break;
+ }
+ }
+
+ // ------------------------------------------ //
+ // draw background color.
+ // ------------------------------------------ //
+
+ handover_hdr->f_GOP.f_The = kGop->Mode->FrameBufferBase;
+ handover_hdr->f_GOP.f_Width = kGop->Mode->Info->VerticalResolution;
+ handover_hdr->f_GOP.f_Height = kGop->Mode->Info->HorizontalResolution;
+ handover_hdr->f_GOP.f_PixelPerLine = kGop->Mode->Info->PixelsPerScanLine;
+ handover_hdr->f_GOP.f_PixelFormat = kGop->Mode->Info->PixelFormat;
+ handover_hdr->f_GOP.f_Size = kGop->Mode->FrameBufferSize;
+#endif // ZBA_USE_FB
+
+ // ------------------------------------------- //
+ // Grab MP services, extended to runtime. //
+ // ------------------------------------------- //
+
+ EfiGUID guid_mp = EfiGUID(EFI_MP_SERVICES_PROTOCOL_GUID);
+ EfiMpServicesProtocol* mp = nullptr;
+
+ BS->LocateProtocol(&guid_mp, nullptr, reinterpret_cast<VoidPtr*>(&mp));
+
+ handover_hdr->f_HardwareTables.f_MpPtr = reinterpret_cast<VoidPtr>(mp);
+
+ kHandoverHeader = handover_hdr;
+
+ fb_init();
+
+ FB::fb_clear_video();
+
+ FBDrawBitMapInRegion(zka_disk, ZKA_DISK_WIDTH, ZKA_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - ZKA_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_DISK_HEIGHT) / 2);
+
+ fb_clear();
+
+ UInt32 cnt_enabled = 0;
+ UInt32 cnt_disabled = 0;
+
+ if (mp)
+ {
+ mp->GetNumberOfProcessors(mp, &cnt_disabled, &cnt_enabled);
+ handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1;
+ }
+ else
+ {
+ handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = NO;
+ }
+ // Fill handover header now.
+
+ // ---------------------------------------------------- //
+ // The following checks for an exisiting partition
+ // inside the disk, if it doesn't have one,
+ // format the disk.
+ // ---------------------------------------------------- //
+
+ BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
+
+ struct_ptr = new EfiMemoryDescriptor[sz_desc];
+
+ BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
+
+ auto kDefaultMemoryMap = 0; // Grab any usable entries.
+
+ //-----------------------------------------------------------//
+ // A simple loop which finds a usable memory region for us.
+ //-----------------------------------------------------------//
+
+ SizeT lookup_index = 0UL;
+
+ for (; struct_ptr[lookup_index].Kind != EfiMemoryType::EfiConventionalMemory; ++lookup_index)
+ {
+ ZKA_UNUSED(0);
+ }
+
+ kDefaultMemoryMap = lookup_index;
+
+ //-------------------------------------------------------------//
+ // Update handover file specific table and phyiscal start field.
+ //-------------------------------------------------------------//
+
+ handover_hdr->f_BitMapStart = nullptr; /* Start of bitmap. */
+ handover_hdr->f_BitMapSize = kHandoverBitMapSz; /* Size of bitmap. */
+
+ while (BS->AllocatePool(EfiLoaderData, handover_hdr->f_BitMapSize, &handover_hdr->f_BitMapStart) != kEfiOk)
+ {
+ if (handover_hdr->f_BitMapStart)
+ {
+ BS->FreePool(handover_hdr->f_BitMapStart);
+ handover_hdr->f_BitMapStart = nullptr;
+ }
+ }
+
+ handover_hdr->f_FirmwareCustomTables[0] = (VoidPtr)BS;
+ handover_hdr->f_FirmwareCustomTables[1] = (VoidPtr)ST;
+
+ Boot::BFileReader reader_syschk(L"syschk.sys", image_handle);
+ reader_syschk.ReadAll(0);
+
+ Boot::BootThread* syschk_thread = nullptr;
+
+ // ------------------------------------------ //
+ // If we succeed in reading the blob, then execute it.
+ // ------------------------------------------ //
+
+ if (reader_syschk.Blob())
+ {
+ syschk_thread = new Boot::BootThread(reader_syschk.Blob());
+ syschk_thread->SetName("BootZ: System Recovery Check");
+ }
+
+ Boot::BDiskFormatFactory<BootDeviceATA> partition_factory;
+
+ if (syschk_thread->Start(handover_hdr, NO) != kEfiOk)
+ {
+ if (partition_factory.IsPartitionValid() == NO)
+ {
+ Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor root{};
+
+ root.fFileName[0] = kNeFSRoot[0];
+ root.fFileName[1] = 0;
+
+ root.fKind = kNeFSCatalogKindDir;
+
+ const auto kFSName = "SSD";
+
+ partition_factory.Format(kFSName, &root, 1);
+
+ fb_init();
+
+ FB::fb_clear_video();
+
+ FBDrawBitMapInRegion(zka_has_disk, ZKA_HAS_DISK_WIDTH, ZKA_HAS_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - ZKA_HAS_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_HAS_DISK_HEIGHT) / 2);
+
+ fb_clear();
+ }
+ }
+
+ // ------------------------------------------ //
+ // null these fields, to avoid being reused later.
+ // ------------------------------------------ //
+
+ handover_hdr->f_FirmwareCustomTables[0] = nullptr;
+ handover_hdr->f_FirmwareCustomTables[1] = nullptr;
+
+ handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor);
+
+ handover_hdr->f_Magic = kHandoverMagic;
+ handover_hdr->f_Version = kHandoverVersion;
+
+ // Provide fimware vendor name.
+
+ Boot::BCopyMem(handover_hdr->f_FirmwareVendorName, sys_table->FirmwareVendor,
+ handover_hdr->f_FirmwareVendorLen);
+
+ handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor);
+
+ // Assign to global 'kHandoverHeader'.
+
+ Boot::BFileReader reader_kernel(L"minoskrnl.exe", image_handle);
+
+ reader_kernel.ReadAll(0);
+
+ Boot::BootThread* kernel_thread = nullptr;
+
+ // ------------------------------------------ //
+ // If we succeed in reading the blob, then execute it.
+ // ------------------------------------------ //
+
+ if (reader_kernel.Blob())
+ {
+ kernel_thread = new Boot::BootThread(reader_kernel.Blob());
+ kernel_thread->SetName("BootZ: MicroKernel.");
+
+ handover_hdr->f_KernelImage = reader_kernel.Blob();
+ }
+ else
+ {
+ fb_init();
+ FBDrawBitMapInRegion(zka_no_disk, ZKA_NO_DISK_WIDTH, ZKA_NO_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - ZKA_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_NO_DISK_HEIGHT) / 2);
+
+ EFI::Stop();
+ }
+
+ EFI::ExitBootServices(map_key, image_handle);
+
+ // ---------------------------------------------------- //
+ // Finally load the OS kernel.
+ // ---------------------------------------------------- //
+
+ kernel_thread->Start(handover_hdr, YES);
+
+ CANT_REACH();
+}
diff --git a/dev/Boot/src/HEL/ARM64/.gitkeep b/dev/Boot/src/HEL/ARM64/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/.gitkeep
diff --git a/dev/Boot/src/HEL/ARM64/BootAPI.S b/dev/Boot/src/HEL/ARM64/BootAPI.S
new file mode 100644
index 00000000..a60ad218
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/BootAPI.S
@@ -0,0 +1,12 @@
+.global rt_jump_to_address
+
+.text
+
+/**
+ @brief this function setups a stack and then jumps to
+ a function */
+rt_jump_to_address:
+ mov x19, x0
+ mov sp, x2
+ blr x19
+
diff --git a/dev/Boot/src/HEL/ARM64/BootPlatform.cc b/dev/Boot/src/HEL/ARM64/BootPlatform.cc
new file mode 100644
index 00000000..8025e1e2
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/BootPlatform.cc
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+
+#ifdef __BOOTLDR_STANDALONE__
+
+using namespace Boot;
+
+EXTERN_C void rt_hlt()
+{
+ while (Yes)
+ ;
+}
+
+EXTERN_C void rt_cli()
+{
+}
+
+EXTERN_C void rt_sti()
+{
+}
+
+EXTERN_C void rt_cld()
+{
+}
+
+EXTERN_C void rt_std()
+{
+}
+
+#endif // __BOOTLDR_STANDALONE__
diff --git a/dev/Boot/src/HEL/ARM64/CoreBootStartup.S b/dev/Boot/src/HEL/ARM64/CoreBootStartup.S
new file mode 100644
index 00000000..71777528
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/CoreBootStartup.S
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef __ZKA_COREBOOT__
+
+.section .boot_hdr
+.align 4
+
+/* BootZ boot header begin */
+
+boot_hdr_mag:
+ .ascii "CB"
+boot_hdr_name:
+ // it has to match ten bytes.
+ .asciz "zbaosldr\0\0"
+boot_hdr_ver:
+ .word 0x104
+boot_hdr_proc:
+ .long bootloader_start
+
+/* BootZ boot header end */
+
+.extern bootloader_main
+.extern bootloader_stack
+
+.globl bootloader_start
+bootloader_start:
+ adr x0, bootloader_stack
+ ldr x1, =bootloader_start
+ sub x0, x0, x1
+ ldr x0, [x0]
+ mov sp, x0
+
+ bl bootloader_main
+ ret
+
+#endif // __ZKA_COREBOOT__ \ No newline at end of file
diff --git a/dev/Boot/src/HEL/ARM64/EFIBootStartup.cc b/dev/Boot/src/HEL/ARM64/EFIBootStartup.cc
new file mode 100644
index 00000000..76010d21
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/EFIBootStartup.cc
@@ -0,0 +1,220 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/BootKit.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <FirmwareKit/EFI.h>
+#include <FirmwareKit/EFI/API.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/MSDOS.h>
+#include <KernelKit/PE.h>
+#include <KernelKit/PEF.h>
+#include <NewKit/Macros.h>
+#include <NewKit/Ref.h>
+#include <BootKit/BootThread.h>
+#include <Mod/CoreGfx/FBMgr.h>
+
+// Makes the compiler shut up.
+#ifndef kMachineModel
+#define kMachineModel "ZkaOS"
+#endif // !kMachineModel
+
+#ifndef kExpectedWidth
+#define kExpectedWidth (1920)
+#endif
+
+#ifndef kExpectedHeight
+#define kExpectedHeight (1080)
+#endif
+
+/** Graphics related. */
+
+STATIC EfiGraphicsOutputProtocol* kGop = nullptr;
+STATIC UInt16 kGopStride = 0U;
+STATIC EfiGUID kGopGuid;
+
+EXTERN_C Void rt_reset_hardware();
+
+EXTERN EfiBootServices* BS;
+
+/**
+ @brief Finds and stores the GOP object.
+*/
+STATIC Bool boot_init_fb() noexcept
+{
+ kGopGuid = EfiGUID(EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID);
+ kGop = nullptr;
+
+ if (BS->LocateProtocol(&kGopGuid, nullptr, (VoidPtr*)&kGop) != kEfiOk)
+ return No;
+
+ kGopStride = 4;
+
+ for (SizeT i = 0; i < kGop->Mode->MaxMode; ++i)
+ {
+ EfiGraphicsOutputProtocolModeInformation* infoPtr = nullptr;
+ UInt32 sz = 0U;
+
+ kGop->QueryMode(kGop, i, &sz, &infoPtr);
+
+ if (infoPtr->HorizontalResolution == kExpectedWidth &&
+ infoPtr->VerticalResolution == kExpectedHeight)
+ {
+ kGop->SetMode(kGop, i);
+ return Yes;
+ }
+ }
+
+ return No;
+}
+
+EXTERN EfiBootServices* BS;
+
+/// @brief Main EFI entrypoint.
+/// @param image_handle Handle of this image.
+/// @param sys_table The system table of it.
+/// @return nothing, never returns.
+EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr image_handle,
+ EfiSystemTable* sys_table)
+{
+ InitEFI(sys_table); ///! Init the EFI library.
+
+ HEL::BootInfoHeader* handover_hdr =
+ new HEL::BootInfoHeader();
+
+ UInt32 map_key = 0;
+ UInt32 size_struct_ptr = sizeof(EfiMemoryDescriptor);
+ EfiMemoryDescriptor* struct_ptr = nullptr;
+ UInt32 sz_desc = sizeof(EfiMemoryDescriptor);
+ UInt32 rev_desc = 0;
+
+#ifdef ZBA_USE_FB
+ if (!boot_init_fb())
+ return 1; ///! Init the GOP.
+
+ for (SizeT index_vt = 0; index_vt < sys_table->NumberOfTableEntries;
+ ++index_vt)
+ {
+ Char* vendor_table = reinterpret_cast<Char*>(
+ sys_table->ConfigurationTable[index_vt].VendorTable);
+
+ // ACPI's 'RSD PTR', which contains the ACPI SDT (MADT, FACP...)
+ if (vendor_table[0] == 'R' && vendor_table[1] == 'S' &&
+ vendor_table[2] == 'D' && vendor_table[3] == ' ' &&
+ vendor_table[4] == 'P' && vendor_table[5] == 'T' &&
+ vendor_table[6] == 'R' && vendor_table[7] == ' ')
+ {
+ handover_hdr->f_HardwareTables.f_VendorPtr = (VoidPtr)vendor_table;
+ break;
+ }
+ }
+
+ // ------------------------------------------ //
+ // draw background color.
+ // ------------------------------------------ //
+
+ handover_hdr->f_GOP.f_The = kGop->Mode->FrameBufferBase;
+ handover_hdr->f_GOP.f_Width = kGop->Mode->Info->VerticalResolution;
+ handover_hdr->f_GOP.f_Height = kGop->Mode->Info->HorizontalResolution;
+ handover_hdr->f_GOP.f_PixelPerLine = kGop->Mode->Info->PixelsPerScanLine;
+ handover_hdr->f_GOP.f_PixelFormat = kGop->Mode->Info->PixelFormat;
+ handover_hdr->f_GOP.f_Size = kGop->Mode->FrameBufferSize;
+#endif // ZBA_USE_FB
+
+ // ------------------------------------------- //
+ // Grab MP services, extended to runtime. //
+ // ------------------------------------------- //
+
+ EfiGUID guid_mp = EfiGUID(EFI_MP_SERVICES_PROTOCOL_GUID);
+ EfiMpServicesProtocol* mp = nullptr;
+
+ BS->LocateProtocol(&guid_mp, nullptr, reinterpret_cast<VoidPtr*>(&mp));
+
+ handover_hdr->f_HardwareTables.f_MpPtr = reinterpret_cast<VoidPtr>(mp);
+
+ kHandoverHeader = handover_hdr;
+
+ fb_init();
+
+ FB::fb_clear_video();
+
+ FBDrawBitMapInRegion(zka_disk, ZKA_DISK_WIDTH, ZKA_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - ZKA_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_DISK_HEIGHT) / 2);
+
+ fb_clear();
+
+ UInt32 cnt_enabled = 0;
+ UInt32 cnt_disabled = 0;
+
+ if (mp)
+ {
+ mp->GetNumberOfProcessors(mp, &cnt_disabled, &cnt_enabled);
+ handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1;
+ }
+ else
+ {
+ handover_hdr->f_HardwareTables.f_MultiProcessingEnabled = NO;
+ }
+
+ //-------------------------------------------------------------//
+ // Update handover file specific table and phyiscal start field.
+ //-------------------------------------------------------------//
+
+ handover_hdr->f_BitMapStart = nullptr; /* Start of bitmap. */
+ handover_hdr->f_BitMapSize = kHandoverBitMapSz; /* Size of bitmap. */
+
+ while (BS->AllocatePool(EfiLoaderData, handover_hdr->f_BitMapSize, &handover_hdr->f_BitMapStart) != kEfiOk)
+ {
+ if (handover_hdr->f_BitMapStart)
+ {
+ BS->FreePool(handover_hdr->f_BitMapStart);
+ handover_hdr->f_BitMapStart = nullptr;
+ }
+ }
+
+ // ------------------------------------------ //
+ // null these fields, to avoid being reused later.
+ // ------------------------------------------ //
+
+ handover_hdr->f_FirmwareCustomTables[0] = nullptr;
+ handover_hdr->f_FirmwareCustomTables[1] = nullptr;
+
+ handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor);
+
+ handover_hdr->f_Magic = kHandoverMagic;
+ handover_hdr->f_Version = kHandoverVersion;
+
+ // Provide fimware vendor name.
+
+ Boot::BCopyMem(handover_hdr->f_FirmwareVendorName, sys_table->FirmwareVendor,
+ handover_hdr->f_FirmwareVendorLen);
+
+ handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor);
+
+ // Assign to global 'kHandoverHeader'.
+
+ Boot::BFileReader reader_kernel(L"minoskrnl.exe", image_handle);
+
+ reader_kernel.ReadAll(0);
+
+ // ------------------------------------------ //
+ // If we succeed in reading the blob, then execute it.
+ // ------------------------------------------ //
+
+ if (reader_kernel.Blob())
+ {
+ auto kernel_thread = Boot::BootThread(reader_kernel.Blob());
+ kernel_thread.SetName("BootZ: MicroKernel.");
+
+ handover_hdr->f_KernelImage = reader_kernel.Blob();
+
+ EFI::ExitBootServices(map_key, image_handle);
+
+ kernel_thread.Start(handover_hdr, YES);
+ }
+
+ CANT_REACH();
+}
diff --git a/dev/Boot/src/HEL/POWER/.gitkeep b/dev/Boot/src/HEL/POWER/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Boot/src/HEL/POWER/.gitkeep
diff --git a/dev/Boot/src/HEL/POWER/CoreBootStartup.S b/dev/Boot/src/HEL/POWER/CoreBootStartup.S
new file mode 100644
index 00000000..02048cfa
--- /dev/null
+++ b/dev/Boot/src/HEL/POWER/CoreBootStartup.S
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.section .boot_hdr
+.align 4
+
+/* BootZ boot header begin */
+
+boot_hdr_mag:
+ .ascii "CB"
+boot_hdr_name:
+ // it has to match ten bytes.
+ .asciz "zbaosldr\0\0"
+boot_hdr_ver:
+ .word 0x104
+boot_hdr_proc:
+ .long bootloader_start
+
+/* BootZ boot header end */
+
+.extern bootloader_main
+.extern bootloader_stack
+
+.globl bootloader_start
+bootloader_start:
+ mflr 4 /* real address of .Laddr */
+ lwz 0,(bootloader_stack-bootloader_start)(4) /* stack address location */
+ mr 1,0 /* use user defined stack */
+
+ bl bootloader_main
+ blr
diff --git a/dev/Boot/src/New+Delete.cc b/dev/Boot/src/New+Delete.cc
new file mode 100644
index 00000000..48196a6b
--- /dev/null
+++ b/dev/Boot/src/New+Delete.cc
@@ -0,0 +1,60 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <BootKit/Platform.h>
+#include <BootKit/Protocol.h>
+#include <BootKit/BootKit.h>
+
+#ifdef __BOOTLDR_STANDALONE__
+EXTERN EfiBootServices* BS;
+
+/// @brief Allocates a new object.
+/// @param sz the size.
+/// @return
+void* operator new(size_t sz)
+{
+ void* buf = nullptr;
+
+ while (BS->AllocatePool(EfiMemoryType::EfiLoaderData, sz, &buf) == kBufferTooSmall)
+ BS->FreePool(buf);
+
+ return buf;
+}
+
+/// @brief Allocates a new object.
+/// @param sz the size.
+/// @return
+void* operator new[](size_t sz)
+{
+ void* buf = nullptr;
+ BS->AllocatePool(EfiMemoryType::EfiLoaderData, sz, &buf);
+
+ return buf;
+}
+
+/// @brief Deletes the object.
+/// @param buf the object.
+void operator delete(void* buf)
+{
+ BS->FreePool(buf);
+}
+
+/// @brief Deletes the object.
+/// @param buf the object.
+void operator delete[](void* buf)
+{
+ BS->FreePool(buf);
+}
+
+/// @brief Deletes the object (array specific).
+/// @param buf the object.
+/// @param size it's size.
+void operator delete(void* buf, size_t size)
+{
+ BS->FreePool(buf);
+}
+
+#endif // __BOOTLDR_STANDALONE__
diff --git a/dev/Boot/src/Root/EFI/STARTUP.NSH b/dev/Boot/src/Root/EFI/STARTUP.NSH
new file mode 100644
index 00000000..2cf25f23
--- /dev/null
+++ b/dev/Boot/src/Root/EFI/STARTUP.NSH
@@ -0,0 +1,2 @@
+fs0:
+BOOT\BOOTAA64.EFI
diff --git a/dev/Hints/CompilerHint.h b/dev/Hints/CompilerHint.h
new file mode 100644
index 00000000..6da68323
--- /dev/null
+++ b/dev/Hints/CompilerHint.h
@@ -0,0 +1,25 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef HINTKIT_HINT_H
+#define HINTKIT_HINT_H
+
+#ifdef __LIBCOMPILER__
+#pragma compiler(hint_manifest)
+#endif
+
+#define _Input
+#define _Output
+
+#define _Optional
+
+#define _StrictCheckInput
+#define _StrictCheckOutput
+
+#define _InOut
+#define _StrictInOut
+
+#endif // ifndef HINTKIT_HINT_H
diff --git a/dev/Kernel/ArchKit/ArchKit.h b/dev/Kernel/ArchKit/ArchKit.h
new file mode 100644
index 00000000..7a0fbbcf
--- /dev/null
+++ b/dev/Kernel/ArchKit/ArchKit.h
@@ -0,0 +1,92 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Function.h>
+
+#include <FirmwareKit/Handover.h>
+
+#ifdef __ZKA_AMD64__
+#include <HALKit/AMD64/Paging.h>
+#include <HALKit/AMD64/Hypervisor.h>
+#include <HALKit/AMD64/Processor.h>
+#elif defined(__ZKA_POWER64__)
+#include <HALKit/POWER/Processor.h>
+#elif defined(__ZKA_ARM64__)
+#include <HALKit/ARM64/Processor.h>
+#else
+#error !!! unknown architecture !!!
+#endif
+
+namespace Kernel
+{
+ inline SSizeT rt_hash_seed(const Char* seed, int mul)
+ {
+ SSizeT hash = 0;
+
+ for (SSizeT idx = 0; seed[idx] != 0; ++idx)
+ {
+ hash += seed[idx];
+ hash ^= mul;
+ }
+
+ return hash;
+ }
+
+ /// @brief write to mapped memory register
+ /// @param base the base address.
+ /// @param reg the register.
+ /// @param value the write to write on it.
+ template <typename WordLength>
+ inline Void ke_dma_write(WordLength base, WordLength reg, WordLength value) noexcept
+ {
+ *(volatile WordLength*)(base + reg) = value;
+ }
+
+ /// @brief read from mapped memory register.
+ /// @param base base address
+ /// @param reg the register.
+ /// @return the value inside the register.
+ template <typename WordLength>
+ inline UInt32 ke_dma_read(WordLength base, WordLength reg) noexcept
+ {
+ return *(volatile WordLength*)((UInt64)base + reg);
+ }
+
+ namespace HAL
+ {
+ auto mm_is_bitmap(VoidPtr ptr) -> Bool;
+ }
+} // namespace Kernel
+
+#define kKernelMaxSystemCalls (256)
+
+typedef Kernel::Void (*rt_syscall_proc)(Kernel::VoidPtr);
+
+struct HAL_SYSCALL_RECORD final
+{
+ Kernel::Int64 fHash;
+ Kernel::Bool fHooked;
+ rt_syscall_proc fProc;
+
+ operator bool()
+ {
+ return fHooked;
+ }
+};
+
+inline Kernel::Array<HAL_SYSCALL_RECORD,
+ kKernelMaxSystemCalls>
+ kSyscalls;
+
+inline Kernel::Array<HAL_SYSCALL_RECORD,
+ kKernelMaxSystemCalls>
+ kKerncalls;
+
+EXTERN_C Kernel::HAL::StackFramePtr mp_get_current_context(Kernel::Int64 pid);
diff --git a/dev/Kernel/CFKit/GUIDWizard.h b/dev/Kernel/CFKit/GUIDWizard.h
new file mode 100644
index 00000000..0a652310
--- /dev/null
+++ b/dev/Kernel/CFKit/GUIDWizard.h
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CFKit/GUIDWrapper.h>
+#include <NewKit/Array.h>
+#include <NewKit/ArrayList.h>
+#include <NewKit/Defines.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Ref.h>
+#include <NewKit/Stream.h>
+#include <NewKit/KString.h>
+
+namespace CFKit::XRN::Version1
+{
+ using namespace Kernel;
+
+ Ref<GUIDSequence*> cf_make_sequence(const ArrayList<UInt32>& seq);
+ ErrorOr<Ref<Kernel::KString>> cf_try_guid_to_string(Ref<GUIDSequence*>& guid);
+} // namespace CFKit::XRN::Version1
diff --git a/dev/Kernel/CFKit/GUIDWrapper.h b/dev/Kernel/CFKit/GUIDWrapper.h
new file mode 100644
index 00000000..e69aa82a
--- /dev/null
+++ b/dev/Kernel/CFKit/GUIDWrapper.h
@@ -0,0 +1,60 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+#include <NewKit/Stream.h>
+
+/* GUID for C++ Components */
+
+#define kXRNNil "@{........-....-M...-N...-............}"
+
+// eXtensible Resource Information
+namespace CFKit::XRN
+{
+ using namespace Kernel;
+
+ union GUIDSequence {
+ alignas(8) UShort u8[16];
+ alignas(8) UShort u16[8];
+ alignas(8) UInt u32[4];
+ alignas(8) ULong u64[2];
+
+ struct
+ {
+ alignas(8) UInt fMs1;
+ UShort fMs2;
+ UShort fMs3;
+ UChar fMs4[8];
+ };
+ };
+
+ class GUID final
+ {
+ public:
+ explicit GUID() = default;
+ ~GUID() = default;
+
+ public:
+ GUID& operator=(const GUID&) = default;
+ GUID(const GUID&) = default;
+
+ public:
+ GUIDSequence& operator->() noexcept
+ {
+ return fUUID;
+ }
+ GUIDSequence& Leak() noexcept
+ {
+ return fUUID;
+ }
+
+ private:
+ GUIDSequence fUUID;
+ };
+} // namespace CFKit::XRN
diff --git a/dev/Kernel/CFKit/Property.h b/dev/Kernel/CFKit/Property.h
new file mode 100644
index 00000000..162b757b
--- /dev/null
+++ b/dev/Kernel/CFKit/Property.h
@@ -0,0 +1,54 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef CFKIT_PROPS_H
+#define CFKIT_PROPS_H
+
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Function.h>
+#include <NewKit/KString.h>
+
+#define kMaxPropLen 255
+
+namespace CFKit
+{
+ using namespace Kernel;
+
+ /// @brief handle to anything (number, ptr, string...)
+ using PropertyId = UIntPtr;
+
+ /// @brief Kernel property class.
+ /// @example \Properties\SmpCores or \Properties\KernelVersion
+ class Property
+ {
+ public:
+ Property();
+ virtual ~Property();
+
+ public:
+ Property& operator=(const Property&) = default;
+ Property(const Property&) = default;
+
+ bool StringEquals(KString& name);
+ PropertyId& GetValue();
+ KString& GetKey();
+
+ private:
+ KString fName{kMaxPropLen};
+ PropertyId fValue{0UL};
+ };
+
+ template <SizeT N>
+ using PropertyArray = Array<Property, N>;
+} // namespace CFKit
+
+namespace Kernel
+{
+ using namespace CFKit;
+}
+
+#endif // !CFKIT_PROPS_H
diff --git a/dev/Kernel/CFKit/Utils.h b/dev/Kernel/CFKit/Utils.h
new file mode 100644
index 00000000..370eca45
--- /dev/null
+++ b/dev/Kernel/CFKit/Utils.h
@@ -0,0 +1,55 @@
+#ifndef CFKIT_UTILS_H
+#define CFKIT_UTILS_H
+
+#include <KernelKit/PE.h>
+#include <KernelKit/MSDOS.h>
+
+namespace CFKit
+{
+ using namespace Kernel;
+
+ /// @brief Finds the PE header inside the blob.
+ inline auto ldr_find_exec_header(DosHeaderPtr ptrDos) -> LDR_EXEC_HEADER_PTR
+ {
+ if (!ptrDos)
+ return nullptr;
+
+ if (ptrDos->eMagic[0] != kMagMz0)
+ return nullptr;
+
+ if (ptrDos->eMagic[1] != kMagMz1)
+ return nullptr;
+
+ return (LDR_EXEC_HEADER_PTR)(VoidPtr)(&ptrDos->eLfanew + 1);
+ }
+
+ /// @brief Finds the PE optional header inside the blob.
+ inline auto ldr_find_opt_exec_header(DosHeaderPtr ptrDos) -> LDR_OPTIONAL_HEADER_PTR
+ {
+ if (!ptrDos)
+ return nullptr;
+
+ auto exec = ldr_find_exec_header(ptrDos);
+
+ if (!exec)
+ return nullptr;
+
+ return (LDR_OPTIONAL_HEADER_PTR)(VoidPtr)(&exec->mCharacteristics + 1);
+ }
+
+ /// @brief Finds the PE header inside the blob.
+ /// @note overloaded function.
+ inline auto ldr_find_exec_header(const Char* ptrDos) -> LDR_EXEC_HEADER_PTR
+ {
+ return ldr_find_exec_header((DosHeaderPtr)ptrDos);
+ }
+
+ /// @brief Finds the PE header inside the blob.
+ /// @note overloaded function.
+ inline auto ldr_find_opt_exec_header(const Char* ptrDos) -> LDR_OPTIONAL_HEADER_PTR
+ {
+ return ldr_find_opt_exec_header((DosHeaderPtr)ptrDos);
+ }
+} // namespace CFKit
+
+#endif // ifndef CFKIT_UTILS_H
diff --git a/dev/Kernel/CompilerKit/CompilerKit.h b/dev/Kernel/CompilerKit/CompilerKit.h
new file mode 100644
index 00000000..6431100b
--- /dev/null
+++ b/dev/Kernel/CompilerKit/CompilerKit.h
@@ -0,0 +1,13 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef _INC_CL_H
+#define _INC_CL_H
+
+#include <CompilerKit/Detail.h>
+#include <CompilerKit/Version.h>
+
+#endif /* ifndef _INC_CL_H */
diff --git a/dev/Kernel/CompilerKit/Detail.h b/dev/Kernel/CompilerKit/Detail.h
new file mode 100644
index 00000000..6f58c97f
--- /dev/null
+++ b/dev/Kernel/CompilerKit/Detail.h
@@ -0,0 +1,27 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#ifdef __MINOSKRNL__
+#include <NewKit/Defines.h>
+#endif // ifdef __MINOSKRNL__
+
+#define ZKA_COPY_DELETE(KLASS) \
+ KLASS& operator=(const KLASS&) = delete; \
+ KLASS(const KLASS&) = delete;
+
+#define ZKA_COPY_DEFAULT(KLASS) \
+ KLASS& operator=(const KLASS&) = default; \
+ KLASS(const KLASS&) = default;
+
+#define ZKA_MOVE_DELETE(KLASS) \
+ KLASS& operator=(KLASS&&) = delete; \
+ KLASS(KLASS&&) = delete;
+
+#define ZKA_MOVE_DEFAULT(KLASS) \
+ KLASS& operator=(KLASS&&) = default; \
+ KLASS(KLASS&&) = default;
diff --git a/dev/Kernel/CompilerKit/Version.h b/dev/Kernel/CompilerKit/Version.h
new file mode 100644
index 00000000..11854cd8
--- /dev/null
+++ b/dev/Kernel/CompilerKit/Version.h
@@ -0,0 +1,7 @@
+// (c) Amlal EL Mahrouss
+
+#pragma once
+
+/// <COMMIT NUMBER>.<YEAR>.<PROGRAM VERSION>
+#define BOOTLOADER_VERSION "1104.2025.110"
+#define KERNEL_VERSION "1104.2025.110"
diff --git a/dev/Kernel/FSKit/Defines.h b/dev/Kernel/FSKit/Defines.h
new file mode 100644
index 00000000..55198c17
--- /dev/null
+++ b/dev/Kernel/FSKit/Defines.h
@@ -0,0 +1,12 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define FSKIT_VERSION "1.0.0"
+#define FSKIT_VERSION_BCD 0x0100
diff --git a/dev/Kernel/FSKit/HPFS.h b/dev/Kernel/FSKit/HPFS.h
new file mode 100644
index 00000000..af3d2e01
--- /dev/null
+++ b/dev/Kernel/FSKit/HPFS.h
@@ -0,0 +1,30 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+/// @file HPFS.h
+/// @brief HPFS filesystem support.
+
+#define kHPFSVersion 0x0100
+#define kHPFSMagic " HPFS"
+#define kHPFSMagicLen 8
+
+#define kHPFSMinimumDiskSize (gib_cast(64))
+
+enum
+{
+ kHPFSInvalidDrive,
+ kHPFSHDDDrive,
+ kHPFSSSDDrive,
+ kHPFSMassStorageDrive,
+ kHPFSSCSIDrive,
+ kHPFSDriveCount,
+};
+
+struct HPFS_EXPLICIT_BOOT_SECTOR;
diff --git a/dev/Kernel/FSKit/IndexableProperty.h b/dev/Kernel/FSKit/IndexableProperty.h
new file mode 100644
index 00000000..9192994f
--- /dev/null
+++ b/dev/Kernel/FSKit/IndexableProperty.h
@@ -0,0 +1,63 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CFKit/Property.h>
+#include <CompilerKit/CompilerKit.h>
+#include <KernelKit/DriveMgr.h>
+
+#define kIndexerNodeNameLength 255
+#define kIndexerClaimed 0xCF
+
+namespace Kernel
+{
+ namespace Indexer
+ {
+ struct IndexProperty final
+ {
+ public:
+ Char Drive[kDriveNameLen];
+ Char Path[kIndexerNodeNameLength];
+ };
+
+ class IndexableProperty final : public Property
+ {
+ public:
+ explicit IndexableProperty()
+ : Property()
+ {
+ Kernel::KString strProp(kMaxPropLen);
+ strProp += "/prop/indexable";
+
+ this->GetKey() = strProp;
+ }
+
+ ~IndexableProperty() override = default;
+
+ ZKA_COPY_DEFAULT(IndexableProperty);
+
+ public:
+ IndexProperty& Leak() noexcept;
+
+ public:
+ void AddFlag(Int16 flag);
+ void RemoveFlag(Int16 flag);
+ Int16 HasFlag(Int16 flag);
+
+ private:
+ IndexProperty fIndex;
+ UInt32 fFlags;
+ };
+
+ /// @brief Index a file into the indexer instance.
+ /// @param filename path
+ /// @param filenameLen used bytes in path.
+ /// @param indexer the filesystem indexer.
+ /// @return none.
+ Void fs_index_file(const Char* filename, SizeT filenameLen, IndexableProperty& indexer);
+ } // namespace Indexer
+} // namespace Kernel
diff --git a/dev/Kernel/FSKit/NeFS.h b/dev/Kernel/FSKit/NeFS.h
new file mode 100644
index 00000000..26529241
--- /dev/null
+++ b/dev/Kernel/FSKit/NeFS.h
@@ -0,0 +1,440 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ FILE: NeFS.h
+ PURPOSE: NeFS (New extended File System) support.
+
+ Revision History:
+
+ ?/?/?: Added file (amlel)
+ 12/02/24: Add UUID macro for EPM and GPT partition schemes.
+ 3/16/24: Add mandatory sector size, kNeFSSectorSz is set to 2048 by
+default.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <Hints/CompilerHint.h>
+#include <KernelKit/DriveMgr.h>
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+
+/**
+ @brief New extended File System specification.
+ @author Amlal EL Mahrouss (Amlal EL Mahrouss, amlalelmahrouss at icloud dot com)
+*/
+
+#define kNeFSInvalidFork (-1)
+#define kNeFSInvalidCatalog (-1)
+#define kNeFSNodeNameLen (256)
+
+#define kNeFSMinimumDiskSize (gib_cast(4))
+
+#define kNeFSSectorSz (512)
+
+#define kNeFSIdentLen (8)
+#define kNeFSIdent " NeFS"
+#define kNeFSPadLen (392)
+
+#define kNeFSMetaFilePrefix '$'
+
+#define kNeFSVersionInteger (0x0129)
+#define kNeFSVerionString "1.2.9"
+
+/// @brief Standard fork types.
+#define kNeFSDataFork "main_data"
+#define kNeFSResourceFork "main_rsrc"
+
+#define kNeFSForkSize (sizeof(NFS_FORK_STRUCT))
+
+#define kNeFSPartitionTypeStandard (7)
+#define kNeFSPartitionTypePage (8)
+#define kNeFSPartitionTypeBoot (9)
+
+#define kNeFSCatalogKindFile (1)
+#define kNeFSCatalogKindDir (2)
+#define kNeFSCatalogKindAlias (3)
+
+//! Shared between network and/or partitions. Export forks as .zip when copying.
+#define kNeFSCatalogKindShared (4)
+
+#define kNeFSCatalogKindResource (5)
+#define kNeFSCatalogKindExecutable (6)
+
+#define kNeFSCatalogKindPage (8)
+
+#define kNeFSCatalogKindDevice (9)
+#define kNeFSCatalogKindLock (10)
+
+#define kNeFSCatalogKindRLE (11)
+#define kNeFSCatalogKindMetaFile (12)
+
+#define kNeFSCatalogKindTTF (13)
+#define kNeFSCatalogKindRIFF (14)
+#define kNeFSCatalogKindMPEG (15)
+#define kNeFSCatalogKindMOFF (16)
+
+#define kNeFSSeparator '/'
+#define kNeFSSeparatorAlt '/'
+
+#define kNeFSUpDir ".."
+#define kNeFSRoot "/"
+#define kNeFSRootAlt "/"
+
+#define kNeFSLF '\r'
+#define kNeFSEOF (-1)
+
+#define kNeFSBitWidth (sizeof(Kernel::Char))
+#define kNeFSLbaType (Kernel::Lba)
+
+/// @note Start after the partition map header. (Virtual addressing)
+#define kNeFSRootCatalogStartAddress (1024)
+#define kNeFSCatalogStartAddress ((2048) + sizeof(NFS_ROOT_PARTITION_BLOCK))
+
+#define kResourceTypeDialog (10)
+#define kResourceTypeString (11)
+#define kResourceTypeMenu (12)
+#define kResourceTypeSound (13)
+#define kResourceTypeFont (14)
+
+#define kConfigLen (64)
+#define kPartLen (32)
+
+#define kNeFSFlagDeleted (70)
+#define kNeFSFlagUnallocated (0)
+#define kNeFSFlagCreated (71)
+
+#define kNeFSMimeNameLen (200)
+#define kNeFSForkNameLen (200)
+
+#define kNeFSFrameworkExt ".fwrk"
+#define kNeFSStepsExt ".step"
+#define kNeFSApplicationExt ".app"
+#define kNeFSJournalExt ".jrnl"
+
+struct NFS_CATALOG_STRUCT;
+struct NFS_FORK_STRUCT;
+struct NFS_ROOT_PARTITION_BLOCK;
+
+enum
+{
+ kNeFSHardDrive = 0xC0, // Hard Drive
+ kNeFSSolidStateDrive = 0xC1, // Solid State Drive
+ kNeFSOpticalDrive = 0x0C, // Blu-Ray/DVD
+ kNeFSMassStorageDevice = 0xCC, // USB
+ kNeFSScsiDrive = 0xC4, // SCSI Hard Drive
+ kNeFSFlashDrive = 0xC6,
+ kNeFSUnknown = 0xFF, // Unknown device.
+ kNeFSDriveCount = 7,
+};
+
+enum
+{
+ kNeFSStatusUnlocked = 0x18,
+ kNeFSStatusLocked,
+ kNeFSStatusError,
+ kNeFSStatusInvalid,
+};
+
+/// @brief Catalog type.
+struct PACKED NFS_CATALOG_STRUCT final
+{
+ BOOL ForkOrCatalog : 1 {0};
+
+ Kernel::Char Name[kNeFSNodeNameLen] = {0};
+ Kernel::Char Mime[kNeFSMimeNameLen] = {0};
+
+ /// Catalog flags.
+ Kernel::UInt16 Flags;
+
+ /// Catalog allocation status.
+ Kernel::UInt16 Status;
+
+ /// Custom catalog flags.
+ Kernel::UInt16 CatalogFlags;
+
+ /// Catalog kind.
+ Kernel::Int32 Kind;
+
+ /// Size of the data fork.
+ Kernel::Lba DataForkSize;
+
+ /// Size of all resource forks.
+ Kernel::Lba ResourceForkSize;
+
+ /// Forks LBA.
+ Kernel::Lba DataFork;
+ Kernel::Lba ResourceFork;
+
+ Kernel::Lba NextSibling;
+ Kernel::Lba PrevSibling;
+};
+
+/// @brief Fork type, contains a data page.
+/// @note The way we store is way different than how other filesystems do, specific chunk of code are
+/// written into either the data fork or resource fork, the resource fork is reserved for file metadata.
+/// whereas the data fork is reserved for file data.
+struct PACKED NFS_FORK_STRUCT final
+{
+ BOOL ForkOrCatalog : 1 {1};
+
+ Kernel::Char ForkName[kNeFSForkNameLen] = {0};
+ Kernel::Char CatalogName[kNeFSNodeNameLen] = {0};
+
+ Kernel::Int32 Flags;
+ Kernel::Int32 Kind;
+
+ Kernel::Int64 ResourceId;
+ Kernel::Int32 ResourceKind;
+ Kernel::Int32 ResourceFlags;
+
+ Kernel::Lba DataOffset; // 8 Where to look for this data?
+ Kernel::SizeT DataSize; /// Data size according using sector count.
+
+ Kernel::Lba NextSibling;
+ Kernel::Lba PreviousSibling;
+
+ Kernel::Char Pad[2] = {0};
+};
+
+/// @brief Partition block type
+struct PACKED NFS_ROOT_PARTITION_BLOCK final
+{
+ Kernel::Char Ident[kNeFSIdentLen] = {0};
+ Kernel::Char PartitionName[kPartLen] = {0};
+
+ Kernel::Int32 Flags;
+ Kernel::Int32 Kind;
+
+ Kernel::Lba StartCatalog;
+ Kernel::SizeT CatalogCount;
+
+ Kernel::SizeT DiskSize;
+
+ Kernel::SizeT FreeCatalog;
+ Kernel::SizeT FreeSectors;
+
+ Kernel::SizeT SectorCount;
+ Kernel::SizeT SectorSize;
+
+ Kernel::UInt64 Version;
+
+ Kernel::Lba EpmBlock;
+
+ Kernel::Char Pad[kNeFSPadLen];
+};
+
+namespace Kernel
+{
+ class NeFileSystemParser;
+ class NeFileSystemJournal;
+ class NeFileSystemHelper;
+
+ enum
+ {
+ kNeFSSubDriveA,
+ kNeFSSubDriveB,
+ kNeFSSubDriveC,
+ kNeFSSubDriveD,
+ kNeFSSubDriveInvalid,
+ kNeFSSubDriveCount,
+ };
+
+ /// \brief Resource fork kind.
+ enum
+ {
+ kNeFSRsrcForkKind = 0,
+ kNeFSDataForkKind = 1
+ };
+
+ ///
+ /// \name NeFileSystemParser
+ /// \brief NeFS parser class. (catalog creation, remove removal, root,
+ /// forks...) Designed like the DOM, detects the filesystem automatically.
+ ///
+ class NeFileSystemParser final
+ {
+ public:
+ explicit NeFileSystemParser() = default;
+ ~NeFileSystemParser() = default;
+
+ public:
+ ZKA_COPY_DEFAULT(NeFileSystemParser);
+
+ public:
+ /// @brief Creates a new fork inside the NeFS partition.
+ /// @param catalog it's catalog
+ /// @param theFork the fork itself.
+ /// @return the fork
+ _Output BOOL CreateFork(_Input NFS_FORK_STRUCT& in);
+
+ /// @brief Find fork inside New filesystem.
+ /// @param catalog the catalog.
+ /// @param name the fork name.
+ /// @return the fork.
+ _Output NFS_FORK_STRUCT* FindFork(_Input NFS_CATALOG_STRUCT* catalog,
+ _Input const Char* name,
+ Boolean data);
+
+ _Output Void RemoveFork(_Input NFS_FORK_STRUCT* fork);
+
+ _Output Void CloseFork(_Input NFS_FORK_STRUCT* fork);
+
+ _Output NFS_CATALOG_STRUCT* FindCatalog(_Input const Char* catalog_name, Lba& ou_lba, Bool search_hidden = YES, Bool local_search = NO);
+
+ _Output NFS_CATALOG_STRUCT* GetCatalog(_Input const Char* name);
+
+ _Output NFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name,
+ _Input const Int32& flags,
+ _Input const Int32& kind);
+
+ _Output NFS_CATALOG_STRUCT* CreateCatalog(_Input const Char* name);
+
+ _Output Bool WriteCatalog(_Input const Char* catalog,
+ _Input Bool rsrc,
+ _Input VoidPtr data,
+ _Input SizeT sz,
+ _Input const Char* name);
+
+ _Output VoidPtr ReadCatalog(_Input _Output NFS_CATALOG_STRUCT* catalog,
+ _Input Bool isRsrcFork,
+ _Input SizeT dataSz,
+ _Input const Char* forkName);
+
+ _Output Bool Seek(_Input _Output NFS_CATALOG_STRUCT* catalog, SizeT off);
+
+ _Output SizeT Tell(_Input _Output NFS_CATALOG_STRUCT* catalog);
+
+ _Output Bool RemoveCatalog(_Input const Char* catalog);
+
+ _Output Bool CloseCatalog(_InOut NFS_CATALOG_STRUCT* catalog);
+
+ /// @brief Make a EPM+NeFS drive out of the disk.
+ /// @param drive The drive to write on.
+ /// @return If it was sucessful, see err_local_get().
+ _Output Bool Format(_Input _Output DriveTrait* drive, _Input const Lba endLba, _Input const Int32 flags, const Char* part_name);
+
+ public:
+ UInt32 mDriveIndex{kNeFSSubDriveA};
+ };
+
+ ///
+ /// \name NeFileSystemHelper
+ /// \brief Filesystem helper and utils.
+ ///
+
+ class NeFileSystemHelper final
+ {
+ public:
+ STATIC const Char* Root();
+ STATIC const Char* UpDir();
+ STATIC const Char Separator();
+ STATIC const Char MetaFile();
+ };
+
+ /// @brief Journal class for NeFS.
+ class NeFileSystemJournal final
+ {
+ private:
+ NFS_CATALOG_STRUCT* mNode{nullptr};
+
+ public:
+ explicit NeFileSystemJournal(const char* stamp = nullptr)
+ {
+ if (!stamp)
+ {
+ kcout << "Invalid: Journal Stamp, using default name.\r";
+ return;
+ }
+
+ kcout << "Info: Journal stamp: " << stamp << endl;
+ rt_copy_memory((VoidPtr)stamp, this->mStamp, rt_string_len(stamp));
+ }
+
+ ~NeFileSystemJournal() = default;
+
+ ZKA_COPY_DEFAULT(NeFileSystemJournal);
+
+ Bool CreateJournal(NeFileSystemParser* parser)
+ {
+ if (!parser)
+ return NO;
+
+ delete parser->CreateCatalog("/etc/xml/", 0, kNeFSCatalogKindDir);
+ mNode = parser->CreateCatalog(mStamp);
+
+ if (!mNode)
+ return NO;
+
+ return YES;
+ }
+
+ Bool GetJournal(NeFileSystemParser* parser)
+ {
+ if (!parser)
+ return NO;
+
+ auto node = parser->GetCatalog(mStamp);
+
+ if (node)
+ {
+ mNode = node;
+ return YES;
+ }
+
+ return NO;
+ }
+
+ Bool ReleaseJournal()
+ {
+ if (mNode)
+ {
+ delete mNode;
+ mNode = nullptr;
+ return YES;
+ }
+
+ return NO;
+ }
+
+ Bool CommitJournal(NeFileSystemParser* parser,
+ Char* xml_data,
+ Char* journal_name)
+ {
+ if (!parser ||
+ !mNode)
+ return NO;
+
+ NFS_FORK_STRUCT new_fork{};
+
+ rt_copy_memory(mStamp, new_fork.CatalogName, rt_string_len(mStamp));
+ rt_copy_memory(journal_name, new_fork.ForkName, rt_string_len(journal_name));
+
+ new_fork.ResourceKind = 0;
+ new_fork.ResourceId = 0;
+ new_fork.ResourceFlags = 0;
+ new_fork.DataSize = rt_string_len(xml_data);
+ new_fork.Kind = kNeFSRsrcForkKind;
+
+ if (!parser->CreateFork(new_fork))
+ return NO;
+
+ kcout << "XML Commited: " << xml_data << "\r\nTo Journal Fork: " << journal_name << endl;
+
+ auto ret = parser->WriteCatalog(new_fork.CatalogName, YES, xml_data, rt_string_len(xml_data), new_fork.ForkName);
+
+ return ret;
+ }
+
+ private:
+ Char mStamp[kNeFSNodeNameLen] = {"/etc/xml/journal" kNeFSJournalExt};
+ };
+
+ namespace NeFS
+ {
+ Boolean fs_init_nefs(Void) noexcept;
+ } // namespace NeFS
+} // namespace Kernel
diff --git a/dev/Kernel/FirmwareKit/.gitkeep b/dev/Kernel/FirmwareKit/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/.gitkeep
diff --git a/dev/Kernel/FirmwareKit/EFI.h b/dev/Kernel/FirmwareKit/EFI.h
new file mode 100644
index 00000000..b11a8e90
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/EFI.h
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <FirmwareKit/EFI/EFI.h>
+
+/// @note this header is used to reference the EFI/EFI.h
diff --git a/dev/Kernel/FirmwareKit/EFI/API.h b/dev/Kernel/FirmwareKit/EFI/API.h
new file mode 100644
index 00000000..58775ddd
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/EFI/API.h
@@ -0,0 +1,106 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __EFI_API__
+#define __EFI_API__
+
+#include <FirmwareKit/EFI/EFI.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/MSDOS.h>
+#include <KernelKit/PE.h>
+
+#define kZKASubsystem 17
+
+#ifdef __ZBAOSLDR__
+// forward decl.
+class BTextWriter;
+
+#define __BOOTKIT_NO_INCLUDE__ 1
+
+#include <BootKit/BootKit.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#endif // ifdef __ZBAOSLDR__
+
+inline EfiSystemTable* ST = nullptr;
+inline EfiBootServices* BS = nullptr;
+
+EXTERN_C void rt_cli();
+EXTERN_C void rt_hlt();
+
+namespace EFI
+{
+ /// @brief Halt and clear interrupts.
+ /// @return
+ inline Void Stop() noexcept
+ {
+ while (YES)
+ {
+ rt_cli();
+ rt_hlt();
+ }
+ }
+
+ /**
+@brief Exit EFI API to let the OS load correctly.
+Bascially frees everything we have in the EFI side.
+*/
+ inline void ExitBootServices(UInt64 MapKey, EfiHandlePtr ImageHandle) noexcept
+ {
+ if (!ST)
+ return;
+
+ ST->BootServices->ExitBootServices(ImageHandle, MapKey);
+ }
+
+ inline UInt32 Platform() noexcept
+ {
+ return kPeMachineAMD64;
+ }
+
+ /***
+ * @brief Throw an error, stop execution as well.
+ * @param ErrorCode error code to be print.
+ * @param Reason reason to be print.
+ */
+ inline void ThrowError(const EfiCharType* ErrorCode,
+ const EfiCharType* Reason) noexcept
+ {
+ ST->ConOut->OutputString(ST->ConOut, L"\r*** STOP ***\r");
+
+ ST->ConOut->OutputString(ST->ConOut, L"*** ERROR: ");
+ ST->ConOut->OutputString(ST->ConOut, ErrorCode);
+
+ ST->ConOut->OutputString(ST->ConOut, L" ***\r *** REASON: ");
+ ST->ConOut->OutputString(ST->ConOut, Reason);
+
+ ST->ConOut->OutputString(ST->ConOut, L" ***\r");
+
+ EFI::Stop();
+ }
+} // namespace EFI
+
+inline void InitEFI(EfiSystemTable* SystemTable) noexcept
+{
+ if (!SystemTable)
+ return;
+
+ ST = SystemTable;
+ BS = ST->BootServices;
+
+ ST->ConOut->ClearScreen(SystemTable->ConOut);
+ ST->ConOut->SetAttribute(SystemTable->ConOut, kEFIYellow);
+
+ ST->BootServices->SetWatchdogTimer(0, 0, 0, nullptr);
+ ST->ConOut->EnableCursor(ST->ConOut, false);
+}
+
+#ifdef __ZBAOSLDR__
+
+#include <BootKit/Platform.h>
+
+#endif // ifdef __ZBAOSLDR__
+
+#endif /* ifndef __EFI_API__ */
diff --git a/dev/Kernel/FirmwareKit/EFI/EFI.h b/dev/Kernel/FirmwareKit/EFI/EFI.h
new file mode 100644
index 00000000..c96777d6
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/EFI/EFI.h
@@ -0,0 +1,922 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef FIRMWARE_KIT_EFI_H
+#define FIRMWARE_KIT_EFI_H
+
+/**
+@brief Implementation of the main EFI protocols.
+*/
+
+#include <NewKit/Defines.h>
+
+using namespace Kernel;
+
+/* we always use stdcall in EFI, the pascal way of calling functions. */
+
+#ifndef EPI_API
+#define EFI_API __attribute__((ms_abi))
+#endif // ifndef EPI_API
+
+#define IN
+#define OUT
+#define OPTIONAL
+
+#define EFI_FINAL final
+
+// Forward decls
+
+struct EfiTableHeader;
+struct EfiLoadFileProtocol;
+struct EfiSimpleTextOutputProtocol;
+struct EfiDevicePathProtocol;
+struct EfiBootServices;
+struct EfiMemoryDescriptor;
+struct EfiSystemTable;
+struct EfiGUID;
+struct EfiFileDevicePathProtocol;
+struct EfiHandle;
+struct EfiGraphicsOutputProtocol;
+struct EfiBitmask;
+struct EfiFileProtocol;
+struct EfiSimpleTextInputProtocol;
+
+typedef UInt64 EfiStatusType;
+
+typedef Char16 EfiChar16Type;
+
+/// @brief Core Handle Kind
+/// Self is like NT's Win32 HANDLE type.
+typedef struct EfiHandle
+{
+}* EfiHandlePtr;
+
+/* UEFI uses wide characters by default. */
+typedef WideChar EfiCharType;
+
+typedef UInt64 EfiPhysicalAddress;
+typedef UIntPtr EfiVirtualAddress;
+
+/// What's BootBolicy?
+/// If TRUE, indicates that the request originates from the boot manager, and
+/// that the boot manager is attempting to load FilePath as a boot selection. If
+/// FALSE, then FilePath must match an exact file to be loaded.
+
+typedef UInt64(EFI_API* EfiTextString)(struct EfiSimpleTextOutputProtocol* Self,
+ const WideChar* OutputString);
+
+typedef UInt64(EFI_API* EfiTextAttrib)(struct EfiSimpleTextOutputProtocol* Self,
+ const WideChar Attribute);
+
+typedef UInt64(EFI_API* EfiTextClear)(struct EfiSimpleTextOutputProtocol* Self);
+
+typedef UInt64(EFI_API* EfiLoadFile)(EfiLoadFileProtocol* Self,
+ EfiFileDevicePathProtocol* FilePath,
+ Boolean BootPolicy,
+ UInt32* BufferSize,
+ VoidPtr Buffer);
+
+typedef UInt64(EFI_API* EfiCopyMem)(VoidPtr DstBuf, VoidPtr SrcBuf, SizeT Length);
+
+typedef UInt64(EFI_API* EfiSetMem)(VoidPtr DstBuf, Char Byte, SizeT Length);
+
+typedef UInt64(EFI_API* EfiHandleProtocol)(EfiHandlePtr Handle, EfiGUID* Guid, VoidPtr* Device);
+
+typedef UInt64(EFI_API* EfiLocateDevicePath)(EfiGUID* Protocol,
+ EfiDevicePathProtocol** DevicePath,
+ EfiHandlePtr Device);
+
+typedef UInt64(EFI_API* EfiStartImage)(EfiHandlePtr Handle, VoidPtr ArgsSize, VoidPtr ArgsPtr);
+
+typedef UInt64(EFI_API* EfiLoadImage)(Boolean BootPolicy,
+ EfiHandlePtr ParentHandle,
+ EfiFileDevicePathProtocol* DeviceFile,
+ VoidPtr buffer,
+ SizeT size,
+ EfiHandlePtr* ppHandle);
+
+/// EFI pool helpers, taken from iPXE.
+
+typedef enum EfiMemoryType
+{
+ ///
+ /// Not used.
+ ///
+ EfiReservedMemoryType,
+ ///
+ /// The code portions of a loaded application.
+ /// (Note that UEFI OS loaders are UEFI applications.)
+ ///
+ EfiLoaderCode,
+ ///
+ /// The data portions of a loaded application and the default data allocation
+ /// type used by an application to allocate pool memory.
+ ///
+ EfiLoaderData,
+ ///
+ /// The code portions of a loaded Boot Services Driver.
+ ///
+ EfiBootServicesCode,
+ ///
+ /// The data portions of a loaded Boot Serves Driver, and the default data
+ /// allocation type used by a Boot Services Driver to allocate pool memory.
+ ///
+ EfiBootServicesData,
+ ///
+ /// The code portions of a loaded Runtime Services Driver.
+ ///
+ EfiRuntimeServicesCode,
+ ///
+ /// The data portions of a loaded Runtime Services Driver and the default
+ /// data allocation type used by a Runtime Services Driver to allocate pool
+ /// memory.
+ ///
+ EfiRuntimeServicesData,
+ ///
+ /// Free (unallocated) memory.
+ ///
+ EfiConventionalMemory,
+ ///
+ /// Memory in which errors have been detected.
+ ///
+ EfiUnusableMemory,
+ ///
+ /// Memory that holds the ACPI tables.
+ ///
+ EfiACPIReclaimMemory,
+ ///
+ /// Address space reserved for use by the firmware.
+ ///
+ EfiACPIMemoryNVS,
+ ///
+ /// Used by system firmware to request that a memory-mapped IO region
+ /// be mapped by the OS to a virtual address so it can be accessed by EFI
+ /// runtime services.
+ ///
+ EfiMemoryMappedIO,
+ ///
+ /// System memory-mapped IO region that is used to translate memory
+ /// cycles to IO cycles by the processor.
+ ///
+ EfiMemoryMappedIOPortSpace,
+ ///
+ /// Address space reserved by the firmware for code that is part of the
+ /// processor.
+ ///
+ EfiPalCode,
+ ///
+ /// A memory region that operates as EfiConventionalMemory,
+ /// however it happens to also support byte-addressable non-volatility.
+ ///
+ EfiPersistentMemory,
+ ///
+ /// A memory region that describes system memory that has not been accepted
+ /// by a corresponding call to the underlying isolation architecture.
+ ///
+ EfiUnacceptedMemoryType,
+ ///
+ /// The last type of memory.
+ /// Not a real type.
+ ///
+ EfiMaxMemoryType,
+} EfiMemoryType;
+
+typedef enum EfiAllocateType
+{
+ /// Anything that satisfy the request.
+ AllocateAnyPages,
+ AllocateMaxAddress,
+ ///
+ /// Allocate pages at a specified address.
+ ///
+ AllocateAddress,
+ ///
+ /// Maximum enumeration value that may be used for bounds checking.
+ ///
+ MaxAllocateType
+} EfiAllocateType;
+
+typedef struct EfiMemoryDescriptor
+{
+ ///
+ /// Kind of the memory region.
+ /// Kind EFI_MEMORY_TYPE is defined in the
+ /// AllocatePages() function description.
+ ///
+ UInt32 Kind;
+ ///
+ /// Physical address of the first byte in the memory region. PhysicalStart
+ /// must be aligned on a 4 KiB boundary, and must not be above
+ /// 0xfffffffffffff000. Kind EFI_PHYSICAL_ADDRESS is defined in the
+ /// AllocatePages() function description
+ ///
+ EfiPhysicalAddress PhysicalStart;
+ ///
+ /// Virtual address of the first byte in the memory region.
+ /// VirtualStart must be aligned on a 4 KiB boundary,
+ /// and must not be above 0xfffffffffffff000.
+ ///
+ EfiVirtualAddress VirtualStart;
+ ///
+ /// NumberOfPagesNumber of 4 KiB pages in the memory region.
+ /// NumberOfPages must not be 0, and must not be any value
+ /// that would represent a memory page with a start address,
+ /// either physical or virtual, above 0xfffffffffffff000.
+ ///
+ UInt64 NumberOfPages;
+ ///
+ /// Attributes of the memory region that describe the bit mask of capabilities
+ /// for that memory region, and not necessarily the current settings for that
+ /// memory region.
+ ///
+ UInt64 Attribute;
+} EfiMemoryDescriptor;
+
+typedef UInt64(EFI_API* EfiAllocatePool)(EfiMemoryType PoolType, UInt32 Size, VoidPtr* Buffer);
+
+typedef UInt64(EFI_API* EfiFreePool)(VoidPtr Buffer);
+
+typedef UInt64(EFI_API* EfiCalculateCrc32)(VoidPtr Data, UInt32 DataSize, UInt32* CrcOut);
+
+/**
+@brief Present in every header, used to identify a UEFI structure.
+*/
+typedef struct EfiTableHeader
+{
+ UInt64 Signature;
+ UInt32 Revision;
+ UInt32 HeaderSize;
+ UInt32 Crc32;
+ UInt32 Reserved;
+} EfiTableHeader;
+
+#define EFI_ACPI_TABLE_PROTOCOL_GUID \
+ { \
+ 0xffe06bdd, 0x6107, 0x46a6, \
+ { \
+ 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c \
+ } \
+ }
+
+#define EFI_LOAD_FILE_PROTOCOL_GUID \
+ { \
+ 0x56EC3091, 0x954C, 0x11d2, \
+ { \
+ 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \
+ { \
+ 0x4006c0c1, 0xfcb3, 0x403e, \
+ { \
+ 0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d \
+ } \
+ }
+
+#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
+ { \
+ 0x5B1B31A1, 0x9562, 0x11d2, \
+ { \
+ 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
+ } \
+ }
+
+#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
+ { \
+ 0x9042a9de, 0x23dc, 0x4a38, \
+ { \
+ 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a \
+ } \
+ }
+
+#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
+
+#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
+ { \
+ 0x0964e5b22, 0x6459, 0x11d2, \
+ { \
+ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
+ { \
+ 0xbc62157e, 0x3e33, 0x4fec, \
+ { \
+ 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf \
+ } \
+ }
+
+#define EFI_DEVICE_PATH_PROTOCOL_GUID \
+ { \
+ 0x9576e91, 0x6d3f, 0x11d2, \
+ { \
+ 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
+ { \
+ 0x0964e5b22, 0x6459, 0x11d2, \
+ { \
+ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+typedef UInt64(EfiImageUnload)(EfiHandlePtr ImageHandle);
+
+enum
+{
+ kPixelRedGreenBlueReserved8BitPerColor,
+ kPixelBlueGreenRedReserved8BitPerColor,
+ kPixelBitMask,
+ kPixelBltOnly,
+ kPixelFormatMax
+};
+
+typedef struct EfiBitmask
+{
+ UInt32 RedMask;
+ UInt32 GreenMask;
+ UInt32 BlueMask;
+ UInt32 ReservedMask;
+} EfiBitmask;
+
+typedef struct
+{
+ UInt8 Blue;
+ UInt8 Green;
+ UInt8 Red;
+ UInt8 Reserved;
+} EfiGraphicsOutputBltPixel;
+
+typedef enum EfiGraphicsOutputProtocolBltOperation
+{
+ EfiBltVideoFill,
+ EfiBltVideoToBltBuffer,
+ EfiBltBufferToVideo,
+ EfiBltVideoToVideo,
+ EfiGraphicsOutputBltOperationMax
+} EfiGraphicsOutputProtocolBltOperation;
+
+typedef struct EfiGraphicsOutputProtocolModeInformation
+{
+ UInt32 Version;
+ UInt32 HorizontalResolution;
+ UInt32 VerticalResolution;
+ UInt32 PixelFormat;
+ EfiBitmask PixelInformation;
+ UInt32 PixelsPerScanLine;
+} EfiGraphicsOutputProtocolModeInformation;
+
+typedef UInt64(EFI_API* EfiGraphicsOutputProtocolQueryMode)(
+ EfiGraphicsOutputProtocol* Self, UInt32 ModeNumber, UInt32* SizeOfInfo, EfiGraphicsOutputProtocolModeInformation** Info);
+
+typedef UInt64(EFI_API* EfiGraphicsOutputProtocolSetMode)(
+ EfiGraphicsOutputProtocol* Self, UInt32 ModeNumber);
+
+typedef UInt64(EFI_API* EfiGraphicsOutputProtocolBlt)(
+ EfiGraphicsOutputProtocol* Self, EfiGraphicsOutputBltPixel* BltBuffer, EfiGraphicsOutputProtocolBltOperation BltOperation, UInt32 SourceX, UInt32 SourceY, UInt32 DestinationX, UInt32 DestinationY, UInt32 Width, UInt32 Height, UInt32 Delta);
+
+typedef struct
+{
+ UInt32 MaxMode;
+ UInt32 Mode;
+ EfiGraphicsOutputProtocolModeInformation* Info;
+ UInt32 SizeOfInfo;
+ UIntPtr FrameBufferBase;
+ UInt32 FrameBufferSize;
+} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
+
+typedef struct EfiGraphicsOutputProtocol
+{
+ EfiGraphicsOutputProtocolQueryMode QueryMode;
+ EfiGraphicsOutputProtocolSetMode SetMode;
+ EfiGraphicsOutputProtocolBlt Blt;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE* Mode;
+} EfiGraphicsOutputProtocol;
+
+typedef struct EfiLoadImageProtocol
+{
+ UInt32 Revision;
+ EfiHandlePtr ParentHandle;
+ EfiSystemTable* SystemTable;
+
+ // Source location of the image
+ EfiHandlePtr DeviceHandle;
+ EfiDevicePathProtocol* FilePath;
+ Void* Reserved;
+
+ // Image’s load options
+ UInt32 LoadOptionsSize;
+ Void* LoadOptions;
+
+ // Location where image was loaded
+ Void* ImageBase;
+ UInt64 ImageSize;
+ EfiMemoryType ImageCodeType;
+ EfiMemoryType ImageDataType;
+ EfiImageUnload Unload;
+} EfiLoadImageProtocol;
+
+typedef struct EfiLoadFileProtocol
+{
+ EfiLoadFile LoadFile;
+} EfiLoadFileProtocol;
+
+typedef struct EfiDevicePathProtocol
+{
+ UInt8 Kind;
+ UInt8 SubType;
+ UInt8 Length[2];
+} EfiDevicePathProtocol;
+
+typedef struct EfiFileDevicePathProtocol
+{
+ EfiDevicePathProtocol Proto;
+
+ ///
+ /// File Path of this struct
+ ///
+ WideChar Path[kPathLen];
+} EfiFileDevicePathProtocol;
+
+typedef UInt64(EFI_API* EfiExitBootServices)(VoidPtr ImageHandle,
+ UInt32 MapKey);
+
+typedef UInt64(EFI_API* EfiAllocatePages)(EfiAllocateType AllocType,
+ EfiMemoryType MemType,
+ UInt32 Count,
+ EfiPhysicalAddress* Memory);
+
+typedef UInt64(EFI_API* EfiFreePages)(EfiPhysicalAddress* Memory, UInt32 Pages);
+
+typedef UInt64(EFI_API* EfiGetMemoryMap)(UInt32* MapSize,
+ EfiMemoryDescriptor* DescPtr,
+ UInt32* MapKey,
+ UInt32* DescSize,
+ UInt32* DescVersion);
+
+/**
+ * @brief GUID type, something you can also find in CFKit.
+ */
+typedef struct EfiGUID EFI_FINAL
+{
+ UInt32 Data1;
+ UInt16 Data2;
+ UInt16 Data3;
+ UInt8 Data4[8];
+} EfiGUID;
+
+/***
+ * Protocol stuff...
+ */
+
+#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
+ { \
+ 0x387477c1, 0x69c7, 0x11d2, \
+ { \
+ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+/** some helpers */
+#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
+#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
+#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
+#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
+#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
+#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
+
+typedef UInt64(EFI_API* EfiLocateProtocol)(EfiGUID* Protocol,
+ VoidPtr Registration,
+ VoidPtr* Interface);
+
+typedef UInt64(EFI_API* EfiOpenProtocol)(EfiHandlePtr Handle, EfiGUID* Guid, VoidPtr* Interface, EfiHandlePtr AgentHandle, EfiHandlePtr ControllerHandle, UInt32 Attributes);
+
+typedef UInt64(EFI_API* EfiEnableCursor)(EfiSimpleTextOutputProtocol* Self, Boolean Visible);
+
+/**
+@name EfiBootServices
+@brief UEFI Boot Services record, it contains functions necessary to a
+firmware level application.
+*/
+typedef struct EfiBootServices
+{
+ EfiTableHeader SystemTable;
+ VoidPtr RaiseTPL;
+ VoidPtr RestoreTPL;
+ EfiAllocatePages AllocatePages;
+ EfiFreePages FreePages;
+ EfiGetMemoryMap GetMemoryMap;
+ EfiAllocatePool AllocatePool;
+ EfiFreePool FreePool;
+ VoidPtr CreateEvent;
+ VoidPtr SetTimer;
+ VoidPtr WaitForEvent;
+ VoidPtr SignalEvent;
+ VoidPtr CloseEvent;
+ VoidPtr CheckEvent;
+ VoidPtr InstallProtocolInterface;
+ VoidPtr ReinstallProtocolInterface;
+ VoidPtr UninstallProtocolInterface;
+ EfiHandleProtocol HandleProtocol;
+ VoidPtr Reserved;
+ VoidPtr RegisterProtocolNotify;
+ VoidPtr LocateHandle;
+ EfiLocateDevicePath LocateDevicePath;
+ VoidPtr InstallConfigurationTable;
+ EfiLoadImage LoadImage;
+ EfiStartImage StartImage;
+ VoidPtr Exit;
+ VoidPtr UnloadImage;
+ EfiExitBootServices ExitBootServices;
+ VoidPtr GetNextMonotonicCount;
+ VoidPtr Stall;
+ EfiStatusType(EFI_API* SetWatchdogTimer)(UInt32 Timeout, UInt64 WatchdogCode, UInt32 DataSize, EfiCharType* Data);
+ VoidPtr ConnectController;
+ VoidPtr DisconnectController;
+ EfiOpenProtocol OpenProtocol;
+ VoidPtr CloseProtocol;
+ VoidPtr OpenProtocolInformation;
+ VoidPtr ProtocolsPerHandle;
+ VoidPtr LocateHandleBuffer;
+ EfiLocateProtocol LocateProtocol;
+ VoidPtr InstallMultipleProtocolInterfaces;
+ VoidPtr UninstallMultipleProtocolInterfaces;
+ EfiCalculateCrc32 CalculateCrc32;
+ EfiCopyMem CopyMem;
+ EfiSetMem SetMem;
+ VoidPtr CreateEventEx;
+} EfiBootServices;
+
+#define kEntireDevPath 0xFF
+#define kThisInstancePath 0x01
+
+/**
+@brief PrintF like protocol.
+*/
+typedef struct EfiSimpleTextOutputProtocol
+{
+ VoidPtr Reset;
+ EfiTextString OutputString;
+ VoidPtr TestString;
+ VoidPtr QueryMode;
+ VoidPtr SetMode;
+ EfiTextAttrib SetAttribute;
+ EfiTextClear ClearScreen;
+ VoidPtr SetCursorPosition;
+ EfiEnableCursor EnableCursor;
+ VoidPtr Mode;
+} EfiSimpleTextOutputProtocol;
+
+typedef struct
+{
+ UInt16 ScanCode;
+ EfiChar16Type UnicodeChar;
+} EfiInputKey;
+
+typedef EfiStatusType(EFI_API* EfiInputReadKey)(
+ IN EfiSimpleTextInputProtocol* This,
+ OUT EfiInputKey* Key);
+
+typedef EfiStatusType(EFI_API* EfiInputReset)(
+ IN EfiSimpleTextInputProtocol* This,
+ IN Boolean ExtendedChk);
+
+typedef EfiStatusType(EFI_API* EfiWaitForEvent)(
+ IN UInt32 NumberOfEvents,
+ IN VoidPtr Event,
+ OUT UInt32* Index);
+
+typedef struct EfiSimpleTextInputProtocol
+{
+ EfiInputReset Reset;
+ EfiInputReadKey ReadKeyStroke;
+ EfiWaitForEvent WaitForKey;
+} EfiSimpleTextInputProtocol;
+
+/// @biref Open Volume procedure ptr.
+typedef UInt64(EFI_API* EfiOpenVolume)(struct EfiSimpleFilesystemProtocol*,
+ struct EfiFileProtocol**);
+
+struct EfiSimpleFilesystemProtocol
+{
+ UInt64 Revision;
+ EfiOpenVolume OpenVolume;
+};
+
+/**
+@brief The Structure that they give you when booting.
+*/
+typedef struct EfiSystemTable
+{
+ EfiTableHeader SystemHeader;
+ WideChar* FirmwareVendor;
+ UInt32 FirmwareRevision;
+ EfiHandlePtr ConsoleInHandle;
+ EfiSimpleTextInputProtocol* ConIn;
+ EfiHandlePtr ConsoleOutHandle;
+ EfiSimpleTextOutputProtocol* ConOut;
+ EfiHandlePtr StandardErrorHandle;
+ VoidPtr StdErr;
+ VoidPtr RuntimeServices;
+ EfiBootServices* BootServices;
+ UInt64 NumberOfTableEntries;
+ /// The configuration table (contains the RSD PTR entry.)
+ struct
+ {
+ EfiGUID VendorGUID;
+ VoidPtr VendorTable;
+ }* ConfigurationTable;
+} EfiSystemTable;
+
+#define kEfiOk 0
+#define kEfiFail -1
+#define kBufferTooSmall 5
+
+#define EFI_EXTERN_C extern "C"
+
+typedef struct EfiIPV4
+{
+ UInt8 Addr[4];
+} EfiIPV4;
+
+///
+/// 16-byte buffer. An IPv6 internet protocol address.
+///
+typedef struct EfiIPV6
+{
+ UInt8 Addr[16];
+} EfiIPV6;
+
+#define kEFIYellow (0x01 | 0x02 | 0x04 | 0x08)
+
+#ifdef __x86_64
+#define __EFI_x86_64__ 1
+#endif // __x86_64
+
+enum
+{
+ kEFIHwDevicePath = 0x01,
+ kEFIAcpiDevicePath = 0x02,
+ kEFIMessaingDevicePath = 0x03,
+ kEFIMediaDevicePath = 0x04,
+ kEFIBiosBootPath = 0x05,
+ kEFIEndOfPath = 0x06,
+ kEFICount = 6,
+};
+
+#define END_DEVICE_PATH_TYPE 0x7f
+#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
+#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
+
+#define kEfiOffsetOf(T, F) __builtin_offsetof(T, F)
+
+/// File I/O macros
+
+#define kEFIFileRead 0x0000000000000001
+#define kEFIFileWrite 0x0000000000000002
+#define kEFIFileCreate 0x0000000000000000
+
+#define kEFIReadOnly 0x01
+#define kEFIHidden 0x02
+#define kEFISystem 0x04
+#define kEFIReserved 0x08
+#define kEFIDirectory 0x10
+#define kEFIArchive 0x20
+
+#define EFI_FILE_PROTOCOL_REVISION 0x00010000
+#define EFI_FILE_PROTOCOL_REVISION2 0x00020000
+#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
+
+#define EFI_EXTRA_DESCRIPTOR_SIZE 8
+
+#define EFI_MP_SERVICES_PROTOCOL_GUID \
+ { \
+ 0x3fdda605, 0xa76e, 0x4f46, \
+ { \
+ 0xad, 0x29, 0x12, 0xf4, \
+ 0x53, 0x1b, 0x3d, 0x08 \
+ } \
+ }
+
+#define PROCESSOR_AS_BSP_BIT 0x00000001
+#define PROCESSOR_ENABLED_BIT 0x00000002
+#define PROCESSOR_HEALTH_STATUS_BIT 0x00000004
+
+#define END_OF_CPU_LIST 0xffffffff
+
+typedef struct EfiIOToken
+{
+ //
+ // If Event is NULL, then blocking I/O is performed.
+ // If Event is not NULL and non-blocking I/O is supported, then non-blocking
+ // I/O is performed, and Event will be signaled when the read request is
+ // completed. The caller must be prepared to handle the case where the
+ // callback associated with Event occurs before the original asynchronous I/O
+ // request call returns.
+ //
+ UInt64 Event;
+
+ //
+ // Defines whether or not the signaled event encountered an error.
+ //
+ UInt64 Status;
+
+ //
+ // For OpenEx(): Not Used, ignored.
+ // For ReadEx(): On input, the size of the Buffer. On output, the amount of
+ // data returned in Buffer.
+ // In both cases, the size is measured in bytes.
+ // For WriteEx(): On input, the size of the Buffer. On output, the amount of
+ // data actually written.
+ // In both cases, the size is measured in bytes.
+ // For FlushEx(): Not used, ignored.
+ //
+ UInt32 BufferSize;
+
+ //
+ // For OpenEx(): Not Used, ignored.
+ // For ReadEx(): The buffer into which the data is read.
+ // For WriteEx(): The buffer of data to write.
+ // For FlushEx(): Not Used, ignored.
+ //
+ Void* Buffer;
+} EfiIOToken;
+
+typedef struct EfiFileProtocol
+{
+ UInt64 Revision;
+
+ EfiStatusType(EFI_API* Open)(struct EfiFileProtocol* Self,
+ struct EfiFileProtocol** Out,
+ EfiCharType* CharType,
+ UInt64 OpenMode,
+ UInt64 Attrib);
+
+ EfiStatusType(EFI_API* Close)(struct EfiFileProtocol* Self);
+
+ EfiStatusType(EFI_API* Delete)(struct EfiFileProtocol* Self);
+
+ EfiStatusType(EFI_API* Read)(struct EfiFileProtocol* Self, UInt64* BufSize, VoidPtr BufOut);
+
+ EfiStatusType(EFI_API* Write)(struct EfiFileProtocol* Self, UInt64* BufSize, VoidPtr BufOut);
+
+ EfiStatusType(EFI_API* GetPosition)(EfiFileProtocol* Self, UInt64* Position);
+
+ EfiStatusType(EFI_API* SetPosition)(EfiFileProtocol* Self, UInt64* Position);
+
+ EfiStatusType(EFI_API* GetInfo)(struct EfiFileProtocol*, struct EfiGUID*, UInt32*, void*);
+
+ EfiStatusType(EFI_API* SetInfo)(struct EfiFileProtocol*, struct EfiGUID*, UInt32*, void*);
+
+ EfiStatusType(EFI_API* Flush)(EfiFileProtocol*);
+
+ EfiStatusType(EFI_API* OpenEx)(EfiFileProtocol* Self,
+ EfiFileProtocol** OutHandle,
+ EfiCharType* Path,
+ UInt64 Mode,
+ UInt64 Attrib,
+ struct EfiIOToken* Token);
+
+ EfiStatusType(EFI_API* ReadEx)(EfiFileProtocol* Self,
+ struct EfiIOToken* Token);
+
+ EfiStatusType(EFI_API* WriteEx)(EfiFileProtocol* Self,
+ struct EfiIOToken* Token);
+
+ EfiStatusType(EFI_API* FlushEx)(EfiFileProtocol* Self,
+ struct EfiIOToken* Token);
+} EfiFileProtocol, *EfiFileProtocolPtr;
+
+typedef UInt64 EfiCursorType;
+
+typedef struct EfiTime
+{
+ UInt16 Year;
+ UInt8 Month;
+ UInt8 Day;
+ UInt8 Hour;
+ UInt8 Minute;
+ UInt8 Second;
+ UInt8 Pad1;
+ UInt32 Nanosecond;
+ Int16 TimeZone;
+ UInt8 Daylight;
+ UInt8 Pad2;
+} EfiTime;
+
+#define EFI_FILE_INFO_GUID \
+ { \
+ 0x09576e92, 0x6d3f, 0x11d2, \
+ { \
+ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
+ } \
+ }
+
+struct EfiFileInfo EFI_FINAL
+{
+ /// @brief Structure size.
+ UInt64 Size;
+ /// @brief File size.
+ UInt64 FileSize;
+ /// @brief Physical size on disk.
+ UInt64 PhysicalSize;
+ /// @brief Create time.
+ EfiTime CreateTime;
+ /// @brief Last access time.
+ EfiTime LastAccessTime;
+ /// @brief Edit time.
+ EfiTime EditTime;
+ /// @brief Attributes.
+ UInt64 Attribute;
+ /// @brief VLA file name.
+ WideChar FileName[1];
+};
+
+//*******************************************************
+// EFI_CPU_PHYSICAL_LOCATION
+// @note As in the EFI specs.
+//*******************************************************
+typedef struct _EfiCPUPhyiscalLocation
+{
+ UInt32 Package;
+ UInt32 Core;
+ UInt32 Thread;
+} EfiCPUPhyiscalLocation;
+
+typedef union _EfiExtendedProcessorInformation {
+ EfiCPUPhyiscalLocation Location2;
+} EfiExtendedProcessorInformation;
+
+typedef struct _EfiProcessorInformation
+{
+ UInt64 ProcessorId;
+ UInt32 StatusFlag;
+ EfiCPUPhyiscalLocation Location;
+ EfiExtendedProcessorInformation ExtendedInformation;
+} EfiProcessorInformation;
+
+typedef EfiStatusType EFI_API (*EfiMpServicesGetNumberOfProcessors)(
+ IN struct _EfiMpServicesProtocol* Self,
+ OUT UInt32* NumberOfProcessors,
+ OUT UInt32* NumberOfEnabledProcessors);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesGetProcessorInfo)(
+ IN struct _EfiMpServicesProtocol* Self,
+ IN UInt32* ProcessorNumber,
+ OUT struct _EfiProcessorInformation* NumberOfEnabledProcessors);
+
+typedef void EFI_API (*EFI_AP_PROCEDURE)(
+ IN VoidPtr ProcedureArgument);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesStartupAllAPS)(
+ IN struct _EfiMpServicesProtocol* Self,
+ IN EFI_AP_PROCEDURE Procedure,
+ IN Boolean SingleThread,
+ IN VoidPtr WaitEvent OPTIONAL, // EFI_EVENT first, but unused here.
+ IN UInt32 TimeoutInMicroSeconds,
+ IN Void* ProcedureArgument OPTIONAL,
+ OUT UInt32** FailedCpuList OPTIONAL);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesSwitchBSP)(
+ IN struct _EfiMpServicesProtocol* Self,
+ IN UInt32 ProcessorNumber,
+ IN Boolean EnableOldBSP);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesStartupThisAP)(
+ IN struct _EfiMpServicesProtocol* Self,
+ IN EFI_AP_PROCEDURE Procedure,
+ IN UInt32 ProcessorNumber,
+ IN VoidPtr WaitEvent OPTIONAL,
+ IN UInt32 TimeoutInMicroseconds,
+ IN Void* ProcedureArgument OPTIONAL,
+ OUT Boolean* Finished OPTIONAL);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesDisableThisAP)(
+ IN struct _EfiMpServicesProtocol* Self,
+ IN UInt32 ProcessorNumber,
+ IN Boolean EnableAP,
+ IN UInt32* HealthFlag OPTIONAL);
+
+typedef EfiStatusType EFI_API (*EfiMpServicesWhoAmI)(
+ IN struct _EfiMpServicesProtocol* Self,
+ OUT UInt32* ProcessorNumber);
+
+typedef struct _EfiMpServicesProtocol
+{
+ EfiMpServicesGetNumberOfProcessors GetNumberOfProcessors;
+ EfiMpServicesGetProcessorInfo GetProcessorInfo;
+ EfiMpServicesStartupAllAPS StartupAllAPs;
+ EfiMpServicesStartupThisAP StartupThisAP;
+ EfiMpServicesSwitchBSP SwitchBSP;
+ EfiMpServicesDisableThisAP EnableDisableAP;
+ EfiMpServicesWhoAmI WhoAmI;
+} EfiMpServicesProtocol;
+
+#endif // ifndef FIRMWARE_KIT_EFI_H
diff --git a/dev/Kernel/FirmwareKit/EFI/NS.h b/dev/Kernel/FirmwareKit/EFI/NS.h
new file mode 100644
index 00000000..a5f21f21
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/EFI/NS.h
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Firmware::Detail::EFI
+{
+ using namespace Kernel;
+
+ EXTERN_C
+ {
+#include <FirmwareKit/EFI/EFI.h>
+ }
+
+} // namespace Firmware::Detail::EFI
diff --git a/dev/Kernel/FirmwareKit/GPT.h b/dev/Kernel/FirmwareKit/GPT.h
new file mode 100644
index 00000000..590b63ef
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/GPT.h
@@ -0,0 +1,57 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <FirmwareKit/EFI/EFI.h>
+
+#define kSectorSizeGPT 512
+
+namespace Kernel
+{
+ struct GPT_GUID;
+ struct GPT_PARTITION_TABLE;
+ struct GPT_PARTITION_ENTRY;
+
+ /// @brief GPT GUID structure.
+ typedef struct GPT_GUID
+ {
+ Kernel::UInt32 Data1;
+ Kernel::UInt16 Data2;
+ Kernel::UInt16 Data3;
+ Kernel::UInt8 Data4[8];
+ } GPT_GUID;
+
+ struct PACKED GPT_PARTITION_TABLE final
+ {
+ Char PartitionName[8];
+ UInt32 Revision;
+ UInt32 HeaderSize;
+ UInt32 ChecksumCRC32;
+ UInt32 Reserved1;
+ UInt64 LBAHeader;
+ UInt64 LBAAltHeader;
+ UInt64 FirstGPTEntry;
+ UInt64 LastGPTEntry;
+ GPT_GUID Guid;
+ UInt64 StartingLBA;
+ UInt32 NumPartitionEntries;
+ UInt32 SizeOfEntries;
+ UInt32 CRC32PartEntry;
+ UInt8 Reserved2[kSectorSizeGPT];
+ };
+
+ struct PACKED GPT_PARTITION_ENTRY
+ {
+ GPT_GUID PartitionTypeGUID;
+ GPT_GUID UniquePartitionGUID;
+ UInt64 StartLBA;
+ UInt64 EndLBA;
+ UInt64 Attributes;
+ UInt8 Name[72];
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/FirmwareKit/Handover.h b/dev/Kernel/FirmwareKit/Handover.h
new file mode 100644
index 00000000..d9af3766
--- /dev/null
+++ b/dev/Kernel/FirmwareKit/Handover.h
@@ -0,0 +1,108 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file Handover.h
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief The handover boot protocol.
+ * @version 1.15
+ * @date 2024-02-23
+ *
+ * @copyright Copyright (c) 2024, Amlal EL Mahrouss
+ *
+ */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define kHandoverMagic 0xBADCC
+#define kHandoverVersion 0x0117
+
+/* Initial bitmap pointer location and size. */
+#define kHandoverBitMapSz (gib_cast(4))
+#define kHandoverStructSz sizeof(HEL::BootInfoHeader)
+
+namespace Kernel::HEL
+{
+ /**
+ @brief The executable type enum.
+ */
+ enum
+ {
+ kTypeKernel = 100,
+ kTypeKernelDriver = 101,
+ kTypeRsrc = 102,
+ kTypeInvalid = 103,
+ kTypeCount = 4,
+ };
+
+ /**
+ @brief The executable architecture enum.
+ */
+
+ enum
+ {
+ kArchAMD64 = 122,
+ kArchARM64 = 123,
+ kArchRISCV = 124,
+ kArchCount = 3,
+ };
+
+ struct BootInfoHeader final
+ {
+ UInt64 f_Magic;
+ UInt64 f_Version;
+
+ VoidPtr f_BitMapStart;
+ SizeT f_BitMapSize;
+
+ VoidPtr f_PageStart;
+
+ VoidPtr f_KernelImage;
+ SizeT f_KernelSz;
+ VoidPtr f_StartupImage;
+ SizeT f_StartupSz;
+
+ WideChar f_FirmwareVendorName[32];
+ SizeT f_FirmwareVendorLen;
+
+ VoidPtr f_FirmwareCustomTables[2]; // On EFI 0: BS 1: ST
+
+ struct
+ {
+ VoidPtr f_SmBios;
+ VoidPtr f_VendorPtr;
+ VoidPtr f_MpPtr;
+ Bool f_MultiProcessingEnabled;
+ } f_HardwareTables;
+
+ struct
+ {
+ UIntPtr f_The;
+ SizeT f_Size;
+ UInt32 f_Width;
+ UInt32 f_Height;
+ UInt32 f_PixelFormat;
+ UInt32 f_PixelPerLine;
+ } f_GOP;
+
+ UInt64 f_FirmwareSpecific[8];
+ };
+
+ enum
+ {
+ kHandoverSpecificKind,
+ kHandoverSpecificAttrib,
+ kHandoverSpecificMemoryEfi,
+ };
+
+ /// @brief Alias of bootloader main type.
+ typedef Int32 (*HandoverProc)(BootInfoHeader* boot_info);
+} // namespace Kernel::HEL
+
+/// @brief Bootloader information header global variable.
+inline Kernel::HEL::BootInfoHeader* kHandoverHeader = nullptr;
diff --git a/dev/Kernel/HALKit/.gitkeep b/dev/Kernel/HALKit/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/.gitkeep
diff --git a/dev/Kernel/HALKit/AMD64/CPUID.h b/dev/Kernel/HALKit/AMD64/CPUID.h
new file mode 100644
index 00000000..abe1cdc1
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/CPUID.h
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: CPUID.h
+ Purpose: CPUID flags.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+enum CPUFeatureEnum
+{
+ kCPUFeatureSSE3 = 1 << 0,
+ kCPUFeaturePCLMUL = 1 << 1,
+ kCPUFeatureDTES64 = 1 << 2,
+ kCPUFeatureMONITOR = 1 << 3,
+ kCPUFeatureDS_CPL = 1 << 4,
+ kCPUFeatureVMX = 1 << 5,
+ kCPUFeatureSMX = 1 << 6,
+ kCPUFeatureEST = 1 << 7,
+ kCPUFeatureTM2 = 1 << 8,
+ kCPUFeatureSSSE3 = 1 << 9,
+ kCPUFeatureCID = 1 << 10,
+ kCPUFeatureSDBG = 1 << 11,
+ kCPUFeatureFMA = 1 << 12,
+ kCPUFeatureCX16 = 1 << 13,
+ kCPUFeatureXTPR = 1 << 14,
+ kCPUFeaturePDCM = 1 << 15,
+ kCPUFeaturePCID = 1 << 17,
+ kCPUFeatureDCA = 1 << 18,
+ kCPUFeatureSSE4_1 = 1 << 19,
+ kCPUFeatureSSE4_2 = 1 << 20,
+ kCPUFeatureX2APIC = 1 << 21,
+ kCPUFeatureMOVBE = 1 << 22,
+ kCPUFeaturePOP3C = 1 << 23,
+ kCPUFeatureECXTSC = 1 << 24,
+ kCPUFeatureAES = 1 << 25,
+ kCPUFeatureXSAVE = 1 << 26,
+ kCPUFeatureOSXSAVE = 1 << 27,
+ kCPUFeatureAVX = 1 << 28,
+ kCPUFeatureF16C = 1 << 29,
+ kCPUFeatureRDRAND = 1 << 30,
+ kCPUFeatureHYPERVISOR = 1 << 31,
+ kCPUFeatureFPU = 1 << 0,
+ kCPUFeatureVME = 1 << 1,
+ kCPUFeatureDE = 1 << 2,
+ kCPUFeaturePSE = 1 << 3,
+ kCPUFeatureEDXTSC = 1 << 4,
+ kCPUFeatureMSR = 1 << 5,
+ kCPUFeaturePAE = 1 << 6,
+ kCPUFeatureMCE = 1 << 7,
+ kCPUFeatureCX8 = 1 << 8,
+ kCPUFeatureAPIC = 1 << 9,
+ kCPUFeatureSEP = 1 << 11,
+ kCPUFeatureMTRR = 1 << 12,
+ kCPUFeaturePGE = 1 << 13,
+ kCPUFeatureMCA = 1 << 14,
+ kCPUFeatureCMOV = 1 << 15,
+ kCPUFeaturePAT = 1 << 16,
+ kCPUFeaturePSE36 = 1 << 17,
+ kCPUFeaturePSN = 1 << 18,
+ kCPUFeatureCLFLUSH = 1 << 19,
+ kCPUFeatureDS = 1 << 21,
+ kCPUFeatureACPI = 1 << 22,
+ kCPUFeatureMMX = 1 << 23,
+ kCPUFeatureFXSR = 1 << 24,
+ kCPUFeatureSSE = 1 << 25,
+ kCPUFeatureSSE2 = 1 << 26,
+ kCPUFeatureSS = 1 << 27,
+ kCPUFeatureHTT = 1 << 28,
+ kCPUFeatureTM = 1 << 29,
+ kCPUFeatureIA64 = 1 << 30,
+ kCPUFeaturePBE = 1 << 31
+};
+
+namespace Kernel
+{
+ typedef Int64 CPUID;
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cc b/dev/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cc
new file mode 100644
index 00000000..a1edf6f1
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cc
@@ -0,0 +1,126 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <HALKit/AMD64/Processor.h>
+#include <NewKit/KString.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Heap.h>
+
+namespace Kernel
+{
+ namespace Detail
+ {
+ struct FADT final : public SDT
+ {
+ UInt32 FirmwareCtrl;
+ UInt32 Dsdt;
+
+ // field used in ACPI 1.0; no longer in use, for compatibility only
+ UInt8 Reserved;
+
+ UInt8 PreferredPowerManagementProfile;
+ UInt16 SCI_Interrupt;
+ UInt32 SMI_CommandPort;
+ UInt8 AcpiEnable;
+ UInt8 AcpiDisable;
+ UInt8 S4BIOS_REQ;
+ UInt8 PSTATE_Control;
+ UInt32 PM1aEventBlock;
+ UInt32 PM1bEventBlock;
+ UInt32 PM1aControlBlock;
+ UInt32 PM1bControlBlock;
+ UInt32 PM2ControlBlock;
+ UInt32 PMTimerBlock;
+ UInt32 GPE0Block;
+ UInt32 GPE1Block;
+ UInt8 PM1EventLength;
+ UInt8 PM1ControlLength;
+ UInt8 PM2ControlLength;
+ UInt8 PMTimerLength;
+ UInt8 GPE0Length;
+ UInt8 GPE1Length;
+ UInt8 GPE1Base;
+ UInt8 CStateControl;
+ UInt16 WorstC2Latency;
+ UInt16 WorstC3Latency;
+ UInt16 FlushSize;
+ UInt16 FlushStride;
+ UInt8 DutyOffset;
+ UInt8 DutyWidth;
+ UInt8 DayAlarm;
+ UInt8 MonthAlarm;
+ UInt8 Century;
+
+ // reserved in ACPI 1.0; used since ACPI 2.0+
+ UInt16 BootArchitecturkMMFlags;
+
+ UInt8 Reserved2;
+ UInt32 Flags;
+
+ // 12 byte structure; see below for details
+ ACPI_ADDRESS ResetReg;
+
+ UInt8 ResetValue;
+ UInt8 Reserved3[3];
+
+ // 64bit pointers - Available on ACPI 2.0+
+ UInt64 X_FirmwareControl;
+ UInt64 X_Dsdt;
+
+ ACPI_ADDRESS X_PM1aEventBlock;
+ ACPI_ADDRESS X_PM1bEventBlock;
+ ACPI_ADDRESS X_PM1aControlBlock;
+ ACPI_ADDRESS X_PM1bControlBlock;
+ ACPI_ADDRESS X_PM2ControlBlock;
+ ACPI_ADDRESS X_PMTimerBlock;
+ ACPI_ADDRESS X_GPE0Block;
+ ACPI_ADDRESS X_GPE1Block;
+ };
+ } // namespace Detail
+
+ ACPIFactoryInterface::ACPIFactoryInterface(VoidPtr rsp_ptr)
+ : fRsdp(rsp_ptr), fEntries(0)
+ {
+ }
+
+ Void ACPIFactoryInterface::Shutdown()
+ {
+ failed_to_shutdown:
+ // in case no acpi mode, or it's not available.
+ while (Yes)
+ {
+ asm volatile("cli; hlt");
+ }
+ }
+
+ /// @brief Reboot machine in either ACPI or by triple faulting.
+ /// @return nothing it's a reboot.
+ Void ACPIFactoryInterface::Reboot()
+ {
+ failed_to_reboot:
+ asm volatile(".intel_syntax noprefix; "
+ "rt_reset_hardware:; "
+ "cli; "
+ "wait_gate1: ; "
+ "in al,0x64 ; "
+ "and al,2 ; "
+ "jnz wait_gate1 ; "
+ "mov al,0x0D1 ; "
+ "out 0x64,al ; "
+ "wait_gate2: ; "
+ "in al,0x64 ; "
+ "and al,2 ; "
+ "jnz wait_gate2 ; "
+ "mov al,0x0FE ; "
+ "out 0x60,al ; "
+ "xor rax,rax ; "
+ "lidt [rax] ; "
+ "reset_wait: ; "
+ "jmp reset_wait ; "
+ ".att_syntax; ");
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalAPICController.cc b/dev/Kernel/HALKit/AMD64/HalAPICController.cc
new file mode 100644
index 00000000..e4e35790
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalAPICController.cc
@@ -0,0 +1,39 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <HALKit/AMD64/Processor.h>
+
+#define cIOAPICRegVal (4)
+#define cIOAPICRegReg (0)
+
+namespace Kernel::HAL
+{
+ /// @brief Read from APIC controller.
+ /// @param reg register.
+ UInt32 APICController::Read(UInt32 reg) noexcept
+ {
+ MUST_PASS(this->fApic);
+
+ UInt32 volatile* io_apic = (UInt32 volatile*)this->fApic;
+ io_apic[cIOAPICRegReg] = (reg & 0xFF);
+
+ return io_apic[cIOAPICRegVal];
+ }
+
+ /// @brief Write to APIC controller.
+ /// @param reg register.
+ /// @param value value.
+ Void APICController::Write(UInt32 reg, UInt32 value) noexcept
+ {
+ MUST_PASS(this->fApic);
+
+ UInt32 volatile* io_apic = (UInt32 volatile*)this->fApic;
+
+ io_apic[cIOAPICRegReg] = (reg & 0xFF);
+ io_apic[cIOAPICRegVal] = value;
+ }
+} // namespace Kernel::HAL
diff --git a/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc
new file mode 100644
index 00000000..4234f11e
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalApplicationProcessor.cc
@@ -0,0 +1,279 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <HALKit/AMD64/Processor.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Semaphore.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/Timer.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <NewKit/KernelPanic.h>
+#include <KernelKit/HardwareThreadScheduler.h>
+
+#define kApicSignature "APIC"
+
+#define kAPIC_ICR_Low 0x300
+#define kAPIC_ICR_High 0x310
+#define kAPIC_SIPI_Vector 0x00500
+#define kAPIC_EIPI_Vector 0x00400
+
+#define kAPIC_BASE_MSR 0x1B
+#define kAPIC_BASE_MSR_BSP 0x100
+#define kAPIC_BASE_MSR_ENABLE 0x800
+
+/// @note: _hal_switch_context is internal
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+//! NOTE: fGSI stands 'Field Global System Interrupt'
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+namespace Kernel::HAL
+{
+ struct PROCESS_APIC_MADT;
+ struct PROCESS_CONTROL_BLOCK;
+
+ struct PROCESS_CONTROL_BLOCK final
+ {
+ HAL::StackFramePtr mFrame;
+ };
+
+ EXTERN_C Void _hal_spin_core(Void);
+
+ STATIC struct PROCESS_APIC_MADT* kMADTBlock = nullptr;
+ STATIC Bool kSMPAware = false;
+ STATIC Int64 kSMPCount = 0;
+
+ STATIC UIntPtr kApicBaseAddress = 0UL;
+
+ STATIC Int32 kSMPInterrupt = 0;
+ STATIC UInt64 kAPICLocales[kSchedProcessLimitPerTeam] = {0};
+ STATIC VoidPtr kRawMADT = nullptr;
+
+ /// @brief Multiple APIC Descriptor Table.
+ struct PROCESS_APIC_MADT final : public SDT
+ {
+ UInt32 Address; // Madt address
+ UInt8 Flags; // Madt flags
+
+ struct
+ {
+ UInt8 Type;
+ UInt8 Len;
+
+ union {
+ struct
+ {
+ UInt8 IoID;
+ UInt8 Resv;
+ UInt32 IoAddress;
+ UInt32 GISBase;
+ } IOAPIC;
+
+ struct
+ {
+ UInt8 Source;
+ UInt8 IRQSource;
+ UInt32 GSI;
+ UInt16 Flags;
+ } IOAPIC_NMI;
+
+ struct
+ {
+ UInt8 ProcessorID;
+ UInt16 Flags;
+ UInt8 LINT;
+ } LAPIC;
+
+ struct
+ {
+ UInt16 Reserved;
+ UInt64 Address;
+ } LAPIC_ADDRESS_OVERRIDE;
+
+ struct
+ {
+ UInt16 Reserved;
+ UInt32 x2APICID;
+ UInt32 Flags;
+ UInt32 AcpiID;
+ } LAPIC_ADDRESS;
+ };
+ } List[]; // Records List
+ };
+
+ ///////////////////////////////////////////////////////////////////////////////////////
+
+ /***********************************************************************************/
+ /// @brief Send IPI command to APIC.
+ /// @param apic_id programmable interrupt controller id.
+ /// @param vector vector interrupt.
+ /// @param target target APIC adress.
+ /// @return
+ /***********************************************************************************/
+
+ Void hal_send_start_ipi(UInt32 target, UInt32 apic_id)
+ {
+ Kernel::ke_dma_write<UInt32>(target, kAPIC_ICR_High, apic_id << 24);
+ Kernel::ke_dma_write<UInt32>(target, kAPIC_ICR_Low, 0x00000500 | 0x00004000 | 0x00000000);
+
+ while (Kernel::ke_dma_read<UInt32>(target, kAPIC_ICR_Low) & 0x1000)
+ {
+ ;
+ }
+ }
+
+ /***********************************************************************************/
+ /// @brief Send end IPI for CPU.
+ /// @param apic_id
+ /// @param vector
+ /// @param target
+ /// @return
+ /***********************************************************************************/
+ Void hal_send_sipi(UInt32 target, UInt32 apic_id, UInt8 vector)
+ {
+ Kernel::ke_dma_write<UInt32>(target, kAPIC_ICR_High, apic_id << 24);
+ Kernel::ke_dma_write<UInt32>(target, kAPIC_ICR_Low, 0x00000600 | 0x00004000 | 0x00000000 | vector);
+
+ while (Kernel::ke_dma_read<UInt32>(target, kAPIC_ICR_Low) & 0x1000)
+ {
+ ;
+ }
+ }
+
+ STATIC PROCESS_CONTROL_BLOCK kProcessBlocks[kSchedProcessLimitPerTeam] = {0};
+
+ EXTERN_C HAL::StackFramePtr mp_get_current_context(Int64 pid)
+ {
+ const auto process_index = pid % kSchedProcessLimitPerTeam;
+ return kProcessBlocks[process_index].mFrame;
+ }
+
+ EXTERN_C BOOL mp_register_process(HAL::StackFramePtr stack_frame, ProcessID pid)
+ {
+ MUST_PASS(stack_frame);
+
+ const auto process_index = pid % kSchedProcessLimitPerTeam;
+
+ kProcessBlocks[process_index].mFrame = stack_frame;
+
+ auto first_id = kAPICLocales[0];
+
+ hal_send_sipi(kApicBaseAddress, first_id, (UInt8)(((UIntPtr)stack_frame->BP) >> 12));
+
+ return YES;
+ }
+
+ /***********************************************************************************/
+ /// @brief Is the current config SMP aware?
+ /// @return True if YES, False if not.
+ /***********************************************************************************/
+ Bool mp_is_smp(Void) noexcept
+ {
+ return kSMPAware;
+ }
+
+ /***********************************************************************************/
+ /// @brief Assembly symbol to bootstrap AP.
+ /***********************************************************************************/
+ EXTERN_C Char* hal_ap_blob_start;
+
+ /***********************************************************************************/
+ /// @brief Assembly symbol to bootstrap AP.
+ /***********************************************************************************/
+ EXTERN_C Char* hal_ap_blob_end;
+
+ /***********************************************************************************/
+ /// @brief Fetch and enable SMP scheduler.
+ /// @param vendor_ptr SMP containing structure.
+ /***********************************************************************************/
+ Void mp_get_cores(VoidPtr vendor_ptr) noexcept
+ {
+ if (!vendor_ptr)
+ return;
+
+ if (!kHandoverHeader->f_HardwareTables.f_MultiProcessingEnabled)
+ {
+ kSMPAware = NO;
+ return;
+ }
+
+ auto hw_and_pow_int = PowerFactoryInterface(vendor_ptr);
+ kRawMADT = hw_and_pow_int.Find(kApicSignature).Leak().Leak();
+
+ kMADTBlock = reinterpret_cast<PROCESS_APIC_MADT*>(kRawMADT);
+ kSMPAware = NO;
+
+ if (kMADTBlock)
+ {
+ SizeT index = 0;
+
+ kSMPInterrupt = 0;
+ kSMPCount = 0;
+
+ kcout << "SMP: Starting APs...\r";
+
+ kApicBaseAddress = kMADTBlock->Address;
+
+ constexpr auto kMemoryAPStart = 0x7C000;
+ Char* ptr_ap_code = reinterpret_cast<Char*>(kMemoryAPStart);
+
+ SizeT hal_ap_blob_len = hal_ap_blob_end - hal_ap_blob_start;
+
+ rt_copy_memory((Char*)hal_ap_blob_start, ptr_ap_code, hal_ap_blob_len);
+
+ while (Yes)
+ {
+ if (kMADTBlock->List[index].Type > 9 ||
+ kSMPCount > kSchedProcessLimitPerTeam)
+ break;
+
+ switch (kMADTBlock->List[index].Type)
+ {
+ case 0x00: {
+ if (kMADTBlock->List[kSMPCount].LAPIC.ProcessorID < 1)
+ break;
+
+ kAPICLocales[kSMPCount] = kMADTBlock->List[kSMPCount].LAPIC.ProcessorID;
+ kcout << "SMP: APIC ID: " << number(kAPICLocales[kSMPCount]) << endl;
+
+ // I'll just make the AP start from scratch here.
+
+ hal_send_start_ipi(kApicBaseAddress, kAPICLocales[kSMPCount]);
+
+ HardwareTimer timer(Kernel::Milliseconds(10));
+ timer.Wait();
+
+ /// TODO: HAL helper to create an address.
+
+ hal_send_sipi(kApicBaseAddress, kAPICLocales[kSMPCount], (UInt8)(((UIntPtr)ptr_ap_code) >> 12));
+
+ ++kSMPCount;
+ break;
+ }
+ default:
+ break;
+ }
+
+ ++index;
+ }
+
+ kcout << "SMP: number of APs: " << number(kSMPCount) << endl;
+
+ // Kernel is now SMP aware.
+ // That means that the scheduler is now available (on MP Kernels)
+
+ kSMPAware = true;
+
+ /// TODO: Notify Boot AP that it must start.
+ }
+ }
+} // namespace Kernel::HAL
+
+///////////////////////////////////////////////////////////////////////////////////////
diff --git a/dev/Kernel/HALKit/AMD64/HalApplicationProcessorGNU.s b/dev/Kernel/HALKit/AMD64/HalApplicationProcessorGNU.s
new file mode 100644
index 00000000..a8ad3b76
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalApplicationProcessorGNU.s
@@ -0,0 +1,8 @@
+.data
+
+.global hal_ap_blob_start /* Export the start symbol */
+.global hal_ap_blob_end /* Export the end symbol */
+
+hal_ap_blob_start:
+ .incbin "HALKit/AMD64/HalApplicationProcessorStartup.bin"
+hal_ap_blob_end:
diff --git a/dev/Kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm b/dev/Kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
new file mode 100644
index 00000000..e0063965
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
@@ -0,0 +1,77 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+[bits 16]
+[org 0x7c000]
+
+hal_ap_start:
+ mov ax, 0x0
+ mov ss, ax
+ mov esp, 0x7000
+
+ cli
+ mov eax, cr0
+ or eax, 1
+ mov cr0, eax
+ jmp .hal_ap_start_flush
+.hal_ap_start_flush:
+ mov ax, 0x10
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+
+ mov eax, cr4
+ or eax, 1 << 5
+ mov cr4, eax
+
+ mov eax, cr3
+ mov cr3, eax
+
+ mov ecx, 0xC0000080
+ rdmsr
+ or eax, 1
+ wrmsr
+
+ mov eax, cr0
+ or eax, (1 << 31)
+ mov cr0, eax
+
+ jmp 0x08:hal_ap_64bit_entry
+hal_ap_end:
+
+hal_ap_length:
+ dq hal_ap_end - hal_ap_start
+
+[bits 64]
+
+hal_ap_64bit_entry:
+ mov ax, 0x23
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+ mov rsp, [hal_ap_64bit_entry_stack_end]
+
+ push 0x33
+ push qword [hal_ap_64bit_entry_loop]
+ o64 pushf
+ push rsp
+ push 0x33
+
+ o64 iret
+
+hal_ap_64bit_entry_loop:
+ jmp $
+
+hal_ap_64bit_entry_stack:
+ resb 8196*2
+hal_ap_64bit_entry_stack_end: \ No newline at end of file
diff --git a/dev/Kernel/HALKit/AMD64/HalBoot.asm b/dev/Kernel/HALKit/AMD64/HalBoot.asm
new file mode 100644
index 00000000..59d9658e
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalBoot.asm
@@ -0,0 +1,28 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+[bits 64]
+
+;; Global symbol of this unit
+[extern hal_init_platform]
+
+%define kTypeKernel 100
+%define kArchAmd64 122
+%define kHandoverMagic 0xBADCC
+
+section .ldr
+
+HandoverMagic:
+ dq kHandoverMagic
+HandoverType:
+ dw kTypeKernel
+HandoverPad:
+ dw 0
+HandoverArch:
+ dw kArchAmd64
diff --git a/dev/Kernel/HALKit/AMD64/HalCPUAMD64.cc b/dev/Kernel/HALKit/AMD64/HalCPUAMD64.cc
new file mode 100644
index 00000000..52ba46aa
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalCPUAMD64.cc
@@ -0,0 +1,101 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HalCPU.cc
+ Purpose: Platform processor routines.
+
+------------------------------------------- */
+
+#include <HALKit/AMD64/Paging.h>
+#include <HALKit/AMD64/Processor.h>
+
+/**
+ * @file HalCPU.cc
+ * @brief Common CPU API.
+ */
+
+namespace Kernel::HAL
+{
+ Void lrt_out8(UInt16 port, UInt8 value)
+ {
+ asm volatile("outb %%al, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+ }
+
+ Void lrt_out16(UInt16 port, UInt16 value)
+ {
+ asm volatile("outw %%ax, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+ }
+
+ Void lrt_out32(UInt16 port, UInt32 value)
+ {
+ asm volatile("outl %%eax, %1"
+ :
+ : "a"(value), "Nd"(port)
+ : "memory");
+ }
+
+ UInt8 lrt_in8(UInt16 port)
+ {
+ UInt8 value = 0UL;
+ asm volatile("inb %1, %%al"
+ : "=a"(value)
+ : "Nd"(port)
+ : "memory");
+
+ return value;
+ }
+
+ UInt16 lrt_in16(UInt16 port)
+ {
+ UInt16 value = 0UL;
+ asm volatile("inw %1, %%ax"
+ : "=a"(value)
+ : "Nd"(port)
+ : "memory");
+
+ return value;
+ }
+
+ UInt32 lrt_in32(UInt16 port)
+ {
+ UInt32 value = 0UL;
+ asm volatile("inl %1, %%eax"
+ : "=a"(value)
+ : "Nd"(port)
+ : "memory");
+
+ return value;
+ }
+
+ Void rt_halt()
+ {
+ asm volatile("hlt");
+ }
+
+ Void rt_cli()
+ {
+ asm volatile("cli");
+ }
+
+ Void rt_sti()
+ {
+ asm volatile("sti");
+ }
+
+ Void rt_cld()
+ {
+ asm volatile("cld");
+ }
+
+ Void rt_std()
+ {
+ asm volatile("std");
+ }
+} // namespace Kernel::HAL
diff --git a/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm b/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm
new file mode 100644
index 00000000..8f6b242b
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalCommonAPI.asm
@@ -0,0 +1,82 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+section .text
+
+extern rt_wait_400ns
+
+global rt_out8
+global rt_out16
+global rt_out32
+
+global rt_in8
+global rt_in16
+global rt_in32
+
+rt_out8:
+ mov al, dl
+ mov dx, cx
+ out dx, al
+ ret
+
+rt_out16:
+ mov ax, dx
+ mov dx, cx
+ out dx, ax
+ ret
+
+rt_out32:
+ mov eax, edx
+ mov edx, ecx
+ out dx, eax
+ ret
+
+rt_in8:
+ mov dx, cx
+ in al, dx
+ ret
+
+rt_in16:
+ mov edx, ecx
+ in ax, dx
+ ret
+
+rt_in32:
+ mov rdx, rcx
+ in eax, dx
+ ret
+
+extern hal_system_call_enter
+global mp_system_call_handler
+
+mp_system_call_handler:
+
+ push r8
+ push r9
+ push r10
+ push r11
+ push r12
+ push r13
+ push r14
+ push r15
+
+ jmp hal_system_call_enter
+
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop r11
+ pop r10
+ pop r9
+ pop r8
+
+ o64 sysret
+
+[bits 16]
diff --git a/dev/Kernel/HALKit/AMD64/HalControlRegister.s b/dev/Kernel/HALKit/AMD64/HalControlRegister.s
new file mode 100644
index 00000000..2115d6d1
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalControlRegister.s
@@ -0,0 +1,45 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.globl hal_write_cr3
+.globl hal_write_cr0
+.globl hal_read_cr2
+.globl hal_read_cr3
+.globl hal_read_cr0
+.globl hal_flush_tlb
+.globl hal_invl_tlb
+
+.text
+
+hal_invl_tlb:
+ invlpg (%rcx)
+ retq
+
+hal_flush_tlb:
+ call hal_read_cr3
+ mov %rax, %rcx
+ call hal_write_cr3
+ retq
+
+hal_read_cr3:
+ movq %cr3, %rax
+ retq
+
+hal_read_cr0:
+ movq %cr0, %rax
+ retq
+
+hal_read_cr2:
+ movq %cr2, %rax
+ retq
+
+hal_write_cr3:
+ movq %rcx, %cr3
+ retq
+
+hal_write_cr0:
+ movq %rcx, %cr0
+ retq
diff --git a/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc
new file mode 100644
index 00000000..a6c205f6
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc
@@ -0,0 +1,235 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <NewKit/KString.h>
+#include <POSIXKit/signal.h>
+
+STATIC BOOL kIsScheduling = NO;
+
+/// @brief Handle GPF fault.
+/// @param rsp
+EXTERN_C void idt_handle_gpf(Kernel::UIntPtr rsp)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: GPF.\r";
+
+ process.Leak().ProcessSignal.SignalIP = 0UL;
+ process.Leak().ProcessSignal.SignalID = SIGKILL;
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kKilled;
+
+ process.Leak().Crash();
+}
+
+/// @brief Handle page fault.
+/// @param rsp
+EXTERN_C void idt_handle_pf(Kernel::UIntPtr rsp)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: Page Fault.\r";
+ kcout << "Kernel: SIGKILL set.\r";
+
+ process.Leak().ProcessSignal.SignalIP = 0UL;
+ process.Leak().ProcessSignal.SignalID = SIGKILL;
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kKilled;
+
+ process.Leak().Crash();
+}
+
+/// @brief Handle scheduler interrupt.
+EXTERN_C void idt_handle_scheduler(Kernel::UIntPtr rsp)
+{
+ static Kernel::Int64 try_count_before_brute = 100000UL;
+
+ while (kIsScheduling)
+ {
+ --try_count_before_brute;
+
+ if (try_count_before_brute < 1)
+ break;
+ }
+
+ try_count_before_brute = 100000UL;
+ kIsScheduling = YES;
+
+ kcout << "Kernel: Timer IRQ (Scheduler Notification).\r";
+ Kernel::UserProcessHelper::StartScheduling();
+
+ kIsScheduling = NO;
+}
+
+/// @brief Handle math fault.
+/// @param rsp
+EXTERN_C void idt_handle_math(Kernel::UIntPtr rsp)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: Math error (division by zero?).\r";
+
+ process.Leak().ProcessSignal.SignalIP = 0UL;
+ process.Leak().ProcessSignal.SignalID = SIGKILL;
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kKilled;
+
+ process.Leak().Crash();
+}
+
+/// @brief Handle any generic fault.
+/// @param rsp
+EXTERN_C void idt_handle_generic(Kernel::UIntPtr rsp)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: Generic Process Fault.\r";
+
+ process.Leak().ProcessSignal.SignalIP = 0UL;
+ process.Leak().ProcessSignal.SignalID = SIGKILL;
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kKilled;
+
+ process.Leak().Crash();
+}
+
+EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: Process RIP: " << Kernel::hex_number(rip) << endl;
+ kcout << "Kernel: SIGTRAP set.\r";
+
+ process.Leak().ProcessSignal.SignalIP = rip;
+ process.Leak().ProcessSignal.SignalID = SIGTRAP;
+
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kFrozen;
+}
+
+/// @brief Handle #UD fault.
+/// @param rsp
+EXTERN_C void idt_handle_ud(Kernel::UIntPtr rsp)
+{
+ auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess();
+
+ if (process.Leak().Status != Kernel::ProcessStatusKind::kRunning)
+ return;
+
+ kIsScheduling = NO;
+
+ kcout << "Kernel: Undefined Opcode.\r";
+
+ process.Leak().ProcessSignal.SignalIP = 0UL;
+ process.Leak().ProcessSignal.SignalID = SIGKILL;
+ process.Leak().ProcessSignal.PreviousStatus = process.Leak().Status;
+
+ kcout << "Kernel: PRCFROZE status set..\r";
+
+ process.Leak().Status = Kernel::ProcessStatusKind::kKilled;
+
+ process.Leak().Crash();
+}
+
+/// @brief Enter syscall from assembly.
+/// @param stack the stack pushed from assembly routine.
+/// @return nothing.
+EXTERN_C Kernel::Void hal_system_call_enter(Kernel::UIntPtr rcx_syscall_index, Kernel::UIntPtr rdx_syscall_struct)
+{
+ if (rcx_syscall_index < kSyscalls.Count())
+ {
+ kcout << "syscall: Enter Syscall.\r";
+
+ if (kSyscalls[rcx_syscall_index].fHooked)
+ {
+ if (kSyscalls[rcx_syscall_index].fProc)
+ {
+ (kSyscalls[rcx_syscall_index].fProc)((Kernel::VoidPtr)rdx_syscall_struct);
+ }
+ else
+ {
+ kcout << "syscall: syscall isn't valid at all! (is nullptr)\r";
+ }
+ }
+ else
+ {
+ kcout << "syscall: syscall isn't hooked at all! (is set to false)\r";
+ }
+
+ kcout << "syscall: Exit Syscall.\r";
+ }
+}
+
+/// @brief Enter Kernel call from assembly (DDK only).
+/// @param stack the stack pushed from assembly routine.
+/// @return nothing.
+EXTERN_C Kernel::Void hal_kernel_call_enter(Kernel::UIntPtr rcx_kerncall_index, Kernel::UIntPtr rdx_kerncall_struct)
+{
+ if (rcx_kerncall_index < kKerncalls.Count())
+ {
+ kcout << "kerncall: Enter Kernel Call List.\r";
+
+ if (kKerncalls[rcx_kerncall_index].fHooked)
+ {
+ if (kKerncalls[rcx_kerncall_index].fProc)
+ {
+ (kKerncalls[rcx_kerncall_index].fProc)((Kernel::VoidPtr)rdx_kerncall_struct);
+ }
+ else
+ {
+ kcout << "kerncall: Kernel call isn't valid at all! (is nullptr)\r";
+ }
+ }
+ else
+ {
+ kcout << "kerncall: Kernel call isn't hooked at all! (is set to false)\r";
+ }
+
+ kcout << "kerncall: Exit Kernel Call List.\r";
+ }
+}
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc
new file mode 100644
index 00000000..041af9ed
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc
@@ -0,0 +1,145 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/Utils.h>
+#include <NewKit/New.h>
+
+namespace Kernel
+{
+ enum CommStatus
+ {
+ kStateInvalid,
+ kStateReady = 0xCF,
+ kStateTransmit = 0xFC,
+ kStateCnt = 3
+ };
+
+ namespace Detail
+ {
+ constexpr Int16 kPort = 0x3F8;
+ static Int32 kState = kStateInvalid;
+
+ /// @brief Init COM1.
+ /// @return
+ template <Int16 PORT>
+ bool hal_serial_init() noexcept
+ {
+ if (kState == kStateReady || kState == kStateTransmit)
+ return true;
+
+ HAL::rt_out8(PORT + 1, 0x00); // Disable all interrupts
+ HAL::rt_out8(PORT + 3, 0x80); // Enable DLAB (set baud rate divisor)
+ HAL::rt_out8(PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud
+ HAL::rt_out8(PORT + 1, 0x00); // (hi byte)
+ HAL::rt_out8(PORT + 3, 0x03); // 8 bits, no parity, one stop bit
+ HAL::rt_out8(PORT + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold
+ HAL::rt_out8(PORT + 4, 0x0B); // IRQs enabled, RTS/DSR set
+ HAL::rt_out8(PORT + 4, 0x1E); // Set in loopback mode, test the serial chip
+ HAL::rt_out8(PORT + 0, 0xAE); // Test serial chip (send byte 0xAE and check if
+ // serial returns same byte)
+
+ // Check if serial is faulty (i.e: not same byte as sent)
+ if (HAL::rt_in8(PORT) != 0xAE)
+ {
+ ke_panic(RUNTIME_CHECK_HANDSHAKE);
+ }
+
+ kState = kStateReady;
+
+ // If serial is not faulty set it in normal operation mode
+ // (not-loopback with IRQs enabled and OUT#1 and OUT#2 bits enabled)
+ HAL::rt_out8(PORT + 4, 0x0F);
+
+ return true;
+ }
+ } // namespace Detail
+
+ TerminalDevice::~TerminalDevice() = default;
+
+ EXTERN_C void ke_io_write(const Char* bytes)
+ {
+#ifdef __DEBUG__
+ Detail::hal_serial_init<Detail::kPort>();
+
+ if (!bytes || Detail::kState != kStateReady)
+ return;
+
+ if (*bytes == 0)
+ return;
+
+ Detail::kState = kStateTransmit;
+
+ SizeT index = 0;
+ SizeT len = 0;
+
+ index = 0;
+ len = rt_string_len(bytes, 255);
+
+ while (index < len)
+ {
+ if (bytes[index] == '\r')
+ HAL::rt_out8(Detail::kPort, '\r');
+
+ HAL::rt_out8(Detail::kPort, bytes[index] == '\r' ? '\n' : bytes[index]);
+ ++index;
+ }
+
+ Detail::kState = kStateReady;
+#endif // __DEBUG__
+ }
+
+ EXTERN_C void ke_io_read(const Char* bytes)
+ {
+#ifdef __DEBUG__
+ Detail::hal_serial_init<Detail::kPort>();
+
+ if (!bytes || Detail::kState != kStateReady)
+ return;
+
+ Detail::kState = kStateTransmit;
+
+ SizeT index = 0;
+
+ ///! TODO: Look on how to wait for the UART to complete.
+ while (true)
+ {
+ auto in = HAL::rt_in8(Detail::kPort);
+
+ ///! If enter pressed then break.
+ if (in == 0xD)
+ {
+ break;
+ }
+
+ if (in < '0' || in < 'A' || in < 'a')
+ {
+ if (in != '@' || in != '!' || in != '?' || in != '.' || in != '/' ||
+ in != ':')
+ {
+ continue;
+ }
+ }
+
+ ((char*)bytes)[index] = in;
+
+ ++index;
+ }
+
+ ((char*)bytes)[index] = 0;
+
+ Detail::kState = kStateReady;
+#endif // __DEBUG__
+ }
+
+ TerminalDevice TerminalDevice::The() noexcept
+ {
+ TerminalDevice out(Kernel::ke_io_write, Kernel::ke_io_read);
+ return out;
+ }
+
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugPort.cc b/dev/Kernel/HALKit/AMD64/HalDebugPort.cc
new file mode 100644
index 00000000..546239c2
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalDebugPort.cc
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+//! @file DebuggerPort.cc
+//! @brief UART debug via packets.
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/DebugOutput.h>
+
+// after that we have start of additional data.
+
+namespace Kernel
+{
+ void rt_debug_listen(DebuggerPortHeader* theHook) noexcept
+ {
+ if (theHook == nullptr)
+ return;
+
+ for (UInt32 i = 0U; i < kDebugMaxPorts; ++i)
+ {
+ HAL::rt_out16(theHook->fPort[i], kDebugMag0);
+ HAL::rt_wait_400ns();
+
+ HAL::rt_out16(theHook->fPort[i], kDebugMag1);
+ HAL::rt_wait_400ns();
+
+ HAL::rt_out16(theHook->fPort[i], kDebugMag2);
+ HAL::rt_wait_400ns();
+
+ HAL::rt_out16(theHook->fPort[i], kDebugMag3);
+ HAL::rt_wait_400ns();
+
+ if (HAL::rt_in16(theHook->fPort[i] != kDebugUnboundPort))
+ ++theHook->fBoundCnt;
+ }
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc b/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc
new file mode 100644
index 00000000..6e3ab7bb
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalDescriptorLoader.cc
@@ -0,0 +1,126 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <HALKit/AMD64/Processor.h>
+
+#define kPITDefaultTicks (1000U)
+
+namespace Kernel::HAL
+{
+ namespace Detail
+ {
+ STATIC ::Kernel::Detail::AMD64::InterruptDescriptorAMD64
+ kInterruptVectorTable[kKernelIdtSize] = {};
+
+ STATIC void hal_set_irq_mask(UInt8 irql);
+ STATIC void hal_clear_irq_mask(UInt8 irql);
+
+ STATIC Void hal_enable_pit(UInt16 ticks) noexcept
+ {
+ if (ticks == 0)
+ ticks = kPITDefaultTicks;
+
+ // Configure PIT to receieve scheduler interrupts.
+
+ UInt16 kPITCommDivisor = kPITFrequency / ticks; // 100 Hz.
+
+ HAL::rt_out8(kPITControlPort, 0x36); // Command to PIT
+ HAL::rt_out8(kPITChannel0Port, kPITCommDivisor & 0xFF); // Send low byte
+ HAL::rt_out8(kPITChannel0Port, (kPITCommDivisor >> 8) & 0xFF); // Send high byte
+
+ hal_clear_irq_mask(32);
+ }
+
+ STATIC void hal_set_irq_mask(UInt8 irql)
+ {
+ UInt16 port;
+ UInt8 value;
+
+ if (irql < 8)
+ {
+ port = kPICData;
+ }
+ else
+ {
+ port = kPIC2Data;
+ irql -= 8;
+ }
+
+ value = rt_in8(port) | (1 << irql);
+ rt_out8(port, value);
+ }
+
+ STATIC void hal_clear_irq_mask(UInt8 irql)
+ {
+ UInt16 port;
+ UInt8 value;
+
+ if (irql < 8)
+ {
+ port = kPICData;
+ }
+ else
+ {
+ port = kPIC2Data;
+ irql -= 8;
+ }
+
+ value = rt_in8(port) & ~(1 << irql);
+ rt_out8(port, value);
+ }
+ } // namespace Detail
+
+ /// @brief Loads the provided Global Descriptor Table.
+ /// @param gdt
+ /// @return
+ Void GDTLoader::Load(RegisterGDT& gdt)
+ {
+ hal_load_gdt(gdt);
+ }
+
+ Void IDTLoader::Load(Register64& idt)
+ {
+ rt_cli();
+
+ const Int16 kPITTickForScheduler = kPITDefaultTicks;
+
+ volatile ::Kernel::UIntPtr** ptr_ivt = (volatile ::Kernel::UIntPtr**)idt.Base;
+
+ for (SizeT idt_indx = 0; idt_indx < kKernelIdtSize; ++idt_indx)
+ {
+ Detail::kInterruptVectorTable[idt_indx].Selector = kIDTSelector;
+ Detail::kInterruptVectorTable[idt_indx].Ist = 0;
+ Detail::kInterruptVectorTable[idt_indx].TypeAttributes = kInterruptGate;
+ Detail::kInterruptVectorTable[idt_indx].OffsetLow = ((UIntPtr)ptr_ivt[idt_indx] & 0xFFFF);
+ Detail::kInterruptVectorTable[idt_indx].OffsetMid = (((UIntPtr)ptr_ivt[idt_indx] >> 16) & 0xFFFF);
+ Detail::kInterruptVectorTable[idt_indx].OffsetHigh =
+ (((UIntPtr)ptr_ivt[idt_indx] >> 32) & 0xFFFFFFFF);
+
+ Detail::kInterruptVectorTable[idt_indx].Zero = 0;
+ }
+
+ idt.Base = (UIntPtr)&Detail::kInterruptVectorTable[0];
+ idt.Limit = sizeof(::Kernel::Detail::AMD64::InterruptDescriptorAMD64) *
+ (kKernelIdtSize);
+
+ hal_load_idt(idt);
+
+ Detail::hal_enable_pit(kPITTickForScheduler);
+
+ rt_sti();
+ }
+
+ void GDTLoader::Load(Ref<RegisterGDT>& gdt)
+ {
+ GDTLoader::Load(gdt.Leak());
+ }
+
+ void IDTLoader::Load(Ref<Register64>& idt)
+ {
+ IDTLoader::Load(idt.Leak());
+ }
+} // namespace Kernel::HAL
diff --git a/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm b/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm
new file mode 100644
index 00000000..b3d8d91f
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalInterruptAPI.asm
@@ -0,0 +1,410 @@
+;; /*
+;; * ---------------------------------------------------
+;; *
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+;; *
+;; * File: HalInterruptAPI.asm
+;; * Purpose: Interrupt API, redirect raw interrupts into their handlers.
+;; *
+;; * ---------------------------------------------------
+;; */
+
+[bits 64]
+
+%define kInterruptId 50
+
+%macro IntExp 1
+global __ZKA_INT_%1
+__ZKA_INT_%1:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+%endmacro
+
+%macro IntNormal 1
+global __ZKA_INT_%1
+__ZKA_INT_%1:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ std
+
+ o64 iret
+%endmacro
+
+; This file handles the core interrupt table
+; Last edited 31/01/24
+
+global ke_handle_irq
+global kInterruptVectorTable
+
+extern idt_handle_gpf
+extern idt_handle_pf
+extern ke_io_write
+extern idt_handle_ud
+extern idt_handle_generic
+extern idt_handle_breakpoint
+
+section .text
+
+__ZKA_INT_0:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ std
+
+ o64 iret
+
+__ZKA_INT_1:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+__ZKA_INT_2:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+;; @brief Triggers a breakpoint and freeze the process. RIP is also fetched.
+__ZKA_INT_3:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+__ZKA_INT_4:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+__ZKA_INT_5:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ std
+
+ o64 iret
+
+;; Invalid opcode interrupt
+__ZKA_INT_6:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+__ZKA_INT_7:
+ cld
+
+ mov al, 0x20
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+;; Invalid opcode interrupt
+__ZKA_INT_8:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rcx
+ call idt_handle_generic
+ pop rcx
+
+ std
+
+ o64 iret
+
+IntNormal 9
+IntExp 10
+IntExp 11
+
+IntExp 12
+
+__ZKA_INT_13:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rcx
+ call idt_handle_gpf
+ pop rcx
+
+ std
+
+ o64 iret
+
+__ZKA_INT_14:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rcx
+ call idt_handle_pf
+ pop rcx
+
+ std
+
+ o64 iret
+
+IntNormal 15
+IntNormal 16
+IntExp 17
+IntNormal 18
+IntNormal 19
+IntNormal 20
+IntNormal 21
+
+IntNormal 22
+
+IntNormal 23
+IntNormal 24
+IntNormal 25
+IntNormal 26
+IntNormal 27
+IntNormal 28
+IntNormal 29
+IntExp 30
+IntNormal 31
+
+[extern idt_handle_scheduler]
+
+__ZKA_INT_32:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rax
+ mov rcx, rsp
+ call idt_handle_scheduler
+ pop rax
+
+ std
+
+ o64 iret
+
+IntNormal 33
+
+IntNormal 34
+IntNormal 35
+IntNormal 36
+IntNormal 37
+IntNormal 38
+IntNormal 39
+IntNormal 40
+
+IntNormal 41
+
+IntNormal 42
+IntNormal 43
+IntNormal 44
+IntNormal 45
+IntNormal 46
+IntNormal 47
+IntNormal 48
+IntNormal 49
+
+[extern hal_system_call_enter]
+[extern hal_kernel_call_enter]
+
+__ZKA_INT_50:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rax
+ mov rax, hal_system_call_enter
+
+ mov rcx, r8
+ mov rdx, r9
+
+ call rax
+ pop rax
+
+ std
+
+ o64 iret
+
+__ZKA_INT_51:
+ cld
+
+ mov al, 0x20
+ out 0xA0, al
+ out 0x20, al
+
+ push rax
+ mov rax, hal_kernel_call_enter
+
+ mov rcx, r8
+ mov rdx, r9
+
+ call rax
+ pop rax
+
+ std
+
+ o64 iret
+
+IntNormal 52
+
+IntNormal 53
+IntNormal 54
+IntNormal 55
+IntNormal 56
+IntNormal 57
+IntNormal 58
+IntNormal 59
+IntNormal 60
+
+%assign i 61
+%rep 195
+ IntNormal i
+%assign i i+1
+%endrep
+
+section .text
+
+[global hal_load_gdt]
+
+hal_load_gdt:
+ cld
+
+ lgdt [rcx]
+
+ mov ax, 0x10
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+
+ mov rax, 0x08
+ push rax
+ push hal_reload_segments
+
+ o64 retf
+
+extern hal_real_init
+
+hal_reload_segments:
+ std
+
+ jmp hal_real_init
+ ret
+
+global hal_load_idt
+
+hal_load_idt:
+ lidt [rcx]
+
+ ; Master PIC initialization
+ mov al, 0x11 ; Start initialization in cascade mode
+ out 0x20, al ; Send initialization command to Master PIC
+ out 0xA0, al ; Send initialization command to Slave PIC
+
+ ; Remap the PIC to use vectors 32-39 for Master and 40-47 for Slave
+ mov al, 0x20 ; Set Master PIC offset to 32
+ out 0x21, al ; Send offset to Master PIC
+
+ mov al, 0x28 ; Set Slave PIC offset to 40
+ out 0xA1, al ; Send offset to Slave PIC
+
+ ; Configure Master PIC to inform Slave PIC at IRQ2
+ mov al, 0x04 ; Tell Master PIC there is a Slave PIC at IRQ2
+ out 0x21, al
+
+ ; Configure Slave PIC identity
+ mov al, 0x02 ; Tell Slave PIC its cascade identity
+ out 0xA1, al
+
+ ; Set both PICs to 8086 mode
+ mov al, 0x01 ; 8086 mode
+ out 0x21, al
+ out 0xA1, al
+
+ ret
+
+section .data
+
+kInterruptVectorTable:
+ %assign i 0
+ %rep 256
+ dq __ZKA_INT_%+i
+ %assign i i+1
+ %endrep
diff --git a/dev/Kernel/HALKit/AMD64/HalKernelMain.cc b/dev/Kernel/HALKit/AMD64/HalKernelMain.cc
new file mode 100644
index 00000000..e982714d
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalKernelMain.cc
@@ -0,0 +1,110 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/HardwareThreadScheduler.h>
+#include <KernelKit/CodeMgr.h>
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <NetworkKit/IPC.h>
+#include <CFKit/Property.h>
+#include <Mod/CoreGfx/TextMgr.h>
+
+EXTERN_C Kernel::VoidPtr kInterruptVectorTable[];
+EXTERN_C Kernel::VoidPtr mp_user_switch_proc;
+EXTERN_C Kernel::Char mp_user_switch_proc_stack_begin[];
+
+EXTERN_C Kernel::rtl_ctor_kind __CTOR_LIST__[];
+EXTERN_C Kernel::VoidPtr __DTOR_LIST__;
+
+EXTERN_C Kernel::Void rtl_kernel_main(Kernel::SizeT argc, char** argv, char** envp, Kernel::SizeT envp_len);
+
+STATIC Kernel::Void hal_init_cxx_ctors()
+{
+ for (Kernel::SizeT i = 0U; i < Kernel::UserProcessScheduler::The().CurrentTeam().AsArray().Count(); ++i)
+ {
+ Kernel::UserProcessScheduler::The().CurrentTeam().AsArray()[i] = Kernel::UserProcess();
+ Kernel::UserProcessScheduler::The().CurrentTeam().AsArray()[i].Status = Kernel::ProcessStatusKind::kKilled;
+ }
+
+ Kernel::UserProcessScheduler::The().CurrentTeam().mProcessCount = 0UL;
+
+ for (Kernel::SizeT index = 0UL; __CTOR_LIST__[index] != __DTOR_LIST__; ++index)
+ {
+ Kernel::rtl_ctor_kind constructor_cxx = (Kernel::rtl_ctor_kind)__CTOR_LIST__[index];
+ constructor_cxx();
+ }
+}
+
+/// @brief Kernel init procedure.
+EXTERN_C void hal_init_platform(
+ Kernel::HEL::BootInfoHeader* handover_hdr)
+{
+ kHandoverHeader = handover_hdr;
+
+ if (kHandoverHeader->f_Magic != kHandoverMagic &&
+ kHandoverHeader->f_Version != kHandoverVersion)
+ {
+ return;
+ }
+
+ hal_init_cxx_ctors();
+
+ /************************************** */
+ /* INITIALIZE BIT MAP. */
+ /************************************** */
+
+ kKernelBitMpSize = kHandoverHeader->f_BitMapSize;
+ kKernelBitMpStart = reinterpret_cast<Kernel::VoidPtr>(
+ reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_BitMapStart));
+
+ /************************************** */
+ /* INITIALIZE GDT AND SEGMENTS. */
+ /************************************** */
+
+ STATIC CONST auto kGDTEntriesCount = 6;
+
+ /* GDT, mostly descriptors for user and kernel segments. */
+ STATIC Kernel::HAL::Detail::ZKA_GDT_ENTRY ALIGN(0x08) kGDTArray[kGDTEntriesCount] = {
+ {.fLimitLow = 0, .fBaseLow = 0, .fBaseMid = 0, .fAccessByte = 0x00, .fFlags = 0x00, .fBaseHigh = 0}, // Null entry
+ {.fLimitLow = 0x0, .fBaseLow = 0, .fBaseMid = 0, .fAccessByte = 0x9A, .fFlags = 0xAF, .fBaseHigh = 0}, // Kernel code
+ {.fLimitLow = 0x0, .fBaseLow = 0, .fBaseMid = 0, .fAccessByte = 0x92, .fFlags = 0xCF, .fBaseHigh = 0}, // Kernel data
+ {.fLimitLow = 0x0, .fBaseLow = 0, .fBaseMid = 0, .fAccessByte = 0xFA, .fFlags = 0xAF, .fBaseHigh = 0}, // User code
+ {.fLimitLow = 0x0, .fBaseLow = 0, .fBaseMid = 0, .fAccessByte = 0xF2, .fFlags = 0xCF, .fBaseHigh = 0}, // User data
+ };
+
+ // Load memory descriptors.
+ Kernel::HAL::RegisterGDT gdt_reg;
+
+ gdt_reg.Base = reinterpret_cast<Kernel::UIntPtr>(kGDTArray);
+ gdt_reg.Limit = (sizeof(Kernel::HAL::Detail::ZKA_GDT_ENTRY) * kGDTEntriesCount) - 1;
+
+ //! GDT will load hal_read_init after it successfully loads the segments.
+ Kernel::HAL::GDTLoader gdt_loader;
+ gdt_loader.Load(gdt_reg);
+
+ Kernel::ke_panic(RUNTIME_CHECK_BOOTSTRAP);
+}
+
+EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept
+{
+ rtl_kernel_main(0, nullptr, nullptr, 0);
+
+ Kernel::HAL::mp_get_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr);
+
+ Kernel::HAL::Register64 idt_reg;
+
+ idt_reg.Base = (Kernel::UIntPtr)kInterruptVectorTable;
+
+ Kernel::HAL::IDTLoader idt_loader;
+
+ idt_loader.Load(idt_reg);
+
+ while (YES)
+ {
+ continue;
+ }
+}
diff --git a/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc b/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
new file mode 100644
index 00000000..594b475f
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalKernelPanic.cc
@@ -0,0 +1,90 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/KernelPanic.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Timer.h>
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/KString.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/FileMgr.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <NewKit/Utils.h>
+
+/* Each error code is attributed with an ID, which will prompt a string onto the
+ * screen. Wait for debugger... */
+
+namespace Kernel
+{
+ /// @brief Dumping factory class.
+ class RecoveryFactory final
+ {
+ public:
+ STATIC Void Recover() noexcept;
+ };
+
+ /***********************************************************************************/
+ /// @brief Stops execution of the kernel.
+ /// @param id kernel stop ID.
+ /***********************************************************************************/
+ Void ke_panic(const Kernel::Int32& id, const Char* message)
+ {
+ fb_init();
+
+ auto panic_text = RGB(0xff, 0xff, 0xff);
+
+ auto y = 10;
+ auto x = 10;
+
+ Char* message_apicid = new Char[128];
+ rt_set_memory(message_apicid, 0, 128);
+
+ rt_copy_memory((VoidPtr) "panic id: ", message_apicid, rt_string_len("panic id: "));
+ rt_to_string(message_apicid + rt_string_len("panic id: "), (UIntPtr)id, 10);
+
+ fb_render_string(message_apicid, y, x, panic_text);
+
+ y += 10;
+
+ fb_render_string((message ? message : "message: panic raised, going nowhere after this!"), y, x, panic_text);
+
+ y += 10;
+
+ Char* message_cr2 = new Char[128];
+ rt_set_memory(message_cr2, 0, 128);
+
+ rt_copy_memory((VoidPtr) "cr2: ", message_cr2, rt_string_len("cr2: "));
+ rt_to_string(message_cr2 + rt_string_len("cr2: "), (UIntPtr)hal_read_cr2(), 10);
+
+ fb_render_string(message_cr2, y, x, panic_text);
+
+ y += 10;
+
+ fb_clear();
+
+ RecoveryFactory::Recover();
+ }
+
+ Void RecoveryFactory::Recover() noexcept
+ {
+ while (YES)
+ {
+ HAL::rt_halt();
+ }
+ }
+
+ void ke_runtime_check(bool expr, const Char* file, const Char* line)
+ {
+ if (!expr)
+ {
+ kcout << "FAILED: FILE: " << file << endl;
+ kcout << "FAILED: LINE: " << line << endl;
+
+ ke_panic(RUNTIME_CHECK_FAILED, file); // Runtime Check failed
+ }
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalPagingMgrAMD64.cc b/dev/Kernel/HALKit/AMD64/HalPagingMgrAMD64.cc
new file mode 100644
index 00000000..97bf07f8
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalPagingMgrAMD64.cc
@@ -0,0 +1,168 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HalPagingMgr.cc
+ Purpose: Platform Paging Manager..
+
+------------------------------------------- */
+
+#include <HALKit/AMD64/Paging.h>
+#include <HALKit/AMD64/Processor.h>
+
+namespace Kernel::HAL
+{
+ typedef UInt32 PageTableIndex;
+
+ /***********************************************************************************/
+ /// \brief Page store type.
+ /***********************************************************************************/
+ struct ZKA_PAGE_STORE final
+ {
+ struct
+ {
+ PDE* fPde{nullptr};
+ PTE* fPte{nullptr};
+ VoidPtr fVAddr{nullptr};
+ } fInternalStore;
+
+ Bool fStoreOp{No}; // Store operation is in progress.
+
+ bool IsValidPage(PTE* pte)
+ {
+ return pte && pte->Present;
+ }
+
+ bool IsWRPage(PTE* pte)
+ {
+ return pte && pte->Wr;
+ }
+
+ bool IsUserPage(PTE* pte)
+ {
+ return pte && pte->User;
+ }
+
+ static ZKA_PAGE_STORE& The()
+ {
+ static ZKA_PAGE_STORE the;
+ return the;
+ }
+ };
+
+ /***********************************************************************************/
+ /// \brief Retrieve the page status of a PTE.
+ /// \param pte Page Table Entry pointer.
+ /***********************************************************************************/
+ STATIC Void mmi_page_status(PTE* pte)
+ {
+ kcout << (pte->Present ? "Present" : "Not Present") << endl;
+ kcout << (pte->Wr ? "W/R" : "Not W/R") << endl;
+ kcout << (pte->ExecDisable ? "NX" : "Not NX") << endl;
+ kcout << (pte->User ? "User" : "Not User") << endl;
+ }
+
+ STATIC Int32 mmi_map_page_table_entry(VoidPtr virtual_address, UInt32 flags, ZKA_PTE* pt_entry, ZKA_PDE* pd_entry);
+
+ /***********************************************************************************/
+ /// @brief Maps or allocates a page from virtual_address.
+ /// @param virtual_address a valid virtual address.
+ /// @param phys_addr point to physical address.
+ /// @param flags the flags to put on the page.
+ /// @return Status code of page manipulation process.
+ /***********************************************************************************/
+ EXTERN_C Int32 mm_map_page(VoidPtr virtual_address, UInt32 flags)
+ {
+ if (!virtual_address ||
+ !flags)
+ return 0;
+
+ // Constants for table index bits
+ const UInt64 cPmlIndexMask = 0x1FFULL; // Mask for PML4, PDPT, PD, PT index (9 bits)
+ const UInt64 cPtIndexMask = 0xFFFULL; // Mask for page table index (12 bits)
+
+ UInt64 cr3 = (UInt64)hal_read_cr3();
+
+ ZKA_PAGE_STORE& page_store = ZKA_PAGE_STORE::The();
+
+ // Extract the indices from the virtual address
+ UInt64 pml4_index = ((UIntPtr)virtual_address >> 39) & cPmlIndexMask;
+ UInt64 pdpt_index = ((UIntPtr)virtual_address >> 30) & cPmlIndexMask;
+ UInt64 pd_index = ((UIntPtr)virtual_address >> 21) & cPmlIndexMask;
+ UInt64 pt_index = ((UIntPtr)virtual_address >> 12) & cPmlIndexMask;
+
+ page_store.fStoreOp = Yes;
+
+ if (page_store.fInternalStore.fVAddr == virtual_address)
+ {
+ page_store.fStoreOp = No;
+ return mmi_map_page_table_entry(page_store.fInternalStore.fVAddr, flags, page_store.fInternalStore.fPte, page_store.fInternalStore.fPde);
+ }
+
+ const auto cPmlEntrySize = 8;
+
+ // Read the PML4 entry from memory
+ UInt64 pml4_base = cr3 & ~cPtIndexMask; // CR3 points to the PML4 table base, mask off lower bits
+ UInt64 pml4_entry = (pml4_base + pml4_index * cPmlEntrySize); // Each entry is 8 bytes
+
+ // Read the PDPT entry
+ UInt64 pdpt_base = pml4_entry & ~cPtIndexMask; // Get the PDPT base physical address
+ UInt64 pdpt_entry = (pdpt_base + pdpt_index * cPmlEntrySize);
+
+ // Read the PD entry
+ UInt64 pd_base = pdpt_entry & ~cPtIndexMask; // Get the Page Directory base physical address
+ UInt64 pd_entry = (pd_base + pd_index * cPmlEntrySize);
+
+ // Read the PT entry
+ UInt64 pt_base = pd_entry & ~cPtIndexMask; // Get the Page Table base physical address
+ UInt64 pt_entry = (pt_base + pt_index * cPmlEntrySize);
+
+ // Lastly, grab the pte entry.
+ ZKA_PDE* pde_struct = reinterpret_cast<ZKA_PDE*>(pt_base);
+
+ return mmi_map_page_table_entry(virtual_address, flags, pde_struct->fEntries[pt_entry], pde_struct);
+ }
+
+ /***********************************************************************************/
+ /// @brief Maps flags for a specific pte.
+ /// @internal Internal function.
+ /***********************************************************************************/
+ STATIC Int32 mmi_map_page_table_entry(VoidPtr virtual_address, UInt32 flags, ZKA_PTE* pt_entry, ZKA_PDE* pd_entry)
+ {
+ if (!pt_entry)
+ return 1;
+
+ pt_entry->Present = true;
+
+ if (flags & kMMFlagsWr)
+ pt_entry->Wr = true;
+ else if (flags & ~kMMFlagsWr)
+ pt_entry->Wr = false;
+
+ if (flags & kMMFlagsNX)
+ pt_entry->ExecDisable = true;
+ else if (flags & ~kMMFlagsNX)
+ pt_entry->ExecDisable = false;
+
+ if (flags & kMMFlagsUser)
+ pt_entry->User = true;
+ else if (flags & ~kMMFlagsUser)
+ pt_entry->User = false;
+
+ hal_invl_tlb(reinterpret_cast<VoidPtr>(pt_entry));
+
+ mmi_page_status(pt_entry);
+
+ ZKA_PAGE_STORE& page_store = ZKA_PAGE_STORE::The();
+
+ // Update Internal store.
+
+ page_store.fInternalStore.fPde = pd_entry;
+ page_store.fInternalStore.fPte = pt_entry;
+ page_store.fInternalStore.fVAddr = virtual_address;
+
+ page_store.fStoreOp = No;
+
+ return 0;
+ }
+} // namespace Kernel::HAL
diff --git a/dev/Kernel/HALKit/AMD64/HalRoutineWait.s b/dev/Kernel/HALKit/AMD64/HalRoutineWait.s
new file mode 100644
index 00000000..89051ba4
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalRoutineWait.s
@@ -0,0 +1,11 @@
+.globl rt_wait_400ns
+
+.section .text
+rt_wait_400ns:
+ jmp .loop
+ pause
+ .loop:
+ jmp .loop2
+ pause
+ .loop2:
+ ret
diff --git a/dev/Kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc b/dev/Kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc
new file mode 100644
index 00000000..b6ea7ca3
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc
@@ -0,0 +1,52 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/AMD64/Processor.h>
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Unimplemented function (crashes by default)
+ /// @param
+ /***********************************************************************************/
+
+ EXTERN_C Void __zka_pure_call(UserProcess* process)
+ {
+ if (process)
+ process->Crash();
+ }
+
+ /***********************************************************************************/
+ /// @brief Validate user stack.
+ /// @param stack_ptr the frame pointer.
+ /***********************************************************************************/
+
+ EXTERN_C Bool hal_check_stack(HAL::StackFramePtr stack_ptr)
+ {
+ if (!stack_ptr)
+ return No;
+
+ return stack_ptr->SP != 0 && stack_ptr->BP != 0;
+ }
+
+ /// @brief Wakes up thread.
+ /// Wakes up thread from the hang state.
+ Void mp_wakeup_thread(HAL::StackFrame* stack)
+ {
+ Kernel::UserProcessHelper::StartScheduling();
+ }
+
+ /// @brief makes the thread sleep on a loop.
+ /// hooks and hangs thread to prevent code from executing.
+ Void mp_hang_thread(HAL::StackFrame* stack)
+ {
+ while (Yes)
+ {
+ /* Nothing to do, code is spinning */
+ }
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/HalTimerAMD64.cc b/dev/Kernel/HALKit/AMD64/HalTimerAMD64.cc
new file mode 100644
index 00000000..bedbb237
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalTimerAMD64.cc
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HalTimer.cc
+ Purpose: HAL timer
+
+ Revision History:
+
+ 07/07/24: Added file (amlel)
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Timer.h>
+
+// timer slot 0
+
+#define cHPETCounterRegValue (0x00)
+#define cHPETConfigRegValue (0x20)
+#define cHPETCompRegValue (0x24)
+#define cHPETInterruptRegValue (0x2C)
+
+///! BUGS: 0
+///! @file HalTimer.cc
+///! @brief Hardware Timer (HPET)
+
+namespace Kernel::Detail
+{
+ struct HPET_BLOCK : public Kernel::SDT
+ {
+ Kernel::UInt8 hardware_rev_id;
+ Kernel::UInt8 comparator_count : 5;
+ Kernel::UInt8 counter_size : 1;
+ Kernel::UInt8 reserved : 1;
+ Kernel::UInt8 legacy_replacement : 1;
+ Kernel::UInt16 pci_vendor_id;
+ ACPI_ADDRESS address;
+ Kernel::UInt8 hpet_number;
+ Kernel::UInt16 minimum_tick;
+ Kernel::UInt8 page_protection;
+ } PACKED;
+} // namespace Kernel::Detail
+
+using namespace Kernel;
+
+HardwareTimer::HardwareTimer(Int64 ms)
+ : fWaitFor(ms)
+{
+ auto power = PowerFactoryInterface(kHandoverHeader->f_HardwareTables.f_VendorPtr);
+
+ auto hpet = (Detail::HPET_BLOCK*)power.Find("HPET").Leak().Leak();
+ MUST_PASS(hpet);
+
+ fDigitalTimer = (IntPtr*)hpet->address.Address;
+}
+
+HardwareTimer::~HardwareTimer()
+{
+ fDigitalTimer = nullptr;
+ fWaitFor = 0;
+}
+
+BOOL HardwareTimer::Wait() noexcept
+{
+ if (fWaitFor < 1)
+ return NO;
+
+ // if not enabled yet.
+ if (!(*(fDigitalTimer + cHPETConfigRegValue) & (1 << 0)))
+ {
+ *(fDigitalTimer + cHPETConfigRegValue) |= (1 << 0); // enable it
+ *(fDigitalTimer + cHPETConfigRegValue) |= (1 << 3); // one shot conf
+ }
+
+ UInt64 ticks = fWaitFor / ((*(fDigitalTimer) >> 32) & __UINT32_MAX__);
+ UInt64 prev = *(fDigitalTimer + cHPETCounterRegValue);
+
+ prev += ticks;
+
+ while (*(fDigitalTimer + cHPETCounterRegValue) < (ticks))
+ ;
+
+ return YES;
+}
diff --git a/dev/Kernel/HALKit/AMD64/HalUtils.asm b/dev/Kernel/HALKit/AMD64/HalUtils.asm
new file mode 100644
index 00000000..d3918190
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/HalUtils.asm
@@ -0,0 +1,26 @@
+;; /*
+;; * ========================================================
+;; *
+;; * ZKA
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+[bits 64]
+
+[global rt_install_tib]
+
+section .text
+
+;; changed: rs, fs
+;; expected: rcx, rdx
+
+rt_install_tib:
+ mov rcx, gs ;; TIB -> Thread Information Block
+ mov rdx, fs ;; PIB -> Process Information Block
+ ret
+
+;; //////////////////////////////////////////////////// ;;
+
+[extern kApicMadtAddressesCount]
diff --git a/dev/Kernel/HALKit/AMD64/Hypervisor.h b/dev/Kernel/HALKit/AMD64/Hypervisor.h
new file mode 100644
index 00000000..8f4a89d9
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Hypervisor.h
@@ -0,0 +1,25 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ MAKE_STRING_ENUM(HYPERVISOR)
+ ENUM_STRING(Qemu, "TCGTCGTCGTCG");
+ ENUM_STRING(KVM, " KVMKVMKVM ");
+ ENUM_STRING(VMWare, "VMwareVMware");
+ ENUM_STRING(VirtualBox, "VBoxVBoxVBox");
+ ENUM_STRING(Xen, "XenVMMXenVMM");
+ ENUM_STRING(Microsoft, "Microsoft Hv");
+ ENUM_STRING(Parallels, " prl hyperv ");
+ ENUM_STRING(ParallelsAlt, " lrpepyh vr ");
+ ENUM_STRING(Bhyve, "bhyve bhyve ");
+ ENUM_STRING(Qnx, " QNXQVMBSQG ");
+ END_STRING_ENUM()
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/MBCI/HalMBCI.cc b/dev/Kernel/HALKit/AMD64/MBCI/HalMBCI.cc
new file mode 100644
index 00000000..3a268f8c
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/MBCI/HalMBCI.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/MBCI/MBCI.h>
diff --git a/dev/Kernel/HALKit/AMD64/PCI/DMA.cc b/dev/Kernel/HALKit/AMD64/PCI/DMA.cc
new file mode 100644
index 00000000..43b9bbdf
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/DMA.cc
@@ -0,0 +1,82 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/DMA.h>
+
+namespace Kernel
+{
+ DMAWrapper::operator bool()
+ {
+ return fAddress;
+ }
+
+ bool DMAWrapper::operator!()
+ {
+ return !fAddress;
+ }
+
+ Boolean DMAWrapper::Check(UIntPtr offset) const
+ {
+ if (!fAddress)
+ return false;
+ if (offset == 0)
+ return true;
+
+ kcout << "[DMAWrapper::IsIn] Checking offset..\n";
+ return reinterpret_cast<UIntPtr>(fAddress) >= offset;
+ }
+
+ bool DMAWrapper::Write(const UIntPtr& bit, const UIntPtr& offset)
+ {
+ if (!fAddress)
+ return false;
+
+ kcout << "[DMAWrapper::Write] Writing at address..\n";
+
+ auto addr =
+ (volatile UIntPtr*)(reinterpret_cast<UIntPtr>(fAddress) + offset);
+ *addr = bit;
+
+ return true;
+ }
+
+ UIntPtr DMAWrapper::Read(const UIntPtr& offset)
+ {
+ kcout << "[DMAWrapper::Read] checking fAddress..\n";
+ if (!fAddress)
+ return 0;
+
+ kcout << "[DMAWrapper::Read] Reading fAddress..\n";
+ return *(volatile UIntPtr*)(reinterpret_cast<UIntPtr>(fAddress) + offset);
+ ;
+ }
+
+ UIntPtr DMAWrapper::operator[](const UIntPtr& offset)
+ {
+ return this->Read(offset);
+ }
+
+ OwnPtr<IOBuf<Char*>> DMAFactory::Construct(OwnPtr<DMAWrapper>& dma)
+ {
+ if (!dma)
+ return {};
+
+ OwnPtr<IOBuf<Char*>> dmaOwnPtr =
+ make_ptr<IOBuf<Char*>, char*>(reinterpret_cast<char*>(dma->fAddress));
+
+ if (!dmaOwnPtr)
+ return {};
+
+ kcout << "Returning the new OwnPtr<IOBuf<Char*>>!\r";
+ return dmaOwnPtr;
+ }
+
+ DMAWrapper& DMAWrapper::operator=(voidPtr Ptr)
+ {
+ fAddress = Ptr;
+ return *this;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/PCI/Database.cc b/dev/Kernel/HALKit/AMD64/PCI/Database.cc
new file mode 100644
index 00000000..2db1c111
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/Database.cc
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/Database.h>
+
+namespace Kernel
+{
+}
diff --git a/dev/Kernel/HALKit/AMD64/PCI/Device.cc b/dev/Kernel/HALKit/AMD64/PCI/Device.cc
new file mode 100644
index 00000000..7b0f64b3
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/Device.cc
@@ -0,0 +1,139 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/PCI/Device.h>
+
+Kernel::UInt ZKA_PCIReadRaw(Kernel::UInt bar, Kernel::UShort bus, Kernel::UShort dev, Kernel::UShort fun)
+{
+ Kernel::UInt target = 0x80000000 | ((Kernel::UInt)bus << 16) |
+ ((Kernel::UInt)dev << 11) | ((Kernel::UInt)fun << 8) |
+ (bar & 0xFC);
+
+ Kernel::HAL::rt_out32((Kernel::UShort)Kernel::PCI::PciConfigKind::ConfigAddress,
+ target);
+
+ return Kernel::HAL::rt_in32((Kernel::UShort)Kernel::PCI::PciConfigKind::ConfigData);
+}
+
+void ZKA_PCISetCfgTarget(Kernel::UInt bar, Kernel::UShort bus, Kernel::UShort dev, Kernel::UShort fun)
+{
+ Kernel::UInt target = 0x80000000 | ((Kernel::UInt)bus << 16) |
+ ((Kernel::UInt)dev << 11) | ((Kernel::UInt)fun << 8) |
+ (bar & ~3);
+
+ Kernel::HAL::rt_out32((Kernel::UShort)Kernel::PCI::PciConfigKind::ConfigAddress,
+ target);
+}
+
+#define PCI_BAR_IO 0x01
+#define PCI_BAR_LOWMEM 0x02
+#define PCI_BAR_64 0x04
+#define PCI_BAR_PREFETCH 0x08
+
+namespace Kernel::PCI
+{
+ Device::Device(UShort bus, UShort device, UShort func, UInt32 bar)
+ : fBus(bus), fDevice(device), fFunction(func), fBar(bar)
+ {
+ }
+
+ Device::~Device() = default;
+
+ UInt Device::Read(UInt bar, Size sz)
+ {
+ ZKA_PCISetCfgTarget(bar, fBus, fDevice, fFunction);
+
+ if (sz == 4)
+ return HAL::rt_in32((UShort)PciConfigKind::ConfigData + (bar & 3));
+ if (sz == 2)
+ return HAL::rt_in16((UShort)PciConfigKind::ConfigData + (bar & 3));
+ if (sz == 1)
+ return HAL::rt_in8((UShort)PciConfigKind::ConfigData + (bar & 3));
+
+ return 0xFFFF;
+ }
+
+ void Device::Write(UInt bar, UIntPtr data, Size sz)
+ {
+ ZKA_PCISetCfgTarget(bar, fBus, fDevice, fFunction);
+
+ if (sz == 4)
+ HAL::rt_out32((UShort)PciConfigKind::ConfigData + (fBar & 3), (UInt)data);
+ if (sz == 2)
+ HAL::rt_out16((UShort)PciConfigKind::ConfigData + (fBar & 3), (UShort)data);
+ if (sz == 1)
+ HAL::rt_out8((UShort)PciConfigKind::ConfigData + (fBar & 3), (UChar)data);
+ }
+
+ UShort Device::DeviceId()
+ {
+ return (UShort)(ZKA_PCIReadRaw(0x0 >> 16, fBus, fDevice, fFunction));
+ }
+
+ UShort Device::VendorId()
+ {
+ return (UShort)(ZKA_PCIReadRaw(0x0, fBus, fDevice, fFunction) >> 16);
+ }
+
+ UShort Device::InterfaceId()
+ {
+ return (UShort)(ZKA_PCIReadRaw(0x0, fBus, fDevice, fFunction) >> 16);
+ }
+
+ UChar Device::Class()
+ {
+ return (UChar)(ZKA_PCIReadRaw(0x08, fBus, fDevice, fFunction) >> 24);
+ }
+
+ UChar Device::Subclass()
+ {
+ return (UChar)(ZKA_PCIReadRaw(0x08, fBus, fDevice, fFunction) >> 16);
+ }
+
+ UChar Device::ProgIf()
+ {
+ return (UChar)(ZKA_PCIReadRaw(0x08, fBus, fDevice, fFunction) >> 8);
+ }
+
+ UChar Device::HeaderType()
+ {
+ return (UChar)(ZKA_PCIReadRaw(0xC, fBus, fDevice, fFunction) >> 16);
+ }
+
+ void Device::EnableMmio(UInt32 bar_in)
+ {
+ bool enable = Read(bar_in, sizeof(UChar)) | (1 << 1);
+ Write(bar_in, enable, sizeof(UShort));
+ }
+
+ void Device::BecomeBusMaster(UInt32 bar_in)
+ {
+ bool enable = Read(bar_in, sizeof(UShort)) | (1 << 2);
+ Write(bar_in, enable, sizeof(UShort));
+ }
+
+ UIntPtr Device::Bar(UInt32 bar_in)
+ {
+ UInt32 bar = ZKA_PCIReadRaw(bar_in, fBus, fDevice, fFunction);
+ return bar;
+ }
+
+ UShort Device::Vendor()
+ {
+ UShort vendor = VendorId();
+
+ if (vendor != (UShort)PciConfigKind::Invalid)
+ fDevice = (UShort)Read(0x0, sizeof(UShort));
+
+ return fDevice;
+ }
+
+ Device::operator bool()
+ {
+ return VendorId() != (UShort)PciConfigKind::Invalid;
+ }
+} // namespace Kernel::PCI
diff --git a/dev/Kernel/HALKit/AMD64/PCI/Express.cc b/dev/Kernel/HALKit/AMD64/PCI/Express.cc
new file mode 100644
index 00000000..f6b5ea4e
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/Express.cc
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/Express.h>
+
+namespace Kernel
+{
+}
diff --git a/dev/Kernel/HALKit/AMD64/PCI/IO.cc b/dev/Kernel/HALKit/AMD64/PCI/IO.cc
new file mode 100644
index 00000000..c969498d
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/IO.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/IO.h>
diff --git a/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc b/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc
new file mode 100644
index 00000000..f0289cdf
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/Iterator.cc
@@ -0,0 +1,41 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/Iterator.h>
+
+namespace Kernel::PCI
+{
+ Iterator::Iterator(const Types::PciDeviceKind& type)
+ {
+ // probe devices.
+ for (int bus = 0; bus < ZKA_BUS_COUNT; ++bus)
+ {
+ for (int device = 0; device < ZKA_DEVICE_COUNT; ++device)
+ {
+ for (int function = 0; function < ZKA_FUNCTION_COUNT; ++function)
+ {
+ auto bar = 0x00;
+
+ Device dev(bus, device, function, bar);
+
+ if (dev.Class() == (UChar)type)
+ {
+ fDevices[bus] = dev;
+ }
+ }
+ }
+ }
+ }
+
+ Iterator::~Iterator()
+ {
+ }
+
+ Ref<PCI::Device> Iterator::operator[](const Size& at)
+ {
+ return fDevices[at];
+ }
+} // namespace Kernel::PCI
diff --git a/dev/Kernel/HALKit/AMD64/PCI/PCI.cc b/dev/Kernel/HALKit/AMD64/PCI/PCI.cc
new file mode 100644
index 00000000..0ade547c
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/PCI/PCI.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/PCI.h>
diff --git a/dev/Kernel/HALKit/AMD64/Paging.h b/dev/Kernel/HALKit/AMD64/Paging.h
new file mode 100644
index 00000000..e58d2466
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Paging.h
@@ -0,0 +1,99 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/** ---------------------------------------------------
+
+ * THIS FILE CONTAINS CODE FOR X86_64 PAGING.
+
+------------------------------------------------------- */
+
+#include <NewKit/Defines.h>
+
+#ifndef kPageMax
+#define kPageMax (0x200)
+#endif //! kPageMax
+
+#ifndef kPageAlign
+#define kPageAlign (0x08)
+#endif //! kPageAlign
+
+#ifndef kPageSize
+#define kPageSize (0x1000)
+#endif // !kPageSize
+
+#ifndef kAlign
+#define kAlign __BIGGEST_ALIGNMENT__
+#endif // !kAlign
+
+EXTERN_C void hal_flush_tlb();
+EXTERN_C void hal_invl_tlb(Kernel::VoidPtr addr);
+EXTERN_C void hal_write_cr3(Kernel::VoidPtr cr3);
+EXTERN_C void hal_write_cr0(Kernel::VoidPtr bit);
+
+EXTERN_C Kernel::VoidPtr hal_read_cr0(); // @brief CPU control register.
+EXTERN_C Kernel::VoidPtr hal_read_cr2(); // @brief Fault address.
+EXTERN_C Kernel::VoidPtr hal_read_cr3(); // @brief Page table.
+
+namespace Kernel::HAL
+{
+ /// @brief Final page entry (Not PML, PDPT)
+ struct PACKED ZKA_PTE final
+ {
+ UInt64 Present : 1;
+ UInt64 Wr : 1;
+ UInt64 User : 1;
+ UInt64 Wt : 1;
+ UInt64 Cache : 1;
+ UInt64 Accessed : 1;
+ UInt64 Dirty : 1;
+ UInt64 MemoryType : 1;
+ UInt64 Global : 1;
+ UInt64 Resvered1 : 3;
+ UInt64 PhysicalAddress : 36;
+ UInt64 Reserved2 : 10;
+ UInt64 ProtectionKey : 5;
+ UInt64 ExecDisable : 1;
+ };
+
+ namespace Detail
+ {
+ enum class ControlRegisterBits
+ {
+ ProtectedModeEnable = 0,
+ MonitorCoProcessor = 1,
+ Emulation = 2,
+ TaskSwitched = 3,
+ ExtensionType = 4,
+ NumericError = 5,
+ WriteProtect = 16,
+ AlignementMask = 18,
+ NotWriteThrough = 29,
+ CacheDisable = 30,
+ PageEnable = 31,
+ };
+
+ inline UInt8 control_register_cast(ControlRegisterBits reg)
+ {
+ return static_cast<UInt8>(reg);
+ }
+ } // namespace Detail
+
+ struct ZKA_PDE final
+ {
+ ZKA_PTE* ALIGN(kPageAlign) fEntries[kPageMax];
+ };
+
+ auto mm_alloc_bitmap(Boolean wr, Boolean user, SizeT size, Bool is_page) -> VoidPtr;
+ auto mm_free_bitmap(VoidPtr page_ptr) -> Bool;
+} // namespace Kernel::HAL
+
+namespace Kernel
+{
+ typedef HAL::ZKA_PTE PTE;
+ typedef HAL::ZKA_PDE PDE;
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/AMD64/Processor.h b/dev/Kernel/HALKit/AMD64/Processor.h
new file mode 100644
index 00000000..0e6dcfff
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Processor.h
@@ -0,0 +1,326 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: Prcoessor.h
+ Purpose: AMD64 processor abstraction.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Utils.h>
+#include <FirmwareKit/Handover.h>
+#include <HALKit/AMD64/Paging.h>
+
+#define kPITControlPort 0x43
+#define kPITChannel0Port 0x40
+#define kPITFrequency 1193180
+
+#define kPICCommand 0x20
+#define kPICData 0x21
+#define kPIC2Command 0xA0
+#define kPIC2Data 0xA1
+
+EXTERN_C
+{
+#include <cpuid.h>
+}
+
+#include <HALKit/AMD64/CPUID.h>
+
+/// @brief Maximum entries of the interrupt descriptor table.
+#define kKernelIdtSize (0x100)
+
+/// @brief interrupt for system call.
+#define kKernelInterruptId (0x32)
+
+#define IsActiveLow(FLG) (FLG & 2)
+#define IsLevelTriggered(FLG) (FLG & 8)
+
+#define kInterruptGate (0x8E)
+#define kTrapGate (0xEF)
+#define kTaskGate (0b10001100)
+#define kIDTSelector (0x08)
+
+namespace Kernel
+{
+ namespace Detail::AMD64
+ {
+ struct PACKED InterruptDescriptorAMD64 final
+ {
+ UInt16 OffsetLow; // offset bits 0..15
+ UInt16 Selector; // a code segment selector in GDT or LDT
+ UInt8 Ist;
+ UInt8 TypeAttributes;
+ UInt16 OffsetMid;
+ UInt32 OffsetHigh;
+ UInt32 Zero; // reserved
+ };
+ } // namespace Detail::AMD64
+} // namespace Kernel
+
+namespace Kernel::HAL
+{
+ /// @brief Memory Manager mapping flags.
+ enum
+ {
+ kMMFlagsInvalid = 0 << 0,
+ kMMFlagsPresent = 1 << 0,
+ kMMFlagsWr = 1 << 1,
+ kMMFlagsUser = 1 << 2,
+ kMMFlagsNX = 1 << 3,
+ kMMFlagsCount = 4,
+ };
+
+ struct PACKED Register64 final
+ {
+ UShort Limit;
+ UIntPtr Base;
+ };
+
+ struct PACKED RegisterGDT final
+ {
+ UShort Limit;
+ UIntPtr Base;
+ };
+
+ using RawRegister = UInt64;
+ using Reg = RawRegister;
+ using InterruptId = UInt16; /* For each element in the IVT */
+
+ /// @brief Stack frame (as retrieved from assembly.)
+ struct PACKED StackFrame final
+ {
+ RawRegister R8{0};
+ RawRegister R9{0};
+ RawRegister R10{0};
+ RawRegister FS{0};
+ RawRegister R12{0};
+ RawRegister R13{0};
+ RawRegister R14{0};
+ RawRegister R15{0};
+ RawRegister GS{0};
+ RawRegister SP{0};
+ RawRegister BP{0};
+ };
+
+ typedef StackFrame* StackFramePtr;
+
+ class InterruptDescriptor final
+ {
+ public:
+ UShort Offset;
+ UShort Selector;
+ UChar Ist;
+ UChar Atrributes;
+
+ UShort SecondOffset;
+ UInt ThirdOffset;
+ UInt Zero;
+
+ operator bool()
+ {
+ return Offset != 0xFFFF;
+ }
+ };
+
+ using InterruptDescriptorArray = Array<InterruptDescriptor, 256>;
+
+ class SegmentDescriptor final
+ {
+ public:
+ UInt16 Base;
+ UInt8 BaseMiddle;
+ UInt8 BaseHigh;
+
+ UShort Limit;
+ UChar Gran;
+ UChar AccessByte;
+ };
+
+ /***
+ * @brief Segment Boolean operations
+ */
+ class SegmentDescriptorComparator final
+ {
+ public:
+ Bool IsValid(SegmentDescriptor& seg)
+ {
+ return seg.Base > seg.Limit;
+ }
+
+ Bool Equals(SegmentDescriptor& seg, SegmentDescriptor& segRight)
+ {
+ return seg.Base == segRight.Base && seg.Limit == segRight.Limit;
+ }
+ };
+
+ using SegmentArray = Array<SegmentDescriptor, 6>;
+
+ class GDTLoader final
+ {
+ public:
+ static Void Load(RegisterGDT& gdt);
+ static Void Load(Ref<RegisterGDT>& gdt);
+ };
+
+ class IDTLoader final
+ {
+ public:
+ static Void Load(Register64& idt);
+ static Void Load(Ref<Register64>& idt);
+ };
+
+ /***********************************************************************************/
+ /// @brief Is the current config SMP aware?
+ /// @return True if YES, False if not.
+ /***********************************************************************************/
+
+ Bool mp_is_smp(Void) noexcept;
+
+ /***********************************************************************************/
+ /// @brief Fetch and enable SMP scheduler.
+ /// @param vendor_ptr SMP containing structure.
+ /***********************************************************************************/
+ Void mp_get_cores(VoidPtr vendor_ptr) noexcept;
+
+ /***********************************************************************************/
+ /// @brief Do a cpuid to check if MSR exists on CPU.
+ /// @retval true it does exists.
+ /// @retval false it doesn't.
+ /***********************************************************************************/
+ inline Bool hal_has_msr() noexcept
+ {
+ static UInt32 eax, unused, edx; // eax, edx
+
+ __get_cpuid(1, &eax, &unused, &unused, &edx);
+
+ // edx returns the flag for MSR (which is 1 shifted to 5.)
+ return edx & (1 << 5);
+ }
+
+ /***********************************************************************************/
+ /// @brief Get Model specific register inside core.
+ /// @param msr MSR
+ /// @param lo low byte
+ /// @param hi high byte
+ /***********************************************************************************/
+ inline Void hal_get_msr(UInt32 msr, UInt32* lo, UInt32* hi) noexcept
+ {
+ if (!lo || !hi)
+ return;
+
+ asm volatile("rdmsr"
+ : "=a"(*lo), "=d"(*hi)
+ : "c"(msr));
+ }
+
+ /// @brief Set Model-specific register.
+ /// @param msr MSR
+ /// @param lo low byte
+ /// @param hi high byte
+ inline Void hal_set_msr(UInt32 msr, UInt32 lo, UInt32 hi) noexcept
+ {
+ asm volatile("wrmsr"
+ :
+ : "a"(lo), "d"(hi), "c"(msr));
+ }
+
+ /// @brief Processor specific namespace.
+ namespace Detail
+ {
+ /* @brief TSS struct. */
+ struct ZKA_TSS final
+ {
+ UInt32 fReserved1;
+ UInt64 fRsp0;
+ UInt64 fRsp1;
+ UInt64 fRsp2;
+ UInt64 fReserved2;
+ UInt64 fIst1;
+ UInt64 fIst2;
+ UInt64 fIst3;
+ UInt64 fIst4;
+ UInt64 fIst5;
+ UInt64 fIst6;
+ UInt64 fIst7;
+ UInt64 fReserved3;
+ UInt16 fReserved4;
+ UInt16 fIopb;
+ };
+
+ /**
+ @brief Global descriptor table entry, either null, code or data.
+ */
+
+ struct PACKED ZKA_GDT_ENTRY final
+ {
+ UInt16 fLimitLow;
+ UInt16 fBaseLow;
+ UInt8 fBaseMid;
+ UInt8 fAccessByte;
+ UInt8 fFlags;
+ UInt8 fBaseHigh;
+ };
+ } // namespace Detail
+
+ class APICController
+ {
+ public:
+ explicit APICController(VoidPtr base)
+ : fApic(base)
+ {
+ }
+
+ ~APICController() = default;
+
+ ZKA_COPY_DEFAULT(APICController);
+
+ public:
+ UInt32 Read(UInt32 reg) noexcept;
+ Void Write(UInt32 reg, UInt32 value) noexcept;
+
+ private:
+ VoidPtr fApic{nullptr};
+ };
+
+ /// @brief Set a PTE from pd_base.
+ /// @param virt_addr a valid virtual address.
+ /// @param phys_addr point to physical address.
+ /// @param flags the flags to put on the page.
+ /// @return Status code of page manip.
+ EXTERN_C Int32 mm_map_page(VoidPtr virt_addr, UInt32 flags);
+
+ EXTERN_C UInt8 rt_in8(UInt16 port);
+ EXTERN_C UInt16 rt_in16(UInt16 port);
+ EXTERN_C UInt32 rt_in32(UInt16 port);
+
+ EXTERN_C void rt_out16(UShort port, UShort byte);
+ EXTERN_C void rt_out8(UShort port, UChar byte);
+ EXTERN_C void rt_out32(UShort port, UInt byte);
+
+ EXTERN_C void rt_wait_400ns();
+ EXTERN_C void rt_halt();
+ EXTERN_C void rt_cli();
+ EXTERN_C void rt_sti();
+ EXTERN_C void rt_cld();
+ EXTERN_C void rt_std();
+} // namespace Kernel::HAL
+
+EXTERN_C Kernel::Void idt_handle_generic(Kernel::UIntPtr rsp);
+EXTERN_C Kernel::Void idt_handle_gpf(Kernel::UIntPtr rsp);
+EXTERN_C Kernel::Void idt_handle_math(Kernel::UIntPtr rsp);
+EXTERN_C Kernel::Void idt_handle_pf(Kernel::UIntPtr rsp);
+
+EXTERN_C ATTRIBUTE(naked) Kernel::Void hal_load_idt(Kernel::HAL::Register64 ptr);
+EXTERN_C ATTRIBUTE(naked) Kernel::Void hal_load_gdt(Kernel::HAL::RegisterGDT ptr);
+
+inline Kernel::VoidPtr kKernelBitMpStart = nullptr;
+inline Kernel::UIntPtr kKernelBitMpSize = 0UL;
diff --git a/dev/Kernel/HALKit/AMD64/ReadMe.md b/dev/Kernel/HALKit/AMD64/ReadMe.md
new file mode 100644
index 00000000..5ea0a19f
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/ReadMe.md
@@ -0,0 +1,8 @@
+# AMD64 Hardware Abstraction Layer
+
+## Brief
+
+- Supported CPU: AMD64 BASED CPUs.
+- Supported Firmware: EDK 2.
+
+###### Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. All rights reserved.
diff --git a/dev/Kernel/HALKit/AMD64/Storage/ATA-DMA.cc b/dev/Kernel/HALKit/AMD64/Storage/ATA-DMA.cc
new file mode 100644
index 00000000..5f765d03
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Storage/ATA-DMA.cc
@@ -0,0 +1,38 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file ATA-DMA.cc
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief ATA driver (DMA mode).
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @copyright Copyright (c) Amlal EL Mahrouss
+ *
+ */
+
+#include <StorageKit/PRDT.h>
+
+#include <Mod/ATA/ATA.h>
+#include <ArchKit/ArchKit.h>
+
+using namespace Kernel;
+
+EXTERN_C Int32 kPRDTTransferStatus;
+STATIC PRDT kPRDT;
+
+#ifdef __ATA_DMA__
+
+#ifdef __ATA_PIO__
+#error !!! You cant have both PIO and DMA enabled! !!!
+#endif /* ifdef __ATA_PIO__ */
+
+#ifdef __AHCI__
+#error !!! You cant have both ATA and AHCI enabled! !!!
+#endif /* ifdef __AHCI__ */
+
+#endif /* ifdef __ATA_DMA__ */
diff --git a/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc b/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc
new file mode 100644
index 00000000..6e523cb7
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Storage/ATA-PIO.cc
@@ -0,0 +1,195 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file ATA-PIO.cc
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief ATA driver (PIO mode).
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @copyright Copyright (c) Amlal EL Mahrouss
+ *
+ */
+
+#include <Mod/ATA/ATA.h>
+#include <ArchKit/ArchKit.h>
+
+#ifdef __ATA_PIO__
+
+using namespace Kernel;
+using namespace Kernel::HAL;
+
+/// bugs: 0
+
+#define kATADataLen 256
+
+STATIC Boolean kATADetected = false;
+STATIC Int32 kATADeviceType = kATADeviceCount;
+STATIC Char kATAData[kATADataLen] = {0};
+
+Boolean drv_std_wait_io(UInt16 IO)
+{
+ for (int i = 0; i < 400; i++)
+ rt_in8(IO + ATA_REG_STATUS);
+
+ATAWaitForIO_Retry:
+ auto rdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if ((rdy & ATA_SR_BSY))
+ goto ATAWaitForIO_Retry;
+
+ATAWaitForIO_Retry2:
+ rdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if (rdy & ATA_SR_ERR)
+ return false;
+
+ if (!(rdy & ATA_SR_DRDY))
+ goto ATAWaitForIO_Retry2;
+
+ return true;
+}
+
+Void drv_std_select(UInt16 Bus)
+{
+ if (Bus == ATA_PRIMARY_IO)
+ rt_out8(Bus + ATA_REG_HDDEVSEL, ATA_PRIMARY_SEL);
+ else
+ rt_out8(Bus + ATA_REG_HDDEVSEL, ATA_SECONDARY_SEL);
+}
+
+Boolean drv_std_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster)
+{
+ UInt16 IO = Bus;
+
+ drv_std_select(IO);
+
+ATAInit_Retry:
+ // Bus init, NEIN bit.
+ rt_out8(IO + ATA_REG_NEIN, 1);
+
+ // identify until it's good
+
+ auto rdy = rt_in8(IO + ATA_REG_STATUS);
+
+ if (rdy & ATA_SR_ERR)
+ {
+ kcout << "ATA Error, aborting...\r";
+
+ return false;
+ }
+
+ if ((rdy & ATA_SR_BSY))
+ {
+ kcout << "Retrying as controller is busy...\r";
+ goto ATAInit_Retry;
+ }
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_IDENTIFY);
+
+ /// fetch serial info
+ /// model, speed, number of sectors...
+
+ drv_std_wait_io(IO);
+
+ for (SizeT indexData = 0ul; indexData < kATADataLen; ++indexData)
+ {
+ kATAData[indexData] = rt_in16(IO + ATA_REG_DATA);
+ }
+
+ OutBus = (Bus == ATA_PRIMARY_IO) ? ATA_PRIMARY_IO : ATA_SECONDARY_IO;
+
+ OutMaster = (Bus == ATA_PRIMARY_IO) ? ATA_MASTER : ATA_SLAVE;
+
+ return YES;
+}
+
+Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz, SizeT Size)
+{
+ Lba /= SectorSz;
+
+ UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
+
+ drv_std_wait_io(IO);
+ drv_std_select(IO);
+
+ rt_out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
+
+ rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz));
+
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
+ rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
+ rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_READ_PIO);
+
+ drv_std_wait_io(IO);
+
+ for (SizeT IndexOff = 0; IndexOff < Size; ++IndexOff)
+ {
+ drv_std_wait_io(IO);
+ Buf[IndexOff] = rt_in16(IO + ATA_REG_DATA);
+ drv_std_wait_io(IO);
+ }
+
+ drv_std_wait_io(IO);
+}
+
+Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz, SizeT Size)
+{
+ Lba /= SectorSz;
+
+ UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
+
+ drv_std_wait_io(IO);
+ drv_std_select(IO);
+
+ rt_out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
+
+ rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz));
+
+ rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8);
+ rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16);
+ rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24);
+
+ rt_out8(IO + ATA_REG_COMMAND, ATA_CMD_WRITE_PIO);
+
+ drv_std_wait_io(IO);
+
+ for (SizeT IndexOff = 0; IndexOff < Size; ++IndexOff)
+ {
+ drv_std_wait_io(IO);
+ rt_out16(IO + ATA_REG_DATA, Buf[IndexOff]);
+ drv_std_wait_io(IO);
+ }
+
+ drv_std_wait_io(IO);
+}
+
+/// @brief is ATA detected?
+Boolean drv_std_detected(Void)
+{
+ return kATADetected;
+}
+
+/***
+ @brief Getter, gets the number of sectors inside the drive.
+*/
+Kernel::SizeT drv_get_sector_count()
+{
+ return (kATAData[61] << 16) | kATAData[60];
+}
+
+/// @brief Get the drive size.
+Kernel::SizeT drv_get_size()
+{
+ return (drv_get_sector_count()) * kATASectorSize;
+}
+
+#endif /* ifdef __ATA_PIO__ */
diff --git a/dev/Kernel/HALKit/AMD64/Storage/SATA-DMA.cc b/dev/Kernel/HALKit/AMD64/Storage/SATA-DMA.cc
new file mode 100644
index 00000000..74afcde3
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/Storage/SATA-DMA.cc
@@ -0,0 +1,316 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/**
+ * @file AHCI.cc
+ * @author Amlal EL Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief AHCI driver.
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+ *
+ */
+
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/LPC.h>
+
+#include <Mod/ATA/ATA.h>
+#include <Mod/AHCI/AHCI.h>
+#include <KernelKit/PCI/Iterator.h>
+#include <NewKit/Utils.h>
+#include <KernelKit/LockDelegate.h>
+
+#ifdef __AHCI__
+
+#define kHBAErrTaskFile (1 << 30)
+#define kHBAPxCmdST 0x0001
+#define kHBAPxCmdFre 0x0010
+#define kHBAPxCmdFR 0x4000
+#define kHBAPxCmdCR 0x8000
+
+#define kSataLBAMode (1 << 6)
+
+#define kAhciSRBsy (0x80)
+#define kAhciSRDrq (0x08)
+
+#define kAhciPortCnt 32
+
+enum
+{
+ kSATAProgIfAHCI = 0x01,
+ kSATASubClass = 0x06,
+ kSATABar5 = 0x24,
+};
+
+STATIC Kernel::PCI::Device kPCIDevice;
+STATIC HbaMem* kSATAPort = nullptr;
+STATIC Kernel::SizeT kSATAPortIdx = 0UL;
+STATIC Kernel::Lba kCurrentDiskSectorCount = 0UL;
+
+template <BOOL Write, BOOL CommandOrCTRL, BOOL Identify>
+static Kernel::Void drv_std_input_output(Kernel::UInt64 lba, Kernel::UInt8* buffer, Kernel::SizeT sector_sz, Kernel::SizeT size_buffer) noexcept;
+
+static Kernel::Int32 drv_find_cmd_slot(HbaPort* port) noexcept;
+
+static Kernel::Void drv_calculate_disk_geometry() noexcept;
+
+static Kernel::Void drv_calculate_disk_geometry() noexcept
+{
+ kCurrentDiskSectorCount = 0UL;
+
+ Kernel::UInt8 identify_data[kib_cast(4)] = {};
+
+ drv_std_input_output<NO, YES, YES>(0, identify_data, 0, kib_cast(8));
+
+ kCurrentDiskSectorCount = (identify_data[61] << 16) | identify_data[60];
+
+ kcout << "Disk Size: " << Kernel::number(drv_get_size()) << endl;
+ kcout << "Highest LBA: " << Kernel::number(kCurrentDiskSectorCount) << endl;
+}
+
+/// @brief Initializes an AHCI disk.
+/// @param PortsImplemented the amount of kSATAPort that have been detected.
+/// @return if the disk was successfully initialized or not.
+Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented)
+{
+ using namespace Kernel;
+
+ PCI::Iterator iterator(Types::PciDeviceKind::MassStorageController);
+
+ for (SizeT device_index = 0; device_index < ZKA_BUS_COUNT; ++device_index)
+ {
+ kPCIDevice = iterator[device_index].Leak(); // And then leak the reference.
+
+ // if SATA and then interface is AHCI...
+ if (kPCIDevice.Subclass() == kSATASubClass &&
+ kPCIDevice.ProgIf() == kSATAProgIfAHCI)
+ {
+ kPCIDevice.EnableMmio(0x24); // Enable the memory index_byte/o for this ahci device.
+ kPCIDevice.BecomeBusMaster(0x24); // Become bus master for this ahci device, so that we can control it.
+
+ HbaMem* mem_ahci = (HbaMem*)kPCIDevice.Bar(0x24);
+
+ Kernel::UInt32 ports_implemented = mem_ahci->Pi;
+ Kernel::UInt16 ahci_index = 0;
+
+ const Kernel::UInt16 kMaxPortsImplemented = kAhciPortCnt;
+ const Kernel::UInt32 kSATASignature = 0x00000101;
+ const Kernel::UInt8 kAhciPresent = 0x03;
+ const Kernel::UInt8 kAhciIPMActive = 0x01;
+
+ Kernel::Boolean detected = false;
+
+ while (ahci_index < kMaxPortsImplemented)
+ {
+ if (ports_implemented)
+ {
+ kcout << "Port is implemented.\r";
+
+ Kernel::UInt8 ipm = (mem_ahci->Ports[ahci_index].Ssts >> 8) & 0x0F;
+ Kernel::UInt8 det = mem_ahci->Ports[ahci_index].Ssts & 0x0F;
+
+ if (mem_ahci->Ports[ahci_index].Sig == kSATASignature)
+ {
+ kcout << "Port is SATA.\r";
+
+ kSATAPortIdx = ahci_index;
+ kSATAPort = mem_ahci;
+
+ kSATAPort->Ports[kSATAPortIdx].Cmd &= ~kHBAPxCmdST;
+ kSATAPort->Ports[kSATAPortIdx].Cmd &= ~kHBAPxCmdFre;
+
+ while (YES)
+ {
+ if (kSATAPort->Ports[kSATAPortIdx].Cmd & kHBAPxCmdFR)
+ continue;
+ if (kSATAPort->Ports[kSATAPortIdx].Cmd & kHBAPxCmdCR)
+ continue;
+
+ break;
+ }
+
+ const auto kAHCIBaseAddress = mib_cast(4);
+
+ kSATAPort->Ports[kSATAPortIdx].Clb = kAHCIBaseAddress + (kSATAPortIdx << 10);
+ kSATAPort->Ports[kSATAPortIdx].Clbu = 0;
+
+ rt_set_memory((VoidPtr)((UIntPtr)kSATAPort->Ports[kSATAPortIdx].Clb), 0, 1024);
+
+ kSATAPort->Ports[kSATAPortIdx].Fb = kAHCIBaseAddress + (32 << 10) + (kSATAPortIdx << 8);
+ kSATAPort->Ports[kSATAPortIdx].Fbu = 0;
+
+ rt_set_memory((VoidPtr)((UIntPtr)kSATAPort->Ports[kSATAPortIdx].Fb), 0, 256);
+
+ HbaCmdHeader* cmdheader = (HbaCmdHeader*)((UIntPtr)kSATAPort->Ports[kSATAPortIdx].Clb);
+
+ for (int i = 0; i < 32; i++)
+ {
+ cmdheader[i].Prdtl = 8;
+
+ cmdheader[i].Ctba = kAHCIBaseAddress + (40 << 10) + (kSATAPortIdx << 13) + (i << 8);
+ cmdheader[i].Ctbau = 0;
+
+ rt_set_memory((VoidPtr)(UIntPtr)cmdheader[i].Ctba, 0, 256);
+ }
+
+ while (kSATAPort->Ports[kSATAPortIdx].Cmd & kHBAPxCmdCR)
+ {
+ }
+
+ kSATAPort->Ports[kSATAPortIdx].Cmd |= kHBAPxCmdFre;
+ kSATAPort->Ports[kSATAPortIdx].Cmd |= kHBAPxCmdST;
+
+ drv_calculate_disk_geometry();
+
+ detected = YES;
+
+ break;
+ }
+ }
+
+ ports_implemented >>= 1;
+ ++ahci_index;
+ }
+
+ return detected;
+ }
+ }
+
+ return No;
+}
+
+Kernel::Boolean drv_std_detected(Kernel::Void)
+{
+ return kPCIDevice.DeviceId() != 0xFFFF;
+}
+
+Kernel::Void drv_std_write(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::SizeT sector_sz, Kernel::SizeT size_buffer)
+{
+ drv_std_input_output<YES, YES, NO>(lba, (Kernel::UInt8*)buffer, sector_sz, size_buffer);
+}
+
+Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buffer, Kernel::SizeT sector_sz, Kernel::SizeT size_buffer)
+{
+ drv_std_input_output<NO, YES, NO>(lba, (Kernel::UInt8*)buffer, sector_sz, size_buffer);
+}
+
+static Kernel::Int32 drv_find_cmd_slot(HbaPort* port) noexcept
+{
+ if (port == nullptr)
+ return -1;
+
+ Kernel::UInt32 slots = (kSATAPort->Ports[kSATAPortIdx].Sact | kSATAPort->Ports[kSATAPortIdx].Ci);
+
+ for (Kernel::Int32 i = 0; i < ((kSATAPort->Cap & 0x1F) + 1); i++)
+ {
+ if ((slots & 1) == 0)
+ return i;
+
+ slots >>= 1;
+ }
+
+ return -1;
+}
+
+template <BOOL Write, BOOL CommandOrCTRL, BOOL Identify>
+static Kernel::Void drv_std_input_output(Kernel::UInt64 lba, Kernel::UInt8* buffer, Kernel::SizeT sector_sz, Kernel::SizeT size_buffer) noexcept
+{
+ if (!CommandOrCTRL)
+ return;
+
+ kSATAPort->Ports[kSATAPortIdx].Is = -1;
+
+ auto slot = 0L;
+
+ slot = drv_find_cmd_slot(&kSATAPort->Ports[kSATAPortIdx]);
+
+ if (slot == -1)
+ return;
+
+ volatile HbaCmdHeader* command_header = ((volatile HbaCmdHeader*)((Kernel::UInt64)kSATAPort->Ports[kSATAPortIdx].Clb + kSATAPort->Ports[kSATAPortIdx].Clbu));
+
+ command_header += slot;
+
+ MUST_PASS(command_header);
+
+ command_header->Cfl = sizeof(FisRegH2D) / sizeof(Kernel::UInt32);
+ command_header->Write = Write;
+ command_header->Prdtl = (Kernel::UInt16)((size_buffer - 1) >> 4) + 1;
+
+ volatile HbaCmdTbl* command_table = (volatile HbaCmdTbl*)((Kernel::UInt64)command_header->Ctba + command_header->Ctbau);
+
+ MUST_PASS(command_table);
+
+ for (Kernel::SizeT i = 0; i < (command_header->Prdtl - 1); i++)
+ {
+ command_table->PrdtEntries[i].Dba = ((Kernel::UInt32)(Kernel::UInt64)buffer & 0xFFFFFFFF);
+ command_table->PrdtEntries[i].Dbau = (((Kernel::UInt64)buffer >> 32) & 0xFFFFFFFF);
+ command_table->PrdtEntries[i].Dbc = (size_buffer - 1);
+ command_table->PrdtEntries[i].InterruptBit = YES;
+
+ size_buffer -= 16;
+ buffer += kib_cast(4);
+ }
+
+ volatile FisRegH2D* h2d_fis = (volatile FisRegH2D*)((Kernel::UInt64)command_table->Cfis);
+
+ h2d_fis->FisType = kFISTypeRegH2D;
+
+ h2d_fis->CmdOrCtrl = YES;
+
+ h2d_fis->Command = Write ? kAHCICmdWriteDmaEx : kAHCICmdReadDmaEx;
+
+ if (Identify)
+ h2d_fis->Command = kAHCICmdIdentify;
+
+ h2d_fis->Lba0 = lba;
+ h2d_fis->Lba1 = lba >> 8;
+ h2d_fis->Lba2 = lba >> 16;
+ h2d_fis->Lba3 = lba >> 24;
+
+ h2d_fis->Device = kSataLBAMode;
+
+ h2d_fis->CountLow = sector_sz & 0xFF;
+ h2d_fis->CountHigh = (sector_sz >> 8) & 0xFF;
+
+ while ((kSATAPort->Ports[kSATAPortIdx].Tfd & (kAhciSRBsy | kAhciSRDrq)))
+ {
+ kcout << "waiting for slot to be ready\r\n";
+ }
+
+ kSATAPort->Is = -1;
+ kSATAPort->Ports[kSATAPortIdx].Ci |= 1 << slot;
+
+ while (kSATAPort->Ports[kSATAPortIdx].Ci & (1 << slot))
+ {
+ kcout << Kernel::number(slot) << endl;
+
+ if (kSATAPort->Is & kHBAErrTaskFile) // check for task file error.
+ {
+ Kernel::ke_panic(RUNTIME_CHECK_BAD_BEHAVIOR, "AHCI Read disk failure, faulty component.");
+ return;
+ }
+ }
+}
+
+/***
+ @brief Gets the number of sectors inside the drive.
+ @return Sector size in bytes.
+ */
+Kernel::SizeT drv_get_sector_count()
+{
+ return kCurrentDiskSectorCount;
+}
+
+/// @brief Get the drive size.
+/// @return Disk size in bytes.
+Kernel::SizeT drv_get_size()
+{
+ return (drv_get_sector_count()) * kAHCISectorSize;
+}
+
+#endif // ifdef __AHCI__
diff --git a/dev/Kernel/HALKit/AMD64/make_ap_blob.sh b/dev/Kernel/HALKit/AMD64/make_ap_blob.sh
new file mode 100755
index 00000000..3f079187
--- /dev/null
+++ b/dev/Kernel/HALKit/AMD64/make_ap_blob.sh
@@ -0,0 +1,3 @@
+# !/bin/sh
+
+nasm -f bin HalApplicationProcessorStartup.asm -o HalApplicationProcessorStartup.bin \ No newline at end of file
diff --git a/dev/Kernel/HALKit/ARM64/APM/APM+IO.cc b/dev/Kernel/HALKit/ARM64/APM/APM+IO.cc
new file mode 100644
index 00000000..ba29bd61
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/APM/APM+IO.cc
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/APM/APM.h>
+#include <KernelKit/LPC.h>
+
+using namespace Kernel;
+
+/// @brief Send APM command to it's space.
+/// @param base_dma the IO base port.
+/// @param cmd the command.
+/// @return status code.
+EXTERN_C Int32 apm_send_io_command(UInt16 cmd, APMPowerCmd value)
+{
+ switch (cmd)
+ {
+ case kAPMPowerCommandReboot: {
+ asm volatile(
+ "ldr x0, =0x84000004\n"
+ "svc #0\n");
+
+ return kErrorSuccess;
+ }
+ case kAPMPowerCommandShutdown: {
+ asm volatile(
+ "ldr x0, =0x84000008\n"
+ "svc #0\n");
+
+ return kErrorSuccess;
+ }
+ default:
+ return kErrorInvalidData;
+ }
+}
diff --git a/dev/Kernel/HALKit/ARM64/ApplicationProcessor.h b/dev/Kernel/HALKit/ARM64/ApplicationProcessor.h
new file mode 100644
index 00000000..cccb9d77
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/ApplicationProcessor.h
@@ -0,0 +1,19 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <HALKit/ARM64/Processor.h>
+
+/************************************************** */
+/* INITIALIZE THE GIC ON CPU. */
+/************************************************** */
+
+namespace Kernel
+{
+ BOOL mp_initialize_gic(Kernel::Void);
+} \ No newline at end of file
diff --git a/dev/Kernel/HALKit/ARM64/HalACPIFactoryInterface.cc b/dev/Kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
new file mode 100644
index 00000000..69459f66
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
@@ -0,0 +1,31 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <NewKit/KString.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Heap.h>
+#include <Mod/APM/APM.h>
+
+namespace Kernel
+{
+ ACPIFactoryInterface::ACPIFactoryInterface(VoidPtr rsp_ptr)
+ : fRsdp(rsp_ptr), fEntries(0)
+ {
+ }
+
+ Void ACPIFactoryInterface::Shutdown()
+ {
+ apm_send_io_command(kAPMPowerCommandShutdown, 0);
+ }
+
+ /// @brief Reboot machine in either ACPI or by triple faulting.
+ /// @return nothing it's a reboot.
+ Void ACPIFactoryInterface::Reboot()
+ {
+ apm_send_io_command(kAPMPowerCommandReboot, 0);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/ARM64/HalApplicationProcessor.cc b/dev/Kernel/HALKit/ARM64/HalApplicationProcessor.cc
new file mode 100644
index 00000000..6b09a415
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalApplicationProcessor.cc
@@ -0,0 +1,136 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/ARM64/Processor.h>
+#include <KernelKit/DebugOutput.h>
+#include <HALKit/ARM64/ApplicationProcessor.h>
+#include <KernelKit/UserProcessScheduler.h>
+
+#define GICD_BASE 0x08000000 // Distributor base address
+#define GICC_BASE 0x08010000 // CPU interface base address
+
+#define GICD_CTLR 0x000 // Distributor Control Register
+#define GICD_ISENABLER 0x100 // Interrupt Set-Enable Registers
+#define GICD_ICENABLER 0x180 // Interrupt Clear-Enable Registers
+#define GICD_ISPENDR 0x200 // Interrupt Set-Pending Registers
+#define GICD_ICPENDR 0x280 // Interrupt Clear-Pending Registers
+#define GICD_IPRIORITYR 0x400 // Interrupt Priority Registers
+#define GICD_ITARGETSR 0x800 // Interrupt Processor Targets Registers
+#define GICD_ICFGR 0xC00 // Interrupt Configuration Registers
+
+#define GICC_CTLR 0x000 // CPU Interface Control Register
+#define GICC_PMR 0x004 // Interrupt Priority Mask Register
+#define GICC_IAR 0x00C // Interrupt Acknowledge Register
+#define GICC_EOIR 0x010 // End of Interrupt Register
+
+// ================================================================= //
+
+namespace Kernel
+{
+ struct PROCESS_CONTROL_BLOCK final
+ {
+ HAL::StackFramePtr mFrame;
+ };
+
+ STATIC PROCESS_CONTROL_BLOCK kProcessBlocks[kSchedProcessLimitPerTeam] = {0};
+
+ namespace Detail
+ {
+ STATIC BOOL kGICEnabled = NO;
+
+ STATIC void mp_hang_fn(void)
+ {
+ while (YES)
+ ;
+ }
+
+ Void mp_setup_gic_el0(Void)
+ {
+ // enable distributor.
+ HAL::hal_mmio_write(GICD_BASE + GICD_CTLR, YES);
+
+ UInt32 gicc_ctlr = HAL::hal_mmio_read<UInt32>(GICC_BASE + GICC_CTLR);
+
+ const auto kEnableSignalInt = YES;
+
+ gicc_ctlr |= kEnableSignalInt; // Enable signaling of interrupts
+ gicc_ctlr |= (kEnableSignalInt << 1); // Allow Group 1 interrupts in EL0
+
+ HAL::hal_mmio_write(GICC_BASE + GICC_CTLR, gicc_ctlr);
+
+ // Set priority mask (accept all priorities)
+ HAL::hal_mmio_write(GICC_BASE + GICC_PMR, 0xFF);
+
+ UInt32 icfgr = HAL::hal_mmio_read<UInt32>(GICD_BASE + GICD_ICFGR + (32 / 16) * 4);
+
+ icfgr |= (0x2 << ((32 % 16) * 2)); // Edge-triggered
+ HAL::hal_mmio_write(GICD_BASE + GICD_ICFGR + (32 / 16) * 4, icfgr);
+
+ // Target interrupt 32 to CPU 1
+ HAL::hal_mmio_write(GICD_BASE + GICD_ITARGETSR + (32 / 4) * 4, 0x2 << ((32 % 4) * 8));
+
+ // Set interrupt 32 priority to lowest (0xFF)
+ HAL::hal_mmio_write(GICD_BASE + GICD_IPRIORITYR + (32 / 4) * 4, 0xFF << ((32 % 4) * 8));
+
+ // Enable interrupt 32 for AP.
+ HAL::hal_mmio_write(GICD_BASE + GICD_ISENABLER + (32 / 32) * 4, 0x01 << (32 % 32));
+
+ kcout << "AP's GIC configured in ISR 32." << endl;
+ }
+
+ BOOL mp_handle_gic_interrupt_el0(Void)
+ {
+ // Read the interrupt ID
+ UInt32 interrupt_id = HAL::hal_mmio_read<UInt32>(GICC_BASE + GICC_IAR);
+
+ // Check if it's a valid interrupt (not spurious)
+ if ((interrupt_id & 0x3FF) < 1020)
+ {
+ kcout << "Handling interrupt for AP: " << (interrupt_id & 0x3FF) << endl;
+
+ // TODO: Handle code here.
+
+ // End the interrupt
+
+ HAL::hal_mmio_write(GICC_BASE + GICC_EOIR, interrupt_id);
+
+ return YES;
+ }
+
+ // spurious interrupt
+ return NO;
+ }
+ } // namespace Detail
+
+ EXTERN_C HAL::StackFramePtr mp_get_current_context(ProcessID pid)
+ {
+ return kProcessBlocks[pid % kSchedProcessLimitPerTeam].mFrame;
+ }
+
+ EXTERN_C Bool mp_register_process(HAL::StackFramePtr stack_frame, ProcessID pid)
+ {
+ MUST_PASS(stack_frame);
+
+ const auto process_index = pid % kSchedProcessLimitPerTeam;
+
+ kProcessBlocks[process_index].mFrame = stack_frame;
+
+ return YES;
+ }
+
+ BOOL mp_initialize_gic(Void)
+ {
+ if (!Detail::kGICEnabled)
+ {
+ Detail::kGICEnabled = YES;
+ Detail::mp_setup_gic_el0();
+
+ return YES;
+ }
+
+ return NO;
+ }
+} // namespace Kernel \ No newline at end of file
diff --git a/dev/Kernel/HALKit/ARM64/HalDebugOutput.cc b/dev/Kernel/HALKit/ARM64/HalDebugOutput.cc
new file mode 100644
index 00000000..e2b2db88
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalDebugOutput.cc
@@ -0,0 +1,83 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/Utils.h>
+#include <NewKit/New.h>
+
+namespace Kernel
+{
+ EXTERN_C void ke_io_write(const Char* bytes)
+ {
+#ifdef __DEBUG__
+ if (*bytes == 0)
+ return;
+
+ SizeT index = 0;
+ SizeT len = 0;
+
+ index = 0;
+ len = rt_string_len(bytes, 255);
+
+ volatile UInt8* uart_ptr = (UInt8*)0x09000000;
+
+ while (index < len)
+ {
+ if (bytes[index] == '\r')
+ *uart_ptr = '\r';
+
+ *uart_ptr = bytes[index] == '\r' ? '\n' : bytes[index];
+ ++index;
+ }
+#endif // __DEBUG__
+ }
+
+ TerminalDevice::~TerminalDevice() = default;
+
+ EXTERN_C void ke_io_read(const Char* bytes)
+ {
+#ifdef __DEBUG__
+ SizeT index = 0;
+
+ volatile UInt8* uart_ptr = (UInt8*)0x09000000;
+
+ ///! TODO: Look on how to wait for the UART to complete.
+ while (Yes)
+ {
+ auto in = *uart_ptr;
+
+ ///! If enter pressed then break.
+ if (in == 0xD)
+ {
+ break;
+ }
+
+ if (in < '0' || in < 'A' || in < 'a')
+ {
+ if (in != '@' || in != '!' || in != '?' || in != '.' || in != '/' ||
+ in != ':')
+ {
+ continue;
+ }
+ }
+
+ ((char*)bytes)[index] = in;
+
+ ++index;
+ }
+
+ ((char*)bytes)[index] = 0;
+#endif // __DEBUG__
+ }
+
+ TerminalDevice TerminalDevice::The() noexcept
+ {
+ TerminalDevice out(Kernel::ke_io_write, Kernel::ke_io_read);
+ return out;
+ }
+
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/ARM64/HalKernelMain.cc b/dev/Kernel/HALKit/ARM64/HalKernelMain.cc
new file mode 100644
index 00000000..7756facd
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalKernelMain.cc
@@ -0,0 +1,52 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/FileMgr.h>
+#include <KernelKit/Heap.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <NewKit/Json.h>
+#include <KernelKit/CodeMgr.h>
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <NetworkKit/IPC.h>
+#include <HALKit/ARM64/Processor.h>
+#include <CFKit/Property.h>
+
+EXTERN_C void hal_init_platform(
+ Kernel::HEL::BootInfoHeader* handover_hdr)
+{
+
+ /************************************************** */
+ /* INITIALIZE AND VALIDATE HEADER. */
+ /************************************************** */
+
+ kHandoverHeader = handover_hdr;
+
+ if (kHandoverHeader->f_Magic != kHandoverMagic &&
+ kHandoverHeader->f_Version != kHandoverVersion)
+ {
+ return;
+ }
+
+ /************************************** */
+ /* INITIALIZE BIT MAP. */
+ /************************************** */
+
+ kKernelBitMpSize = kHandoverHeader->f_BitMapSize;
+ kKernelBitMpStart = reinterpret_cast<Kernel::VoidPtr>(
+ reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_BitMapStart));
+
+ /// @note do initialize the interrupts after it.
+
+ Kernel::mp_initialize_gic();
+
+ while (YES)
+ {
+ }
+}
diff --git a/dev/Kernel/HALKit/ARM64/HalKernelPanic.cc b/dev/Kernel/HALKit/ARM64/HalKernelPanic.cc
new file mode 100644
index 00000000..8be2db2f
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalKernelPanic.cc
@@ -0,0 +1,80 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/KernelPanic.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Timer.h>
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/KString.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/FileMgr.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/TextMgr.h>
+#include <NewKit/Utils.h>
+
+/* Each error code is attributed with an ID, which will prompt a string onto the
+ * screen. Wait for debugger... */
+
+namespace Kernel
+{
+ /// @brief Dumping factory class.
+ class RecoveryFactory final
+ {
+ public:
+ STATIC Void Recover() noexcept;
+ };
+
+ /***********************************************************************************/
+ /// @brief Stops execution of the kernel.
+ /// @param id kernel stop ID.
+ /***********************************************************************************/
+ Void ke_panic(const Kernel::Int32& id, const Char* message)
+ {
+ fb_init();
+
+ auto panic_text = RGB(0xff, 0xff, 0xff);
+
+ auto y = 10;
+ auto x = 10;
+
+ Char* message_apicid = new Char[128];
+ rt_set_memory(message_apicid, 0, 128);
+
+ rt_copy_memory((VoidPtr) "panic id: ", message_apicid, rt_string_len("panic id: "));
+ rt_to_string(message_apicid + rt_string_len("panic id: "), (UIntPtr)id, 10);
+
+ fb_render_string(message_apicid, y, x, panic_text);
+
+ y += 10;
+
+ fb_render_string((message ? message : "message: panic raised, going nowhere after this!"), y, x, panic_text);
+
+ y += 10;
+
+ fb_clear();
+
+ RecoveryFactory::Recover();
+ }
+
+ Void RecoveryFactory::Recover() noexcept
+ {
+ while (YES)
+ {
+ HAL::rt_halt();
+ }
+ }
+
+ void ke_runtime_check(bool expr, const Char* file, const Char* line)
+ {
+ if (!expr)
+ {
+ kcout << "FAILED: FILE: " << file << endl;
+ kcout << "FAILED: LINE: " << line << endl;
+
+ ke_panic(RUNTIME_CHECK_FAILED, file); // Runtime Check failed
+ }
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/ARM64/HalPageInternal.S b/dev/Kernel/HALKit/ARM64/HalPageInternal.S
new file mode 100644
index 00000000..8fcf40ff
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalPageInternal.S
@@ -0,0 +1,5 @@
+.text
+
+hal_flush_tlb:
+ tlbi
+ ret
diff --git a/dev/Kernel/HALKit/ARM64/HalPagingMgrARM64.cc b/dev/Kernel/HALKit/ARM64/HalPagingMgrARM64.cc
new file mode 100644
index 00000000..0991fd37
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalPagingMgrARM64.cc
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HalPagingMgr.cc
+ Purpose: Platform Paging Manager..
+
+------------------------------------------- */
+
+#include <HALKit/ARM64/Paging.h>
+#include <HALKit/ARM64/Processor.h>
+
+namespace Kernel::HAL
+{
+ typedef UInt32 PageTableIndex;
+
+ /// \brief Page store type.
+ struct ZKA_PAGE_STORE final
+ {
+ struct
+ {
+ PDE* fPde{nullptr};
+ PTE* fPte{nullptr};
+ VoidPtr fVAddr{nullptr};
+ } fInternalStore;
+
+ Bool fStoreOp{No}; // Store operation in progress.
+
+ static ZKA_PAGE_STORE& The()
+ {
+ static ZKA_PAGE_STORE the;
+ return the;
+ }
+ };
+
+ /// \brief Retrieve the page status of a PTE.
+ STATIC Void mmi_page_status(PTE* pte)
+ {
+ }
+
+ STATIC Int32 mmi_map_page_table_entry(VoidPtr virtual_address, UInt32 flags, PTE* pt_entry);
+
+ /// @brief Maps or allocates a page from virtual_address.
+ /// @param virtual_address a valid virtual address.
+ /// @param phys_addr point to physical address.
+ /// @param flags the flags to put on the page.
+ /// @return Status code of page manipulation process.
+ EXTERN_C Int32 mm_map_page(VoidPtr virtual_address, UInt32 flags)
+ {
+ if (!virtual_address ||
+ !flags)
+ return 0;
+
+ ZKA_PAGE_STORE& page_store = ZKA_PAGE_STORE::The();
+
+ while (page_store.fStoreOp)
+ ;
+
+ page_store.fStoreOp = Yes;
+
+ if (page_store.fInternalStore.fVAddr == virtual_address)
+ {
+ page_store.fStoreOp = No;
+ return mmi_map_page_table_entry(page_store.fInternalStore.fVAddr, flags, page_store.fInternalStore.fPte);
+ }
+
+ return 1;
+ }
+
+ /// @brief Maps flags for a specific pte.
+ /// @internal Internal function.
+ STATIC Int32 mmi_map_page_table_entry(VoidPtr virtual_address, UInt32 flags, PTE* pt_entry)
+ {
+ ZKA_PAGE_STORE& page_store = ZKA_PAGE_STORE::The();
+
+ // Update Internal store.
+
+ page_store.fInternalStore.fPde = nullptr;
+ page_store.fInternalStore.fPte = pt_entry;
+ page_store.fInternalStore.fVAddr = virtual_address;
+
+ page_store.fStoreOp = No;
+
+ return 0;
+ }
+} // namespace Kernel::HAL
diff --git a/dev/Kernel/HALKit/ARM64/HalSchedulerCoreARM64.cc b/dev/Kernel/HALKit/ARM64/HalSchedulerCoreARM64.cc
new file mode 100644
index 00000000..ff1dd448
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalSchedulerCoreARM64.cc
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ /// @brief Wakes up thread.
+ /// Wakes up thread from the hang state.
+ Void mp_wakeup_thread(HAL::StackFrame* stack)
+ {
+ ZKA_UNUSED(stack);
+ }
+
+ /// @brief makes the thread sleep on a loop.
+ /// hooks and hangs thread to prevent code from executing.
+ Void mp_hang_thread(HAL::StackFrame* stack)
+ {
+ ZKA_UNUSED(stack);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc b/dev/Kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc
new file mode 100644
index 00000000..b254e670
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc
@@ -0,0 +1,35 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/ARM64/Processor.h>
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Unimplemented function (crashes by default)
+ /// @param void
+ /***********************************************************************************/
+
+ EXTERN_C Void __zka_pure_call(UserProcess* process)
+ {
+ if (process)
+ process->Crash();
+ }
+
+ /***********************************************************************************/
+ /// @brief Validate user stack.
+ /// @param stack_ptr the frame pointer.
+ /***********************************************************************************/
+
+ EXTERN_C Bool hal_check_stack(HAL::StackFramePtr stack_ptr)
+ {
+ if (!stack_ptr)
+ return No;
+
+ return stack_ptr->SP != 0 && stack_ptr->BP != 0;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/ARM64/HalTimerARM64.cc b/dev/Kernel/HALKit/ARM64/HalTimerARM64.cc
new file mode 100644
index 00000000..f860c5a2
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/HalTimerARM64.cc
@@ -0,0 +1,14 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HalTimer.cc
+ Purpose: HAL timer
+
+ Revision History:
+
+ 07/07/24: Added file (amlel)
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
diff --git a/dev/Kernel/HALKit/ARM64/MBCI/MBCI.cc b/dev/Kernel/HALKit/ARM64/MBCI/MBCI.cc
new file mode 100644
index 00000000..d9c39f4a
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/MBCI/MBCI.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/MBCI/MBCI.h> \ No newline at end of file
diff --git a/dev/Kernel/HALKit/ARM64/Paging.h b/dev/Kernel/HALKit/ARM64/Paging.h
new file mode 100644
index 00000000..f20c9fcf
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/Paging.h
@@ -0,0 +1,120 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/** ---------------------------------------------------
+
+ * THIS FILE CONTAINS CODE FOR ARMV8 PAGING.
+
+------------------------------------------------------- */
+
+#include <NewKit/Defines.h>
+
+#ifndef kPageMax
+#define kPageMax (0x200)
+#endif //! kPageMax
+
+#ifndef kPageAlign
+#define kPageAlign (0x1000)
+#endif //! kPageAlign
+
+#ifndef kPageSize
+#define kPageSize (0x1000)
+#endif // !kPageSize
+
+//! short format address range
+
+#define c16KBPage 0b000
+#define c8KBPage 0b001
+#define c4KBPage 0b010
+#define c2KBPage 0b011
+#define c1KBPage 0b100
+#define c512BPage 0b101
+#define c256BPage 0b110
+#define c128BPage 0b111
+
+/// Long format address range
+
+#define cPageMAll \
+ { \
+ 0b000, 0b000 \
+ }
+#define cPageMToMax(M) \
+ { \
+ M, 0b000 \
+ }
+#define cPageMaxToM(M) \
+ { \
+ 0b000, M \
+ }
+#define cPageMToN(M, N) \
+ { \
+ M, N \
+ }
+
+namespace Kernel::HAL
+{
+ struct PACKED PTE_4KB final
+ {
+ UInt64 Valid : 1;
+ UInt64 Table : 1;
+ UInt64 AttrIndex : 3;
+ UInt64 NS : 1;
+ UInt64 AP : 2;
+ UInt64 SH : 2;
+ UInt64 AF : 1;
+ UInt64 NG : 1;
+ UInt64 Reserved1 : 1;
+ UInt64 Contiguous : 1;
+ UInt64 Dirty : 1;
+ UInt64 Reserved : 2;
+ UInt64 PhysicalAddress : 36;
+ UInt64 Reserved3 : 4;
+ UInt64 PXN : 1;
+ UInt64 XN : 1;
+ UInt64 Reserved4 : 9;
+ };
+
+ namespace Detail
+ {
+ enum class ControlRegisterBits
+ {
+ ProtectedModeEnable = 0,
+ MonitorCoProcessor = 1,
+ Emulation = 2,
+ TaskSwitched = 3,
+ ExtensionType = 4,
+ NumericError = 5,
+ WriteProtect = 16,
+ AlignementMask = 18,
+ NotWriteThrough = 29,
+ CacheDisable = 30,
+ PageEnable = 31,
+ };
+
+ inline UInt8 control_register_cast(ControlRegisterBits reg)
+ {
+ return static_cast<UInt8>(reg);
+ }
+ } // namespace Detail
+
+ struct PDE_4KB final
+ {
+ PTE_4KB ALIGN(kPageAlign) fEntries[kPageMax];
+ };
+
+ auto mm_alloc_bitmap(Boolean wr, Boolean user, SizeT size, Bool is_page) -> VoidPtr;
+ auto mm_free_bitmap(VoidPtr page_ptr) -> Bool;
+} // namespace Kernel::HAL
+
+namespace Kernel
+{
+ typedef HAL::PTE_4KB PTE;
+ typedef HAL::PDE_4KB PDE;
+} // namespace Kernel
+
+EXTERN_C void hal_flush_tlb();
diff --git a/dev/Kernel/HALKit/ARM64/Processor.h b/dev/Kernel/HALKit/ARM64/Processor.h
new file mode 100644
index 00000000..2e640a7f
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/Processor.h
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Utils.h>
+#include <FirmwareKit/Handover.h>
+
+#define kCPUBackendName "ARMv8"
+
+namespace Kernel::HAL
+{
+ struct PACKED Register64 final
+ {
+ UShort Limit;
+ UIntPtr Base;
+ };
+
+ /// @brief Memory Manager mapping flags.
+ enum
+ {
+ kMMFlagsPresent = 1 << 0,
+ kMMFlagsWr = 1 << 1,
+ kMMFlagsUser = 1 << 2,
+ kMMFlagsNX = 1 << 3,
+ kMMFlagsCount = 3,
+ };
+
+ /// @brief Set a PTE from pd_base.
+ /// @param virt_addr a valid virtual address.
+ /// @param phys_addr point to physical address.
+ /// @param flags the flags to put on the page.
+ /// @return Status code of page manip.
+ EXTERN_C Int32 mm_map_page(VoidPtr virt_addr, UInt32 flags);
+
+ typedef UIntPtr Reg;
+ typedef Register64 Register;
+
+ /// @note let's keep the same name as AMD64 HAL.
+ struct PACKED StackFrame final
+ {
+ Reg R8{0};
+ Reg R9{0};
+ Reg R10{0};
+ Reg R11{0};
+ Reg R12{0};
+ Reg R13{0};
+ Reg R14{0};
+ Reg R15{0};
+ Reg SP{0};
+ Reg BP{0};
+ };
+
+ typedef StackFrame* StackFramePtr;
+
+ inline Void rt_halt() noexcept
+ {
+ while (Yes)
+ {
+ }
+ }
+
+ template <typename DataKind>
+ inline void hal_mmio_write(UIntPtr address, DataKind value)
+ {
+ *reinterpret_cast<volatile DataKind*>(address) = value;
+ }
+
+ template <typename DataKind>
+ inline DataKind hal_mmio_read(UIntPtr address)
+ {
+ return *reinterpret_cast<volatile DataKind*>(address);
+ }
+} // namespace Kernel::HAL
+
+inline Kernel::VoidPtr kKernelBitMpStart = nullptr;
+inline Kernel::UIntPtr kKernelBitMpSize = 0UL;
+
+inline Kernel::VoidPtr kKernelPhysicalStart = nullptr;
+
+#include <HALKit/ARM64/Paging.h>
diff --git a/dev/Kernel/HALKit/ARM64/ReadMe.md b/dev/Kernel/HALKit/ARM64/ReadMe.md
new file mode 100644
index 00000000..c51229f2
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/ReadMe.md
@@ -0,0 +1,3 @@
+# ARM64 Hardware Abstraction Layer
+
+- Supported Firmware: CoreBoot/EDK/OpenMobileBoot
diff --git a/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc b/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc
new file mode 100644
index 00000000..bcde2435
--- /dev/null
+++ b/dev/Kernel/HALKit/ARM64/Storage/MFlash+IO.cc
@@ -0,0 +1,84 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef ZKA_USE_MBCI_FLASH
+
+#include <NewKit/Defines.h>
+#include <ArchKit/ArchKit.h>
+#include <Mod/MFlash/MFlash.h>
+#include <Mod/MBCI/MBCI.h>
+
+/// @file MFlash.cc
+/// @brief MBCI Flash support.
+
+#define kMaxFlashSlots (8U)
+
+namespace Kernel
+{
+ /// /Mount/Flash/n
+ constexpr auto kFlashBridgeMagic = "FLSH";
+ constexpr auto kFlashBridgeRevision = 1;
+
+ STATIC BOOL kFlashEnabled = NO;
+ STATIC SizeT kFlashSize[kMaxFlashSlots] = {};
+ STATIC SizeT kFlashSectorSz[kMaxFlashSlots] = {};
+ STATIC IMBCIHost* kFlashMetaPackets[kMaxFlashSlots] = {};
+ STATIC IMBCIHost* kFlashDataPackets[kMaxFlashSlots] = {};
+
+ /// @brief Enable flash memory builtin.
+ STATIC Void drv_enable_flash(Int32 slot);
+
+ /// @brief Disable flash memory builtin.
+ STATIC Void drv_disable_flash(Int32 slot);
+
+ /// @brief get slot sector count.
+ /// @return slot sector count.
+ SizeT drv_get_sector_count(Int32 slot)
+ {
+ if (slot > kMaxFlashSlots)
+ return 0;
+
+ return kFlashSectorSz[slot];
+ }
+
+ /// @brief get slot full size (in bytes).
+ /// @return drive slot size
+ SizeT drv_get_size(Int32 slot)
+ {
+ if (slot > kMaxFlashSlots)
+ return 0;
+
+ return kFlashSize[slot];
+ }
+
+ /// @brief Enable flash memory at slot.
+ BOOL drv_enable_at(Int32 slot)
+ {
+ if (slot > kMaxFlashSlots)
+ return NO;
+
+ kFlashMetaPackets[slot]->InterruptEnable = YES;
+
+ kcout << "Enabled hardware slot at: " << number(slot) << endl;
+
+ return YES;
+ }
+
+ /// @brief Disable flash memory at slot.
+ BOOL drv_disable_at(Int32 slot)
+ {
+ if (slot > kMaxFlashSlots)
+ return NO;
+
+ kFlashMetaPackets[slot]->InterruptEnable = NO;
+
+ kcout << "Disabled hardware slot at: " << number(slot) << endl;
+
+ return YES;
+ }
+} // namespace Kernel
+
+#endif // if ZKA_USE_MBCI_FLASH
diff --git a/dev/Kernel/HALKit/AXP/CR.s b/dev/Kernel/HALKit/AXP/CR.s
new file mode 100644
index 00000000..4d68257d
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/CR.s
@@ -0,0 +1,11 @@
+.globl read_lr1
+.globl read_lr0
+
+.section .text
+ read_lr0:
+ movq %r30, %cr3
+ ret
+
+ hal_read_cr0:
+ movq %r30, %cr0
+ ret \ No newline at end of file
diff --git a/dev/Kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp b/dev/Kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/CoreInterruptHandlerDEC.cpp
diff --git a/dev/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/dev/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp
new file mode 100644
index 00000000..76f90c82
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/CoreSyscallHandlerDEC.cpp
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <HALKit/AXP/Processor.h>
+
+/// @brief Internal call for syscall, to work with C++.
+/// @param stack
+/// @return nothing.
+EXTERN_C void rt_syscall_handle(Kernel::HAL::StackFrame* stack)
+{
+ if (stack->Rcx <= (kSyscalls.Count() - 1))
+ {
+ kcout << "syscall: enter.\r";
+
+ if (kSyscalls[stack->Rcx].Leak().Leak().fHooked)
+ (kSyscalls[stack->Rcx].Leak().Leak().fProc)(stack);
+
+ kcout << "syscall: exit.\r";
+ }
+}
diff --git a/dev/Kernel/HALKit/AXP/HAL.s b/dev/Kernel/HALKit/AXP/HAL.s
new file mode 100644
index 00000000..0178527f
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/HAL.s
@@ -0,0 +1,13 @@
+.globl rt_wait_400ns
+
+.section .text
+rt_wait_400ns:
+ jmp .L
+.L:
+ jmp .L2
+ wtint ;; wait for interrupt
+.L2:
+
+ ret
+
+
diff --git a/dev/Kernel/HALKit/AXP/Processor.h b/dev/Kernel/HALKit/AXP/Processor.h
new file mode 100644
index 00000000..f183c100
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/Processor.h
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
diff --git a/dev/Kernel/HALKit/AXP/README b/dev/Kernel/HALKit/AXP/README
new file mode 100644
index 00000000..91e7b134
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/README
@@ -0,0 +1 @@
+This is for DEC Alpha.
diff --git a/dev/Kernel/HALKit/AXP/README.TXT b/dev/Kernel/HALKit/AXP/README.TXT
new file mode 100644
index 00000000..11e138f9
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/README.TXT
@@ -0,0 +1 @@
+An toy HAL to test the Kernel portability.
diff --git a/dev/Kernel/HALKit/AXP/SYSCALL.s b/dev/Kernel/HALKit/AXP/SYSCALL.s
new file mode 100644
index 00000000..19cab808
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/SYSCALL.s
@@ -0,0 +1,10 @@
+.section .text
+system_handle_user_call:
+ .cfi_startproc
+
+ push %r0
+ jmp %r1
+ mov %r30, %r2
+
+ .cfi_endproc
+ retsys \ No newline at end of file
diff --git a/dev/Kernel/HALKit/AXP/VM.s b/dev/Kernel/HALKit/AXP/VM.s
new file mode 100644
index 00000000..7024086b
--- /dev/null
+++ b/dev/Kernel/HALKit/AXP/VM.s
@@ -0,0 +1,5 @@
+.global hal_flush_tlb
+
+.section .text
+hal_flush_tlb:
+ swppal \ No newline at end of file
diff --git a/dev/Kernel/HALKit/POWER/.gitkeep b/dev/Kernel/HALKit/POWER/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/.gitkeep
diff --git a/dev/Kernel/HALKit/POWER/AP.h b/dev/Kernel/HALKit/POWER/AP.h
new file mode 100644
index 00000000..ba79b888
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/AP.h
@@ -0,0 +1,39 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: AP.h
+ Purpose: POWER hardware threads.
+
+ Revision History:
+
+ 14/04/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ struct HAL_HARDWARE_THREAD;
+
+ /// @brief hardware thread indentification type.
+ typedef Kernel::Int32 hal_ap_kind;
+
+ /// @brief Hardware thread information structure.
+ typedef struct HAL_HARDWARE_THREAD
+ {
+ Kernel::UIntPtr fStartAddress;
+ Kernel::UInt8 fPrivleged : 1;
+ Kernel::UInt32 fPageMemoryFlags;
+ hal_ap_kind fIdentNumber;
+ } HAL_HARDWARE_THREAD;
+
+ /// @brief Set PC to specific hart.
+ /// @param hart the hart
+ /// @param epc the pc.
+ /// @return
+ EXTERN_C Kernel::Void hal_set_pc_to_hart(HAL_HARDWARE_THREAD* hart, Kernel::VoidPtr epc);
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/POWER/APM/.gitkeep b/dev/Kernel/HALKit/POWER/APM/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/APM/.gitkeep
diff --git a/dev/Kernel/HALKit/POWER/HalAP.cc b/dev/Kernel/HALKit/POWER/HalAP.cc
new file mode 100644
index 00000000..2475bfba
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/HalAP.cc
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/POWER/Processor.h>
+#include <KernelKit/DebugOutput.h>
+#include <HALKit/POWER/AP.h>
+
+using namespace Kernel;
+
+namespace Kernel::Detail
+{
+ STATIC void mp_hang_fn(void)
+ {
+ while (YES)
+ ;
+ }
+} // namespace Kernel::Detail
+
+/// @brief wakes up thread.
+/// wakes up thread from hang.
+void mp_wakeup_thread(HAL::StackFramePtr stack)
+{
+ if (!stack)
+ return;
+
+ hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(stack->BP));
+}
+
+/// @brief makes thread sleep.
+/// hooks and hangs thread to prevent code from executing.
+void mp_hang_thread(HAL::StackFramePtr stack)
+{
+ if (!stack)
+ return;
+
+ hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(Kernel::Detail::mp_hang_fn));
+}
diff --git a/dev/Kernel/HALKit/POWER/HalDebugOutput.cc b/dev/Kernel/HALKit/POWER/HalDebugOutput.cc
new file mode 100644
index 00000000..91805d87
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/HalDebugOutput.cc
@@ -0,0 +1,27 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/POWER/Processor.h>
+#include <KernelKit/DebugOutput.h>
+
+using namespace Kernel;
+
+/// @brief Writes to COM1.
+/// @param bytes
+void ke_io_write(const Char* bytes)
+{
+ if (!bytes)
+ return;
+
+ SizeT index = 0;
+ SizeT len = rt_string_len(bytes, 255);
+
+ while (index < len)
+ {
+ // TODO
+ ++index;
+ }
+}
diff --git a/dev/Kernel/HALKit/POWER/HalStartSequence.s b/dev/Kernel/HALKit/POWER/HalStartSequence.s
new file mode 100644
index 00000000..a8124dce
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/HalStartSequence.s
@@ -0,0 +1,14 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.globl __ImageStart
+.extern hal_init_platform
+.align 4
+.text
+
+__ImageStart:
+ bl hal_init_platform
+ blr
diff --git a/dev/Kernel/HALKit/POWER/HalThread.cc b/dev/Kernel/HALKit/POWER/HalThread.cc
new file mode 100644
index 00000000..2e650b30
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/HalThread.cc
@@ -0,0 +1,8 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/POWER/Processor.h>
+#include <KernelKit/DebugOutput.h>
diff --git a/dev/Kernel/HALKit/POWER/HalVirtualMemory.cc b/dev/Kernel/HALKit/POWER/HalVirtualMemory.cc
new file mode 100644
index 00000000..3ed0ef3d
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/HalVirtualMemory.cc
@@ -0,0 +1,49 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/POWER/Processor.h>
+#include <KernelKit/DebugOutput.h>
+#include <HALKit/POWER/MMU.h>
+
+/// @note Refer to SoC documentation.
+
+using namespace Kernel;
+
+EXTERN_C Void hal_write_tlb(UInt32 mas0, UInt32 mas1, UInt32 mas2, UInt32 mas3, UInt32 mas7)
+{
+ hal_mtspr(MAS0, mas0);
+ hal_mtspr(MAS1, mas1);
+ hal_mtspr(MAS2, mas2);
+ hal_mtspr(MAS3, mas3);
+ hal_mtspr(MAS7, mas7);
+
+ hal_flush_tlb();
+}
+
+EXTERN_C Bool hal_set_tlb(UInt8 tlb, UInt32 epn, UInt64 rpn, UInt8 perms, UInt8 wimge, UInt8 ts, UInt8 esel, UInt8 tsize, UInt8 iprot)
+{
+ if ((hal_mfspr(SPRN_MMUCFG) & MMUCFG_MAVN) == MMUCFG_MAVN_V1 && (tsize & 1))
+ {
+ // this MMU does not allow odd tsize values
+ return false;
+ }
+
+ UInt32 mas0 = FSL_BOOKE_MAS0(tlb, esel, 0);
+ UInt32 mas1 = FSL_BOOKE_MAS1(1, iprot, 0, ts, tsize);
+ UInt32 mas2 = FSL_BOOKE_MAS2(epn, wimge);
+ UInt32 mas3 = FSL_BOOKE_MAS3(rpn, 0, perms);
+ UInt32 mas7 = FSL_BOOKE_MAS7(rpn);
+
+ hal_write_tlb(mas0, mas1, mas2, mas3, mas7);
+
+ return true;
+}
+
+/// @brief Flush TLB
+EXTERN_C void hal_flush_tlb()
+{
+ asm volatile("isync;tlbwe;msync;isync");
+}
diff --git a/dev/Kernel/HALKit/POWER/MBCI/.gitkeep b/dev/Kernel/HALKit/POWER/MBCI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/MBCI/.gitkeep
diff --git a/dev/Kernel/HALKit/POWER/MBCI/HalMBCIHost.cc b/dev/Kernel/HALKit/POWER/MBCI/HalMBCIHost.cc
new file mode 100644
index 00000000..2e650b30
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/MBCI/HalMBCIHost.cc
@@ -0,0 +1,8 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/POWER/Processor.h>
+#include <KernelKit/DebugOutput.h>
diff --git a/dev/Kernel/HALKit/POWER/Processor.h b/dev/Kernel/HALKit/POWER/Processor.h
new file mode 100644
index 00000000..10908b35
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/Processor.h
@@ -0,0 +1,62 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ Purpose: POWER processor header.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/Utils.h>
+
+#define NoOp() asm volatile("mr 0, 0")
+#define kHalPPCAlignment __attribute__((aligned(4)))
+
+namespace Kernel::HAL
+{
+ typedef UIntPtr Reg;
+
+ /// @brief Stack frame (as retrieved from assembly.)
+ struct PACKED StackFrame final
+ {
+ Reg R8{0};
+ Reg R9{0};
+ Reg R10{0};
+ Reg R11{0};
+ Reg R12{0};
+ Reg R13{0};
+ Reg R14{0};
+ Reg R15{0};
+ Reg SP{0};
+ Reg BP{0};
+ };
+
+ typedef StackFrame* StackFramePtr;
+
+ inline void rt_halt()
+ {
+ while (true)
+ {
+ NoOp(); // no oop.
+ }
+ }
+
+ inline void rt_cli()
+ {
+ NoOp(); // no oop
+ }
+} // namespace Kernel::HAL
+
+EXTERN_C Kernel::Void int_handle_math(Kernel::UIntPtr sp);
+EXTERN_C Kernel::Void int_handle_pf(Kernel::UIntPtr sp);
+
+/// @brief Set TLB.
+Kernel::Bool hal_set_tlb(Kernel::UInt8 tlb, Kernel::UInt32 epn, Kernel::UInt64 rpn, Kernel::UInt8 perms, Kernel::UInt8 wimge, Kernel::UInt8 ts, Kernel::UInt8 esel, Kernel::UInt8 tsize, Kernel::UInt8 iprot);
+
+/// @brief Write TLB.
+Kernel::Void hal_write_tlb(Kernel::UInt32 mas0, Kernel::UInt32 mas1, Kernel::UInt32 mas2, Kernel::UInt32 mas3, Kernel::UInt32 mas7);
+
+/// @brief Flush TLB.
+EXTERN_C Kernel::Void hal_flush_tlb();
diff --git a/dev/Kernel/HALKit/POWER/ReadMe.md b/dev/Kernel/HALKit/POWER/ReadMe.md
new file mode 100644
index 00000000..a9751581
--- /dev/null
+++ b/dev/Kernel/HALKit/POWER/ReadMe.md
@@ -0,0 +1,4 @@
+POWER Hardware Abstraction Layer
+
+- Supported CPU: POWER
+- Supported Firmware: CoreBoot \ No newline at end of file
diff --git a/dev/Kernel/HALKit/RISCV/.keep b/dev/Kernel/HALKit/RISCV/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/.keep
diff --git a/dev/Kernel/HALKit/RISCV/AP.h b/dev/Kernel/HALKit/RISCV/AP.h
new file mode 100644
index 00000000..05de4727
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/AP.h
@@ -0,0 +1,36 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: AP.h
+ Purpose: RISC-V hardware threads.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ typedef Int64 hal_ap_kind;
+
+ typedef struct HAL_HARDWARE_THREAD
+ {
+ Kernel::UIntPtr fStartAddress;
+ Kernel::UInt8 fPrivleged : 1;
+ Kernel::UInt32 fPageMemoryFlags;
+ hal_ap_kind fIdentNumber;
+ } HAL_HARDWARE_THREAD;
+
+ /// @brief Set PC to specific hart.
+ /// @param hart the hart
+ /// @param epc the pc.
+ /// @return
+ EXTERN_C Kernel::Void hal_set_pc_to_hart(HAL_HARDWARE_THREAD* hart, Kernel::VoidPtr epc);
+
+} // namespace Kernel
diff --git a/dev/Kernel/HALKit/RISCV/APM/.gitkeep b/dev/Kernel/HALKit/RISCV/APM/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/APM/.gitkeep
diff --git a/dev/Kernel/HALKit/RISCV/HalAP.cc b/dev/Kernel/HALKit/RISCV/HalAP.cc
new file mode 100644
index 00000000..619a03d4
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/HalAP.cc
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <HALKit/RISCV/Processor.h>
+#include <KernelKit/DebugOutput.h>
+#include <HALKit/RISCV/AP.h>
+
+using namespace Kernel;
+
+namespace Kernel::Detail
+{
+ STATIC void mp_hang_fn(void)
+ {
+ while (YES)
+ ;
+ }
+} // namespace Kernel::Detail
+
+/// @brief wakes up thread.
+/// wakes up thread from hang.
+void mp_wakeup_thread(HAL::StackFramePtr stack)
+{
+ if (!stack)
+ return;
+
+ hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(stack->BP));
+}
+
+/// @brief makes thread sleep.
+/// hooks and hangs thread to prevent code from executing.
+void mp_hang_thread(HAL::StackFramePtr stack)
+{
+ if (!stack)
+ return;
+
+ hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(Kernel::Detail::mp_hang_fn));
+}
diff --git a/dev/Kernel/HALKit/RISCV/ReadMe.md b/dev/Kernel/HALKit/RISCV/ReadMe.md
new file mode 100644
index 00000000..b099aa31
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/ReadMe.md
@@ -0,0 +1,4 @@
+RISCV64 Hardware Abstraction Layer
+
+- Supported CPU: RISCV64
+- Supported Firmware: CoreBoot \ No newline at end of file
diff --git a/dev/Kernel/HALKit/RISCV/Storage/.gitkeep b/dev/Kernel/HALKit/RISCV/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/RISCV/Storage/.gitkeep
diff --git a/dev/Kernel/HALKit/X86S/.gitkeep b/dev/Kernel/HALKit/X86S/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/X86S/.gitkeep
diff --git a/dev/Kernel/HALKit/X86S/ACPI/.gitkeep b/dev/Kernel/HALKit/X86S/ACPI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/X86S/ACPI/.gitkeep
diff --git a/dev/Kernel/HALKit/X86S/Storage/.gitkeep b/dev/Kernel/HALKit/X86S/Storage/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/HALKit/X86S/Storage/.gitkeep
diff --git a/dev/Kernel/KernelKit/CodeMgr.h b/dev/Kernel/KernelKit/CodeMgr.h
new file mode 100644
index 00000000..eb5b316d
--- /dev/null
+++ b/dev/Kernel/KernelKit/CodeMgr.h
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: CodeMgr.h
+ Purpose: Code Mgr.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+ 3/8/24: Add UPP struct.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/PECodeMgr.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <KernelKit/IPEFDylibObject.h>
+
+namespace Kernel
+{
+ /// @brief Main process entrypoint.
+ typedef void (*rtl_main_kind)(const SizeT argc, Char** argv, Char** envp, const SizeT envp_len);
+
+ /// @brief C++ Constructor entrypoint.
+ typedef void (*rtl_ctor_kind)(void);
+
+ /// @brief C++ Destructor entrypoint.
+ typedef void (*rtl_dtor_kind)(void);
+
+ /// @brief Executes a new process from a function. Kernel code only.
+ /// @note This sets up a new stack, anything on the main function that calls the Kernel will not be accessible.
+ /// @param main the start of the process.
+ /// @return The team's process id.
+ ProcessID rtl_create_process(rtl_main_kind main, const Char* process_name) noexcept;
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/DebugOutput.h b/dev/Kernel/KernelKit/DebugOutput.h
new file mode 100644
index 00000000..0f02ecb1
--- /dev/null
+++ b/dev/Kernel/KernelKit/DebugOutput.h
@@ -0,0 +1,211 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DeviceMgr.h>
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/OwnPtr.h>
+#include <NewKit/Stream.h>
+
+#define kDebugMaxPorts 56
+
+#define kDebugUnboundPort 0x0FEED
+
+#define kDebugMag0 'Z'
+#define kDebugMag1 'D'
+#define kDebugMag2 'B'
+#define kDebugMag3 'G'
+
+#define kDebugSourceFile 0
+#define kDebugLine 33
+#define kDebugTeam 43
+#define kDebugEOP 49
+
+namespace Kernel
+{
+ class TerminalDevice;
+ class DTraceDevice;
+
+ inline TerminalDevice end_line();
+ inline TerminalDevice number(const Long& x);
+ inline TerminalDevice hex_number(const Long& x);
+
+ // @brief Emulates a VT100 terminal.
+ class TerminalDevice final ZKA_DEVICE<const Char*>
+ {
+ public:
+ TerminalDevice(void (*print)(const Char*), void (*gets)(const Char*))
+ : IDeviceObject<const Char*>(print, gets)
+ {
+ }
+
+ ~TerminalDevice() override;
+
+ /// @brief returns device name (terminal name)
+ /// @return string type (const Char*)
+ const Char* Name() const override
+ {
+ return ("TerminalDevice");
+ }
+
+ ZKA_COPY_DEFAULT(TerminalDevice);
+
+ STATIC TerminalDevice The() noexcept;
+ };
+
+ inline TerminalDevice end_line()
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self.operator<<("\r");
+ return self;
+ }
+
+ inline TerminalDevice carriage_return()
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self.operator<<("\r");
+ return self;
+ }
+
+ inline TerminalDevice tabulate()
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self.operator<<("\t");
+ return self;
+ }
+
+ /// @brief emulate a terminal bell, like the VT100 does.
+ inline TerminalDevice bell()
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self.operator<<("\a");
+ return self;
+ }
+
+ namespace Detail
+ {
+ inline TerminalDevice _write_number(const Long& x, TerminalDevice& term)
+ {
+ UInt64 y = (x > 0 ? x : -x) / 10;
+ UInt64 h = (x > 0 ? x : -x) % 10;
+
+ if (y)
+ _write_number(y, term);
+
+ /* fail if the number is not base-10 */
+ if (h > 10)
+ {
+ _write_number('?', term);
+ return term;
+ }
+
+ if (y < 0)
+ y = -y;
+
+ const Char kNumbers[11] = "0123456789";
+
+ Char buf[2];
+ buf[0] = kNumbers[h];
+ buf[1] = 0;
+
+ term.operator<<(buf);
+ return term;
+ }
+
+ inline TerminalDevice _write_number_hex(const Long& x, TerminalDevice& term)
+ {
+ UInt64 y = (x > 0 ? x : -x) / 16;
+ UInt64 h = (x > 0 ? x : -x) % 16;
+
+ if (y)
+ _write_number_hex(y, term);
+
+ /* fail if the hex number is not base-16 */
+ if (h > 16)
+ {
+ _write_number_hex('?', term);
+ return term;
+ }
+
+ if (y < 0)
+ y = -y;
+
+ const Char kNumbers[17] = "0123456789ABCDEF";
+
+ Char buf[2];
+ buf[0] = kNumbers[h];
+ buf[1] = 0;
+
+ term.operator<<(buf);
+ return term;
+ }
+ } // namespace Detail
+
+ inline TerminalDevice hex_number(const Long& x)
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ Detail::_write_number_hex(x, self);
+ self.operator<<("h");
+
+ return self;
+ }
+
+ inline TerminalDevice number(const Char* x)
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self << "?";
+
+ return self;
+ }
+
+ inline TerminalDevice number(const Long& x)
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ Detail::_write_number(x, self);
+
+ return self;
+ }
+
+ inline TerminalDevice get_console_in(Char* buf)
+ {
+ TerminalDevice self = TerminalDevice::The();
+
+ self >> buf;
+
+ return self;
+ }
+
+ typedef Char rt_debug_type[255];
+
+ class DebuggerPortHeader final
+ {
+ public:
+ Int16 fPort[kDebugMaxPorts];
+ Int16 fBoundCnt;
+ };
+
+ inline TerminalDevice& operator<<(TerminalDevice& src, auto number)
+ {
+ number(number, src);
+ return src;
+ }
+} // namespace Kernel
+
+#ifdef kcout
+#undef kcout
+#endif // ifdef kcout
+
+#define kcout Kernel::TerminalDevice::The() << "\e[0;31m [NeKernel] " << __FILE__ << " \e[0m: "
+
+#define endl Kernel::TerminalDevice::The() << Kernel::end_line()
diff --git a/dev/Kernel/KernelKit/Defines.h b/dev/Kernel/KernelKit/Defines.h
new file mode 100644
index 00000000..8fa90619
--- /dev/null
+++ b/dev/Kernel/KernelKit/Defines.h
@@ -0,0 +1,15 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define KERNELKIT_VERSION "1.0.2"
+#define KERNELKIT_VERSION_BCD 0x01020
+
+class UserProcessScheduler;
+class UserProcess;
diff --git a/dev/Kernel/KernelKit/DeviceMgr.h b/dev/Kernel/KernelKit/DeviceMgr.h
new file mode 100644
index 00000000..9e867561
--- /dev/null
+++ b/dev/Kernel/KernelKit/DeviceMgr.h
@@ -0,0 +1,140 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/* -------------------------------------------
+
+ Revision History:
+
+ 31/01/24: Add kDeviceCnt (amlel)
+ 15/11/24: Add ZKA_DEVICE macro, to inherit from device object.
+
+ ------------------------------------------- */
+
+#pragma once
+
+/* @note Device Mgr. */
+/* @file KernelKit/DeviceMgr.h */
+/* @brief Device abstraction and I/O buffer. */
+
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Ref.h>
+
+#define kDeviceMgrRootDirPath "/Devices/"
+
+#define ZKA_DEVICE : public ::Kernel::IDeviceObject
+
+// Last Rev: Wed, Apr 3, 2024 9:09:41 AM
+
+namespace Kernel
+{
+ template <typename T>
+ class IDeviceObject;
+
+ /***********************************************************************************/
+ /// @brief Device contract interface, represents an HW device.
+ /***********************************************************************************/
+ template <typename T>
+ class IDeviceObject
+ {
+ public:
+ explicit IDeviceObject(void (*Out)(T), void (*In)(T))
+ : fOut(Out), fIn(In)
+ {
+ }
+
+ virtual ~IDeviceObject() = default;
+
+ public:
+ IDeviceObject& operator=(const IDeviceObject<T>&) = default;
+ IDeviceObject(const IDeviceObject<T>&) = default;
+
+ public:
+ virtual IDeviceObject<T>& operator<<(T Data)
+ {
+ fOut(Data);
+ return *this;
+ }
+
+ virtual IDeviceObject<T>& operator>>(T Data)
+ {
+ fIn(Data);
+ return *this;
+ }
+
+ virtual const char* Name() const
+ {
+ return "IDeviceObject";
+ }
+
+ operator bool()
+ {
+ return fOut && fIn;
+ }
+
+ Bool operator!()
+ {
+ return !fOut || !fIn;
+ }
+
+ protected:
+ Void (*fOut)(T Data) = {nullptr};
+ Void (*fIn)(T Data) = {nullptr};
+ };
+
+ ///
+ /// @brief Input Output abstract class.
+ /// Used mainly to communicate between OS to hardware.
+ ///
+ template <typename T>
+ class IOBuf final
+ {
+ public:
+ explicit IOBuf(T dma_addr)
+ : fData(dma_addr)
+ {
+ // At least pass something valid when instancating this struct.
+ MUST_PASS(fData);
+ }
+
+ IOBuf& operator=(const IOBuf<T>&) = default;
+ IOBuf(const IOBuf<T>&) = default;
+
+ ~IOBuf() = default;
+
+ public:
+ template <typename R>
+ R operator->() const
+ {
+ return fData;
+ }
+
+ template <typename R>
+ R& operator[](Size index) const
+ {
+ return fData[index];
+ }
+
+ private:
+ T fData;
+ };
+
+ ///! @brief Device enum types.
+ enum
+ {
+ kDeviceTypeIDE,
+ kDeviceTypeEthernet,
+ kDeviceTypeWiFi,
+ kDeviceTypeFW,
+ kDeviceTypeBT,
+ kDeviceTypeRS232,
+ kDeviceTypeSCSI,
+ kDeviceTypeAHCI,
+ kDeviceTypeMBCI,
+ kDeviceTypeUSB,
+ kDeviceTypeMediaCtrl, // MM controller
+ kDeviceTypeCount,
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/DriveMgr.h b/dev/Kernel/KernelKit/DriveMgr.h
new file mode 100644
index 00000000..e28e7cb7
--- /dev/null
+++ b/dev/Kernel/KernelKit/DriveMgr.h
@@ -0,0 +1,191 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef INC_DRIVE_MANAGER_H
+#define INC_DRIVE_MANAGER_H
+
+#include <KernelKit/UserProcessScheduler.h>
+#include <CompilerKit/CompilerKit.h>
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/DeviceMgr.h>
+#include <KernelKit/LPC.h>
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+#include <NewKit/Ref.h>
+
+#define kDriveMaxCount (4U)
+#define kDriveSectorSz (512U)
+#define kDriveInvalidID (-1)
+#define kDriveNameLen (32)
+
+#define drv_sector_cnt(SIZE, SECTOR_SZ) (((SIZE) + (SECTOR_SZ)) / (SECTOR_SZ))
+
+namespace Kernel
+{
+ enum
+ {
+ kInvalidDisc = -1,
+
+ /// Storage types, combine with flags.
+ kBlockDevice = 0xAD,
+ kMassStorageDisc = 0xDA,
+ kFloppyDisc = 0xCD,
+ kOpticalDisc = 0xDC, // CD-ROM/DVD-ROM/Blu-Ray
+ kTapeDisc = 0xD7,
+
+ /// Storage flags, combine with types.
+ kReadOnlyDrive = 0x10, // Read only drive
+ kEPMDrive = 0x11, // Explicit Partition Map.
+ kEPTDrive = 0x12, // ESP w/ EPM partition.
+ kMBRDrive = 0x13, // PC classic partition scheme
+ kGPTDrive = 0x14, // PC new partition scheme
+ kUnformattedDrive = 0x15,
+ kStorageCount = 9,
+ };
+
+ /// @brief Media drive trait type.
+ struct DriveTrait final
+ {
+ Char fName[kDriveNameLen]; // /System, /Boot, //./Devices/USB...
+ Int32 fKind; // fMassStorage, fFloppy, fOpticalDisc.
+ Int32 fFlags; // fReadOnly, fEPMDrive...
+
+ /// @brief Packet drive (StorageKit compilant.)
+ struct DrivePacket final
+ {
+ VoidPtr fPacketContent{nullptr}; //! packet body.
+ Char fPacketMime[kDriveNameLen] = "*/*"; //! identify what we're sending.
+ SizeT fPacketSize{0UL}; //! packet size
+ UInt32 fPacketCRC32{0UL}; //! sanity crc, in case if good is set to false
+ Boolean fPacketGood{YES};
+ Lba fPacketLba{0UL};
+ Boolean fPacketReadOnly{NO};
+ } fPacket;
+
+ Lba fLbaStart{0}, fLbaEnd{0};
+ SizeT fSectorSz{512};
+
+ Void (*fInput)(DrivePacket packet);
+ Void (*fOutput)(DrivePacket packet);
+ Void (*fVerify)(DrivePacket packet);
+ Void (*fInit)(DrivePacket packet);
+ const Char* (*fDriveKind)(Void);
+ };
+
+ ///! drive as a device.
+ typedef DriveTrait* DriveTraitPtr;
+
+ /**
+ * @brief Mounted drives interface.
+ * @note This class has all of it's drive set to nullptr, allocate them using
+ * GetAddressOf(index).
+ */
+ class MountpointInterface final
+ {
+ public:
+ explicit MountpointInterface() = default;
+ ~MountpointInterface() = default;
+
+ ZKA_COPY_DEFAULT(MountpointInterface);
+
+ public:
+ DriveTrait& A()
+ {
+ return mA;
+ }
+
+ DriveTrait& B()
+ {
+ return mB;
+ }
+
+ DriveTrait& C()
+ {
+ return mC;
+ }
+
+ DriveTrait& D()
+ {
+ return mD;
+ }
+
+ enum
+ {
+ kDriveIndexA = 0,
+ kDriveIndexB,
+ kDriveIndexC,
+ kDriveIndexD,
+ kDriveIndexInvalid,
+ };
+
+ DriveTraitPtr GetAddressOf(const Int32& index)
+ {
+ err_local_get() = kErrorSuccess;
+
+ switch (index)
+ {
+ case kDriveIndexA:
+ return &mA;
+ case kDriveIndexB:
+ return &mB;
+ case kDriveIndexC:
+ return &mC;
+ case kDriveIndexD:
+ return &mD;
+ default: {
+ err_local_get() = kErrorNoSuchDisk;
+ kcout << "No such disc letter.\n";
+
+ break;
+ }
+ }
+
+ return nullptr;
+ }
+
+ private:
+ DriveTrait mA, mB, mC, mD;
+ };
+
+ /// @brief Unimplemented drive.
+ /// @param pckt the packet to read.
+ /// @return
+ Void io_drv_unimplemented(DriveTrait::DrivePacket* pckt) noexcept;
+
+ /// @brief Gets the drive kind (ATA, SCSI, AHCI...)
+ /// @param void none.
+ /// @return the drive kind (ATA, Flash, NVM)
+ const Char* io_drv_kind(Void);
+
+ /// @brief Makes a new drive.
+ /// @return the new drive as a trait.
+ DriveTrait io_construct_blank_drive(Void) noexcept;
+
+ /// @brief Fetches the main drive.
+ /// @return the new drive as a trait.
+ DriveTrait io_construct_main_drive(Void) noexcept;
+
+ namespace Detect
+ {
+ Void io_detect_drive(DriveTrait& trait);
+ }
+
+ /// @brief Read from newfs disk.
+ /// @param Mnt mounted interface.
+ /// @param DrvTrait drive info
+ /// @param DrvIndex drive index.
+ /// @return
+ Int32 fs_ifs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
+
+ /// @brief Write to ifs disk.
+ /// @param Mnt mounted interface.
+ /// @param DrvTrait drive info
+ /// @param DrvIndex drive index.
+ /// @return
+ Int32 fs_ifs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
+} // namespace Kernel
+
+#endif /* ifndef INC_DRIVE_MANAGER_H */
diff --git a/dev/Kernel/KernelKit/FileMgr.h b/dev/Kernel/KernelKit/FileMgr.h
new file mode 100644
index 00000000..c78c0b97
--- /dev/null
+++ b/dev/Kernel/KernelKit/FileMgr.h
@@ -0,0 +1,392 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal EL Mahrouss Labs, all rights reserved.
+
+ File: FileMgr.h
+ Purpose: Kernel file manager.
+
+------------------------------------------- */
+
+/* -------------------------------------------
+
+ Revision History:
+
+ 31/01/24: Update documentation (amlel)
+ 05/07/24: NeFS support, and fork support, updated constants and specs
+ as well.
+ 18/01/25: Patches to FileStream class.
+
+ ------------------------------------------- */
+
+#ifndef INC_FILEMGR_H
+#define INC_FILEMGR_H
+
+#ifdef __FSKIT_INCLUDES_NEFS__
+#include <FSKit/NeFS.h>
+#endif // __FSKIT_INCLUDES_NEFS__
+
+#ifdef __FSKIT_INCLUDES_HPFS__
+#include <FSKit/HPFS.h>
+#endif // __FSKIT_INCLUDES_HPFS__
+
+#include <CompilerKit/CompilerKit.h>
+#include <Hints/CompilerHint.h>
+#include <KernelKit/LPC.h>
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/Stream.h>
+#include <NewKit/ErrorOr.h>
+#include <KernelKit/Heap.h>
+#include <NewKit/Ref.h>
+
+/// @brief Filesystem manager, abstraction over mounted filesystem.
+/// Works like the VFS or IFS.
+
+#define kRestrictR "r"
+#define kRestrictRB "rb"
+#define kRestrictW "w"
+#define kRestrictWB "rw"
+#define kRestrictRWB "rwb"
+
+#define kRestrictMax (5U)
+
+#define node_cast(PTR) reinterpret_cast<Kernel::NodePtr>(PTR)
+
+/**
+ @note Refer to first enum.
+*/
+#define kFileOpsCount (4U)
+#define kFileMimeGeneric "n-application-kind/all"
+
+/** @brief invalid position. (n-pos) */
+#define kNPos (SizeT)(-1);
+
+namespace Kernel
+{
+ enum
+ {
+ kFileWriteAll = 100,
+ kFileReadAll = 101,
+ kFileReadChunk = 102,
+ kFileWriteChunk = 103,
+ kFileIOCnt = (kFileWriteChunk - kFileWriteAll) + 1,
+ // file flags
+ kFileFlagRsrc = 104,
+ kFileFlagData = 105,
+ };
+
+ typedef VoidPtr NodePtr;
+
+ /**
+ @brief Filesystem Mgr Interface class
+ @brief Used to provide common I/O for a specific filesystem.
+*/
+ class IFilesystemMgr
+ {
+ public:
+ explicit IFilesystemMgr() = default;
+ virtual ~IFilesystemMgr() = default;
+
+ public:
+ ZKA_COPY_DEFAULT(IFilesystemMgr);
+
+ public:
+ /// @brief Mounts a new filesystem into an active state.
+ /// @param interface the filesystem interface
+ /// @return
+ static bool Mount(IFilesystemMgr* interface);
+
+ /// @brief Unmounts the active filesystem
+ /// @return
+ static IFilesystemMgr* Unmount();
+
+ /// @brief Getter, gets the active filesystem.
+ /// @return
+ static IFilesystemMgr* GetMounted();
+
+ public:
+ virtual NodePtr Create(_Input const Char* path) = 0;
+ virtual NodePtr CreateAlias(_Input const Char* path) = 0;
+ virtual NodePtr CreateDirectory(_Input const Char* path) = 0;
+ virtual NodePtr CreateSwapFile(const Char* path) = 0;
+
+ public:
+ virtual bool Remove(_Input const Char* path) = 0;
+
+ public:
+ virtual NodePtr Open(_Input const Char* path, _Input const Char* r) = 0;
+
+ public:
+ virtual Void Write(_Input NodePtr node, _Input VoidPtr data, _Input Int32 flags, _Input SizeT size) = 0;
+
+ virtual _Output VoidPtr Read(_Input NodePtr node,
+ _Input Int32 flags,
+ _Input SizeT sz) = 0;
+
+ virtual Void Write(_Input const Char* name,
+ _Input NodePtr node,
+ _Input VoidPtr data,
+ _Input Int32 flags,
+ _Input SizeT size) = 0;
+
+ virtual _Output VoidPtr Read(_Input const Char* name,
+ _Input NodePtr node,
+ _Input Int32 flags,
+ _Input SizeT sz) = 0;
+
+ public:
+ virtual bool Seek(_Input NodePtr node, _Input SizeT off) = 0;
+
+ public:
+ virtual SizeT Tell(_Input NodePtr node) = 0;
+ virtual bool Rewind(_Input NodePtr node) = 0;
+ };
+
+#ifdef __FSKIT_INCLUDES_NEFS__
+ /**
+ * @brief Based of IFilesystemMgr, takes care of managing NeFS
+ * disks.
+ */
+ class NeFileSystemMgr final : public IFilesystemMgr
+ {
+ public:
+ explicit NeFileSystemMgr();
+ ~NeFileSystemMgr() override;
+
+ public:
+ ZKA_COPY_DEFAULT(NeFileSystemMgr);
+
+ public:
+ NodePtr Create(const Char* path) override;
+ NodePtr CreateAlias(const Char* path) override;
+ NodePtr CreateDirectory(const Char* path) override;
+ NodePtr CreateSwapFile(const Char* path) override;
+
+ public:
+ bool Remove(_Input const Char* path) override;
+ NodePtr Open(_Input const Char* path, _Input const Char* r) override;
+ Void Write(_Input NodePtr node, _Input VoidPtr data, _Input Int32 flags, _Input SizeT sz) override;
+ VoidPtr Read(_Input NodePtr node, _Input Int32 flags, _Input SizeT sz) override;
+ bool Seek(_Input NodePtr node, _Input SizeT off) override;
+ SizeT Tell(_Input NodePtr node) override;
+ bool Rewind(_Input NodePtr node) override;
+
+ Void Write(_Input const Char* name,
+ _Input NodePtr node,
+ _Input VoidPtr data,
+ _Input Int32 flags,
+ _Input SizeT size) override;
+
+ _Output VoidPtr Read(_Input const Char* name,
+ _Input NodePtr node,
+ _Input Int32 flags,
+ _Input SizeT sz) override;
+
+ public:
+ /// @brief Get NeFS parser class.
+ /// @return The filesystem parser class.
+ NeFileSystemParser* GetParser() noexcept;
+
+ private:
+ NeFileSystemParser* mParser{nullptr};
+ };
+
+#endif // ifdef __FSKIT_INCLUDES_NEFS__
+
+ /**
+ * FileStream class.
+ * @tparam Encoding file encoding (char, wchar_t...)
+ * @tparam FSClass Filesystem contract who takes care of it.
+ */
+ template <typename Encoding = Char,
+ typename FSClass = IFilesystemMgr>
+ class FileStream final
+ {
+ public:
+ explicit FileStream(const Encoding* path, const Encoding* restrict_type);
+ ~FileStream();
+
+ public:
+ FileStream& operator=(const FileStream&);
+ FileStream(const FileStream&);
+
+ public:
+ ErrorOr<Int64> Write(const SizeT offset, const VoidPtr data, SizeT len) noexcept
+ {
+ if (this->fFileRestrict != kFileMgrRestrictReadWrite &&
+ this->fFileRestrict != kFileMgrRestrictReadWriteBinary &&
+ this->fFileRestrict != kFileMgrRestrictWrite &&
+ this->fFileRestrict != kFileMgrRestrictWriteBinary)
+ return ErrorOr<Int64>(kErrorInvalidData);
+
+ if (data == nullptr)
+ return ErrorOr<Int64>(kErrorInvalidData);
+
+ auto man = FSClass::GetMounted();
+
+ if (man)
+ {
+ man->Write(offset, fFile, data, len);
+ return ErrorOr<Int64>(0);
+ }
+
+ return ErrorOr<Int64>(kErrorInvalidData);
+ }
+
+ ErrorOr<Int64> Write(const Char* name, const VoidPtr data, SizeT len) noexcept
+ {
+ if (this->fFileRestrict != kFileMgrRestrictReadWrite &&
+ this->fFileRestrict != kFileMgrRestrictReadWriteBinary &&
+ this->fFileRestrict != kFileMgrRestrictWrite &&
+ this->fFileRestrict != kFileMgrRestrictWriteBinary)
+ return ErrorOr<Int64>(kErrorInvalidData);
+
+ if (data == nullptr)
+ return ErrorOr<Int64>(kErrorInvalidData);
+
+ auto man = FSClass::GetMounted();
+
+ if (man)
+ {
+ man->Write(name, fFile, data, 0, len);
+ return ErrorOr<Int64>(0);
+ }
+
+ return ErrorOr<Int64>(kErrorInvalidData);
+ }
+
+ VoidPtr Read(const Char* name, const SizeT sz) noexcept
+ {
+ if (this->fFileRestrict != kFileMgrRestrictReadWrite &&
+ this->fFileRestrict != kFileMgrRestrictReadWriteBinary &&
+ this->fFileRestrict != kFileMgrRestrictRead &&
+ this->fFileRestrict != kFileMgrRestrictReadBinary)
+ return nullptr;
+
+ auto man = FSClass::GetMounted();
+
+ if (man)
+ {
+ VoidPtr ret = man->Read(name, fFile, kFileReadAll, 0);
+ return ret;
+ }
+
+ return nullptr;
+ }
+
+ VoidPtr Read(SizeT offset, const SizeT sz)
+ {
+ if (this->fFileRestrict != kFileMgrRestrictReadWrite &&
+ this->fFileRestrict != kFileMgrRestrictReadWriteBinary &&
+ this->fFileRestrict != kFileMgrRestrictRead &&
+ this->fFileRestrict != kFileMgrRestrictReadBinary)
+ return nullptr;
+
+ auto man = FSClass::GetMounted();
+
+ if (man)
+ {
+ man->Seek(fFile, offset);
+ auto ret = man->Read(fFile, kFileReadChunk, sz);
+
+ return ret;
+ }
+
+ return nullptr;
+ }
+
+ public:
+ /// @brief Leak node pointer.
+ /// @return The node pointer.
+ NodePtr Leak()
+ {
+ return fFile;
+ }
+
+ /// @brief Leak MIME.
+ /// @return The MIME.
+ Char* MIME() noexcept
+ {
+ return const_cast<Char*>(fMime);
+ }
+
+ enum
+ {
+ kFileMgrRestrictRead,
+ kFileMgrRestrictReadBinary,
+ kFileMgrRestrictWrite,
+ kFileMgrRestrictWriteBinary,
+ kFileMgrRestrictReadWrite,
+ kFileMgrRestrictReadWriteBinary,
+ };
+
+ private:
+ NodePtr fFile{nullptr};
+ Int32 fFileRestrict{kFileMgrRestrictReadBinary};
+ const Char* fMime{kFileMimeGeneric};
+ };
+
+ using FileStreamUTF8 = FileStream<Char>;
+ using FileStreamUTF16 = FileStream<WideChar>;
+
+ typedef UInt64 CursorType;
+
+ inline static const auto kRestrictStrLen = 8U;
+
+ /// @brief restrict information about the file descriptor.
+ struct FileRestrictKind final
+ {
+ Char fRestrict[kRestrictStrLen];
+ Int32 fMappedTo;
+ };
+
+ /// @brief constructor
+ template <typename Encoding, typename Class>
+ inline FileStream<Encoding, Class>::FileStream(const Encoding* path,
+ const Encoding* restrict_type)
+ : fFile(Class::GetMounted()->Open(path, restrict_type))
+ {
+ const SizeT kRestrictCount = kRestrictMax;
+ const FileRestrictKind kRestrictList[] = {
+ {
+ .fRestrict = kRestrictR,
+ .fMappedTo = kFileMgrRestrictRead,
+ },
+ {
+ .fRestrict = kRestrictRB,
+ .fMappedTo = kFileMgrRestrictReadBinary,
+ },
+ {
+ .fRestrict = kRestrictRWB,
+ .fMappedTo = kFileMgrRestrictReadWriteBinary,
+ },
+ {
+ .fRestrict = kRestrictW,
+ .fMappedTo = kFileMgrRestrictWrite,
+ },
+ {
+ .fRestrict = kRestrictWB,
+ .fMappedTo = kFileMgrRestrictReadWrite,
+ }};
+
+ for (SizeT index = 0; index < kRestrictCount; ++index)
+ {
+ if (rt_string_cmp(restrict_type, kRestrictList[index].fRestrict,
+ rt_string_len(kRestrictList[index].fRestrict)) == 0)
+ {
+ fFileRestrict = kRestrictList[index].fMappedTo;
+ break;
+ }
+ }
+
+ kcout << "new file: " << path << ".\r";
+ }
+
+ /// @brief destructor of the file stream.
+ template <typename Encoding, typename Class>
+ inline FileStream<Encoding, Class>::~FileStream()
+ {
+ mm_delete_heap(fFile);
+ }
+} // namespace Kernel
+
+#endif // ifndef INC_FILEMGR_H
diff --git a/dev/Kernel/KernelKit/HardwareThreadScheduler.h b/dev/Kernel/KernelKit/HardwareThreadScheduler.h
new file mode 100644
index 00000000..81a137e1
--- /dev/null
+++ b/dev/Kernel/KernelKit/HardwareThreadScheduler.h
@@ -0,0 +1,149 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __INC_MP_MANAGER_H__
+#define __INC_MP_MANAGER_H__
+
+#include <ArchKit/ArchKit.h>
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/Ref.h>
+
+/// @note Last Rev Sun 28 Jul CET 2024
+/// @note Last Rev Thu, Aug 1, 2024 9:07:38 AM
+
+#define kMaxAPInsideSched (8U)
+
+namespace Kernel
+{
+ class HardwareThread;
+ class HardwareThreadScheduler;
+
+ using ThreadID = UInt32;
+
+ enum ThreadKind
+ {
+ kAPSystemReserved, // System reserved thread, well user can't use it
+ kAPStandard, // user thread, cannot be used by Kernel
+ kAPFallback, // fallback thread, cannot be used by user if not clear or
+ // used by Kernel.
+ kAPBoot, // The core we booted from, the mama.
+ kInvalidAP,
+ kAPCount,
+ };
+
+ typedef enum ThreadKind ThreadKind;
+ typedef ThreadID ThreadID;
+
+ /***********************************************************************************/
+ ///
+ /// \name HardwareThread
+ /// \brief Abstraction over the CPU's core, used to run processes or threads.
+ ///
+ /***********************************************************************************/
+
+ class HardwareThread final
+ {
+ public:
+ explicit HardwareThread();
+ ~HardwareThread();
+
+ public:
+ ZKA_COPY_DEFAULT(HardwareThread)
+
+ public:
+ operator bool();
+
+ public:
+ void Wake(const bool wakeup = false) noexcept;
+ void Busy(const bool busy = false) noexcept;
+
+ public:
+ bool Switch(VoidPtr image, Ptr8 stack_ptr, HAL::StackFramePtr frame, const ThreadID& pid);
+ bool IsWakeup() noexcept;
+
+ public:
+ HAL::StackFramePtr StackFrame() noexcept;
+ const ThreadKind& Kind() noexcept;
+ bool IsBusy() noexcept;
+ const ThreadID& ID() noexcept;
+
+ private:
+ HAL::StackFramePtr fStack{nullptr};
+ ThreadKind fKind{ThreadKind::kAPStandard};
+ ThreadID fID{0};
+ ThreadID fSourcePID{0};
+ Bool fWakeup{NO};
+ Bool fBusy{NO};
+ UInt64 fPTime{0};
+
+ private:
+ friend class HardwareThreadScheduler;
+ friend class UserProcessHelper;
+ };
+
+ ///
+ /// \name HardwareThreadScheduler
+ /// \brief Class to manage the thread scheduling.
+ ///
+
+ class HardwareThreadScheduler final : public ISchedulable
+ {
+ private:
+ friend class UserProcessHelper;
+
+ public:
+ explicit HardwareThreadScheduler();
+ ~HardwareThreadScheduler();
+ ZKA_COPY_DEFAULT(HardwareThreadScheduler);
+
+ public:
+ HAL::StackFramePtr Leak() noexcept;
+
+ public:
+ Ref<HardwareThread*> operator[](const SizeT& idx);
+ bool operator!() noexcept;
+ operator bool() noexcept;
+
+ const Bool IsUser() override
+ {
+ return Yes;
+ }
+
+ const Bool IsKernel() override
+ {
+ return No;
+ }
+
+ const Bool HasMP() override
+ {
+ return kHandoverHeader->f_HardwareTables.f_MultiProcessingEnabled;
+ }
+
+ public:
+ /// @brief Shared instance of the MP Mgr.
+ /// @return the reference to the mp manager class.
+ STATIC HardwareThreadScheduler& The();
+
+ public:
+ /// @brief Returns the amount of threads present in the system.
+ /// @returns SizeT the amount of cores present.
+ SizeT Capacity() noexcept;
+
+ private:
+ Array<HardwareThread, kMaxAPInsideSched> fThreadList;
+ ThreadID fCurrentThread{0};
+ };
+
+ /// @brief wakes up thread.
+ /// wakes up thread from hang.
+ Void mp_wakeup_thread(HAL::StackFramePtr stack);
+
+ /// @brief makes thread sleep.
+ /// hooks and hangs thread to prevent code from executing.
+ Void mp_hang_thread(HAL::StackFramePtr stack);
+} // namespace Kernel
+
+#endif // !__INC_MP_MANAGER_H__
diff --git a/dev/Kernel/KernelKit/Heap.h b/dev/Kernel/KernelKit/Heap.h
new file mode 100644
index 00000000..ac6cac41
--- /dev/null
+++ b/dev/Kernel/KernelKit/Heap.h
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef INC_KERNEL_HEAP_H
+#define INC_KERNEL_HEAP_H
+
+/// @date 30/01/24
+/// @file: Heap.h
+/// @brief: heap allocation support.
+
+#include <NewKit/KernelPanic.h>
+#include <KernelKit/LPC.h>
+#include <Hints/CompilerHint.h>
+
+namespace Kernel
+{
+ /// @brief Declare pointer as free.
+ /// @param heap_ptr the pointer.
+ /// @return a status code regarding the deallocation.
+ Int32 mm_delete_heap(VoidPtr heap_ptr);
+
+ /// @brief Declare a new size for heap_ptr.
+ /// @param heap_ptr the pointer.
+ /// @return unsupported always returns nullptr.
+ VoidPtr mm_realloc_heap(VoidPtr heap_ptr, SizeT new_sz);
+
+ /// @brief Check if pointer is a valid Kernel pointer.
+ /// @param heap_ptr the pointer
+ /// @return if it exists it returns true.
+ Boolean mm_is_valid_heap(VoidPtr heap_ptr);
+
+ /// @brief Allocate chunk of memory.
+ /// @param sz Size of pointer
+ /// @param wr Read Write bit.
+ /// @param user User enable bit.
+ /// @return The newly allocated pointer, or nullptr.
+ VoidPtr mm_new_heap(const SizeT sz, const Bool wr, const Bool user);
+
+ /// @brief Protect the heap with a CRC value.
+ /// @param heap_ptr pointer.
+ /// @return if it valid: point has crc now., otherwise fail.
+ Boolean mm_protect_heap(VoidPtr heap_ptr);
+
+ /// @brief Makes a Kernel page.
+ /// @param heap_ptr the page pointer.
+ /// @return status code
+ Int32 mm_make_page(VoidPtr heap_ptr);
+
+ /// @brief Overwrites and set the flags of a heap header.
+ /// @param heap_ptr the pointer to update.
+ /// @param flags the flags to set.
+ Int32 mm_make_flags(VoidPtr heap_ptr, UInt64 flags);
+
+ /// @brief Gets the flags of a heap header.
+ /// @param heap_ptr the pointer to get.
+ UInt64 mm_get_flags(VoidPtr heap_ptr);
+
+ /// @brief Allocate C++ class.
+ /// @param cls The class to allocate.
+ /// @param args The args to pass.
+ template <typename T, typename... Args>
+ inline Void mm_new_class(_Input _Output T** cls, _Input Args&&... args)
+ {
+ if (*cls)
+ {
+ err_global_get() = Kernel::kErrorInvalidData;
+ return;
+ }
+
+ *cls = new T(move(args)...);
+ }
+
+ /// @brief Delete and nullify C++ class.
+ /// @param cls The class to delete.
+ template <typename T>
+ inline Void mm_delete_class(_Input _Output T** cls)
+ {
+ delete *cls;
+ *cls = nullptr;
+ }
+} // namespace Kernel
+
+#endif // !INC_KERNEL_HEAP_H
diff --git a/dev/Kernel/KernelKit/IDylibObject.h b/dev/Kernel/KernelKit/IDylibObject.h
new file mode 100644
index 00000000..a7602be6
--- /dev/null
+++ b/dev/Kernel/KernelKit/IDylibObject.h
@@ -0,0 +1,48 @@
+/*
+ * ========================================================
+ *
+ * Kernel
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <CompilerKit/CompilerKit.h>
+
+#define ZKA_DLL_OBJECT : public IDylibObject
+
+namespace Kernel
+{
+ /// @brief DLL class object. A handle to a shared library.
+ class IDylibObject
+ {
+ public:
+ explicit IDylibObject() = default;
+ virtual ~IDylibObject() = default;
+
+ struct DLL_TRAITS final
+ {
+ VoidPtr ImageObject{nullptr};
+ VoidPtr ImageEntrypointOffset{nullptr};
+
+ Bool IsValid()
+ {
+ return ImageObject && ImageEntrypointOffset;
+ }
+ };
+
+ ZKA_COPY_DEFAULT(IDylibObject);
+
+ virtual DLL_TRAITS** GetAddressOf() = 0;
+ virtual DLL_TRAITS* Get() = 0;
+
+ virtual Void Mount(DLL_TRAITS* to_mount) = 0;
+ virtual Void Unmount() = 0;
+ };
+
+ /// @brief Pure implementation, missing method/function handler.
+ EXTERN_C void __zka_pure_call(void);
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/IPEFDylibObject.h b/dev/Kernel/KernelKit/IPEFDylibObject.h
new file mode 100644
index 00000000..68493c86
--- /dev/null
+++ b/dev/Kernel/KernelKit/IPEFDylibObject.h
@@ -0,0 +1,106 @@
+/*
+ * ========================================================
+ *
+ * Kernel
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#ifndef __KERNELKIT_SHARED_OBJECT_H__
+#define __KERNELKIT_SHARED_OBJECT_H__
+
+#include <KernelKit/PEF.h>
+#include <NewKit/Defines.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/IDylibObject.h>
+
+namespace Kernel
+{
+ /**
+ * @brief Shared Library class
+ * Load library from this class
+ */
+ class IPEFDylibObject final ZKA_DLL_OBJECT
+ {
+ public:
+ explicit IPEFDylibObject() = default;
+ ~IPEFDylibObject() = default;
+
+ public:
+ ZKA_COPY_DEFAULT(IPEFDylibObject);
+
+ private:
+ DLL_TRAITS* fMounted{nullptr};
+
+ public:
+ DLL_TRAITS** GetAddressOf()
+ {
+ return &fMounted;
+ }
+
+ DLL_TRAITS* Get()
+ {
+ return fMounted;
+ }
+
+ public:
+ void Mount(DLL_TRAITS* to_mount)
+ {
+ if (!to_mount || !to_mount->ImageObject)
+ return;
+
+ fMounted = to_mount;
+
+ if (fLoader && to_mount)
+ {
+ delete fLoader;
+ fLoader = nullptr;
+ }
+
+ if (!fLoader)
+ {
+ fLoader = new PEFLoader(fMounted->ImageObject);
+ }
+ }
+
+ void Unmount()
+ {
+ if (fMounted)
+ fMounted = nullptr;
+ };
+
+ template <typename SymbolType>
+ SymbolType Load(const Char* symbol_name, SizeT len, Int32 kind)
+ {
+ if (symbol_name == nullptr || *symbol_name == 0)
+ return nullptr;
+ if (len > kPathLen || len < 1)
+ return nullptr;
+
+ auto ret =
+ reinterpret_cast<SymbolType>(fLoader->FindSymbol(symbol_name, kind));
+
+ if (!ret)
+ {
+ if (kind == kPefCode)
+ return (VoidPtr)&__zka_pure_call;
+
+ return nullptr;
+ }
+
+ return ret;
+ }
+
+ private:
+ PEFLoader* fLoader{nullptr};
+ };
+
+ typedef IPEFDylibObject* IDylibRef;
+
+ EXTERN_C IDylibRef rtl_init_dylib(UserProcess& header);
+ EXTERN_C Void rtl_fini_dylib(UserProcess& header, IDylibRef lib, Bool* successful);
+} // namespace Kernel
+
+#endif /* ifndef __KERNELKIT_SHARED_OBJECT_H__ */
diff --git a/dev/Kernel/KernelKit/LPC.h b/dev/Kernel/KernelKit/LPC.h
new file mode 100644
index 00000000..434a3efc
--- /dev/null
+++ b/dev/Kernel/KernelKit/LPC.h
@@ -0,0 +1,70 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+/// @file LPC.h
+/// @brief Local Process Codes.
+
+#define err_local_ok() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode() == Kernel::kErrorSuccess)
+#define err_local_fail() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode() != Kernel::kErrorSuccess)
+#define err_local_get() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode())
+
+#define err_global_ok() (Kernel::kErrorLocalNumber == Kernel::kErrorSuccess)
+#define err_global_fail() (Kernel::kErrorLocalNumber != Kernel::kErrorSuccess)
+#define err_global_get() (Kernel::kErrorLocalNumber)
+
+namespace Kernel
+{
+ typedef Int32 HError;
+
+ inline HError kErrorLocalNumber = 0UL;
+
+ inline constexpr HError kErrorSuccess = 0;
+ inline constexpr HError kErrorExecutable = 33;
+ inline constexpr HError kErrorExecutableLib = 34;
+ inline constexpr HError kErrorFileNotFound = 35;
+ inline constexpr HError kErrorDirectoryNotFound = 36;
+ inline constexpr HError kErrorDiskReadOnly = 37;
+ inline constexpr HError kErrorDiskIsFull = 38;
+ inline constexpr HError kErrorProcessFault = 39;
+ inline constexpr HError kErrorSocketHangUp = 40;
+ inline constexpr HError kErrorThreadLocalStorage = 41;
+ inline constexpr HError kErrorMath = 42;
+ inline constexpr HError kErrorNoNetwork = 43;
+ inline constexpr HError kErrorHeapOutOfMemory = 44;
+ inline constexpr HError kErrorNoSuchDisk = 45;
+ inline constexpr HError kErrorFileExists = 46;
+ inline constexpr HError kErrorFormatFailed = 47;
+ inline constexpr HError kErrorNetworkTimeout = 48;
+ inline constexpr HError kErrorInternal = 49;
+ inline constexpr HError kErrorForkAlreadyExists = 50;
+ inline constexpr HError kErrorOutOfTeamSlot = 51;
+ inline constexpr HError kErrorHeapNotPresent = 52;
+ inline constexpr HError kErrorNoEntrypoint = 53;
+ inline constexpr HError kErrorDiskIsCorrupted = 54;
+ inline constexpr HError kErrorDisk = 55;
+ inline constexpr HError kErrorInvalidData = 56;
+ inline constexpr HError kErrorAsync = 57;
+ inline constexpr HError kErrorNonBlocking = 58;
+ inline constexpr HError kErrorIPC = 59;
+ inline constexpr HError kErrorSign = 60;
+ inline constexpr HError kErrorInvalidCreds = 61;
+ inline constexpr HError kErrorCDTrayBroken = 62;
+ inline constexpr HError kErrorUnrecoverableDisk = 63;
+ inline constexpr HError kErrorFileLocked = 64;
+ inline constexpr HError kErrorUnimplemented = 0;
+
+ /// @brief Raises a bug check stop code.
+ Void err_bug_check_raise(Void) noexcept;
+
+ /// @brief Does a system wide bug check.
+ /// @param void no params are needed.
+ /// @return if error-free: false, otherwise true.
+ Boolean err_bug_check(Void) noexcept;
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/LoaderInterface.h b/dev/Kernel/KernelKit/LoaderInterface.h
new file mode 100644
index 00000000..29a1b928
--- /dev/null
+++ b/dev/Kernel/KernelKit/LoaderInterface.h
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <Hints/CompilerHint.h>
+#include <NewKit/Defines.h>
+#include <NewKit/ErrorOr.h>
+
+namespace Kernel
+{
+ /// @brief This interface is used to make loader contracts (MSCOFF, PEF).
+ /// @author @Amlal-El-Mahrouss
+ class LoaderInterface
+ {
+ public:
+ explicit LoaderInterface() = default;
+ virtual ~LoaderInterface() = default;
+
+ ZKA_COPY_DEFAULT(LoaderInterface);
+
+ public:
+ virtual _Output ErrorOr<VoidPtr> GetBlob() = 0;
+ virtual _Output const Char* AsString() = 0;
+ virtual _Output const Char* MIME() = 0;
+ virtual _Output const Char* Path() = 0;
+ virtual _Output ErrorOr<VoidPtr> FindStart() = 0;
+ virtual _Output VoidPtr FindSymbol(_Input const Char* name, _Input Int32 kind) = 0;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/LockDelegate.h b/dev/Kernel/KernelKit/LockDelegate.h
new file mode 100644
index 00000000..2ee4bb25
--- /dev/null
+++ b/dev/Kernel/KernelKit/LockDelegate.h
@@ -0,0 +1,69 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Atom.h>
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ enum
+ {
+ kLockDone = 200,
+ kLockTimedOut,
+ };
+
+ /// @brief Lock condition pointer.
+ typedef Boolean* LockPtr;
+
+ /// @brief Locking delegate class, hangs until limit.
+ /// @tparam N the amount of cycles to wait.
+ template <SizeT N>
+ class LockDelegate final
+ {
+ public:
+ LockDelegate() = delete;
+
+ public:
+ explicit LockDelegate(LockPtr expr)
+ {
+ auto spin = 0U;
+
+ while (spin < N)
+ {
+ if (*expr)
+ {
+ fLockStatus | kLockDone;
+ break;
+ }
+
+ ++spin;
+ }
+
+ if (spin > N)
+ fLockStatus | kLockTimedOut;
+ }
+
+ ~LockDelegate() = default;
+
+ LockDelegate& operator=(const LockDelegate&) = delete;
+ LockDelegate(const LockDelegate&) = delete;
+
+ bool Done()
+ {
+ return fLockStatus[kLockDone] == kLockDone;
+ }
+
+ bool HasTimedOut()
+ {
+ return fLockStatus[kLockTimedOut] != kLockTimedOut;
+ }
+
+ private:
+ Atom<UInt> fLockStatus;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/MSDOS.h b/dev/Kernel/KernelKit/MSDOS.h
new file mode 100644
index 00000000..3da68dae
--- /dev/null
+++ b/dev/Kernel/KernelKit/MSDOS.h
@@ -0,0 +1,52 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: MSDOS.h
+ Purpose: MS-DOS header for Kernel.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+
+------------------------------------------- */
+
+#ifndef __MSDOS_EXEC__
+#define __MSDOS_EXEC__
+
+#include <KernelKit/PE.h>
+#include <NewKit/Defines.h>
+
+// Last Rev
+// Sat Feb 24 CET 2024
+
+#define kMagMz0 'M'
+#define kMagMz1 'Z'
+
+typedef Kernel::UInt32 DosWord;
+typedef Kernel::Long DosLong;
+
+typedef struct _DosHeader
+{
+ Kernel::UInt8 eMagic[2];
+ DosWord eMagLen;
+ DosWord ePagesCount;
+ DosWord eCrlc;
+ DosWord eCParHdr;
+ DosWord eMinAlloc;
+ DosWord eMaxAlloc;
+ DosWord eStackSeg;
+ DosWord eStackPtr;
+ DosWord eChksum;
+ DosWord eIp;
+ DosWord eCs;
+ DosWord eLfarlc;
+ DosWord eOvno;
+ DosWord eRes[4];
+ DosWord eOemid;
+ DosWord eOeminfo;
+ DosWord eRes2[10];
+ DosLong eLfanew;
+} DosHeader, *DosHeaderPtr;
+
+#endif /* ifndef __MSDOS_EXEC__ */
diff --git a/dev/Kernel/KernelKit/PCI/DMA.h b/dev/Kernel/KernelKit/PCI/DMA.h
new file mode 100644
index 00000000..0ad2c344
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/DMA.h
@@ -0,0 +1,81 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DeviceMgr.h>
+#include <KernelKit/PCI/Device.h>
+#include <NewKit/Array.h>
+#include <NewKit/OwnPtr.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ enum class DmaKind
+ {
+ PCI, // Bus mastering is required to be turned on. Basiaclly a request
+ // control system. 64-Bit access depends on the PAE bit and the device
+ // (if Double Address Cycle is available)
+ ISA, // Four DMA channels 0-3; 8 bit transfers and only a megabyte of RAM.
+ Invalid,
+ };
+
+ class DMAWrapper final
+ {
+ public:
+ explicit DMAWrapper() = delete;
+
+ public:
+ explicit DMAWrapper(nullPtr) = delete;
+ explicit DMAWrapper(voidPtr Ptr, DmaKind Kind = DmaKind::PCI)
+ : fAddress(Ptr), fKind(Kind)
+ {
+ }
+
+ public:
+ DMAWrapper& operator=(voidPtr Ptr);
+
+ public:
+ DMAWrapper& operator=(const DMAWrapper&) = default;
+ DMAWrapper(const DMAWrapper&) = default;
+
+ public:
+ ~DMAWrapper() = default;
+
+ template <class T>
+ T* operator->();
+
+ template <class T>
+ T* Get(const UIntPtr off = 0);
+
+ public:
+ operator bool();
+ bool operator!();
+
+ public:
+ bool Write(const UIntPtr& bit, const UIntPtr& offset);
+ UIntPtr Read(const UIntPtr& offset);
+ Boolean Check(UIntPtr offset) const;
+
+ public:
+ UIntPtr operator[](const UIntPtr& offset);
+
+ private:
+ voidPtr fAddress{nullptr};
+ DmaKind fKind{DmaKind::Invalid};
+
+ private:
+ friend class DMAFactory;
+ };
+
+ class DMAFactory final
+ {
+ public:
+ static OwnPtr<IOBuf<Char*>> Construct(OwnPtr<DMAWrapper>& dma);
+ };
+} // namespace Kernel
+
+#include <KernelKit/PCI/DMA.inl>
diff --git a/dev/Kernel/KernelKit/PCI/DMA.inl b/dev/Kernel/KernelKit/PCI/DMA.inl
new file mode 100644
index 00000000..49c950a6
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/DMA.inl
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+namespace Kernel
+{
+ template <class T>
+ T* DMAWrapper::operator->()
+ {
+ return fAddress;
+ }
+
+ template <class T>
+ T* DMAWrapper::Get(const UIntPtr offset)
+ {
+ return reinterpret_cast<T*>((UIntPtr)fAddress + offset);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/PCI/Database.h b/dev/Kernel/KernelKit/PCI/Database.h
new file mode 100644
index 00000000..6cf27521
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/Database.h
@@ -0,0 +1,38 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+#pragma once
+
+#include <KernelKit/PCI/Device.h>
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ namespace Types
+ {
+ // https://wiki.osdev.org/PCI
+ enum class PciDeviceKind : UChar
+ {
+ MassStorageController = 0x1,
+ NetworkController = 0x2,
+ DisplayController = 0x3,
+ MultimediaController = 0x4,
+ MemoryController = 0x5,
+ Bridge = 0x6,
+ CommunicationController = 0x7,
+ GenericSystemPeripheral = 0x8,
+ InputDeviceController = 0x9,
+ DockingStation = 0xa,
+ Processor = 0xb,
+ SerialBusController = 0xc,
+ WirelessController = 0xd,
+ IntelligentController = 0xe,
+ SatelliteCommunicationsController = 0xf,
+ CoProcessor = 0x40,
+ Unassgined = 0xf,
+ Invalid = Unassgined,
+ };
+ } // namespace Types
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/PCI/Device.h b/dev/Kernel/KernelKit/PCI/Device.h
new file mode 100644
index 00000000..75a84308
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/Device.h
@@ -0,0 +1,80 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel::PCI
+{
+ enum class PciConfigKind : UShort
+ {
+ ConfigAddress = 0xCF8,
+ ConfigData = 0xCFC,
+ Invalid = 0xFFF
+ };
+
+ class Device final
+ {
+ public:
+ Device() = default;
+
+ public:
+ explicit Device(UShort bus, UShort device, UShort function, UInt32 bar);
+
+ Device& operator=(const Device&) = default;
+
+ Device(const Device&) = default;
+
+ ~Device();
+
+ public:
+ UInt Read(UInt bar, Size szData);
+ void Write(UInt bar, UIntPtr data, Size szData);
+
+ public:
+ operator bool();
+
+ public:
+ template <typename T>
+ UInt Read(UInt bar)
+ {
+ static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported");
+ return Read(bar, sizeof(T));
+ }
+
+ template <typename T>
+ void Write(UInt bar, UIntPtr data)
+ {
+ static_assert(sizeof(T) <= 4, "64-bit PCI addressing is unsupported");
+ Write(bar, data, sizeof(T));
+ }
+
+ public:
+ UShort DeviceId();
+ UShort VendorId();
+ UShort InterfaceId();
+ UChar Class();
+ UChar Subclass();
+ UChar ProgIf();
+ UChar HeaderType();
+ UIntPtr Bar(UInt32 bar_in);
+
+ public:
+ void EnableMmio(UInt32 bar_in);
+ void BecomeBusMaster(UInt32 bar_in); // for PCI-DMA, PC-DMA does not need that.
+
+ UShort Vendor();
+
+ private:
+ UShort fBus;
+ UShort fDevice;
+ UShort fFunction;
+ UInt32 fBar;
+ };
+} // namespace Kernel::PCI
+
+EXTERN_C void NewOSPCISetCfgTarget(Kernel::UInt bar);
+EXTERN_C Kernel::UInt NewOSPCIReadRaw(Kernel::UInt bar);
diff --git a/dev/Kernel/KernelKit/PCI/Express.h b/dev/Kernel/KernelKit/PCI/Express.h
new file mode 100644
index 00000000..f8b24289
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/Express.h
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define PCI_EXPRESS_BUS_COUNT (4096)
diff --git a/dev/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl b/dev/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl
new file mode 100644
index 00000000..7eb5b405
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/IO-Impl-AMD64.inl
@@ -0,0 +1,54 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: IO-Impl-AMD64.h
+ Purpose: I/O for AMD64.
+
+ Revision History:
+
+ 30/01/24: Add file. (amlel)
+ 02/02/24: Update I/O routines. (amlel)
+
+------------------------------------------- */
+
+namespace Kernel
+{
+ template <SizeT Sz>
+ template <typename T>
+ T IOArray<Sz>::In(SizeT index)
+ {
+ switch (sizeof(T))
+ {
+#ifdef __ZKA_AMD64__
+ case 4:
+ return HAL::rt_in32(fPorts[index].Leak());
+ case 2:
+ return HAL::rt_in16(fPorts[index].Leak());
+ case 1:
+ return HAL::rt_in8(fPorts[index].Leak());
+#endif
+ default:
+ return 0xFFFF;
+ }
+ }
+
+ template <SizeT Sz>
+ template <typename T>
+ void IOArray<Sz>::Out(SizeT index, T value)
+ {
+ switch (sizeof(T))
+ {
+#ifdef __ZKA_AMD64__
+ case 4:
+ HAL::rt_out32(fPorts[index].Leak(), value);
+ case 2:
+ HAL::rt_out16(fPorts[index].Leak(), value);
+ case 1:
+ HAL::rt_out8(fPorts[index].Leak(), value);
+#endif
+ default:
+ break;
+ }
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/PCI/IO.h b/dev/Kernel/KernelKit/PCI/IO.h
new file mode 100644
index 00000000..b947a739
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/IO.h
@@ -0,0 +1,59 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <ArchKit/ArchKit.h>
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ template <SizeT Sz>
+ class IOArray final
+ {
+ public:
+ IOArray() = delete;
+
+ IOArray(nullPtr) = delete;
+
+ explicit IOArray(Array<UShort, Sz>& ports)
+ : fPorts(ports)
+ {
+ }
+ ~IOArray()
+ {
+ }
+
+ IOArray& operator=(const IOArray&) = default;
+
+ IOArray(const IOArray&) = default;
+
+ operator bool()
+ {
+ return !fPorts.Empty();
+ }
+
+ public:
+ template <typename T>
+ T In(SizeT index);
+
+ template <typename T>
+ void Out(SizeT index, T value);
+
+ private:
+ Array<UShort, Sz> fPorts;
+ };
+
+ using IOArray16 = IOArray<16>;
+} // namespace Kernel
+
+#ifdef __x86_64__
+#include <KernelKit/PCI/IO-Impl-AMD64.inl>
+#else
+#error Please provide platform specific code for the I/O
+#endif // ifdef __x86_64__
diff --git a/dev/Kernel/KernelKit/PCI/Iterator.h b/dev/Kernel/KernelKit/PCI/Iterator.h
new file mode 100644
index 00000000..012d5f00
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/Iterator.h
@@ -0,0 +1,43 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __PCI_ITERATOR_H__
+#define __PCI_ITERATOR_H__
+
+#include <KernelKit/PCI/Database.h>
+#include <KernelKit/PCI/Device.h>
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+#define ZKA_BUS_COUNT (256)
+#define ZKA_DEVICE_COUNT (33)
+#define ZKA_FUNCTION_COUNT (8)
+
+namespace Kernel::PCI
+{
+ class Iterator final
+ {
+ public:
+ Iterator() = delete;
+
+ public:
+ explicit Iterator(const Types::PciDeviceKind& deviceType);
+
+ Iterator& operator=(const Iterator&) = default;
+ Iterator(const Iterator&) = default;
+
+ ~Iterator();
+
+ public:
+ Ref<PCI::Device> operator[](const Size& sz);
+
+ private:
+ Array<PCI::Device, ZKA_BUS_COUNT> fDevices;
+ };
+} // namespace Kernel::PCI
+
+#endif // __PCI_ITERATOR_H__
diff --git a/dev/Kernel/KernelKit/PCI/PCI.h b/dev/Kernel/KernelKit/PCI/PCI.h
new file mode 100644
index 00000000..230ec6c6
--- /dev/null
+++ b/dev/Kernel/KernelKit/PCI/PCI.h
@@ -0,0 +1,59 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define cPCIConfigAddressPort (0xCF8)
+#define cPCIConfigDataPort (0xCFC)
+
+#define cPCIDeviceCount (32)
+#define cPCIFuncCount (8)
+#define cPCIBusCount (255)
+
+namespace Kernel::PCI
+{
+ // model
+ struct DeviceHeader
+ {
+ UInt16 VendorId;
+ UInt16 DeviceId;
+ UInt8 Command;
+ UInt8 Status;
+ UInt8 RevisionId;
+ UInt8 ProgIf;
+ UInt8 SubClass;
+ UInt8 Class;
+ UInt8 CacheLineSz;
+ UInt8 LatencyTimer;
+ UInt8 HeaderType;
+ UInt8 Bist;
+ UInt8 Bus;
+ UInt8 Device;
+ UInt8 Function;
+ };
+
+ namespace Detail
+ {
+ class BAR
+ {
+ public:
+ UIntPtr BAR;
+ SizeT Size;
+ };
+ } // namespace Detail
+
+ class BAR
+ {
+ public:
+ Detail::BAR BAR1;
+ Detail::BAR BAR2;
+ Detail::BAR BAR3;
+ Detail::BAR BAR4;
+ Detail::BAR BAR5;
+ };
+} // namespace Kernel::PCI
diff --git a/dev/Kernel/KernelKit/PE.h b/dev/Kernel/KernelKit/PE.h
new file mode 100644
index 00000000..90406a5d
--- /dev/null
+++ b/dev/Kernel/KernelKit/PE.h
@@ -0,0 +1,143 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: PE.h
+ Purpose: Portable Executable for Kernel.
+
+ Revision History:
+
+ 30/01/24: Added file (amlel)
+
+------------------------------------------- */
+
+#ifndef __KERNELKIT_INC_PE_H__
+#define __KERNELKIT_INC_PE_H__
+
+#include <NewKit/Defines.h>
+
+#define kPeSignature 0x00004550
+
+#define kPeDLLBase 0x4000000
+#define kPeEXEBase 0x1000000
+
+#define kPeMagic32 0x010b
+#define kPeMagic64 0x020b
+
+#define kPeMachineAMD64 0x8664
+#define kPeMachineARM64 0xaa64
+
+typedef struct LDR_EXEC_HEADER final
+{
+ Kernel::UInt32 mSignature;
+ Kernel::UInt16 mMachine;
+ Kernel::UInt16 mNumberOfSections;
+ Kernel::UInt32 mTimeDateStamp;
+ Kernel::UInt32 mPointerToSymbolTable;
+ Kernel::UInt32 mNumberOfSymbols;
+ Kernel::UInt16 mSizeOfOptionalHeader;
+ Kernel::UInt16 mCharacteristics;
+} LDR_EXEC_HEADER, *LDR_EXEC_HEADER_PTR;
+
+typedef struct LDR_OPTIONAL_HEADER final
+{
+ Kernel::UInt16 mMagic; // 0x010b - PE32, 0x020b - PE32+ (64 bit)
+ Kernel::UInt8 mMajorLinkerVersion;
+ Kernel::UInt8 mMinorLinkerVersion;
+ Kernel::UInt32 mSizeOfCode;
+ Kernel::UInt32 mSizeOfInitializedData;
+ Kernel::UInt32 mSizeOfUninitializedData;
+ Kernel::UInt32 mAddressOfEntryPoint;
+ Kernel::UInt32 mBaseOfCode;
+ Kernel::UInt32 mBaseOfData;
+ Kernel::UInt32 mImageBase;
+ Kernel::UInt32 mSectionAlignment;
+ Kernel::UInt32 mFileAlignment;
+ Kernel::UInt16 mMajorOperatingSystemVersion;
+ Kernel::UInt16 mMinorOperatingSystemVersion;
+ Kernel::UInt16 mMajorImageVersion;
+ Kernel::UInt16 mMinorImageVersion;
+ Kernel::UInt16 mMajorSubsystemVersion;
+ Kernel::UInt16 mMinorSubsystemVersion;
+ Kernel::UInt32 mWin32VersionValue;
+ Kernel::UInt32 mSizeOfImage;
+ Kernel::UInt32 mSizeOfHeaders;
+ Kernel::UInt32 mCheckSum;
+ Kernel::UInt16 mSubsystem;
+ Kernel::UInt16 mDllCharacteristics;
+ Kernel::UInt32 mSizeOfStackReserve;
+ Kernel::UInt32 mSizeOfStackCommit;
+ Kernel::UInt32 mSizeOfHeapReserve;
+ Kernel::UInt32 mSizeOfHeapCommit;
+ Kernel::UInt32 mLoaderFlags;
+ Kernel::UInt32 mNumberOfRvaAndSizes;
+} LDR_OPTIONAL_HEADER, *LDR_OPTIONAL_HEADER_PTR;
+
+typedef struct LDR_SECTION_HEADER final
+{
+ Kernel::Char mName[8];
+ Kernel::UInt32 mVirtualSize;
+ Kernel::UInt32 mVirtualAddress;
+ Kernel::UInt32 mSizeOfRawData;
+ Kernel::UInt32 mPointerToRawData;
+ Kernel::UInt32 mPointerToRelocations;
+ Kernel::UInt32 mPointerToLineNumbers;
+ Kernel::UInt16 mNumberOfRelocations;
+ Kernel::UInt16 mNumberOfLinenumbers;
+ Kernel::UInt32 mCharacteristics;
+} LDR_SECTION_HEADER, *LDR_SECTION_HEADER_PTR;
+
+enum kExecDataDirParams
+{
+ kExecExport,
+ kExecImport,
+ kExecInvalid,
+ kExecCount,
+};
+
+typedef struct LDR_EXPORT_DIRECTORY
+{
+ Kernel::UInt32 mCharacteristics;
+ Kernel::UInt32 mTimeDateStamp;
+ Kernel::UInt16 mMajorVersion;
+ Kernel::UInt16 mMinorVersion;
+ Kernel::UInt32 mName;
+ Kernel::UInt32 mBase;
+ Kernel::UInt32 mNumberOfFunctions;
+ Kernel::UInt32 mNumberOfNames;
+ Kernel::UInt32 mAddressOfFunctions; // export table rva
+ Kernel::UInt32 mAddressOfNames;
+ Kernel::UInt32 mAddressOfNameOrdinal; // ordinal table rva
+} LDR_EXPORT_DIRECTORY, *LDR_EXPORT_DIRECTORY_PTR;
+
+typedef struct LDR_IMPORT_DIRECTORY
+{
+ union {
+ Kernel::UInt32 mCharacteristics;
+ Kernel::UInt32 mOriginalFirstThunk;
+ };
+ Kernel::UInt32 mTimeDateStamp;
+ Kernel::UInt32 mForwarderChain;
+ Kernel::UInt32 mNameRva;
+ Kernel::UInt32 mThunkTableRva;
+} LDR_IMPORT_DIRECTORY, *LDR_IMPORT_DIRECTORY_PTR;
+
+typedef struct LDR_DATA_DIRECTORY
+{
+ Kernel::UInt32 VirtualAddress;
+ Kernel::UInt32 Size;
+} LDR_DATA_DIRECTORY, *LDR_DATA_DIRECTORY_PTR;
+
+typedef struct LDR_IMAGE_HEADER
+{
+ LDR_EXEC_HEADER mHeader;
+ LDR_OPTIONAL_HEADER mOptHdr;
+} LDR_IMAGE_HEADER, *LDR_IMAGE_HEADER_PTR;
+
+enum
+{
+ eUserSection = 0x00000020,
+ cPEResourceId = 0xFFaadd00,
+};
+
+#endif /* ifndef __KERNELKIT_INC_PE_H__ */
diff --git a/dev/Kernel/KernelKit/PECodeMgr.h b/dev/Kernel/KernelKit/PECodeMgr.h
new file mode 100644
index 00000000..f0f1b719
--- /dev/null
+++ b/dev/Kernel/KernelKit/PECodeMgr.h
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: PECodeMgr.h
+ Purpose: PE32+ Code Mgr and DLL mgr.
+
+ Revision History:
+
+ 12/02/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+////////////////////////////////////////////////////
+
+// LAST REV: Mon Feb 12 13:52:01 CET 2024
+
+////////////////////////////////////////////////////
+
+#include <KernelKit/PE.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/KString.h>
diff --git a/dev/Kernel/KernelKit/PEF.h b/dev/Kernel/KernelKit/PEF.h
new file mode 100644
index 00000000..79d237fe
--- /dev/null
+++ b/dev/Kernel/KernelKit/PEF.h
@@ -0,0 +1,117 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: PEF.h
+ Purpose: Preferred Executable Format for Kernel.
+
+ Revision History:
+
+ ?/?/23: Added file (amlel)
+
+------------------------------------------- */
+
+#ifndef KERNELKIT_PEF_H
+#define KERNELKIT_PEF_H
+
+#include <CompilerKit/CompilerKit.h>
+#include <KernelKit/LoaderInterface.h>
+#include <NewKit/Defines.h>
+
+#define kPefMagic "Joy!"
+#define kPefMagicFat "yoJ!"
+
+#define kPefMagicLen 5
+
+#define kPefVersion 3
+#define kPefNameLen 255
+
+/* not mandatory, only for non fork based filesystems. */
+#define kPefExt ".o"
+#define kPefDylibExt ".dylib"
+#define kPefLibExt ".lib"
+#define kPefObjectExt ".obj"
+#define kPefDebugExt ".dbg"
+#define kPefDriverExt ".sys"
+
+// Kernel System Binary Interface.
+#define kPefAbi (0x5046)
+
+#define kPefBaseOrigin (0x40000000)
+
+#define kPefStart "__ImageStart"
+
+#define kPefForkKind kPefMagic
+#define kPefForkKindFAT kPefMagicFat
+
+namespace Kernel
+{
+ enum
+ {
+ kPefArchIntel86S,
+ kPefArchAMD64,
+ kPefArchRISCV,
+ kPefArch64x0, /* 64x0. ISA */
+ kPefArch32x0, /* 32x0. ISA */
+ kPefArchPowerPC,
+ kPefArchARM64,
+ kPefArchCount = (kPefArchPowerPC - kPefArchIntel86S) + 1,
+ kPefArchInvalid = 0xFF,
+ };
+
+ enum
+ {
+ kPefSubArchAMD,
+ kPefSubArchIntel,
+ kPefSubArchARM,
+ kPefSubArchGeneric,
+ kPefSubArchIBM,
+ };
+
+ enum
+ {
+ kPefKindExec = 1, /* .o */
+ kPefKindDylib = 2, /* .dylib */
+ kPefKindObject = 4, /* .obj */
+ kPefKindDebug = 5, /* .dbg */
+ kPefKindDriver = 6,
+ kPefKindCount,
+ };
+
+ typedef struct PEFContainer final
+ {
+ Char Magic[kPefMagicLen];
+ UInt32 Linker;
+ UInt32 Version;
+ UInt32 Kind;
+ UInt32 Abi;
+ UInt32 Cpu;
+ UInt32 SubCpu; /* Cpu specific information */
+ UIntPtr Start;
+ SizeT HdrSz; /* Size of header */
+ SizeT Count; /* container header count */
+ } PACKED PEFContainer;
+
+ /* First PEFCommandHeader starts after PEFContainer */
+
+ typedef struct PEFCommandHeader final
+ {
+ Char Name[kPefNameLen]; /* container name */
+ UInt32 Cpu; /* container cpu */
+ UInt32 SubCpu; /* container sub-cpu */
+ UInt32 Flags; /* container flags */
+ UInt16 Kind; /* container kind */
+ UIntPtr Offset; /* content offset */
+ SizeT Size; /* content Size */
+ } PACKED PEFCommandHeader;
+
+ enum
+ {
+ kPefCode = 0xC,
+ kPefData = 0xD,
+ kPefZero = 0xE,
+ kPefLinkerID = 0x1,
+ };
+} // namespace Kernel
+
+#endif /* ifndef KERNELKIT_PEF_H */
diff --git a/dev/Kernel/KernelKit/PEFCodeMgr.h b/dev/Kernel/KernelKit/PEFCodeMgr.h
new file mode 100644
index 00000000..25fb7f9b
--- /dev/null
+++ b/dev/Kernel/KernelKit/PEFCodeMgr.h
@@ -0,0 +1,72 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef _INC_CODE_MANAGER_PEF_H_
+#define _INC_CODE_MANAGER_PEF_H_
+
+#include <KernelKit/PEF.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/KString.h>
+#include <KernelKit/FileMgr.h>
+
+#ifndef INC_PROCESS_SCHEDULER_H
+#include <KernelKit/UserProcessScheduler.h>
+#endif
+
+#define kPefApplicationMime "application/vnd-zka-executable"
+
+namespace Kernel
+{
+ ///
+ /// \name PEFLoader
+ /// \brief PEF loader class.
+ ///
+ class PEFLoader : public LoaderInterface
+ {
+ private:
+ explicit PEFLoader() = delete;
+
+ public:
+ explicit PEFLoader(const VoidPtr blob);
+ explicit PEFLoader(const Char* path);
+ ~PEFLoader() override;
+
+ public:
+ ZKA_COPY_DEFAULT(PEFLoader);
+
+ public:
+ const Char* Path() override;
+ const Char* AsString() override;
+ const Char* MIME() override;
+
+ public:
+ ErrorOr<VoidPtr> FindStart() override;
+ VoidPtr FindSymbol(const Char* name, Int32 kind) override;
+ ErrorOr<VoidPtr> GetBlob() override;
+
+ public:
+ bool IsLoaded() noexcept;
+
+ private:
+#ifdef __FSKIT_INCLUDES_NEFS__
+ OwnPtr<FileStream<Char, NeFileSystemMgr>> fFile;
+#else
+ OwnPtr<FileStream<Char>> fFile;
+#endif // __FSKIT_INCLUDES_NEFS__
+
+ Ref<KString> fPath;
+ VoidPtr fCachedBlob;
+ bool fFatBinary;
+ bool fBad;
+ };
+
+ namespace Utils
+ {
+ ProcessID rtl_create_process(PEFLoader& exec, const Int32& procKind) noexcept;
+ } // namespace Utils
+} // namespace Kernel
+
+#endif // ifndef _INC_CODE_MANAGER_PEF_H_
diff --git a/dev/Kernel/KernelKit/Semaphore.h b/dev/Kernel/KernelKit/Semaphore.h
new file mode 100644
index 00000000..7d149027
--- /dev/null
+++ b/dev/Kernel/KernelKit/Semaphore.h
@@ -0,0 +1,43 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <KernelKit/Timer.h>
+#include <CompilerKit/CompilerKit.h>
+
+namespace Kernel
+{
+ class UserProcess;
+
+ typedef UserProcess& UserProcessRef;
+
+ /// @brief Access control class, which locks a task until one is done.
+ class Semaphore final
+ {
+ public:
+ explicit Semaphore() = default;
+ ~Semaphore() = default;
+
+ public:
+ bool IsLocked() const;
+ bool Unlock() noexcept;
+
+ public:
+ void WaitForProcess() noexcept;
+
+ public:
+ bool Lock(UserProcess& process);
+ bool LockOrWait(UserProcess& process, TimerInterface* timer);
+
+ public:
+ ZKA_COPY_DEFAULT(Semaphore);
+
+ private:
+ UserProcessRef fLockingProcess;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/ThreadLocalStorage.h b/dev/Kernel/KernelKit/ThreadLocalStorage.h
new file mode 100644
index 00000000..bce26b26
--- /dev/null
+++ b/dev/Kernel/KernelKit/ThreadLocalStorage.h
@@ -0,0 +1,69 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef KERNELKIT_TLS_H
+#define KERNELKIT_TLS_H
+
+#include <NewKit/Defines.h>
+#include <NewKit/ErrorOr.h>
+
+///! @brief Thread Local Storage for minoskrnl.
+
+#define kCookieMag0Idx 0
+#define kCookieMag1Idx 1
+#define kCookieMag2Idx 2
+
+#define kCookieMag0 'Z'
+#define kCookieMag1 'K'
+#define kCookieMag2 'A'
+
+#define kTLSCookieLen (3U)
+
+struct THREAD_INFORMATION_BLOCK;
+
+/// @brief Thread Information Block.
+/// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64)
+struct PACKED THREAD_INFORMATION_BLOCK final
+{
+ Kernel::Char Cookie[kTLSCookieLen]{0}; //! Thread magic number.
+ Kernel::VoidPtr Record{nullptr}; //! Thread information record.
+};
+
+///! @brief Cookie Sanity check.
+Kernel::Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* the_tib);
+
+///! @brief new ptr syscall.
+template <typename T>
+T* tls_new_ptr(void) noexcept;
+
+///! @brief delete ptr syscall.
+template <typename T>
+Kernel::Boolean tls_delete_ptr(T* ptr) noexcept;
+
+//! @brief Delete process pointer.
+//! @param obj The pointer to delete.
+template <typename T>
+inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T> obj) noexcept;
+
+//! @brief Delete process pointer.
+//! @param obj The pointer to delete.
+template <typename T>
+inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T*> obj) noexcept;
+
+template <typename T, typename... Args>
+T* tls_new_class(Args&&... args);
+
+/// @brief TLS install TIB and PIB. (syscall)
+EXTERN_C Kernel::Void rt_install_tib(THREAD_INFORMATION_BLOCK* TIB, THREAD_INFORMATION_BLOCK* PIB);
+
+/// @brief TLS check (syscall)
+EXTERN_C Kernel::Bool tls_check_syscall_impl(Kernel::VoidPtr TIB) noexcept;
+
+#include <KernelKit/ThreadLocalStorage.inl>
+
+// last rev 7/7/24
+
+#endif /* ifndef KERNELKIT_TLS_H */
diff --git a/dev/Kernel/KernelKit/ThreadLocalStorage.inl b/dev/Kernel/KernelKit/ThreadLocalStorage.inl
new file mode 100644
index 00000000..6573209a
--- /dev/null
+++ b/dev/Kernel/KernelKit/ThreadLocalStorage.inl
@@ -0,0 +1,99 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+//! @file ThreadLocalStorage.inl
+//! @brief Allocate resources from the process's heap storage.
+
+#ifndef INC_PROCESS_SCHEDULER_H
+#include <KernelKit/UserProcessScheduler.h>
+#endif
+
+template <typename T>
+inline T* tls_new_ptr(void) noexcept
+{
+ using namespace Kernel;
+
+ auto ref_process = UserProcessScheduler::The().GetCurrentProcess();
+ MUST_PASS(ref_process);
+
+ auto pointer = ref_process.Leak().New(sizeof(T));
+
+ if (pointer.Error())
+ return nullptr;
+
+ return reinterpret_cast<T*>(pointer.Leak().Leak());
+}
+
+//! @brief Delete process pointer.
+//! @param obj The pointer to delete.
+template <typename T>
+inline Kernel::Bool tls_delete_ptr(T* obj) noexcept
+{
+ using namespace Kernel;
+
+ if (!obj)
+ return No;
+
+ auto ref_process = UserProcessScheduler::The().GetCurrentProcess();
+ MUST_PASS(ref_process);
+
+ ErrorOr<T*> obj_wrapped{obj};
+
+ return ref_process.Leak().Delete(obj_wrapped, sizeof(T));
+}
+
+//! @brief Delete process pointer.
+//! @param obj The pointer to delete.
+template <typename T>
+inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T> obj) noexcept
+{
+ return tls_delete_ptr(obj.Leak());
+}
+
+//! @brief Delete process pointer.
+//! @param obj The pointer to delete.
+template <typename T>
+inline Kernel::Bool tls_delete_ptr(Kernel::ErrorOr<T*> obj) noexcept
+{
+ return tls_delete_ptr(obj->Leak());
+}
+
+/// @brief Allocate a C++ class, and then call the constructor of it.
+/// @tparam T class type.
+/// @tparam ...Args varg class type.
+/// @param args arguments list.
+/// @return Class instance.
+template <typename T, typename... Args>
+T* tls_new_class(Args&&... args)
+{
+ using namespace Kernel;
+
+ T* obj = tls_new_ptr<T>();
+
+ if (obj)
+ {
+ *obj = T(forward(args)...);
+ return obj;
+ }
+
+ return nullptr;
+}
+
+/// @brief Delete a C++ class (call constructor first.)
+/// @tparam T
+/// @param obj
+/// @return
+template <typename T>
+inline Kernel::Bool tls_delete_class(T* obj)
+{
+ using namespace Kernel;
+
+ if (!obj)
+ return No;
+
+ obj->~T();
+ return tls_delete_ptr(obj);
+}
diff --git a/dev/Kernel/KernelKit/Timer.h b/dev/Kernel/KernelKit/Timer.h
new file mode 100644
index 00000000..2fa2dfa6
--- /dev/null
+++ b/dev/Kernel/KernelKit/Timer.h
@@ -0,0 +1,81 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/LPC.h>
+
+namespace Kernel
+{
+ class SoftwareTimer;
+ class TimerInterface;
+
+ class TimerInterface
+ {
+ public:
+ /// @brief Default constructor
+ explicit TimerInterface() = default;
+ virtual ~TimerInterface() = default;
+
+ public:
+ ZKA_COPY_DEFAULT(TimerInterface);
+
+ public:
+ virtual BOOL Wait() noexcept;
+ };
+
+ class SoftwareTimer final : public TimerInterface
+ {
+ public:
+ explicit SoftwareTimer(Int64 seconds);
+ ~SoftwareTimer() override;
+
+ public:
+ ZKA_COPY_DEFAULT(SoftwareTimer);
+
+ public:
+ BOOL Wait() noexcept override;
+
+ private:
+ IntPtr* fDigitalTimer{nullptr};
+ Int64 fWaitFor{0};
+ };
+
+ class HardwareTimer final : public TimerInterface
+ {
+ public:
+ explicit HardwareTimer(Int64 seconds);
+ ~HardwareTimer() override;
+
+ public:
+ ZKA_COPY_DEFAULT(HardwareTimer);
+
+ public:
+ BOOL Wait() noexcept override;
+
+ private:
+ IntPtr* fDigitalTimer{nullptr};
+ Int64 fWaitFor{0};
+ };
+
+ inline Int64 Milliseconds(Int64 time)
+ {
+ if (time < 0)
+ return 0;
+
+ // TODO: nanoseconds maybe?
+ return 1000 * 1000 * time;
+ }
+
+ inline Int64 Seconds(Int64 time)
+ {
+ if (time < 0)
+ return 0;
+
+ return 1000 * Milliseconds(time);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/User.h b/dev/Kernel/KernelKit/User.h
new file mode 100644
index 00000000..2fb832d4
--- /dev/null
+++ b/dev/Kernel/KernelKit/User.h
@@ -0,0 +1,86 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef INC_USER_H
+#define INC_USER_H
+
+#include <CompilerKit/CompilerKit.h>
+#include <KernelKit/LPC.h>
+#include <NewKit/KString.h>
+#include <NewKit/Defines.h>
+
+///! We got the Super, standard user (%s format) and guest user,
+///! all are used to make authorization operations on the OS.
+#define kSuperUser "OS AUTHORITY/SUPER/%s"
+#define kGuestUser "OS AUTHORITY/GUEST/%s"
+#define kFmtUser "OS AUTHORITY/STD/%s"
+
+#define kUsersDir "/usr/"
+
+#define kMaxUserNameLen (255U)
+#define kMaxUserTokenLen (255U)
+
+namespace Kernel
+{
+ class User;
+
+ enum class UserRingKind
+ {
+ kRingInvalid = 0,
+ kRingStdUser = 1,
+ kRingSuperUser = 2,
+ kRingGuestUser = 5,
+ kRingCount = 3,
+ };
+
+ typedef Char* UserPublicKey;
+
+ /// @brief User class.
+ class User final
+ {
+ public:
+ explicit User() = delete;
+
+ User(const Int32& sel, const Char* username);
+ User(const UserRingKind& kind, const Char* username);
+
+ ~User();
+
+ public:
+ ZKA_COPY_DEFAULT(User);
+
+ public:
+ bool operator==(const User& lhs);
+ bool operator!=(const User& lhs);
+
+ public:
+ /// @brief Get software ring
+ const UserRingKind& Ring() noexcept;
+
+ /// @brief Get user name
+ Char* Name() noexcept;
+
+ /// @brief Is he a standard user?
+ Bool IsStdUser() noexcept;
+
+ /// @brief Is she a super user?
+ Bool IsSuperUser() noexcept;
+
+ /// @brief Saves a password from the public key.
+ Bool Save(const UserPublicKey password) noexcept;
+
+ /// @brief Checks if a password matches the **password**.
+ /// @param password the password to check.
+ Bool Matches(const UserPublicKey password) noexcept;
+
+ private:
+ UserRingKind mUserRing{UserRingKind::kRingStdUser};
+ Char mUserName[kMaxUserNameLen] = {0};
+ Char mUserKey[kMaxUserTokenLen] = {0};
+ };
+} // namespace Kernel
+
+#endif /* ifndef INC_USER_H */
diff --git a/dev/Kernel/KernelKit/UserProcessScheduler.h b/dev/Kernel/KernelKit/UserProcessScheduler.h
new file mode 100644
index 00000000..0682a9cd
--- /dev/null
+++ b/dev/Kernel/KernelKit/UserProcessScheduler.h
@@ -0,0 +1,341 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef INC_PROCESS_SCHEDULER_H
+#define INC_PROCESS_SCHEDULER_H
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/LockDelegate.h>
+#include <KernelKit/User.h>
+#include <NewKit/MutableArray.h>
+
+#define kSchedMinMicroTime (AffinityKind::kStandard)
+#define kSchedInvalidPID (-1)
+#define kSchedProcessLimitPerTeam (32U)
+
+#define kSchedMaxMemoryLimit gib_cast(128)
+#define kSchedMaxStackSz mib_cast(8)
+
+#define kProcessInvalidID (-1)
+#define kProcessNameLen (128U)
+
+////////////////////////////////////////////////////
+// The current date is: Thu 11/28/2024 //
+////////////////////////////////////////////////////
+
+namespace Kernel
+{
+ //! @note Forward class declarations.
+
+ class IDylibObject;
+ class UserProcess;
+ class UserProcessTeam;
+ class UserProcessScheduler;
+ class UserProcessHelper;
+
+ //! @brief Local Process identifier.
+ typedef Int64 ProcessID;
+
+ //! @brief Local Process status enum.
+ enum class ProcessStatusKind : Int32
+ {
+ kInvalid,
+ kStarting,
+ kRunning,
+ kKilled,
+ kFrozen,
+ kFinished,
+ kCount,
+ };
+
+ //! @brief Affinity is the amount of nano-seconds this process is going
+ //! to run.
+ enum class AffinityKind : Int32
+ {
+ kRealTime = 500,
+ kVeryHigh = 250,
+ kHigh = 200,
+ kStandard = 1000,
+ kLowUsage = 1500,
+ kVeryLowUsage = 2000,
+ };
+
+ // operator overloading.
+
+ inline bool operator<(AffinityKind lhs, AffinityKind rhs)
+ {
+ Int32 lhs_int = static_cast<Int>(lhs);
+ Int32 rhs_int = static_cast<Int>(rhs);
+
+ return lhs_int < rhs_int;
+ }
+
+ inline bool operator>(AffinityKind lhs, AffinityKind rhs)
+ {
+ Int32 lhs_int = static_cast<Int>(lhs);
+ Int32 rhs_int = static_cast<Int>(rhs);
+
+ return lhs_int > rhs_int;
+ }
+
+ inline bool operator<=(AffinityKind lhs, AffinityKind rhs)
+ {
+ Int32 lhs_int = static_cast<Int>(lhs);
+ Int32 rhs_int = static_cast<Int>(rhs);
+
+ return lhs_int <= rhs_int;
+ }
+
+ inline bool operator>=(AffinityKind lhs, AffinityKind rhs)
+ {
+ Int32 lhs_int = static_cast<Int>(lhs);
+ Int32 rhs_int = static_cast<Int>(rhs);
+
+ return lhs_int >= rhs_int;
+ }
+
+ // end of operator overloading.
+
+ enum class ProcessSubsystem : Int32
+ {
+ kProcessSubsystemSecurity = 100,
+ kProcessSubsystemApplication,
+ kProcessSubsystemService,
+ kProcessSubsystemDriver,
+ kProcessSubsystemInvalid = 255,
+ kProcessSubsystemCount = 4,
+ };
+
+ using ProcessTime = UInt64;
+ using PID = Int64;
+
+ // for permission manager, tells where we run the code.
+ enum class ProcessLevelRing : Int32
+ {
+ kRingStdUser = 1,
+ kRingSuperUser = 2,
+ kRingGuestUser = 5,
+ kRingCount = 5,
+ };
+
+ /// @brief Helper type to describe a code image.
+ using ImagePtr = VoidPtr;
+
+ struct UserProcessImage final
+ {
+ explicit UserProcessImage() = default;
+
+ ImagePtr fCode;
+ ImagePtr fBlob;
+
+ Bool HasCode()
+ {
+ return this->fCode != nullptr;
+ }
+
+ Bool HasImage()
+ {
+ return this->fBlob != nullptr;
+ }
+ };
+
+ /// @name UserProcess
+ /// @brief User process class, holds information about the running process/thread.
+ class UserProcess final
+ {
+ public:
+ explicit UserProcess();
+ ~UserProcess();
+
+ public:
+ ZKA_COPY_DEFAULT(UserProcess);
+
+ public:
+ Char Name[kProcessNameLen] = {"Process"};
+ ProcessSubsystem SubSystem{ProcessSubsystem::kProcessSubsystemInvalid};
+ User* Owner{nullptr};
+ HAL::StackFramePtr StackFrame{nullptr};
+ AffinityKind Affinity{AffinityKind::kStandard};
+ ProcessStatusKind Status{ProcessStatusKind::kFinished};
+ UInt8* StackReserve{nullptr};
+ UserProcessImage Image{};
+ SizeT StackSize{kSchedMaxStackSz};
+ IDylibObject* DylibDelegate{nullptr};
+ SizeT MemoryCursor{0UL};
+ SizeT MemoryLimit{kSchedMaxMemoryLimit};
+ SizeT UsedMemory{0UL};
+
+ struct ProcessMemoryHeapList final
+ {
+ VoidPtr MemoryEntry{nullptr};
+ SizeT MemoryEntrySize{0UL};
+ SizeT MemoryEntryPad{0UL};
+
+ struct ProcessMemoryHeapList* MemoryPrev{nullptr};
+ struct ProcessMemoryHeapList* MemoryNext{nullptr};
+ };
+
+ struct UserProcessSignal final
+ {
+ UIntPtr SignalIP;
+ ProcessStatusKind PreviousStatus;
+ UIntPtr SignalID;
+ };
+
+ UserProcessSignal ProcessSignal;
+ ProcessMemoryHeapList* ProcessMemoryHeap{nullptr};
+ UserProcessTeam* ProcessParentTeam;
+
+ VoidPtr VMRegister{0UL};
+
+ enum
+ {
+ kInvalidExecutableKind,
+ kExectuableKind,
+ kExectuableDylibKind,
+ kExectuableKindCount,
+ };
+
+ ProcessTime PTime{0}; //! @brief Process allocated tine.
+
+ PID ProcessId{kSchedInvalidPID};
+ Int32 Kind{kExectuableKind};
+
+ public:
+ //! @brief boolean operator, check status.
+ operator bool();
+
+ ///! @brief Crashes the app, exits with code ~0.
+ Void Crash();
+
+ ///! @brief Exits the app.
+ Void Exit(const Int32& exit_code = 0);
+
+ ///! @brief TLS allocate.
+ ///! @param sz size of new ptr.
+ ErrorOr<VoidPtr> New(const SizeT& sz, const SizeT& pad_amount = 0);
+
+ ///! @brief TLS free.
+ ///! @param ptr the pointer to free.
+ ///! @param sz the size of it.
+ template <typename T>
+ Boolean Delete(ErrorOr<T*> ptr, const SizeT& sz);
+
+ ///! @brief Wakes up threads.
+ Void Wake(const Bool wakeup = false);
+
+ public:
+ //! @brief Gets the local exit code.
+ const UInt32& GetExitCode() noexcept;
+
+ ///! @brief Get the process's name
+ ///! @example 'C Runtime Library'
+ const Char* GetName() noexcept;
+
+ //! @brief return local error code of process.
+ //! @return Int32 local error code.
+ Int32& GetLocalCode() noexcept;
+
+ const User* GetOwner() noexcept;
+ const ProcessStatusKind& GetStatus() noexcept;
+ const AffinityKind& GetAffinity() noexcept;
+
+ private:
+ UInt32 fLastExitCode{0};
+ Int32 fLocalCode{0};
+
+ friend UserProcessScheduler;
+ friend UserProcessHelper;
+ };
+
+ /// \brief Processs Team (contains multiple processes inside it.)
+ /// Equivalent to a process batch
+ class UserProcessTeam final
+ {
+ public:
+ explicit UserProcessTeam();
+ ~UserProcessTeam() = default;
+
+ ZKA_COPY_DEFAULT(UserProcessTeam);
+
+ Array<UserProcess, kSchedProcessLimitPerTeam>& AsArray();
+ Ref<UserProcess>& AsRef();
+ ProcessID& Id() noexcept;
+
+ public:
+ Array<UserProcess, kSchedProcessLimitPerTeam> mProcessList;
+ Ref<UserProcess> mCurrentProcess;
+ ProcessID mTeamId{0};
+ ProcessID mProcessCount{0};
+ };
+
+ typedef Array<UserProcess, kSchedProcessLimitPerTeam> UserThreadArray;
+
+ using UserProcessRef = UserProcess&;
+
+ /// @brief Process scheduler class.
+ /// The main class which you call to schedule user processes.
+ class UserProcessScheduler final : public ISchedulable
+ {
+ friend class UserProcessHelper;
+
+ public:
+ explicit UserProcessScheduler() = default;
+ ~UserProcessScheduler() override = default;
+
+ ZKA_COPY_DEFAULT(UserProcessScheduler)
+
+ operator bool();
+ bool operator!();
+
+ public:
+ UserProcessTeam& CurrentTeam();
+
+ public:
+ ProcessID Spawn(const Char* name, VoidPtr code, VoidPtr image);
+ const Bool Remove(ProcessID process_id);
+
+ const Bool IsUser() override;
+ const Bool IsKernel() override;
+ const Bool HasMP() override;
+
+ public:
+ Ref<UserProcess>& GetCurrentProcess();
+ const SizeT Run() noexcept;
+
+ public:
+ STATIC UserProcessScheduler& The();
+
+ private:
+ UserProcessTeam mTeam{};
+ };
+
+ /*
+ * \brief UserProcess helper class, which contains needed utilities for the scheduler.
+ */
+
+ class UserProcessHelper final
+ {
+ public:
+ STATIC Bool Switch(VoidPtr image_ptr, UInt8* stack_ptr, HAL::StackFramePtr frame_ptr, const PID& new_pid);
+ STATIC Bool CanBeScheduled(const UserProcess& process);
+ STATIC ErrorOr<PID> TheCurrentPID();
+ STATIC SizeT StartScheduling();
+ };
+
+ const UInt32& sched_get_exit_code(void) noexcept;
+} // namespace Kernel
+
+#include <KernelKit/ThreadLocalStorage.h>
+#include <KernelKit/UserProcessScheduler.inl>
+
+////////////////////////////////////////////////////
+
+// END
+
+////////////////////////////////////////////////////
+
+#endif /* ifndef INC_PROCESS_SCHEDULER_H */
diff --git a/dev/Kernel/KernelKit/UserProcessScheduler.inl b/dev/Kernel/KernelKit/UserProcessScheduler.inl
new file mode 100644
index 00000000..6f1f3f4a
--- /dev/null
+++ b/dev/Kernel/KernelKit/UserProcessScheduler.inl
@@ -0,0 +1,51 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ FILE: UserProcessScheduler.inl
+ PURPOSE: Low level/Ring-3 Process scheduler.
+
+------------------------------------------- */
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /** @brief Free pointer from usage. */
+ /***********************************************************************************/
+
+ template <typename T>
+ Boolean UserProcess::Delete(ErrorOr<T*> ptr, const SizeT& sz)
+ {
+ if (!ptr ||
+ sz == 0)
+ return No;
+
+ ProcessMemoryHeapList* entry = this->ProcessMemoryHeap;
+
+ while (entry != nullptr)
+ {
+ if (entry->MemoryEntry == ptr.Leak().Leak())
+ {
+ this->UsedMemory -= entry->MemoryEntrySize;
+
+#ifdef __ZKA_AMD64__
+ auto pd = hal_read_cr3();
+ hal_write_cr3(this->VMRegister);
+
+ auto ret = mm_delete_heap(entry->MemoryEntry);
+
+ hal_write_cr3(pd);
+
+ return ret;
+#else
+ Bool ret = mm_delete_heap(ptr.Leak().Leak());
+ return ret;
+#endif
+ }
+
+ entry = entry->MemoryNext;
+ }
+
+ return No;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/KernelKit/XCOFF.h b/dev/Kernel/KernelKit/XCOFF.h
new file mode 100644
index 00000000..2bc45dfa
--- /dev/null
+++ b/dev/Kernel/KernelKit/XCOFF.h
@@ -0,0 +1,51 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: XCOFF.h
+ Purpose: XCOFF for Kernel.
+
+ Revision History:
+
+ 04/07/24: Added file (amlel)
+
+------------------------------------------- */
+
+#ifndef INC_XOCFF_H
+#define INC_XOCFF_H
+
+#include <NewKit/Defines.h>
+
+#define kXCOFF64Magic (0x01F7)
+
+#define kXCOFFRelFlg (0x0001)
+#define kXCOFFExecutable (0x0002)
+#define kXCOFFLnno (0x0004)
+#define kXCOFFLSyms (0x0008)
+
+struct XCoffFileHeader;
+struct XCoffForkHeader;
+
+/// @brief XCoff file header, meant for POWER apps.
+typedef struct XCoffFileHeader
+{
+ Kernel::UInt16 fMagic;
+ Kernel::UInt16 fTarget;
+ Kernel::UInt16 fNumSecs;
+ Kernel::UInt32 fTimeDat;
+ Kernel::UIntPtr fSymPtr;
+ Kernel::UInt32 fNumSyms;
+ Kernel::UInt16 fOptHdr; // ?: Number of bytes in optional header
+} XCoffFileHeader64;
+
+#define cForkNameLen (255)
+
+/// @brief This the executable manifest fork.
+typedef struct XCoffForkHeader
+{
+ Kernel::Char fPropertiesXMLFork[cForkNameLen];
+ Kernel::Char fDynamicLoaderFork[cForkNameLen];
+ Kernel::Char fCodeSignFork[cForkNameLen];
+} XCoffForkHeader;
+
+#endif // ifndef INC_XOCFF_H
diff --git a/dev/Kernel/KernelRsrc.rsrc b/dev/Kernel/KernelRsrc.rsrc
new file mode 100644
index 00000000..4c786c15
--- /dev/null
+++ b/dev/Kernel/KernelRsrc.rsrc
@@ -0,0 +1,25 @@
+#include "CompilerKit/Version.h"
+
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904E4"
+ BEGIN
+ VALUE "CompanyName", "Amlal EL Mahrouss."
+ VALUE "FileDescription", "ZKA Minimal Kernel."
+ VALUE "FileVersion", KERNEL_VERSION
+ VALUE "InternalName", "minoskrnl"
+ VALUE "LegalCopyright", "(c) 2024 Amlal EL Mahrouss, all rights reserved."
+ VALUE "OriginalFilename", "minoskrnl.exe"
+ VALUE "ProductName", "ZKA Minimal Kernel."
+ VALUE "ProductVersion", KERNEL_VERSION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1252
+ END
+END
diff --git a/dev/Kernel/MoveAll.ARM64.sh b/dev/Kernel/MoveAll.ARM64.sh
new file mode 100755
index 00000000..35e0909e
--- /dev/null
+++ b/dev/Kernel/MoveAll.ARM64.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+for file in *.o; do
+ mv -- "$file" "${file%.o}.obj"
+done
+
+mv *.obj obj/
diff --git a/dev/Kernel/MoveAll.X64.sh b/dev/Kernel/MoveAll.X64.sh
new file mode 100755
index 00000000..1c135d06
--- /dev/null
+++ b/dev/Kernel/MoveAll.X64.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+for file in *.o; do
+ mv -- "$file" "${file%.o}.obj"
+done
+
+mv *.obj HALKit/AMD64/*.obj obj/
diff --git a/dev/Kernel/NetworkKit/IP.h b/dev/Kernel/NetworkKit/IP.h
new file mode 100644
index 00000000..f04a6bca
--- /dev/null
+++ b/dev/Kernel/NetworkKit/IP.h
@@ -0,0 +1,83 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+#include <NewKit/KString.h>
+
+namespace Kernel
+{
+ class RawIPAddress6;
+ class RawIPAddress;
+ class IPFactory;
+
+ class RawIPAddress final
+ {
+ private:
+ explicit RawIPAddress(char bytes[4]);
+ ~RawIPAddress() = default;
+
+ RawIPAddress& operator=(const RawIPAddress&) = delete;
+ RawIPAddress(const RawIPAddress&) = default;
+
+ public:
+ char* Address();
+
+ char& operator[](const Size& index);
+
+ bool operator==(const RawIPAddress& ipv6);
+ bool operator!=(const RawIPAddress& ipv6);
+
+ private:
+ char fAddr[4];
+
+ friend IPFactory; // it is the one creating these addresses, thus this
+ // is why the constructors are private.
+ };
+
+ /**
+ * @brief IPv6 address.
+ */
+ class RawIPAddress6 final
+ {
+ private:
+ explicit RawIPAddress6(char Bytes[8]);
+ ~RawIPAddress6() = default;
+
+ RawIPAddress6& operator=(const RawIPAddress6&) = delete;
+ RawIPAddress6(const RawIPAddress6&) = default;
+
+ public:
+ char* Address()
+ {
+ return fAddr;
+ }
+
+ char& operator[](const Size& index);
+
+ bool operator==(const RawIPAddress6& ipv6);
+ bool operator!=(const RawIPAddress6& ipv6);
+
+ private:
+ char fAddr[8];
+
+ friend IPFactory;
+ };
+
+ /**
+ * @brief IP Creation helpers
+ */
+ class IPFactory final
+ {
+ public:
+ static ErrorOr<KString> ToKString(Ref<RawIPAddress6>& ipv6);
+ static ErrorOr<KString> ToKString(Ref<RawIPAddress>& ipv4);
+ static bool IpCheckVersion4(const Char* ip);
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NetworkKit/IPC.h b/dev/Kernel/NetworkKit/IPC.h
new file mode 100644
index 00000000..a615adc9
--- /dev/null
+++ b/dev/Kernel/NetworkKit/IPC.h
@@ -0,0 +1,106 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved..
+
+ File: IPC.h.
+ Purpose: IPC protocol.
+
+------------------------------------------- */
+
+#ifndef INC_IPC_H
+#define INC_IPC_H
+
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+#include <Hints/CompilerHint.h>
+
+/// @file IPC.h
+/// @brief IPC comm. protocol.
+
+/// IA separator.
+#define kIPCRemoteSeparator ":"
+
+/// Interchange address, consists of PID:TEAM.
+#define kIPCRemoteInvalid "00:00"
+
+#define kIPCHeaderMagic (0x4950434)
+
+namespace Kernel
+{
+ struct IPC_ADDR;
+ struct IPC_MSG;
+
+ /// @brief 128-bit IPC address.
+ struct PACKED IPC_ADDR final
+ {
+ UInt64 UserProcessID;
+ UInt64 UserProcessTeam;
+
+ ////////////////////////////////////
+ // some operators.
+ ////////////////////////////////////
+
+ bool operator==(const IPC_ADDR& addr) noexcept
+ {
+ return addr.UserProcessID == this->UserProcessID && addr.UserProcessTeam == this->UserProcessTeam;
+ }
+
+ bool operator==(IPC_ADDR& addr) noexcept
+ {
+ return addr.UserProcessID == this->UserProcessID && addr.UserProcessTeam == this->UserProcessTeam;
+ }
+ };
+
+ typedef struct IPC_ADDR IPC_ADDR;
+
+ enum
+ {
+ kIPCLittleEndian = 0,
+ kIPCBigEndian = 1,
+ kIPCMixedEndian = 2,
+ };
+
+ constexpr inline auto kIPCMsgSize = 6094U;
+
+ /// @brief IPC connection header, message cannot be greater than 6K.
+ typedef struct IPC_MSG final
+ {
+ UInt32 IpcHeaderMagic; // cRemoteHeaderMagic
+ UInt8 IpcEndianess; // 0 : LE, 1 : BE
+ SizeT IpcPacketSize;
+ IPC_ADDR IpcFrom;
+ IPC_ADDR IpcTo;
+ UInt32 IpcCRC32;
+ UInt32 IpcMsg;
+ UInt32 IpcMsgSz;
+ UInt8 IpcData[kIPCMsgSize];
+
+ /// @brief Passes the message to target, could be anything, HTTP packet, JSON or whatever.
+ Bool Pass(IPC_MSG* target) noexcept
+ {
+ if (target && target->IpcFrom == this->IpcTo)
+ {
+ if (this->IpcMsgSz > target->IpcMsgSz)
+ return No;
+
+ rt_copy_memory(this->IpcData, target->IpcData, this->IpcMsgSz);
+
+ return Yes;
+ }
+
+ return No;
+ }
+ } PACKED IPC_MSG;
+
+ /// @brief Sanitize packet function
+ /// @retval true packet is correct.
+ /// @retval false packet is incorrect and process has crashed.
+ Bool ipc_sanitize_packet(_Input IPC_MSG* pckt_in);
+
+ /// @brief Construct packet function
+ /// @retval true packet is correct.
+ /// @retval false packet is incorrect and process has crashed.
+ Bool ipc_construct_packet(_Output _Input IPC_MSG** pckt_in);
+} // namespace Kernel
+
+#endif // INC_IPC_H
diff --git a/dev/Kernel/NetworkKit/LTE.h b/dev/Kernel/NetworkKit/LTE.h
new file mode 100644
index 00000000..7aa99ec6
--- /dev/null
+++ b/dev/Kernel/NetworkKit/LTE.h
@@ -0,0 +1,16 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved..
+
+ File: LTE.h.
+ Purpose: LTE protocol classes.
+
+------------------------------------------- */
+
+#ifndef _INC_NETWORK_LTE_H_
+#define _INC_NETWORK_LTE_H_
+
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+
+#endif // ifndef _INC_NETWORK_LTE_H_
diff --git a/dev/Kernel/NetworkKit/MAC.h b/dev/Kernel/NetworkKit/MAC.h
new file mode 100644
index 00000000..916e3348
--- /dev/null
+++ b/dev/Kernel/NetworkKit/MAC.h
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+
+namespace Kernel
+{
+ class MacAddressGetter;
+
+ /// \brief This retrieves the MAC address of the device.
+ /// \note Listens for the current NIC.
+ class MacAddressGetter final
+ {
+ public:
+ explicit MacAddressGetter() = default;
+
+ public:
+ KString& AsString();
+ Array<WideChar, 12>& AsBytes();
+ };
+
+} // namespace Kernel
diff --git a/dev/Kernel/NetworkKit/NetworkDevice.h b/dev/Kernel/NetworkKit/NetworkDevice.h
new file mode 100644
index 00000000..c55c2f37
--- /dev/null
+++ b/dev/Kernel/NetworkKit/NetworkDevice.h
@@ -0,0 +1,83 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __INC_NETWORK_DEVICE_H__
+#define __INC_NETWORK_DEVICE_H__
+
+#include <KernelKit/DeviceMgr.h>
+#include <NetworkKit/IP.h>
+
+/// @note Can either work with: Ethernet, GPRS, WiFi
+
+namespace Kernel
+{
+ struct NetworkDeviceCommand;
+ class NetworkDevice;
+
+ /**
+ * \brief Network device interface, establishes a connection to the NIC.
+ */
+ class NetworkDevice final : public IDeviceObject<NetworkDeviceCommand>
+ {
+ public:
+ NetworkDevice(void (*out)(NetworkDeviceCommand),
+ void (*in)(NetworkDeviceCommand),
+ void (*onCleanup)(void) = nullptr);
+
+ ~NetworkDevice() override;
+
+ public:
+ NetworkDevice& operator=(const NetworkDevice&) = default;
+ NetworkDevice(const NetworkDevice&) = default;
+
+ public:
+ const Char* Name() const override;
+ Boolean Name(const Char* newStr);
+
+ private:
+ static constexpr auto cNetworkNameLen = 512;
+
+ Void (*fCleanup)(void);
+ Char fNetworkName[cNetworkNameLen];
+ };
+
+ struct NetworkDeviceCommand final
+ {
+ UInt32 CommandName;
+ UInt32 CommandType;
+ UInt32 CommandFlags;
+ VoidPtr CommandBuffer;
+ SizeT CommandSizeBuffer;
+ };
+
+ /// @brief TCP device.
+ using TCPNetworkDevice = NetworkDevice;
+
+ /// @brief UDP device.
+ using UDPNetworkDevice = NetworkDevice;
+
+ /// @brief PPP device.
+ using PPPNetworkDevice = NetworkDevice;
+
+ /// @brief IPC device.
+ using IPCNetworkDevice = NetworkDevice;
+
+ /// @brief GRPS device.
+ using GPRSNetworkDevice = NetworkDevice;
+
+ /// @brief GSM device.
+ using GSMNetworkDevice = NetworkDevice;
+
+ /// @brief Bluetooth device.
+ using BTNetworkDevice = NetworkDevice;
+
+ /// @brief LTE device.
+ using LTENetworkDevice = NetworkDevice;
+} // namespace Kernel
+
+#include <NetworkKit/NetworkDevice.inl>
+
+#endif // !__INC_NETWORK_DEVICE_H__
diff --git a/dev/Kernel/NetworkKit/NetworkDevice.inl b/dev/Kernel/NetworkKit/NetworkDevice.inl
new file mode 100644
index 00000000..8d6bf6cb
--- /dev/null
+++ b/dev/Kernel/NetworkKit/NetworkDevice.inl
@@ -0,0 +1,32 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/***
+ Dtor and ctors.
+*/
+
+namespace Kernel
+{
+ NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand),
+ void (*in)(NetworkDeviceCommand),
+ void (*on_cleanup)(void))
+ : IDeviceObject<NetworkDeviceCommand>(out, in), fCleanup(on_cleanup)
+ {
+ kcout << "NetworkDevice initialized.\r";
+
+ MUST_PASS(out && in && on_cleanup);
+ }
+
+ NetworkDevice::~NetworkDevice()
+ {
+ MUST_PASS(fCleanup);
+
+ kcout << "NetworkDevice cleanup.\r";
+
+ if (fCleanup)
+ fCleanup();
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Array.h b/dev/Kernel/NewKit/Array.h
new file mode 100644
index 00000000..c8ac6f55
--- /dev/null
+++ b/dev/Kernel/NewKit/Array.h
@@ -0,0 +1,58 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ template <typename T, SizeT N>
+ class Array final
+ {
+ public:
+ explicit Array() = default;
+ ~Array() = default;
+
+ Array& operator=(const Array&) = default;
+ Array(const Array&) = default;
+
+ T& operator[](const SizeT& at)
+ {
+ return fArray[at];
+ }
+
+ Boolean Empty()
+ {
+ return this->Count() > 0;
+ }
+
+ const SizeT Capacity()
+ {
+ return N;
+ }
+
+ const SizeT Count()
+ {
+ return N;
+ }
+
+ const T* CData()
+ {
+ return fArray;
+ }
+
+ operator bool()
+ {
+ return !Empty();
+ }
+
+ private:
+ T fArray[N];
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/ArrayList.h b/dev/Kernel/NewKit/ArrayList.h
new file mode 100644
index 00000000..29ef946a
--- /dev/null
+++ b/dev/Kernel/NewKit/ArrayList.h
@@ -0,0 +1,58 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ template <typename T>
+ class ArrayList final
+ {
+ public:
+ explicit ArrayList(T* list)
+ : fList(reinterpret_cast<T>(list))
+ {
+ }
+
+ ~ArrayList() = default;
+
+ ArrayList& operator=(const ArrayList&) = default;
+ ArrayList(const ArrayList&) = default;
+
+ T* Data()
+ {
+ return fList;
+ }
+
+ const T* CData()
+ {
+ return fList;
+ }
+
+ T& operator[](int index) const
+ {
+ return fList[index];
+ }
+
+ operator bool()
+ {
+ return fList;
+ }
+
+ private:
+ T* fList;
+
+ friend class InitHelpers;
+ };
+
+ template <typename ValueType>
+ ArrayList<ValueType> make_list(ValueType val)
+ {
+ return ArrayList<ValueType>{val};
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Atom.h b/dev/Kernel/NewKit/Atom.h
new file mode 100644
index 00000000..1a13315a
--- /dev/null
+++ b/dev/Kernel/NewKit/Atom.h
@@ -0,0 +1,46 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ template <typename T>
+ class Atom final
+ {
+ public:
+ explicit Atom() = default;
+ ~Atom() = default;
+
+ public:
+ Atom& operator=(const Atom&) = delete;
+ Atom(const Atom&) = delete;
+
+ public:
+ T operator[](Size sz)
+ {
+ return (fArrayOfAtoms & sz);
+ }
+ void operator|(Size sz)
+ {
+ fArrayOfAtoms |= sz;
+ }
+
+ friend Boolean operator==(Atom<T>& atomic, const T& idx)
+ {
+ return atomic[idx] == idx;
+ }
+
+ friend Boolean operator!=(Atom<T>& atomic, const T& idx)
+ {
+ return atomic[idx] == idx;
+ }
+
+ private:
+ T fArrayOfAtoms;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Crc32.h b/dev/Kernel/NewKit/Crc32.h
new file mode 100644
index 00000000..8a8222e5
--- /dev/null
+++ b/dev/Kernel/NewKit/Crc32.h
@@ -0,0 +1,23 @@
+/*
+ * ========================================================
+ *
+ * ZKA
+ * Date Added: 13/02/2023
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#ifndef CRC32_H
+#define CRC32_H
+
+#include <NewKit/Defines.h>
+
+#define kCrcCnt (256)
+
+namespace Kernel
+{
+ UInt ke_calculate_crc32(const Char* crc, UInt len) noexcept;
+} // namespace Kernel
+
+#endif // !CRC32_H
diff --git a/dev/Kernel/NewKit/CxxAbi.h b/dev/Kernel/NewKit/CxxAbi.h
new file mode 100644
index 00000000..1eec5891
--- /dev/null
+++ b/dev/Kernel/NewKit/CxxAbi.h
@@ -0,0 +1,28 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#ifndef __TOOLCHAINKIT__
+
+#define kAtExitMacDestructors (128)
+
+struct atexit_func_entry_t
+{
+ void (*destructor_func)(void*);
+ void* obj_ptr;
+ void* dso_handle;
+};
+
+typedef unsigned uarch_t;
+
+namespace cxxabiv1
+{
+ typedef void* __guard;
+}
+
+#endif // __GNUC__
diff --git a/dev/Kernel/NewKit/Defines.h b/dev/Kernel/NewKit/Defines.h
new file mode 100644
index 00000000..a221bdad
--- /dev/null
+++ b/dev/Kernel/NewKit/Defines.h
@@ -0,0 +1,188 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Macros.h>
+
+#define NEWKIT_VERSION_STR "1.1.0"
+#define NEWKIT_VERSION_BCD 0x01100
+
+#ifdef __has_feature
+#if !__has_feature(cxx_nullptr)
+#if !__has_nullptr
+#error !!! You must at least have nullptr featured on your C++ compiler. !!!
+#endif
+#endif
+#endif
+
+/// @brief The **Kernel** namespace where it's API resides.
+namespace Kernel
+{
+ using voidPtr = void*;
+ using VoidPtr = void*;
+ using nullPtr = decltype(nullptr);
+ using NullPtr = decltype(nullptr);
+
+ using Int = int;
+ using Int32 = int;
+ using UShort = unsigned short;
+ using UInt16 = unsigned short;
+ using Short = short;
+ using Int16 = short;
+ using UInt = unsigned int;
+ using UInt32 = unsigned int;
+ using Long = __INT64_TYPE__;
+ using Int64 = __INT64_TYPE__;
+ using ULong = __UINT64_TYPE__;
+ using UInt64 = __UINT64_TYPE__;
+ using Boolean = bool;
+ using Bool = bool;
+ using Char = char;
+ using UChar = unsigned char;
+ using UInt8 = unsigned char;
+
+ using SSize = Int64;
+ using SSizeT = Int64;
+ using Size = __SIZE_TYPE__;
+ using SizeT = __SIZE_TYPE__;
+ using IntPtr = __INTPTR_TYPE__;
+ using UIntPtr = __UINTPTR_TYPE__;
+ using IntFast = __INT_FAST32_TYPE__;
+ using IntFast64 = __INT_FAST64_TYPE__;
+ using PtrDiff = __PTRDIFF_TYPE__;
+
+ using SInt16 = Int16;
+ using SInt32 = Int32;
+ using SInt64 = Int64;
+
+ typedef UIntPtr* Ptr64;
+ typedef UInt32* Ptr32;
+ typedef UInt8* Ptr8;
+
+ using Utf8Char = char8_t;
+ using Utf16Char = char16_t;
+ using WideChar = wchar_t;
+ using Utf32Char = char32_t;
+
+ typedef UInt32 PhysicalAddressKind;
+ typedef UIntPtr VirtualAddressKind;
+
+ using Void = void;
+
+ using Lba = UInt64;
+
+ using Char16 = char16_t;
+
+ enum class Endian : UInt8
+ {
+ kEndianInvalid,
+ kEndianBig,
+ kEndianLittle,
+ kEndianMixed,
+ kEndianCount
+ };
+
+ /// @brief Forward object.
+ /// @tparam Args the object type.
+ /// @param arg the object.
+ /// @return object's rvalue
+ template <typename Args>
+ inline Args&& forward(Args& arg)
+ {
+ return static_cast<Args&&>(arg);
+ }
+
+ /// @brief Move object.
+ /// @tparam Args the object type.
+ /// @param arg the object.
+ /// @return object's rvalue
+ template <typename Args>
+ inline Args&& move(Args&& arg)
+ {
+ return static_cast<Args&&>(arg);
+ }
+
+ /// @brief Encoding interface, used as a proxy to convert T to Char*
+ /// Used to cast A to B or B to A.
+ class ICodec
+ {
+ public:
+ explicit ICodec() = default;
+ virtual ~ICodec() = default;
+
+ ICodec& operator=(const ICodec&) = default;
+ ICodec(const ICodec&) = default;
+
+ public:
+ /// @brief Convert type to bytes.
+ /// @tparam T the type.
+ /// @param type (a1) the data.
+ /// @return a1 as Char*
+ template <typename T>
+ Char* AsBytes(T type) noexcept
+ {
+ return nullptr;
+ }
+
+ /// @brief Construct from type to class.
+ /// @tparam T the type to convert.
+ /// @param type (a1) the data.
+ /// @return a1 as Char*
+ template <typename OutputClass, typename FactoryClass>
+ OutputClass* Construct(Char* type) noexcept
+ {
+ FactoryClass class_fac;
+ return class_fac.template From<OutputClass>(type);
+ }
+
+ /// @brief Convert T class to Y class.
+ /// @tparam T the class type of type.
+ /// @tparam Y the result class.
+ /// @param type the class to cast.
+ /// @return the class as Y.
+ template <typename T, typename Y>
+ Y As(T type) noexcept
+ {
+ if (type.template IsSerializable())
+ {
+ return reinterpret_cast<Char*>(type);
+ }
+
+ return type.template As<Y>();
+ }
+ };
+
+ /// \brief Scheduler interface, represents a scheduler object.
+ /// @note This is used to schedule tasks, such as threads, drivers, user threads, etc.
+ class ISchedulable
+ {
+ public:
+ explicit ISchedulable() = default;
+ virtual ~ISchedulable() = default;
+
+ ISchedulable& operator=(const ISchedulable&) = default;
+ ISchedulable(const ISchedulable&) = default;
+
+ /// @brief Is this object only accepting user tasks?
+ virtual const Bool IsUser()
+ {
+ return NO;
+ }
+
+ /// @brief Is this object only accepting kernel tasks?
+ virtual const Bool IsKernel()
+ {
+ return NO;
+ }
+
+ /// @brief Is this object offloading to another CPU?
+ virtual const Bool HasMP()
+ {
+ return NO;
+ }
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/ErrorOr.h b/dev/Kernel/NewKit/ErrorOr.h
new file mode 100644
index 00000000..958bf739
--- /dev/null
+++ b/dev/Kernel/NewKit/ErrorOr.h
@@ -0,0 +1,77 @@
+/*
+ * ========================================================
+ *
+ * ZKA
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ using ErrorT = UInt;
+
+ template <typename T>
+ class ErrorOr final
+ {
+ public:
+ ErrorOr() = default;
+ ~ErrorOr() = default;
+
+ public:
+ explicit ErrorOr(Int32 err)
+ : mId(err)
+ {
+ }
+
+ explicit ErrorOr(nullPtr Null)
+ {
+ }
+
+ explicit ErrorOr(T* Class)
+ : mRef(Class)
+ {
+ }
+
+ explicit ErrorOr(T Class)
+ : mRef(Class)
+ {
+ }
+
+ ErrorOr& operator=(const ErrorOr&) = default;
+ ErrorOr(const ErrorOr&) = default;
+
+ ErrorOr& operator=(const Ref<T>& refErr)
+ {
+ mRef = refErr;
+ return *this;
+ }
+
+ Ref<T>& Leak()
+ {
+ return mRef;
+ }
+
+ Int32 Error()
+ {
+ return mId;
+ }
+
+ operator bool()
+ {
+ return mRef;
+ }
+
+ private:
+ Ref<T> mRef;
+ Int32 mId{0};
+ };
+
+ using ErrorOrAny = ErrorOr<voidPtr>;
+
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Function.h b/dev/Kernel/NewKit/Function.h
new file mode 100644
index 00000000..9fa218af
--- /dev/null
+++ b/dev/Kernel/NewKit/Function.h
@@ -0,0 +1,53 @@
+#ifndef _INC_FUNCTION_H__
+#define _INC_FUNCTION_H__
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ template <typename T, typename... Args>
+ class Function final
+ {
+ public:
+ Function() = default;
+
+ public:
+ explicit Function(T (*Fn)(Args... args))
+ : fFn(Fn)
+ {
+ }
+
+ ~Function() = default;
+
+ Function& operator=(const Function&) = default;
+ Function(const Function&) = default;
+
+ template <typename... XArgs>
+ T operator()(Args... args)
+ {
+ return fFn(args...);
+ }
+
+ template <typename... XArgs>
+ T Call(Args... args)
+ {
+ return fFn(args...);
+ }
+
+ operator bool()
+ {
+ return fFn;
+ }
+
+ bool operator!()
+ {
+ return !fFn;
+ }
+
+ private:
+ T(*fFn)
+ (Args... args);
+ };
+} // namespace Kernel
+
+#endif // !_INC_FUNCTION_H__
diff --git a/dev/Kernel/NewKit/Json.h b/dev/Kernel/NewKit/Json.h
new file mode 100644
index 00000000..250bc716
--- /dev/null
+++ b/dev/Kernel/NewKit/Json.h
@@ -0,0 +1,151 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+// last-rev: 30/01/24
+
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Stream.h>
+#include <NewKit/KString.h>
+#include <NewKit/Utils.h>
+
+#define kMaxJsonPath 4096
+#define kJSONLen 32
+#define kJSONNull "null"
+
+namespace Kernel
+{
+ /// @brief Json class
+ class JSON final
+ {
+ public:
+ explicit JSON()
+ {
+ auto len = kJSONLen;
+ KString key = KString(len);
+ key += kJSONNull;
+
+ this->AsKey() = key;
+ this->AsValue() = key;
+ }
+
+ explicit JSON(SizeT lhsLen, SizeT rhsLen)
+ : fKey(lhsLen), fValue(rhsLen)
+ {
+ }
+
+ ~JSON() = default;
+
+ ZKA_COPY_DEFAULT(JSON);
+
+ const Bool& IsUndefined()
+ {
+ return fUndefined;
+ }
+
+ private:
+ Bool fUndefined; // is this instance undefined?
+ KString fKey;
+ KString fValue;
+
+ public:
+ /// @brief returns the key of the json
+ /// @return the key as string view.
+ KString& AsKey()
+ {
+ return fKey;
+ }
+
+ /// @brief returns the value of the json.
+ /// @return the key as string view.
+ KString& AsValue()
+ {
+ return fValue;
+ }
+
+ static JSON kNull;
+ };
+
+ /// @brief Json stream reader helper.
+ struct JsonStreamReader final
+ {
+ STATIC JSON In(const Char* full_array)
+ {
+ auto start_val = '{';
+ auto end_val = '}';
+ Boolean probe_value = false;
+
+ if (full_array[0] != start_val)
+ {
+ if (full_array[0] != '[')
+ return JSON::kNull;
+
+ start_val = '[';
+ end_val = ']';
+
+ probe_value = true;
+ }
+
+ SizeT len = rt_string_len(full_array);
+
+ SizeT key_len = 0;
+ SizeT value_len = 0;
+
+ JSON type(kMaxJsonPath, kMaxJsonPath);
+
+ for (SizeT i = 1; i < len; ++i)
+ {
+ if (full_array[i] == '\r' ||
+ full_array[i] == '\n')
+ continue;
+
+ if (probe_value)
+ {
+ if (full_array[i] == end_val ||
+ full_array[i] == ',')
+ {
+ probe_value = false;
+
+ ++value_len;
+ }
+ else
+ {
+ type.AsValue().Data()[value_len] = full_array[i];
+
+ ++value_len;
+ }
+ }
+ else
+ {
+ if (start_val == '[')
+ continue;
+
+ if (full_array[i] == ':')
+ {
+ probe_value = true;
+ type.AsKey().Data()[key_len] = 0;
+ ++key_len;
+ }
+ else
+ {
+ type.AsKey().Data()[key_len] = full_array[i];
+
+ ++key_len;
+ }
+ }
+ }
+
+ type.AsValue().Data()[value_len] = 0;
+
+ return type;
+ }
+ };
+
+ using JsonStream = Stream<JsonStreamReader, JSON>;
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/KString.h b/dev/Kernel/NewKit/KString.h
new file mode 100644
index 00000000..350623d7
--- /dev/null
+++ b/dev/Kernel/NewKit/KString.h
@@ -0,0 +1,94 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/Defines.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Utils.h>
+#include <NewKit/KernelPanic.h>
+
+#define cMinimumStringSize 8196
+
+namespace Kernel
+{
+ /// @brief KString static string class.
+ class KString final
+ {
+ public:
+ explicit KString()
+ {
+ fDataSz = cMinimumStringSize;
+
+ fData = new Char[fDataSz];
+ MUST_PASS(fData);
+
+ rt_set_memory(fData, 0, fDataSz);
+ }
+
+ explicit KString(const SizeT& Sz)
+ : fDataSz(Sz)
+ {
+ MUST_PASS(Sz > 1);
+
+ fData = new Char[Sz];
+ MUST_PASS(fData);
+
+ rt_set_memory(fData, 0, Sz);
+ }
+
+ ~KString()
+ {
+ if (fData)
+ {
+ delete[] fData;
+ fData = nullptr;
+ }
+ }
+
+ ZKA_COPY_DEFAULT(KString);
+
+ Char* Data();
+ const Char* CData() const;
+ Size Length() const;
+
+ bool operator==(const Char* rhs) const;
+ bool operator!=(const Char* rhs) const;
+
+ bool operator==(const KString& rhs) const;
+ bool operator!=(const KString& rhs) const;
+
+ KString& operator+=(const Char* rhs);
+ KString& operator+=(const KString& rhs);
+
+ operator bool()
+ {
+ return fData;
+ }
+
+ bool operator!()
+ {
+ return fData;
+ }
+
+ private:
+ Char* fData{nullptr};
+ Size fDataSz{0};
+ Size fCur{0};
+
+ friend class StringBuilder;
+ };
+
+ struct StringBuilder final
+ {
+ static ErrorOr<KString> Construct(const Char* data);
+ static const Char* FromBool(const Char* fmt, bool n);
+ static const Char* Format(const Char* fmt, const Char* from);
+ static bool Equals(const Char* lhs, const Char* rhs);
+ static bool Equals(const WideChar* lhs, const WideChar* rhs);
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/KernelPanic.h b/dev/Kernel/NewKit/KernelPanic.h
new file mode 100644
index 00000000..9255d9cc
--- /dev/null
+++ b/dev/Kernel/NewKit/KernelPanic.h
@@ -0,0 +1,64 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ void ke_runtime_check(bool expr, const Char* file, const Char* line);
+}
+
+#define MUST_PASS_COMPILER(EXPR, MSG) static_assert(EXPR, MSG)
+
+#define __MUST_PASS(EXPR, FILE, LINE) \
+ Kernel::ke_runtime_check(EXPR, FILE, STRINGIFY(LINE))
+
+#ifdef __DEBUG__
+#define MUST_PASS(EXPR) __MUST_PASS((EXPR), __FILE__, __LINE__)
+#define assert(EXPR) MUST_PASS(EXPR, RUNTIME_CHECK_EXPRESSION)
+#else
+#define MUST_PASS(EXPR) (Kernel::Void)(EXPR)
+#define assert(EXPR) (Kernel::Void)(EXPR)
+#endif
+
+enum RUNTIME_CHECK
+{
+ RUNTIME_CHECK_FAILED = 1111,
+ RUNTIME_CHECK_POINTER,
+ RUNTIME_CHECK_EXPRESSION,
+ RUNTIME_CHECK_FILE,
+ RUNTIME_CHECK_IPC,
+ RUNTIME_CHECK_TLS,
+ RUNTIME_CHECK_HANDSHAKE,
+ RUNTIME_CHECK_ACPI,
+ RUNTIME_CHECK_INVALID_PRIVILEGE,
+ RUNTIME_CHECK_PROCESS,
+ RUNTIME_CHECK_BAD_BEHAVIOR,
+ RUNTIME_CHECK_BOOTSTRAP,
+ RUNTIME_CHECK_UNEXCPECTED,
+ RUNTIME_CHECK_FILESYSTEM,
+ RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM,
+ RUNTIME_CHECK_PAGE,
+ RUNTIME_CHECK_COUNT,
+};
+
+namespace Kernel
+{
+ void ke_panic(const Int32& id, const Char* message = nullptr);
+} // namespace Kernel
+
+#ifdef TRY
+#undef TRY
+#endif
+
+#define TRY(FN) \
+ if (!FN()) \
+ { \
+ MUST_PASS(false); \
+ }
diff --git a/dev/Kernel/NewKit/Macros.h b/dev/Kernel/NewKit/Macros.h
new file mode 100644
index 00000000..f2a92b68
--- /dev/null
+++ b/dev/Kernel/NewKit/Macros.h
@@ -0,0 +1,149 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#ifndef KIB
+#define KIB(X) (Kernel::UInt64)((X) / 1024)
+#endif
+
+#ifndef kib_cast
+#define kib_cast(X) (Kernel::UInt64)((X) * 1024)
+#endif
+
+#ifndef MIB
+#define MIB(X) (Kernel::UInt64)((Kernel::UInt64)KIB(X) / 1024)
+#endif
+
+#ifndef mib_cast
+#define mib_cast(X) (Kernel::UInt64)((Kernel::UInt64)kib_cast(X) * 1024)
+#endif
+
+#ifndef GIB
+#define GIB(X) (Kernel::UInt64)((Kernel::UInt64)MIB(X) / 1024)
+#endif
+
+#ifndef gib_cast
+#define gib_cast(X) (Kernel::UInt64)((Kernel::UInt64)mib_cast(X) * 1024)
+#endif
+
+#ifndef TIB
+#define TIB(X) (Kernel::UInt64)((Kernel::UInt64)GIB(X) / 1024)
+#endif
+
+#ifndef tib_cast
+#define tib_cast(X) ((Kernel::UInt64)gib_cast(X) * 1024)
+#endif
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) \
+ (((sizeof(a) / sizeof(*(a))) / \
+ (static_cast<Kernel::Size>(!(sizeof(a) % sizeof(*(a)))))))
+#endif
+
+#define DEPRECATED ATTRIBUTE(deprecated)
+
+#ifndef ALIGN
+#define ALIGN(X) __attribute__((aligned(X)))
+#endif // #ifndef ALIGN
+
+#ifndef ATTRIBUTE
+#define ATTRIBUTE(X) __attribute__((X))
+#endif // #ifndef ATTRIBUTE
+
+#ifndef __ZKA_VER__
+#define __ZKA_VER__ (2024)
+#endif // !__ZKA_VER__
+
+#ifndef EXTERN
+#define EXTERN extern
+#endif
+
+#ifndef EXTERN_C
+#define EXTERN_C extern "C"
+#endif
+
+#ifndef MAKE_ENUM
+#define MAKE_ENUM(NAME) \
+ enum NAME \
+ {
+#endif
+
+#ifndef END_ENUM
+#define END_ENUM() \
+ } \
+ ;
+#endif
+
+#ifndef MAKE_STRING_ENUM
+#define MAKE_STRING_ENUM(NAME) \
+ namespace NAME \
+ {
+#endif
+
+#ifndef ENUM_STRING
+#define ENUM_STRING(NAME, VAL) inline constexpr const char* e##NAME = VAL
+#endif
+
+#ifndef END_STRING_ENUM
+#define END_STRING_ENUM() }
+#endif
+
+#ifndef rtl_alloca
+#define rtl_alloca(sz) __builtin_alloca(sz)
+#endif // #ifndef rtl_alloca
+
+#ifndef CANT_REACH
+#define CANT_REACH() __builtin_unreachable()
+#endif
+
+#define kInvalidAddress 0xFBFBFBFBFBFBFBFB
+#define kBadAddress 0x0000000000000000
+#define kMaxAddr 0xFFFFFFFFFFFFFFFF
+#define kPathLen 0x100
+
+#define PACKED ATTRIBUTE(packed)
+#define NO_EXEC ATTRIBUTE(noexec)
+
+#define EXTERN extern
+#define STATIC static
+
+#define CONST const
+
+#define STRINGIFY(X) #X
+#define ZKA_UNUSED(X) ((Kernel::Void)X)
+
+#ifndef RGB
+#define RGB(R, G, B) (Kernel::UInt32)(R | G << 0x8 | B << 0x10)
+#endif // !RGB
+
+#ifdef __ZKA_AMD64__
+#define dbg_break_point() asm volatile("int $3")
+#else
+#define dbg_break_point() ((void)0)
+#endif
+
+#define rtl_deduce_endianess(address, value) \
+ (((reinterpret_cast<Kernel::Char*>(address)[0]) == (value)) \
+ ? (Kernel::Endian::kEndianBig) \
+ : (Kernel::Endian::kEndianLittle))
+
+#define Yes true
+#define No false
+
+#define YES true
+#define NO false
+
+#define TRUE true
+#define FALSE false
+
+#define BOOL Kernel::Boolean
+
+#ifdef RTL_INIT_OBJECT
+#undef RTL_INIT_OBJECT
+#endif // ifdef RTL_INIT_OBJECT
+
+#define RTL_INIT_OBJECT(OBJ, TYPE, ...) TYPE OBJ = TYPE(__VA_ARGS__)
diff --git a/dev/Kernel/NewKit/MutableArray.h b/dev/Kernel/NewKit/MutableArray.h
new file mode 100644
index 00000000..36159212
--- /dev/null
+++ b/dev/Kernel/NewKit/MutableArray.h
@@ -0,0 +1,239 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/Array.h>
+#include <NewKit/Defines.h>
+
+#define TRY_FIND_NODE(NAME, NODE) \
+ auto* NAME = NODE; \
+ while (NAME) \
+ { \
+ if (NAME->fIndex == Index) \
+ return NAME->fVal; \
+ NAME = NAME->fNext; \
+ }
+
+#define TRY_FIND_NODE2(NAME, NODE) \
+ auto* NAME = NODE; \
+ while (NAME) \
+ { \
+ if (NAME->fIndex == Index) \
+ return Ref<T>{NAME->fVal}; \
+ NAME = NAME->fNext; \
+ }
+
+#define TRY_REMOVE_NODE(NODE) \
+ if (NODE && NODE->fIndex == Index) \
+ { \
+ NODE->fUsed = false; \
+ NODE->fIndex = 0; \
+ \
+ return true; \
+ }
+
+// FIXME: this is a shitty algorithm, which is consumer hungry.
+// Remove and occurences of that, and remove that class.
+namespace Kernel
+{
+ template <typename T>
+ class MutableArray;
+
+ template <typename T, T _PlaceHolderValue>
+ class NullableMutableArray;
+
+ template <typename T>
+ class MutableLinkedList
+ {
+ public:
+ T fVal;
+ SizeT fIndex{0};
+ Boolean fUsed{false};
+
+ MutableLinkedList* fPrev{nullptr};
+ MutableLinkedList* fNext{nullptr};
+ };
+
+ template <typename T, T _PlaceHolderValue>
+ class NullableMutableArray
+ {
+ public:
+ // explicit this.
+ explicit NullableMutableArray()
+ : fFirstNode(new MutableLinkedList<T>())
+ {
+ }
+
+ /*
+ * We free all the nodes allocated by the array
+ * and store the next one inside "NextIt"
+ */
+
+ virtual ~NullableMutableArray()
+ {
+ auto* It = fFirstNode;
+ MutableLinkedList<T>* NextIt = nullptr;
+
+ while (It)
+ {
+ NextIt = It->fNext;
+ delete It;
+
+ It = NextIt;
+ }
+ }
+
+ NullableMutableArray& operator=(const NullableMutableArray&) = default;
+ NullableMutableArray(const NullableMutableArray&) = default;
+
+ operator bool()
+ {
+ return Count() > 1;
+ }
+
+ public:
+ T operator[](const SizeT& Index) const
+ {
+ TRY_FIND_NODE(first, fFirstNode);
+ TRY_FIND_NODE(last, fLastNode);
+
+ return _PlaceHolderValue;
+ }
+
+ SizeT Count() const
+ {
+ return fNodeCount;
+ }
+
+ public:
+ Boolean Remove(const SizeT& Index)
+ {
+ TRY_REMOVE_NODE(fFirstNode);
+ TRY_REMOVE_NODE(fLastNode);
+
+ return false;
+ }
+
+ Boolean Add(const T val)
+ {
+ auto* iterationNode = fFirstNode;
+ MUST_PASS(iterationNode);
+
+ while (iterationNode)
+ {
+ if (!iterationNode->fUsed)
+ {
+ iterationNode->fVal = val;
+ iterationNode->fIndex = 0;
+
+ iterationNode->fUsed = true;
+
+ ++fNodeCount;
+
+ return true;
+ }
+
+ iterationNode = iterationNode->fNext;
+ }
+
+ return false;
+ }
+
+ private:
+ /* Avoid useless lookups */
+ MutableLinkedList<T>* fLastNode{nullptr};
+ MutableLinkedList<T>* fFirstNode{nullptr};
+
+ /* Number of nodes inside of this dynamic array. */
+ Kernel::SizeT fNodeCount{0};
+
+ private:
+ // don't remove that
+ friend MutableArray<T>;
+ };
+
+ template <typename T>
+ class MutableArray : public NullableMutableArray<voidPtr, nullptr>
+ {
+ public:
+ // explicit this.
+ explicit MutableArray() = default;
+ virtual ~MutableArray() = default;
+
+ ZKA_COPY_DEFAULT(MutableArray)
+
+ public:
+ Boolean Add(const T val)
+ {
+ auto* iterationNode = fFirstNode;
+
+ if (!iterationNode)
+ {
+ fFirstNode = new MutableLinkedList<T>();
+ iterationNode = fFirstNode;
+ }
+
+ MUST_PASS(iterationNode);
+
+ while (iterationNode)
+ {
+ if (!iterationNode->fUsed)
+ {
+ iterationNode->fVal = val;
+ iterationNode->fIndex = 0;
+
+ iterationNode->fUsed = true;
+
+ ++fNodeCount;
+
+ return true;
+ }
+
+ iterationNode = iterationNode->fNext;
+ }
+
+ return false;
+ }
+
+ public:
+ Ref<T> operator[](const SizeT& Index) const
+ {
+ TRY_FIND_NODE2(first, fFirstNode);
+ TRY_FIND_NODE2(last, fLastNode);
+
+ return {};
+ }
+
+ SizeT Count() const
+ {
+ return fNodeCount;
+ }
+
+ bool Contains(T& value) noexcept
+ {
+ MutableLinkedList<T>* first = fFirstNode;
+
+ while (first)
+ {
+ if (first->fVal == value && first->fUsed)
+ return true;
+
+ first = first->fNext;
+ }
+
+ return false;
+ }
+
+ private:
+ /* Avoid useless lookups */
+ MutableLinkedList<T>* fLastNode{nullptr};
+ MutableLinkedList<T>* fFirstNode{nullptr};
+
+ /* Number of nodes inside of this dynamic array. */
+ Kernel::SizeT fNodeCount{0};
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/New.h b/dev/Kernel/NewKit/New.h
new file mode 100644
index 00000000..989f72e2
--- /dev/null
+++ b/dev/Kernel/NewKit/New.h
@@ -0,0 +1,20 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/Heap.h>
+
+/// @note compatible with tk too.
+typedef __SIZE_TYPE__ size_t;
+
+void* operator new(size_t ptr);
+void* operator new[](size_t ptr);
+
+void operator delete(void* ptr);
+void operator delete(void* ptr, unsigned long);
+void operator delete[](void* ptr);
diff --git a/dev/Kernel/NewKit/NewKit.h b/dev/Kernel/NewKit/NewKit.h
new file mode 100644
index 00000000..0b4eb00b
--- /dev/null
+++ b/dev/Kernel/NewKit/NewKit.h
@@ -0,0 +1,20 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Array.h>
+#include <NewKit/ArrayList.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Json.h>
+#include <NewKit/KernelPanic.h>
+#include <NewKit/MutableArray.h>
+#include <NewKit/New.h>
+#include <NewKit/OwnPtr.h>
+#include <NewKit/Ref.h>
+#include <NewKit/Stream.h>
+#include <NewKit/Utils.h>
diff --git a/dev/Kernel/NewKit/OwnPtr.h b/dev/Kernel/NewKit/OwnPtr.h
new file mode 100644
index 00000000..7e0c6ef9
--- /dev/null
+++ b/dev/Kernel/NewKit/OwnPtr.h
@@ -0,0 +1,94 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/KernelPanic.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ template <typename T>
+ class OwnPtr;
+
+ template <typename T>
+ class NonNullRefPtr;
+
+ template <typename T>
+ class OwnPtr final
+ {
+ public:
+ OwnPtr()
+ {
+ }
+ ~OwnPtr()
+ {
+ this->Delete();
+ }
+
+ OwnPtr& operator=(const OwnPtr&) = default;
+ OwnPtr(const OwnPtr&) = default;
+
+ public:
+ template <typename... Args>
+ bool New(Args&&... arg)
+ {
+ if (fCls)
+ {
+ return false;
+ }
+
+ fCls = new T(arg...);
+ return fCls;
+ }
+
+ void Delete()
+ {
+ if (fCls)
+ delete fCls;
+
+ fCls = nullptr;
+ }
+
+ T* operator->() const
+ {
+ return fCls;
+ };
+ T* Raw()
+ {
+ return fCls;
+ }
+
+ Ref<T> AsRef()
+ {
+ return Ref<T>(fCls);
+ }
+
+ operator bool()
+ {
+ return fCls;
+ }
+ bool operator!()
+ {
+ return !fCls;
+ }
+
+ private:
+ T* fCls;
+ };
+
+ template <typename T, typename... Args>
+ OwnPtr<T> make_ptr(Args... args)
+ {
+ OwnPtr<T> ret;
+ ret.template New<Args...>(forward(args)...);
+ MUST_PASS(ret);
+
+ return ret;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/PageMgr.h b/dev/Kernel/NewKit/PageMgr.h
new file mode 100644
index 00000000..f12aa875
--- /dev/null
+++ b/dev/Kernel/NewKit/PageMgr.h
@@ -0,0 +1,81 @@
+// a way to create and find our pages.
+// I'm thinking about a separate way of getting a paged area.
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ class PageMgr;
+
+ class PTEWrapper final
+ {
+ public:
+ explicit PTEWrapper(Boolean Rw = false, Boolean User = false, Boolean ExecDisable = false, UIntPtr Address = 0);
+
+ ~PTEWrapper();
+
+ PTEWrapper& operator=(const PTEWrapper&) = default;
+ PTEWrapper(const PTEWrapper&) = default;
+
+ public:
+ const UIntPtr VirtualAddress();
+
+ Void NoExecute(const bool enable = false);
+ Bool NoExecute();
+
+ operator bool()
+ {
+ return fVirtAddr;
+ }
+
+ bool Reclaim();
+ bool Shareable();
+ bool Present();
+ bool Access();
+
+ private:
+ Boolean fRw;
+ Boolean fUser;
+ Boolean fExecDisable;
+ UIntPtr fVirtAddr;
+ Boolean fCache;
+ Boolean fShareable;
+ Boolean fWt;
+ Boolean fPresent;
+ Boolean fAccessed;
+
+ private:
+ friend class PageMgr;
+ friend class Pmm;
+ };
+
+ struct PageMgr final
+ {
+ public:
+ PageMgr() = default;
+ ~PageMgr() = default;
+
+ PageMgr& operator=(const PageMgr&) = default;
+ PageMgr(const PageMgr&) = default;
+
+ public:
+ PTEWrapper Request(Boolean Rw, Boolean User, Boolean ExecDisable, SizeT Sz);
+ bool Free(Ref<PTEWrapper>& wrapper);
+
+ private:
+ void FlushTLB();
+
+ private:
+ friend PTEWrapper;
+ friend class Pmm;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Pair.h b/dev/Kernel/NewKit/Pair.h
new file mode 100644
index 00000000..851fe45b
--- /dev/null
+++ b/dev/Kernel/NewKit/Pair.h
@@ -0,0 +1,14 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ class Pair;
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Pmm.h b/dev/Kernel/NewKit/Pmm.h
new file mode 100644
index 00000000..0eb749c1
--- /dev/null
+++ b/dev/Kernel/NewKit/Pmm.h
@@ -0,0 +1,44 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/PageMgr.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ class Pmm;
+ class PTEWrapper;
+
+ class Pmm final
+ {
+ public:
+ explicit Pmm();
+ ~Pmm();
+
+ Pmm& operator=(const Pmm&) = delete;
+ Pmm(const Pmm&) = default;
+
+ Ref<PTEWrapper> RequestPage(Boolean user = false, Boolean readWrite = false);
+ Boolean FreePage(Ref<PTEWrapper> refPage);
+
+ Boolean ToggleRw(Ref<PTEWrapper> refPage, Boolean enable = true);
+ Boolean TogglePresent(Ref<PTEWrapper> refPage, Boolean enable = true);
+ Boolean ToggleUser(Ref<PTEWrapper> refPage, Boolean enable = true);
+ Boolean ToggleShare(Ref<PTEWrapper> refPage, Boolean enable = true);
+
+ /// @brief Get the page manager of this.
+ Ref<PageMgr>& Leak()
+ {
+ return fPageMgr;
+ }
+
+ private:
+ Ref<PageMgr> fPageMgr;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Ref.h b/dev/Kernel/NewKit/Ref.h
new file mode 100644
index 00000000..f91d0c1d
--- /dev/null
+++ b/dev/Kernel/NewKit/Ref.h
@@ -0,0 +1,108 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef _NEWKIT_REF_H_
+#define _NEWKIT_REF_H_
+
+#include <NewKit/Defines.h>
+#include <NewKit/KernelPanic.h>
+#include <KernelKit/Heap.h>
+
+namespace Kernel
+{
+ template <typename T>
+ class Ref final
+ {
+ public:
+ Ref() = default;
+
+ ~Ref()
+ {
+ if (mm_is_valid_heap(fClass))
+ delete fClass;
+ }
+
+ public:
+ Ref(T* cls)
+ : fClass(cls)
+ {
+ }
+
+ Ref(T cls)
+ : fClass(&cls)
+ {
+ }
+
+ Ref& operator=(T ref)
+ {
+ if (!fClass)
+ return *this;
+
+ fClass = &ref;
+ return *this;
+ }
+
+ public:
+ T operator->() const
+ {
+ MUST_PASS(*fClass);
+ return *fClass;
+ }
+
+ T& Leak() noexcept
+ {
+ return *fClass;
+ }
+
+ T& TryLeak() const noexcept
+ {
+ MUST_PASS(*fClass);
+ return *fClass;
+ }
+
+ T operator*()
+ {
+ return *fClass;
+ }
+
+ operator bool() noexcept
+ {
+ return fClass;
+ }
+
+ private:
+ T* fClass{nullptr};
+ };
+
+ template <typename T>
+ class NonNullRef final
+ {
+ public:
+ NonNullRef() = delete;
+ NonNullRef(nullPtr) = delete;
+
+ NonNullRef(T* ref)
+ : fRef(ref)
+ {
+ MUST_PASS(ref);
+ }
+
+ Ref<T>& operator->()
+ {
+ MUST_PASS(fRef);
+ return fRef;
+ }
+
+ NonNullRef& operator=(const NonNullRef<T>& ref) = delete;
+ NonNullRef(const NonNullRef<T>& ref) = default;
+
+ private:
+ Ref<T> fRef{nullptr};
+ };
+} // namespace Kernel
+
+#endif // ifndef _NEWKIT_REF_H_
diff --git a/dev/Kernel/NewKit/Stream.h b/dev/Kernel/NewKit/Stream.h
new file mode 100644
index 00000000..90b828a5
--- /dev/null
+++ b/dev/Kernel/NewKit/Stream.h
@@ -0,0 +1,58 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ template <typename StreamTrait, typename Kind>
+ class Stream final
+ {
+ public:
+ explicit Stream(Ref<Stream> ref)
+ : fStream(ref)
+ {
+ }
+
+ ~Stream() = default;
+
+ Stream& operator=(const Stream&) = default;
+ Stream(const Stream&) = default;
+
+ template <typename Data>
+ friend Stream<StreamTrait, Kind>& operator>>(Stream<StreamTrait, Kind>& Ks, Ref<Data>& Buf)
+ {
+ Ks.fKind = Ks.fStream->In(Buf);
+ return *Ks;
+ }
+
+ template <typename Data>
+ friend Stream<StreamTrait, Kind>& operator<<(Stream<StreamTrait, Kind>& Ks, Ref<Data>& Buf)
+ {
+ Ks.fKind = Buf;
+ Ks.fStream->Out(Buf.Leak());
+ return *Ks;
+ }
+
+ Ref<StreamTrait>& AsStreamTrait()
+ {
+ return fStream;
+ }
+
+ Ref<Kind>& AsType()
+ {
+ return fKind;
+ }
+
+ private:
+ Ref<StreamTrait> fStream;
+ Ref<Kind> fKind;
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Utils.h b/dev/Kernel/NewKit/Utils.h
new file mode 100644
index 00000000..6b99fec4
--- /dev/null
+++ b/dev/Kernel/NewKit/Utils.h
@@ -0,0 +1,29 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len);
+ Int rt_move_memory(const voidPtr src, voidPtr dst, Size len);
+ voidPtr rt_set_memory(voidPtr dst, UInt32 val, Size len);
+ void rt_zero_memory(voidPtr pointer, Size len);
+ Int rt_string_cmp(const Char* src, const Char* cmp, Size len);
+ const Char* rt_alloc_string(const Char* text);
+ Size rt_string_len(const Char* str);
+ Size rt_string_len(const Char* str, SizeT _len);
+ Boolean rt_to_string(Char* buf, UInt64 base, Int32 limit);
+ Boolean is_newln(Char chr);
+ Boolean is_space(Char chr);
+ Int rt_to_uppercase(Int c);
+ Int rt_to_lower(Int c);
+ voidPtr rt_string_in_string(const Char* in, const Char* needle);
+ char* rt_string_has_char(Char* str, const Char chr);
+} // namespace Kernel
diff --git a/dev/Kernel/NewKit/Variant.h b/dev/Kernel/NewKit/Variant.h
new file mode 100644
index 00000000..c603773f
--- /dev/null
+++ b/dev/Kernel/NewKit/Variant.h
@@ -0,0 +1,70 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+#include <NewKit/Json.h>
+
+namespace Kernel
+{
+ class Variant final
+ {
+ public:
+ enum class VariantKind
+ {
+ kString,
+ kBlob,
+ kNull,
+ kJson,
+ kXML,
+ };
+
+ public:
+ explicit Variant() = delete;
+
+ public:
+ ZKA_COPY_DEFAULT(Variant);
+
+ ~Variant() = default;
+
+ public:
+ explicit Variant(KString* stringView)
+ : fPtr((VoidPtr)stringView), fKind(VariantKind::kString)
+ {
+ }
+
+ explicit Variant(JSON* json)
+ : fPtr((VoidPtr)json), fKind(VariantKind::kJson)
+ {
+ }
+
+ explicit Variant(nullPtr)
+ : fPtr(nullptr), fKind(VariantKind::kNull)
+ {
+ }
+
+ explicit Variant(VoidPtr ptr)
+ : fPtr(ptr), fKind(VariantKind::kBlob)
+ {
+ }
+
+ public:
+ const Char* ToString();
+ VoidPtr Leak();
+
+ template <typename T>
+ T* As()
+ {
+ return reinterpret_cast<T*>(fPtr);
+ }
+
+ private:
+ voidPtr fPtr{nullptr};
+ VariantKind fKind{VariantKind::kNull};
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/POSIXKit/signal.h b/dev/Kernel/POSIXKit/signal.h
new file mode 100644
index 00000000..75e6bf59
--- /dev/null
+++ b/dev/Kernel/POSIXKit/signal.h
@@ -0,0 +1,20 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+/** https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html */
+
+#include <POSIXKit/unix_layer.h>
+
+typedef Kernel::UInt32 signal_t;
+
+#define SIGKILL 0
+#define SIGPAUS 1
+#define SIGEXEC 2
+#define SIGTRAP 3
+#define SIGABRT 4
+#define SIGCONT 5
diff --git a/dev/Kernel/POSIXKit/unix_layer.h b/dev/Kernel/POSIXKit/unix_layer.h
new file mode 100644
index 00000000..f543ed41
--- /dev/null
+++ b/dev/Kernel/POSIXKit/unix_layer.h
@@ -0,0 +1,13 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <SystemKit/TeamScheduler.h>
+#include <SystemKit/SwapDisk.h> \ No newline at end of file
diff --git a/dev/Kernel/ReadMe.md b/dev/Kernel/ReadMe.md
new file mode 100644
index 00000000..f90bc5e5
--- /dev/null
+++ b/dev/Kernel/ReadMe.md
@@ -0,0 +1,3 @@
+# ZkaOS Minimal Kernel DLL.
+
+An EXE which takes the role of the Minimal Kernel Image.
diff --git a/dev/Kernel/StorageKit/AHCI.h b/dev/Kernel/StorageKit/AHCI.h
new file mode 100644
index 00000000..5641898a
--- /dev/null
+++ b/dev/Kernel/StorageKit/AHCI.h
@@ -0,0 +1,33 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DeviceMgr.h>
+#include <KernelKit/DriveMgr.h>
+#include <NewKit/OwnPtr.h>
+
+namespace Kernel
+{
+ class AHCIDeviceInterface ZKA_DEVICE<MountpointInterface*>
+ {
+ public:
+ explicit AHCIDeviceInterface(void (*Out)(MountpointInterface* outpacket),
+ void (*In)(MountpointInterface* inpacket),
+ void (*Cleanup)(void));
+
+ virtual ~AHCIDeviceInterface();
+
+ public:
+ AHCIDeviceInterface& operator=(const AHCIDeviceInterface&) = default;
+ AHCIDeviceInterface(const AHCIDeviceInterface&) = default;
+
+ const Char* Name() const override;
+
+ private:
+ void (*fCleanup)(void) = {nullptr};
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/StorageKit/ATA.h b/dev/Kernel/StorageKit/ATA.h
new file mode 100644
index 00000000..5551d96b
--- /dev/null
+++ b/dev/Kernel/StorageKit/ATA.h
@@ -0,0 +1,39 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DeviceMgr.h>
+#include <KernelKit/DriveMgr.h>
+#include <NewKit/OwnPtr.h>
+#include <NewKit/Utils.h>
+
+namespace Kernel
+{
+ /// @brief ATA device interface type.
+ class ATADeviceInterface : public IDeviceObject<MountpointInterface*>
+ {
+ public:
+ explicit ATADeviceInterface(void (*Out)(MountpointInterface* outpacket),
+ void (*In)(MountpointInterface* inpacket),
+ void (*Cleanup)(void));
+
+ virtual ~ATADeviceInterface();
+
+ public:
+ ATADeviceInterface& operator<<(MountpointInterface* Data) override;
+ ATADeviceInterface& operator>>(MountpointInterface* Data) override;
+
+ public:
+ ATADeviceInterface& operator=(const ATADeviceInterface&) = default;
+ ATADeviceInterface(const ATADeviceInterface&) = default;
+
+ const Char* Name() const override;
+
+ private:
+ void (*fCleanup)(void) = {nullptr};
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/StorageKit/NVME.h b/dev/Kernel/StorageKit/NVME.h
new file mode 100644
index 00000000..f4a8393a
--- /dev/null
+++ b/dev/Kernel/StorageKit/NVME.h
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/DeviceMgr.h>
+#include <KernelKit/DriveMgr.h>
+
+namespace Kernel
+{
+ class NVMEDeviceInterface final ZKA_DEVICE<MountpointInterface*>
+ {
+ public:
+ explicit NVMEDeviceInterface(Void (*out)(MountpointInterface* out_packet),
+ Void (*in)(MountpointInterface* in_packet),
+ Void (*cleanup)(Void));
+
+ ~NVMEDeviceInterface() override;
+
+ public:
+ ZKA_COPY_DEFAULT(NVMEDeviceInterface);
+
+ const Char* Name() const override;
+
+ public:
+ OwnPtr<MountpointInterface*> operator()(UInt32 dma_low, UInt32 dma_high, SizeT dma_sz);
+
+ private:
+ Void (*fCleanup)(Void) = {nullptr};
+ };
+} // namespace Kernel
diff --git a/dev/Kernel/StorageKit/PRDT.h b/dev/Kernel/StorageKit/PRDT.h
new file mode 100644
index 00000000..ef9b9d4a
--- /dev/null
+++ b/dev/Kernel/StorageKit/PRDT.h
@@ -0,0 +1,36 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/PCI/DMA.h>
+#include <KernelKit/PCI/Iterator.h>
+#include <NewKit/Ref.h>
+
+#define kPrdtTransferSize (sizeof(Kernel::UShort))
+
+namespace Kernel
+{
+ /// @brief Tranfer information about PRD.
+ enum kPRDTTransfer
+ {
+ kPRDTTransferInProgress,
+ kPRDTTransferIsDone,
+ kPRDTTransferCount,
+ };
+
+ /// @brief Physical Region Descriptor Table.
+ struct PRDT
+ {
+ UInt32 fPhysAddress;
+ UInt32 fSectorCount;
+ UInt8 fEndBit;
+ };
+
+ void construct_prdt(Ref<PRDT>& prd);
+
+ EXTERN_C Int32 kPRDTTransferStatus;
+} // namespace Kernel
diff --git a/dev/Kernel/StorageKit/SCSI.h b/dev/Kernel/StorageKit/SCSI.h
new file mode 100644
index 00000000..51ee0609
--- /dev/null
+++ b/dev/Kernel/StorageKit/SCSI.h
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Mod/SCSI/SCSI.h>
+
+extern const scsi_packet_type<12> kCDRomPacketTemplate;
diff --git a/dev/Kernel/StorageKit/StorageKit.h b/dev/Kernel/StorageKit/StorageKit.h
new file mode 100644
index 00000000..ad358e90
--- /dev/null
+++ b/dev/Kernel/StorageKit/StorageKit.h
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#define kDriveSectorSizeHDD (512U)
+#define kDriveSectorSizeSSD (512U)
+#define kDriveSectorSizeOptical (2048)
+
+namespace Kernel
+{
+ template <typename T>
+ class IDeviceObject;
+
+ class NVMEDeviceInterface;
+ class AHCIDeviceInterface;
+ class ATADeviceInterface;
+ class SCSIDeviceInterface;
+} // namespace Kernel
diff --git a/dev/Kernel/SystemKit/SwapDisk.h b/dev/Kernel/SystemKit/SwapDisk.h
new file mode 100644
index 00000000..05f7b2d5
--- /dev/null
+++ b/dev/Kernel/SystemKit/SwapDisk.h
@@ -0,0 +1,48 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025 Amlal EL Mahrouss Labs, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <CompilerKit/CompilerKit.h>
+
+#define kSwapBlockMaxSize (mib_cast(16))
+#define kSwapPageFile "/boot/pagefile.sys"
+
+/// @file SwapDisk.h
+/// @brief Virtual memory swap disk.
+
+namespace Kernel
+{
+ struct SWAP_DISK_HEADER;
+
+ /// @brief This class is a disk swap delegate for any data. available as a syscall too.
+ class SwapDisk final
+ {
+ public:
+ explicit SwapDisk() = default;
+ ~SwapDisk() = default;
+
+ ZKA_COPY_DEFAULT(SwapDisk);
+
+ BOOL Write(const Char* fork_name, const SizeT fork_name_len, SWAP_DISK_HEADER* data, const SizeT data_len);
+ SWAP_DISK_HEADER* Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len);
+ };
+
+ typedef struct SWAP_DISK_HEADER
+ {
+ UInt32 fMagic;
+ SizeT fHeaderSz;
+ UInt64 fTeamID;
+ UInt64 fProcessID;
+ UInt64 fVirtualAddress;
+ SizeT fBlobSz;
+ Char fBlob[];
+ } PACKED SWAP_DISK_HEADER;
+
+ typedef SWAP_DISK_HEADER* SWAP_DISK_HEADER_REF;
+} // namespace Kernel
diff --git a/dev/Kernel/SystemKit/TeamScheduler.h b/dev/Kernel/SystemKit/TeamScheduler.h
new file mode 100644
index 00000000..92d3b5d6
--- /dev/null
+++ b/dev/Kernel/SystemKit/TeamScheduler.h
@@ -0,0 +1,20 @@
+
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+/// @file TeamScheduler.h
+/// @brief This file takes care of creating processes/threads from a subsystem context.
+
+namespace Kernel
+{
+ class UserSubsystem;
+ class UserEnvVar;
+ class UserEnv;
+} // namespace Kernel \ No newline at end of file
diff --git a/dev/Kernel/amd64-desktop.make b/dev/Kernel/amd64-desktop.make
new file mode 100644
index 00000000..9f6e94e3
--- /dev/null
+++ b/dev/Kernel/amd64-desktop.make
@@ -0,0 +1,85 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the minoskrnl's makefile.
+##################################################
+
+CXX = x86_64-w64-mingw32-g++
+LD = x86_64-w64-mingw32-ld
+CCFLAGS = -fshort-wchar -c -D__ZKA_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions -std=c++20 -D__ZKA_SUPPORT_NX__ -O0 -I../Vendor -D__FSKIT_INCLUDES_NEFS__ -D__MINOSKRNL__ -D__HAVE_ZKA_APIS__ -D__FREESTANDING__ -D__ZKA_VIRTUAL_MEMORY_SUPPORT__ -D__ZKA_AUTO_FORMAT__ -D__ZKA__ -I./ -I../ -I../zba
+
+ASM = nasm
+
+DISK_DRV =
+
+ifneq ($(ATA_PIO_SUPPORT), )
+DISK_DRV = -D__ATA_PIO__
+endif
+
+ifneq ($(ATA_DMA_SUPPORT), )
+DISK_DRV = -D__ATA_DMA__
+endif
+
+ifneq ($(AHCI_SUPPORT), )
+DISK_DRV = -D__AHCI__
+endif
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG_MACRO = -D__DEBUG__
+endif
+
+COPY = cp
+
+# Add assembler, linker, and object files variables.
+ASMFLAGS = -f win64
+
+# Kernel subsystem is 17 and entrypoint is hal_init_platform
+LDFLAGS = -e hal_init_platform --subsystem=17 --image-base 0x4000000
+LDOBJ = obj/*.obj
+
+# This file is the Kernel, responsible of task, memory, driver, sci, disk and device management.
+KERNEL_IMG = minoskrnl.exe
+
+.PHONY: error
+error:
+ @echo "=== ERROR ==="
+ @echo "=> Use a specific target."
+
+MOVEALL=./MoveAll.X64.sh
+WINDRES=x86_64-w64-mingw32-windres
+
+.PHONY: newos-amd64-epm
+newos-amd64-epm: clean
+ clear
+ @echo "!!! Please build what is needed by HALKit/AMD64/HalApplicationProcessorGNU.s !!!"
+ @echo "!!! Please build what is needed by HALKit/AMD64/HalApplicationProcessorGNU.s !!!"
+ @echo "!!! Please build what is needed by HALKit/AMD64/HalApplicationProcessorGNU.s !!!"
+ @sleep 3
+
+ $(WINDRES) KernelRsrc.rsrc -O coff -o KernelRsrc.obj
+ $(CXX) $(CCFLAGS) $(DISK_DRV) $(DEBUG_MACRO) $(wildcard src/*.cc) $(wildcard HALKit/AMD64/PCI/*.cc) $(wildcard src/Network/*.cc) $(wildcard src/Storage/*.cc) $(wildcard src/FS/*.cc) $(wildcard HALKit/AMD64/Storage/*.cc) $(wildcard HALKit/AMD64/*.cc) $(wildcard src/System/*.cc) $(wildcard HALKit/AMD64/*.s)
+ $(ASM) $(ASMFLAGS) HALKit/AMD64/HalInterruptAPI.asm
+ $(ASM) $(ASMFLAGS) HALKit/AMD64/HalCommonAPI.asm
+ $(ASM) $(ASMFLAGS) HALKit/AMD64/HalBoot.asm
+ $(ASM) $(ASMFLAGS) HALKit/AMD64/HalUtils.asm
+ $(MOVEALL)
+
+OBJCOPY=x86_64-w64-mingw32-objcopy
+
+.PHONY: link-amd64-epm
+link-amd64-epm:
+ $(LD) $(LDFLAGS) $(LDOBJ) -o $(KERNEL_IMG)
+
+.PHONY: all
+all: newos-amd64-epm link-amd64-epm
+ @echo "Kernel => OK."
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "all: Build Kernel and link it."
+ @echo "link-amd64-epm: Link Kernel for EPM based disks."
+ @echo "newos-amd64-epm: Build Kernel for EPM based disks."
+
+.PHONY: clean
+clean:
+ rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL_IMG)
diff --git a/dev/Kernel/arm64-desktop.make b/dev/Kernel/arm64-desktop.make
new file mode 100644
index 00000000..4cfb1076
--- /dev/null
+++ b/dev/Kernel/arm64-desktop.make
@@ -0,0 +1,64 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the microKernel makefile.
+##################################################
+
+CC = clang++
+LD = lld-link
+CCFLAGS = -fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__ZKA_ARM64__ -fno-rtti -fno-exceptions -I./ \
+ -target aarch64-unknown-windows \
+ -std=c++20 -O3 -D__MINOSKRNL__ -D__ZKA_MINIMAL_OS__ -D__ZKA_NO_BUILTIN__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../
+
+ASM = clang++
+
+DISKDRIVER = -D__USE_FLASH_MEM__
+
+ifneq ($(DEBUG_SUPPORT), )
+DEBUG = -D__DEBUG__
+endif
+
+COPY = cp
+
+LDFLAGS = -subsystem:efi_application -entry:hal_init_platform /nodefaultlib
+LDOBJ = obj/*.obj
+
+# This file is the Kernel, responsible of task management and memory.
+KERNEL = minoskrnl.exe
+
+.PHONY: error
+error:
+ @echo "=== ERROR ==="
+ @echo "=> Use a specific target."
+
+MOVEALL=./MoveAll.ARM64.sh
+
+.PHONY: newos-arm64-epm
+newos-arm64-epm: clean
+ $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard src/*.cc) \
+ $(wildcard src/FS/*.cc) $(wildcard HALKit/ARM64/Storage/*.cc) \
+ $(wildcard HALKit/ARM64/PCI/*.cc) $(wildcard src/Network/*.cc) $(wildcard src/Storage/*.cc) \
+ $(wildcard HALKit/ARM64/*.cc) $(wildcard HALKit/ARM64/*.cpp) \
+ $(wildcard HALKit/ARM64/*.s) $(wildcard HALKit/ARM64/APM/*.cc)
+
+ $(MOVEALL)
+
+OBJCOPY=x86_64-w64-mingw32-objcopy
+
+.PHONY: link-arm64-epm
+link-arm64-epm:
+ $(LD) $(LDFLAGS) $(LDOBJ) /out:$(KERNEL)
+
+.PHONY: all
+all: newos-arm64-epm link-arm64-epm
+ @echo "Kernel => OK."
+
+.PHONY: help
+help:
+ @echo "=== HELP ==="
+ @echo "all: Build Kernel and link it."
+ @echo "link-arm64-epm: Link Kernel for EPM based disks."
+ @echo "newos-arm64-epm: Build Kernel for EPM based disks."
+
+.PHONY: clean
+clean:
+ rm -f $(LDOBJ) $(wildcard *.o) $(KERNEL)
diff --git a/dev/Kernel/doc/Explicit Partition Map.pdf b/dev/Kernel/doc/Explicit Partition Map.pdf
new file mode 100644
index 00000000..a73834cd
--- /dev/null
+++ b/dev/Kernel/doc/Explicit Partition Map.pdf
Binary files differ
diff --git a/dev/Kernel/doc/SPECIFICATION.md b/dev/Kernel/doc/SPECIFICATION.md
new file mode 100644
index 00000000..0233643a
--- /dev/null
+++ b/dev/Kernel/doc/SPECIFICATION.md
@@ -0,0 +1,63 @@
+===================================
+
+# 0: General Information
+
+===================================
+
+- ABI and Format: PEF/PE32+.
+- Kernel architecture: Portable hybrid Kernel.
+- Language: C++/(Assembly (AMD64, X64000, X86S, ARM64, POWER, RISCV))
+
+===================================
+
+# 1: The Kernel
+
+===================================
+
+- Drive/Device Abstraction.
+- SMP, Preemptive Multi Threading.
+- Separation of Files/Devices.
+- Networking.
+- Hardware Abstraction Layer.
+- Native Filesystem support (NeFS, FAT32 and ffs2).
+- Program Loaders interfaces.
+- TLS (Thread Local Storage) support.
+- Semaphore, Locks, Timers.
+- Canary mechanisms.
+- Dynamic Sys.
+- Cross Platform.
+- Permission Selectors.
+
+===================================
+
+# 2: The Filesystem
+
+===================================
+
+- Catalog object with associated forks.
+- Large storage support.
+- Long file names.
+- UNIX path style.
+
+==================================
+
+# 3: Common naming conventions:
+
+==================================
+
+- Kernel -> ke_init_x
+- RunTime -> rt_copy_mem
+- Hal -> hal_foo_bar
+- Class methods -> Class::FooBar
+
+===================================
+
+# 4: The zbaosldr
+
+===================================
+
+- Capable of booting from a network drive.
+- Loads a PE file which is the Kernel.
+- Sanity checks, based on the number of sections.
+- Handover compliant.
+- Does check for a valid partition (useful in the case of recovering)
diff --git a/dev/Kernel/doc/TODO-LIST.md b/dev/Kernel/doc/TODO-LIST.md
new file mode 100644
index 00000000..6e8e4b4d
--- /dev/null
+++ b/dev/Kernel/doc/TODO-LIST.md
@@ -0,0 +1,25 @@
+# TODO list
+
+- We need preemptive multi-threading. [ X ]
+- We then need sync primitives. [ X ]
+- We also need a system library for the OS. [ X ]
+- We need a bootloader for AMD64 [ X ]
+ - Implement Boot Services [ X ]
+ - Design Handover [ X ]
+ - Load Kernel into memory [ X ]
+ - Fix bug in Kernel loader, which causes a 06 #UD. [ X ]
+ - Load Kernel [ X ]
+ - Add IDT [ X ]
+ - AHCI driver [ WiP ]
+- Context switch x87/SSE/AVX registers [ X ]
+- Framebuffer [ X ]
+- ATA support [ X ]
+- Make installer [ X ]
+
+Status:
+
+BootZ: Need to boot from EPM partition. [ X ]
+<br>
+minoskrnl: New Filesystem is done. [ X ]
+
+**Refer to Jira please!**
diff --git a/dev/Kernel/obj/.hgkeep b/dev/Kernel/obj/.hgkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/obj/.hgkeep
diff --git a/dev/Kernel/power64-cb.make b/dev/Kernel/power64-cb.make
new file mode 100644
index 00000000..83ab3235
--- /dev/null
+++ b/dev/Kernel/power64-cb.make
@@ -0,0 +1,4 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the microKernel makefile.
+##################################################
diff --git a/dev/Kernel/riscv64-cb.make b/dev/Kernel/riscv64-cb.make
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/riscv64-cb.make
diff --git a/dev/Kernel/src/ACPIFactoryInterface.cc b/dev/Kernel/src/ACPIFactoryInterface.cc
new file mode 100644
index 00000000..cbfded4e
--- /dev/null
+++ b/dev/Kernel/src/ACPIFactoryInterface.cc
@@ -0,0 +1,96 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <Mod/ACPI/ACPIFactoryInterface.h>
+#include <NewKit/KString.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Heap.h>
+
+namespace Kernel
+{
+ /// @brief Finds a descriptor table inside ACPI XSDT.
+ ErrorOr<voidPtr> ACPIFactoryInterface::Find(const Char* signature)
+ {
+ MUST_PASS(fRsdp);
+
+ if (!signature)
+ return ErrorOr<voidPtr>{-1};
+
+ if (*signature == 0)
+ return ErrorOr<voidPtr>{-1};
+
+ RSDP* rsp_ptr = reinterpret_cast<RSDP*>(this->fRsdp);
+
+ if (rsp_ptr->Revision <= 1)
+ return ErrorOr<voidPtr>{-1};
+
+ RSDT* xsdt = reinterpret_cast<RSDT*>(rsp_ptr->RsdtAddress);
+
+ Int64 num = (xsdt->Length - sizeof(SDT)) / sizeof(Int64);
+
+ /***
+ crucial to avoid underflows.
+ */
+ if (num < 1)
+ {
+ /// stop here, we should have entries...
+ ke_panic(RUNTIME_CHECK_ACPI);
+ return ErrorOr<voidPtr>{-1};
+ }
+
+ this->fEntries = num;
+
+ kcout << "ACPI: Number of entries: " << number(this->fEntries) << endl;
+ kcout << "ACPI: Revision: " << number(xsdt->Revision) << endl;
+ kcout << "ACPI: Signature: " << xsdt->Signature << endl;
+ kcout << "ACPI: Address of XSDT: " << hex_number((UIntPtr)xsdt) << endl;
+
+ const short cAcpiSignatureLength = 4;
+
+ for (Size index = 0; index < this->fEntries; ++index)
+ {
+ SDT* sdt = reinterpret_cast<SDT*>(xsdt->AddressArr[index]);
+
+ kcout << "ACPI: Checksum: " << number(sdt->Checksum) << endl;
+ kcout << "ACPI: Revision: " << number(sdt->Revision) << endl;
+
+ for (short signature_index = 0; signature_index < cAcpiSignatureLength; ++signature_index)
+ {
+ if (sdt->Signature[signature_index] != signature[signature_index])
+ break;
+
+ if (signature_index == (cAcpiSignatureLength - 1))
+ {
+ kcout << "ACPI: SDT Signature: " << sdt->Signature << endl;
+ kcout << "ACPI: SDT OEM ID: " << sdt->OemId << endl;
+ return ErrorOr<voidPtr>(reinterpret_cast<voidPtr>(xsdt->AddressArr[index]));
+ }
+ }
+ }
+
+ return ErrorOr<voidPtr>{-1};
+ }
+
+ /***
+ @brief Checksum on SDT header.
+ @param checksum the header to checksum
+ @param len the length of it.
+ */
+ bool ACPIFactoryInterface::Checksum(const Char* checksum, SSizeT len)
+ {
+ if (len == 0)
+ return 1;
+
+ char chr = 0;
+
+ for (int index = 0; index < len; ++index)
+ {
+ chr += checksum[index];
+ }
+
+ return chr == 0;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Array.cc b/dev/Kernel/src/Array.cc
new file mode 100644
index 00000000..71f65c06
--- /dev/null
+++ b/dev/Kernel/src/Array.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Array.h>
diff --git a/dev/Kernel/src/ArrayList.cc b/dev/Kernel/src/ArrayList.cc
new file mode 100644
index 00000000..a43fd4e0
--- /dev/null
+++ b/dev/Kernel/src/ArrayList.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/ArrayList.h>
diff --git a/dev/Kernel/src/Atom.cc b/dev/Kernel/src/Atom.cc
new file mode 100644
index 00000000..92937411
--- /dev/null
+++ b/dev/Kernel/src/Atom.cc
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Atom.h>
+
+// @file Atom.cpp
+// @brief Atomic primitives
diff --git a/dev/Kernel/src/BitMapMgr.cc b/dev/Kernel/src/BitMapMgr.cc
new file mode 100644
index 00000000..a098322c
--- /dev/null
+++ b/dev/Kernel/src/BitMapMgr.cc
@@ -0,0 +1,186 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+
+#ifdef __ZKA_AMD64__
+#include <HALKit/AMD64/Paging.h>
+#elif defined(__ZKA_ARM64__)
+#include <HALKit/ARM64/Paging.h>
+#endif
+
+#include <NewKit/Defines.h>
+#include <NewKit/KernelPanic.h>
+
+#define kBitMapMagic (0x10210U)
+#define kBitMapPadSize (mib_cast(16))
+
+#define kBitMapMagIdx (0U)
+#define kBitMapSizeIdx (1U)
+#define kBitMapUsedIdx (2U)
+
+namespace Kernel
+{
+ namespace HAL
+ {
+ namespace Detail
+ {
+ /// \brief Proxy Interface to allocate a bitmap.
+ class IBitMapAllocator final
+ {
+ public:
+ explicit IBitMapAllocator() = default;
+ ~IBitMapAllocator() = default;
+
+ ZKA_COPY_DELETE(IBitMapAllocator);
+
+ auto IsBitMap(VoidPtr page_ptr) -> Bool
+ {
+ if (!page_ptr)
+ return No;
+
+ UIntPtr* ptr_bit_set = reinterpret_cast<UIntPtr*>(page_ptr);
+
+ if (!ptr_bit_set[kBitMapMagIdx] ||
+ ptr_bit_set[kBitMapMagIdx] != kBitMapMagic)
+ return No;
+
+ return Yes;
+ }
+
+ auto FreeBitMap(VoidPtr page_ptr) -> Bool
+ {
+ if (this->IsBitMap(page_ptr) == No)
+ return No;
+
+ UIntPtr* ptr_bit_set = reinterpret_cast<UIntPtr*>(page_ptr);
+
+ ptr_bit_set[kBitMapMagIdx] = kBitMapMagic;
+ ptr_bit_set[kBitMapUsedIdx] = No;
+
+ this->GetBitMapStatus(ptr_bit_set);
+
+ return Yes;
+ }
+
+ UInt32 MakeMMFlags(Bool wr, Bool user)
+ {
+ UInt32 flags = kMMFlagsPresent;
+
+ if (wr)
+ flags |= kMMFlagsWr;
+
+ if (user)
+ flags |= kMMFlagsUser;
+
+ return flags;
+ }
+
+ /// @brief Iterate over availables pages for a free one.
+ /// @return The new address which was found.
+ auto FindBitMap(VoidPtr base_ptr, SizeT size, Bool wr, Bool user) -> VoidPtr
+ {
+ if (!size)
+ return nullptr;
+
+ VoidPtr base = reinterpret_cast<VoidPtr>(((UIntPtr)base_ptr) + kPageSize);
+
+ while (YES)
+ {
+ UIntPtr* ptr_bit_set = reinterpret_cast<UIntPtr*>(base);
+
+ if (ptr_bit_set[kBitMapMagIdx] == kBitMapMagic &&
+ ptr_bit_set[kBitMapSizeIdx] <= size)
+ {
+ if (ptr_bit_set[kBitMapUsedIdx] == No)
+ {
+ ptr_bit_set[kBitMapSizeIdx] = size;
+ ptr_bit_set[kBitMapUsedIdx] = Yes;
+
+ this->GetBitMapStatus(ptr_bit_set);
+
+ UInt32 flags = this->MakeMMFlags(wr, user);
+ mm_map_page(ptr_bit_set, flags);
+
+ return (VoidPtr)ptr_bit_set;
+ }
+
+ kcout << "Missed potential BitMap as it is already used!\r\n";
+ }
+ else if (ptr_bit_set[kBitMapMagIdx] != kBitMapMagic)
+ {
+ ptr_bit_set[kBitMapMagIdx] = kBitMapMagic;
+ ptr_bit_set[kBitMapSizeIdx] = size;
+ ptr_bit_set[kBitMapUsedIdx] = Yes;
+
+ this->GetBitMapStatus(ptr_bit_set);
+
+ UInt32 flags = this->MakeMMFlags(wr, user);
+ mm_map_page(ptr_bit_set, flags);
+
+ return (VoidPtr)ptr_bit_set;
+ }
+
+ base = reinterpret_cast<VoidPtr>(reinterpret_cast<UIntPtr>(base) + ((ptr_bit_set[kBitMapMagIdx] != kBitMapMagic) ? (size) : ptr_bit_set[kBitMapSizeIdx]));
+ }
+
+ return nullptr;
+ }
+
+ /// @brief Print Bitmap status
+ auto GetBitMapStatus(UIntPtr* ptr_bit_set) -> Void
+ {
+ if (!this->IsBitMap(ptr_bit_set))
+ {
+ kcout << "Not a BitMap: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ return;
+ }
+
+ kcout << "Magic Number: " << hex_number(ptr_bit_set[kBitMapMagIdx]) << endl;
+ kcout << "Is Allocated: " << (ptr_bit_set[kBitMapUsedIdx] ? "Yes" : "No") << endl;
+ kcout << "Size of BitMap (B): " << number(ptr_bit_set[kBitMapSizeIdx]) << endl;
+ kcout << "Size of BitMap (KIB): " << number(KIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kcout << "Size of BitMap (MIB): " << number(MIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kcout << "Size of BitMap (GIB): " << number(GIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kcout << "Size of BitMap (TIB): " << number(TIB(ptr_bit_set[kBitMapSizeIdx])) << endl;
+ kcout << "Address Of BitMap Header: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ }
+ };
+ } // namespace Detail
+
+ auto mm_is_bitmap(VoidPtr ptr) -> Bool
+ {
+ Detail::IBitMapAllocator traits;
+ return traits.IsBitMap(ptr);
+ }
+
+ /// @brief Allocate a new page to be used by the OS.
+ /// @param wr read/write bit.
+ /// @param user user bit.
+ /// @return a new bitmap allocated pointer.
+ auto mm_alloc_bitmap(Boolean wr, Boolean user, SizeT size, Bool is_page) -> VoidPtr
+ {
+ VoidPtr ptr_new = nullptr;
+ Detail::IBitMapAllocator traits;
+
+ ptr_new = traits.FindBitMap(kKernelBitMpStart, size, wr, user);
+
+ return (UIntPtr*)ptr_new;
+ }
+
+ /// @brief Free Bitmap, and mark it a absent in page terms.
+ auto mm_free_bitmap(VoidPtr page_ptr) -> Bool
+ {
+ if (!page_ptr)
+ return No;
+
+ Detail::IBitMapAllocator traits;
+ Bool ret = traits.FreeBitMap(page_ptr);
+
+ return ret;
+ }
+ } // namespace HAL
+} // namespace Kernel
diff --git a/dev/Kernel/src/CodeMgr.cc b/dev/Kernel/src/CodeMgr.cc
new file mode 100644
index 00000000..de35f846
--- /dev/null
+++ b/dev/Kernel/src/CodeMgr.cc
@@ -0,0 +1,28 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/CodeMgr.h>
+#include <NewKit/Utils.h>
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Executes a new process from a function. Kernel code only.
+ /// @note This sets up a new stack, anything on the main function that calls the Kernel will not be accessible.
+ /// @param main the start of the process.
+ /// @return if the process was started or not.
+ /***********************************************************************************/
+
+ ProcessID rtl_create_process(rtl_main_kind main, const Char* process_name) noexcept
+ {
+ if (!process_name ||
+ *process_name == 0)
+ return kProcessInvalidID;
+
+ return UserProcessScheduler::The().Spawn(process_name, reinterpret_cast<VoidPtr>(main), nullptr);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Crc32.cc b/dev/Kernel/src/Crc32.cc
new file mode 100644
index 00000000..fcc2bf3f
--- /dev/null
+++ b/dev/Kernel/src/Crc32.cc
@@ -0,0 +1,83 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Crc32.h>
+
+// @file CRC32.cpp
+// @brief Check sequence implementation.
+
+namespace Kernel
+{
+ /// @brief The CRC32 seed table.
+ UInt32 kCrcTbl[kCrcCnt] = {
+ 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL,
+ 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL,
+ 0x6BE22838L, 0x9989AB3BL, 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L,
+ 0x5E133C24L, 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL,
+ 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, 0x9A879FA0L,
+ 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, 0x5D1D08BFL, 0xAF768BBCL,
+ 0xBC267848L, 0x4E4DFB4BL, 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L,
+ 0x33ED7D2AL, 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L,
+ 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, 0x6DFE410EL,
+ 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, 0x30E349B1L, 0xC288CAB2L,
+ 0xD1D83946L, 0x23B3BA45L, 0xF779DEAEL, 0x05125DADL, 0x1642AE59L,
+ 0xE4292D5AL, 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL,
+ 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, 0x417B1DBCL,
+ 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, 0x86E18AA3L, 0x748A09A0L,
+ 0x67DAFA54L, 0x95B17957L, 0xCBA24573L, 0x39C9C670L, 0x2A993584L,
+ 0xD8F2B687L, 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L,
+ 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, 0x96BF4DCCL,
+ 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, 0xDBFC821CL, 0x2997011FL,
+ 0x3AC7F2EBL, 0xC8AC71E8L, 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L,
+ 0x0F36E6F7L, 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L,
+ 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, 0xEB1FCBADL,
+ 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, 0x2C855CB2L, 0xDEEEDFB1L,
+ 0xCDBE2C45L, 0x3FD5AF46L, 0x7198540DL, 0x83F3D70EL, 0x90A324FAL,
+ 0x62C8A7F9L, 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L,
+ 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, 0x3CDB9BDDL,
+ 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, 0x82F63B78L, 0x709DB87BL,
+ 0x63CD4B8FL, 0x91A6C88CL, 0x456CAC67L, 0xB7072F64L, 0xA457DC90L,
+ 0x563C5F93L, 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L,
+ 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, 0x92A8FC17L,
+ 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, 0x55326B08L, 0xA759E80BL,
+ 0xB4091BFFL, 0x466298FCL, 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL,
+ 0x0B21572CL, 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L,
+ 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, 0x65D122B9L,
+ 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, 0x2892ED69L, 0xDAF96E6AL,
+ 0xC9A99D9EL, 0x3BC21E9DL, 0xEF087A76L, 0x1D63F975L, 0x0E330A81L,
+ 0xFC588982L, 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL,
+ 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, 0x38CC2A06L,
+ 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, 0xFF56BD19L, 0x0D3D3E1AL,
+ 0x1E6DCDEEL, 0xEC064EEDL, 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L,
+ 0xD0DDD530L, 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL,
+ 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, 0x8ECEE914L,
+ 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, 0xD3D3E1ABL, 0x21B862A8L,
+ 0x32E8915CL, 0xC083125FL, 0x144976B4L, 0xE622F5B7L, 0xF5720643L,
+ 0x07198540L, 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L,
+ 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, 0xE330A81AL,
+ 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, 0x24AA3F05L, 0xD6C1BC06L,
+ 0xC5914FF2L, 0x37FACCF1L, 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L,
+ 0x7AB90321L, 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL,
+ 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, 0x34F4F86AL,
+ 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, 0x79B737BAL, 0x8BDCB4B9L,
+ 0x988C474DL, 0x6AE7C44EL, 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L,
+ 0xAD7D5351L};
+
+ /// @brief Calculate CRC32 of p
+ /// @param p the data to compute.
+ /// @param len the length of the data.
+ /// @return the CRC32.
+ UInt ke_calculate_crc32(const Char* p, UInt len) noexcept
+ {
+ UInt crc = 0xffffffff;
+
+ while (len-- != 0)
+ crc = kCrcTbl[((UInt8)crc ^ *(p++))] ^ (crc >> 8);
+
+ // return (~crc); also works, does the same thing.
+ return (crc ^ 0xffffffff);
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/CxxAbi-AMD64.cc b/dev/Kernel/src/CxxAbi-AMD64.cc
new file mode 100644
index 00000000..9065ece5
--- /dev/null
+++ b/dev/Kernel/src/CxxAbi-AMD64.cc
@@ -0,0 +1,90 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef __ZKA_AMD64__
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/CxxAbi.h>
+#include <KernelKit/LPC.h>
+
+atexit_func_entry_t __atexit_funcs[kAtExitMacDestructors];
+
+uarch_t __atexit_func_count;
+
+/// @brief dynamic shared object Handle.
+Kernel::UIntPtr __dso_handle;
+
+EXTERN_C Kernel::Void __cxa_pure_virtual(void* self)
+{
+ kcout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
+ kcout << ", has unimplemented virtual functions.\r";
+}
+
+EXTERN_C void ___chkstk_ms(void)
+{
+}
+
+EXTERN_C int atexit(void (*f)(void*), void* arg, void* dso)
+{
+ if (__atexit_func_count >= kAtExitMacDestructors)
+ return 1;
+
+ __atexit_funcs[__atexit_func_count].destructor_func = f;
+ __atexit_funcs[__atexit_func_count].obj_ptr = arg;
+ __atexit_funcs[__atexit_func_count].dso_handle = dso;
+
+ __atexit_func_count++;
+
+ return 0;
+}
+
+EXTERN_C void __cxa_finalize(void* f)
+{
+ uarch_t i = __atexit_func_count;
+ if (!f)
+ {
+ while (i--)
+ {
+ if (__atexit_funcs[i].destructor_func)
+ {
+ (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr);
+ };
+ }
+
+ return;
+ }
+
+ while (i--)
+ {
+ if (__atexit_funcs[i].destructor_func)
+ {
+ (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr);
+ __atexit_funcs[i].destructor_func = 0;
+ };
+ }
+}
+
+namespace cxxabiv1
+{
+ EXTERN_C int __cxa_guard_acquire(__guard* g)
+ {
+ (void)g;
+ return 0;
+ }
+
+ EXTERN_C int __cxa_guard_release(__guard* g)
+ {
+ *(char*)g = 1;
+ return 0;
+ }
+
+ EXTERN_C void __cxa_guard_abort(__guard* g)
+ {
+ (void)g;
+ }
+} // namespace cxxabiv1
+
+#endif // ifdef __ZKA_AMD64__
diff --git a/dev/Kernel/src/CxxAbi-ARM64.cc b/dev/Kernel/src/CxxAbi-ARM64.cc
new file mode 100644
index 00000000..127e12c6
--- /dev/null
+++ b/dev/Kernel/src/CxxAbi-ARM64.cc
@@ -0,0 +1,107 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef __ZKA_ARM64__
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/CxxAbi.h>
+#include <KernelKit/LPC.h>
+
+atexit_func_entry_t __atexit_funcs[kAtExitMacDestructors];
+
+uarch_t __atexit_func_count;
+
+/// @brief dynamic shared object Handle.
+Kernel::UIntPtr __dso_handle;
+
+EXTERN_C void __chkstk(void)
+{
+}
+
+EXTERN_C int atexit(void (*f)(void*), void* arg, void* dso)
+{
+ if (__atexit_func_count >= kAtExitMacDestructors)
+ return 1;
+
+ __atexit_funcs[__atexit_func_count].destructor_func = f;
+ __atexit_funcs[__atexit_func_count].obj_ptr = arg;
+ __atexit_funcs[__atexit_func_count].dso_handle = dso;
+
+ __atexit_func_count++;
+
+ return 0;
+}
+
+EXTERN_C void __cxa_finalize(void* f)
+{
+ uarch_t i = __atexit_func_count;
+ if (!f)
+ {
+ while (i--)
+ {
+ if (__atexit_funcs[i].destructor_func)
+ {
+ (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr);
+ };
+ }
+
+ return;
+ }
+
+ while (i--)
+ {
+ if (__atexit_funcs[i].destructor_func)
+ {
+ (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr);
+ __atexit_funcs[i].destructor_func = 0;
+ };
+ }
+}
+
+namespace cxxabiv1
+{
+ EXTERN_C int __cxa_guard_acquire(__guard* g)
+ {
+ (void)g;
+ return 0;
+ }
+
+ EXTERN_C int __cxa_guard_release(__guard* g)
+ {
+ *(char*)g = 1;
+ return 0;
+ }
+
+ EXTERN_C void __cxa_guard_abort(__guard* g)
+ {
+ (void)g;
+ }
+} // namespace cxxabiv1
+
+EXTERN_C Kernel::Void _purecall(void* self)
+{
+ kcout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self));
+ kcout << ", has unimplemented virtual functions.\r";
+}
+
+EXTERN_C Kernel::Void _Init_thread_footer(Kernel::Int* thread_obj)
+{
+ ZKA_UNUSED(thread_obj);
+}
+
+EXTERN_C Kernel::Void _Init_thread_epoch(Kernel::Void)
+{
+ ZKA_UNUSED(0);
+}
+
+EXTERN_C Kernel::Void _Init_thread_header(Kernel::Int* thread_obj)
+{
+ ZKA_UNUSED(0);
+}
+
+EXTERN_C Kernel::Int _tls_index = 0UL;
+
+#endif // ifdef __ZKA_ARM64__
diff --git a/dev/Kernel/src/Defines.cc b/dev/Kernel/src/Defines.cc
new file mode 100644
index 00000000..2252d68d
--- /dev/null
+++ b/dev/Kernel/src/Defines.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Defines.h>
diff --git a/dev/Kernel/src/DeviceMgr.cc b/dev/Kernel/src/DeviceMgr.cc
new file mode 100644
index 00000000..88bed209
--- /dev/null
+++ b/dev/Kernel/src/DeviceMgr.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DeviceMgr.h>
diff --git a/dev/Kernel/src/DriveMgr+IO.cc b/dev/Kernel/src/DriveMgr+IO.cc
new file mode 100644
index 00000000..ee857ed4
--- /dev/null
+++ b/dev/Kernel/src/DriveMgr+IO.cc
@@ -0,0 +1,96 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DriveMgr.h>
+#include <KernelKit/FileMgr.h>
+
+/*************************************************************
+ *
+ * File: DriveMgr+IO.cc
+ * Purpose: Filesystem to mountpoint interface.
+ * Date: 3/26/24
+ *
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ *************************************************************/
+
+/// Useful macros.
+
+#define rtl_nefs_write(DRV, TRAITS, MP) (MP->DRV()).fOutput(TRAITS)
+#define rtl_nefs_read(DRV, TRAITS, MP) (MP->DRV()).fInput(TRAITS)
+
+namespace Kernel
+{
+ /// @brief Read from newfs disk.
+ /// @param Mnt mounted interface.
+ /// @param DrvTrait drive info
+ /// @param DrvIndex drive index.
+ /// @return
+ Int32 fs_ifs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex)
+ {
+ if (!Mnt)
+ return 1;
+
+ DrvTrait.fPacket.fPacketGood = false;
+
+ switch (DrvIndex)
+ {
+ case MountpointInterface::kDriveIndexA: {
+ rtl_nefs_read(A, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexB: {
+ rtl_nefs_read(B, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexC: {
+ rtl_nefs_read(C, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexD: {
+ rtl_nefs_read(D, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ }
+
+ return DrvTrait.fPacket.fPacketGood;
+ }
+
+ /// @brief Write to newfs disk.
+ /// @param Mnt mounted interface.
+ /// @param DrvTrait drive info
+ /// @param DrvIndex drive index.
+ /// @return
+ Int32 fs_ifs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex)
+ {
+ if (!Mnt)
+ return 1;
+
+ DrvTrait.fPacket.fPacketGood = false;
+
+ switch (DrvIndex)
+ {
+ case MountpointInterface::kDriveIndexA: {
+ rtl_nefs_write(A, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexB: {
+ rtl_nefs_write(B, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexC: {
+ rtl_nefs_write(C, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ case MountpointInterface::kDriveIndexD: {
+ rtl_nefs_write(D, DrvTrait.fPacket, Mnt);
+ break;
+ }
+ }
+
+ return DrvTrait.fPacket.fPacketGood;
+ }
+} // namespace Kernel \ No newline at end of file
diff --git a/dev/Kernel/src/DriveMgr.cc b/dev/Kernel/src/DriveMgr.cc
new file mode 100644
index 00000000..9968e2e6
--- /dev/null
+++ b/dev/Kernel/src/DriveMgr.cc
@@ -0,0 +1,230 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/DriveMgr.h>
+#include <NewKit/Utils.h>
+#include <FirmwareKit/EPM.h>
+#include <Mod/ATA/ATA.h>
+#include <Mod/AHCI/AHCI.h>
+#include <Mod/NVME/NVME.h>
+
+/***********************************************************************************/
+/// @file DriveMgr.cc
+/// @brief Drive Manager of minoskrnl.
+/***********************************************************************************/
+
+namespace Kernel
+{
+#if defined(__ATA_PIO__) || defined(__ATA_DMA__)
+ STATIC UInt16 kATAIO = 0U;
+ STATIC UInt8 kATAMaster = 0U;
+#endif
+
+ /// @brief reads from an ATA drive.
+ /// @param pckt Packet structure (fPacketContent must be non null)
+ /// @return
+ Void io_drv_input(DriveTrait::DrivePacket pckt)
+ {
+#ifdef __AHCI__
+ drv_std_read(pckt.fPacketLba, (Char*)pckt.fPacketContent, kAHCISectorSize, pckt.fPacketSize);
+#elif defined(__ATA_PIO__) || defined(__ATA_DMA__)
+ drv_std_read(pckt.fPacketLba, kATAIO, kATAMaster, (Char*)pckt.fPacketContent, kATASectorSize, pckt.fPacketSize);
+#endif
+ }
+
+ /// @brief Writes to an ATA drive.
+ /// @param pckt the packet to write.
+ /// @return
+ Void io_drv_output(DriveTrait::DrivePacket pckt)
+ {
+ if (pckt.fPacketReadOnly)
+ return;
+
+ kcout << "Writing blob to disk...\r";
+
+#ifdef __AHCI__
+ drv_std_write(pckt.fPacketLba, (Char*)pckt.fPacketContent, kAHCISectorSize, pckt.fPacketSize);
+#elif defined(__ATA_PIO__) || defined(__ATA_DMA__)
+ drv_std_write(pckt.fPacketLba, kATAIO, kATAMaster, (Char*)pckt.fPacketContent, kATASectorSize, pckt.fPacketSize);
+#endif
+ }
+
+ /// @brief Executes a disk check on the ATA drive.
+ /// @param pckt the packet to read.
+ /// @return
+ Void io_drv_init(DriveTrait::DrivePacket pckt)
+ {
+#if defined(__ATA_PIO__) || defined(__ATA_DMA__)
+ kATAMaster = 0;
+ kATAIO = 0;
+#endif
+
+#if defined(__ATA_PIO__) || defined(__ATA_DMA__)
+ kATAMaster = true;
+ kATAIO = ATA_PRIMARY_IO;
+
+ if (drv_std_init(kATAIO, kATAMaster, kATAIO, kATAMaster))
+ {
+ pckt.fPacketGood = YES;
+ return;
+ }
+
+ kATAMaster = false;
+ kATAIO = ATA_SECONDARY_IO;
+
+ if (!drv_std_init(kATAIO, kATAMaster, kATAIO, kATAMaster))
+ {
+ return;
+ }
+
+ pckt.fPacketGood = YES;
+#elif defined(__AHCI__)
+ UInt16 pi = 0;
+
+ if (!drv_std_init(pi))
+ {
+ return;
+ }
+#endif // if defined(__ATA_PIO__) || defined (__ATA_DMA__)
+ }
+
+/// @brief Gets the drive kind (ATA, SCSI, AHCI...)
+/// @param no arguments.
+/// @return no arguments.
+#ifdef __ATA_PIO__
+ const Char* io_drv_kind(Void)
+ {
+ return "ATA-PIO";
+ }
+#endif
+#ifdef __ATA_DMA__
+ const Char* io_drv_kind(Void)
+ {
+ return "ATA-DMA";
+ }
+#endif
+#ifdef __AHCI__
+ const Char* io_drv_kind(Void)
+ {
+ return "AHCI";
+ }
+#endif
+#ifdef __ZKA_MINIMAL_OS__
+ const Char* io_drv_kind(Void)
+ {
+ return "Not Loaded";
+ }
+#endif
+
+ /// @brief Unimplemented drive function.
+ /// @param pckt the packet to read.
+ Void io_drv_unimplemented(DriveTrait::DrivePacket pckt) noexcept
+ {
+ ZKA_UNUSED(pckt);
+ }
+
+ /// @brief Makes a new drive.
+ /// @return the new blank drive.
+ DriveTrait io_construct_blank_drive() noexcept
+ {
+ DriveTrait trait;
+
+ constexpr auto kBlankDrive = "/media/blank/";
+
+ rt_copy_memory((VoidPtr)kBlankDrive, trait.fName, rt_string_len(kBlankDrive));
+ trait.fKind = kInvalidDisc;
+
+ trait.fInput = io_drv_unimplemented;
+ trait.fOutput = io_drv_unimplemented;
+ trait.fVerify = io_drv_unimplemented;
+ trait.fInit = io_drv_unimplemented;
+ trait.fDriveKind = io_drv_kind;
+
+ kcout << "Construct: " << trait.fName << "\r";
+
+ return trait;
+ }
+
+ namespace Detect
+ {
+ Void io_detect_drive(DriveTrait& trait)
+ {
+ EPM_PART_BLOCK block_struct;
+
+ trait.fPacket.fPacketLba = kEPMBootBlockLba;
+ trait.fPacket.fPacketSize = sizeof(EPM_PART_BLOCK);
+ trait.fPacket.fPacketContent = &block_struct;
+
+ rt_copy_memory((VoidPtr) "fs/detect-packet", trait.fPacket.fPacketMime,
+ rt_string_len("fs/detect-packet"));
+
+ trait.fInit(trait.fPacket);
+
+ trait.fInput(trait.fPacket);
+
+ if (rt_string_cmp(((BOOT_BLOCK_STRUCT*)trait.fPacket.fPacketContent)->Magic, kEPMMagic, kEPMMagicLength) == 0)
+ {
+ trait.fPacket.fPacketReadOnly = NO;
+ trait.fKind = kMassStorageDisc | kEPMDrive;
+
+ kcout << "Formatted Disk is EPM (Mass Storage)\r";
+
+ trait.fSectorSz = block_struct.SectorSz;
+ trait.fLbaEnd = block_struct.LbaEnd;
+ trait.fLbaStart = block_struct.LbaStart;
+
+ if (trait.fSectorSz == 0 ||
+ trait.fLbaEnd == 0)
+ {
+ ke_panic(RUNTIME_CHECK_FAILED, "Invalid EPM partition!");
+ }
+ }
+ else
+ {
+ trait.fPacket.fPacketReadOnly = YES;
+ trait.fKind = kMassStorageDisc | kUnformattedDrive | kReadOnlyDrive;
+
+ kcout << "Scheme Found: " << block_struct.Name << endl;
+
+ if (block_struct.Name[0] == 0)
+ kcout << "Disk partition is empty (Read Only)\r";
+ }
+
+ rt_copy_memory((VoidPtr) "*/*", trait.fPacket.fPacketMime,
+ rt_string_len("*/*"));
+
+ trait.fPacket.fPacketLba = 0;
+ trait.fPacket.fPacketSize = 0UL;
+ trait.fPacket.fPacketContent = nullptr;
+ }
+ } // namespace Detect
+
+ /// @brief Fetches the main drive.
+ /// @return the new drive. (returns kEPMDrive if EPM formatted)
+ DriveTrait io_construct_main_drive() noexcept
+ {
+ DriveTrait trait;
+
+ constexpr auto kMainDrive = "/media/sda/";
+
+ rt_copy_memory((VoidPtr)kMainDrive, trait.fName, rt_string_len(kMainDrive));
+
+ MUST_PASS(trait.fName[0] != 0);
+
+ trait.fVerify = io_drv_unimplemented;
+ trait.fOutput = io_drv_output;
+ trait.fInput = io_drv_input;
+ trait.fInit = io_drv_init;
+ trait.fDriveKind = io_drv_kind;
+
+ kcout << "Detecting partition scheme of: " << trait.fName << ".\r";
+
+ Detect::io_detect_drive(trait);
+
+ return trait;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/ErrorOr.cc b/dev/Kernel/src/ErrorOr.cc
new file mode 100644
index 00000000..f365277f
--- /dev/null
+++ b/dev/Kernel/src/ErrorOr.cc
@@ -0,0 +1,12 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/ErrorOr.h>
+
+/***********************************************************************************/
+/// @file ErrorOr.cc ///
+/// @brief ErrorOr container class. ///
+/***********************************************************************************/
diff --git a/dev/Kernel/src/FS/HPFS.cc b/dev/Kernel/src/FS/HPFS.cc
new file mode 100644
index 00000000..984ca243
--- /dev/null
+++ b/dev/Kernel/src/FS/HPFS.cc
@@ -0,0 +1,22 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef __FSKIT_INCLUDES_HPFS__
+
+#include <Mod/AHCI/AHCI.h>
+#include <Mod/ATA/ATA.h>
+#include <Mod/Flash/Flash.h>
+#include <FSKit/HPFS.h>
+#include <KernelKit/LPC.h>
+#include <NewKit/Crc32.h>
+#include <NewKit/KernelPanic.h>
+#include <NewKit/KString.h>
+#include <NewKit/Utils.h>
+#include <FirmwareKit/EPM.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/User.h>
+
+#endif // ifdef __FSKIT_INCLUDES_HPFS__
diff --git a/dev/Kernel/src/FileMgr.cc b/dev/Kernel/src/FileMgr.cc
new file mode 100644
index 00000000..0e05daa1
--- /dev/null
+++ b/dev/Kernel/src/FileMgr.cc
@@ -0,0 +1,52 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/FileMgr.h>
+#include <NewKit/Utils.h>
+
+/// @file FileMgr.cc
+//! @brief File System Manager API.
+
+namespace Kernel
+{
+ STATIC IFilesystemMgr* kMountedFilesystem = nullptr;
+
+ /// @brief FilesystemMgr getter.
+ /// @return The mounted filesystem.
+ _Output IFilesystemMgr* IFilesystemMgr::GetMounted()
+ {
+ return kMountedFilesystem;
+ }
+
+ /// @brief Unmount filesystem.
+ /// @return The unmounted filesystem.
+ _Output IFilesystemMgr* IFilesystemMgr::Unmount()
+ {
+ if (kMountedFilesystem)
+ {
+ auto mount = kMountedFilesystem;
+ kMountedFilesystem = nullptr;
+
+ return mount;
+ }
+
+ return nullptr;
+ }
+
+ /// @brief Mount filesystem.
+ /// @param mount_ptr The filesystem to mount.
+ /// @return if it succeeded true, otherwise false.
+ _Output Bool IFilesystemMgr::Mount(_Input IFilesystemMgr* mount_ptr)
+ {
+ if (mount_ptr != nullptr)
+ {
+ kMountedFilesystem = mount_ptr;
+ return Yes;
+ }
+
+ return No;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/GUIDWizard.cc b/dev/Kernel/src/GUIDWizard.cc
new file mode 100644
index 00000000..854a0db7
--- /dev/null
+++ b/dev/Kernel/src/GUIDWizard.cc
@@ -0,0 +1,72 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: GUIDWizard.cc
+ Purpose: GUID helper code
+
+ Revision History:
+
+------------------------------------------- */
+
+#include <CFKit/GUIDWizard.h>
+#include <NewKit/Ref.h>
+
+// begin of ascii 'readable' characters. (A, C, C, 1, 2)
+#define kUUIDAsciiBegin 47
+// @brief Size of UUID.
+#define kUUIDSize 37
+
+namespace CFKit::XRN::Version1
+{
+ auto cf_make_sequence(const ArrayList<UInt32>& uuidSeq) -> Ref<GUIDSequence*>
+ {
+ GUIDSequence* seq = new GUIDSequence();
+ MUST_PASS(seq);
+
+ Ref<GUIDSequence*> seq_ref{seq};
+
+ seq_ref.Leak()->fMs1 = uuidSeq[0];
+ seq_ref.Leak()->fMs2 = uuidSeq[1];
+ seq_ref.Leak()->fMs3 = uuidSeq[2];
+ seq_ref.Leak()->fMs4[0] = uuidSeq[3];
+ seq_ref.Leak()->fMs4[1] = uuidSeq[4];
+ seq_ref.Leak()->fMs4[2] = uuidSeq[5];
+ seq_ref.Leak()->fMs4[3] = uuidSeq[6];
+ seq_ref.Leak()->fMs4[4] = uuidSeq[7];
+ seq_ref.Leak()->fMs4[5] = uuidSeq[8];
+ seq_ref.Leak()->fMs4[6] = uuidSeq[9];
+ seq_ref.Leak()->fMs4[7] = uuidSeq[10];
+
+ return seq_ref;
+ }
+
+ // @brief Tries to make a guid out of a string.
+ // This function is not complete for now
+ auto cf_try_guid_to_string(Ref<GUIDSequence*>& seq) -> ErrorOr<Ref<KString>>
+ {
+ Char buf[kUUIDSize];
+
+ for (SizeT index = 0; index < 16; ++index)
+ {
+ buf[index] = seq.Leak()->u8[index] + kUUIDAsciiBegin;
+ }
+
+ for (SizeT index = 16; index < 24; ++index)
+ {
+ buf[index] = seq.Leak()->u16[index] + kUUIDAsciiBegin;
+ }
+
+ for (SizeT index = 24; index < 28; ++index)
+ {
+ buf[index] = seq.Leak()->u32[index] + kUUIDAsciiBegin;
+ }
+
+ auto view = StringBuilder::Construct(buf);
+
+ if (view)
+ return ErrorOr<Ref<KString>>{view.Leak()};
+
+ return ErrorOr<Ref<KString>>{-1};
+ }
+} // namespace CFKit::XRN::Version1
diff --git a/dev/Kernel/src/GUIDWrapper.cc b/dev/Kernel/src/GUIDWrapper.cc
new file mode 100644
index 00000000..eda9cf29
--- /dev/null
+++ b/dev/Kernel/src/GUIDWrapper.cc
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <CFKit/GUIDWrapper.h>
+
+namespace CFKit::XRN
+{
+}
diff --git a/dev/Kernel/src/HardwareThreadScheduler.cc b/dev/Kernel/src/HardwareThreadScheduler.cc
new file mode 100644
index 00000000..66500f73
--- /dev/null
+++ b/dev/Kernel/src/HardwareThreadScheduler.cc
@@ -0,0 +1,219 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/HardwareThreadScheduler.h>
+#include <CFKit/Property.h>
+
+/***********************************************************************************/
+///! @file HardwareThreadScheduler.cc
+///! @brief This file handles multi processing in the Kernel.
+///! @brief Multi processing is needed for multi-tasking operations.
+/***********************************************************************************/
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @note Those symbols are needed in order to switch and validate the stack.
+ /***********************************************************************************/
+
+ EXTERN_C Bool hal_check_stack(HAL::StackFramePtr frame);
+ EXTERN_C Bool mp_register_process(HAL::StackFramePtr frame, ProcessID pid);
+
+ STATIC HardwareThreadScheduler kHardwareThreadScheduler;
+
+ ///! A HardwareThread class takes care of it's owned hardware thread.
+ ///! It has a stack for it's core.
+
+ /***********************************************************************************/
+ ///! @brief C++ constructor.
+ /***********************************************************************************/
+ HardwareThread::HardwareThread() = default;
+
+ /***********************************************************************************/
+ ///! @brief C++ destructor.
+ /***********************************************************************************/
+ HardwareThread::~HardwareThread() = default;
+
+ /***********************************************************************************/
+ //! @brief returns the id of the thread.
+ /***********************************************************************************/
+ const ThreadID& HardwareThread::ID() noexcept
+ {
+ return fID;
+ }
+
+ /***********************************************************************************/
+ //! @brief returns the kind of thread we have.
+ /***********************************************************************************/
+ const ThreadKind& HardwareThread::Kind() noexcept
+ {
+ return fKind;
+ }
+
+ /***********************************************************************************/
+ //! @brief is the thread busy?
+ //! @return whether the thread is busy or not.
+ /***********************************************************************************/
+ Bool HardwareThread::IsBusy() noexcept
+ {
+ STATIC Int64 busy_timer = 0U;
+
+ if (fBusy && busy_timer > this->fPTime)
+ {
+ busy_timer = 0U;
+ fBusy = No;
+ }
+
+ ++busy_timer;
+
+ return fBusy;
+ }
+
+ /***********************************************************************************/
+ /// @brief Get processor stack frame.
+ /***********************************************************************************/
+
+ HAL::StackFramePtr HardwareThread::StackFrame() noexcept
+ {
+ MUST_PASS(fStack);
+ return fStack;
+ }
+
+ Void HardwareThread::Busy(const Bool busy) noexcept
+ {
+ fBusy = busy;
+ }
+
+ HardwareThread::operator bool()
+ {
+ return this->fStack && !this->fBusy;
+ }
+
+ /***********************************************************************************/
+ /// @brief Wakeup the processor.
+ /***********************************************************************************/
+
+ Void HardwareThread::Wake(const bool wakeup) noexcept
+ {
+ fWakeup = wakeup;
+ }
+
+ /***********************************************************************************/
+ /// @brief Switch to hardware thread.
+ /// @param stack the new hardware thread.
+ /// @retval true stack was changed, code is running.
+ /// @retval false stack is invalid, previous code is running.
+ /***********************************************************************************/
+ Bool HardwareThread::Switch(VoidPtr image_ptr, Ptr8 stack_ptr, HAL::StackFramePtr frame, const ThreadID& pid)
+ {
+ this->fStack = frame;
+ this->fSourcePID = pid;
+
+ fStack->BP = reinterpret_cast<UIntPtr>(image_ptr);
+ fStack->SP = reinterpret_cast<UIntPtr>(stack_ptr);
+
+ Bool ret = mp_register_process(fStack, this->fSourcePID);
+
+ if (ret)
+ this->Busy(YES);
+
+ return ret;
+ }
+
+ /***********************************************************************************/
+ ///! @brief Tells if processor is waked up.
+ /***********************************************************************************/
+ bool HardwareThread::IsWakeup() noexcept
+ {
+ return fWakeup;
+ }
+
+ /***********************************************************************************/
+ ///! @brief Constructor and destructors.
+ ///! @brief Default constructor.
+ /***********************************************************************************/
+
+ HardwareThreadScheduler::HardwareThreadScheduler() = default;
+
+ /***********************************************************************************/
+ ///! @brief Default destructor.
+ /***********************************************************************************/
+ HardwareThreadScheduler::~HardwareThreadScheduler() = default;
+
+ /***********************************************************************************/
+ /// @brief Shared singleton function
+ /***********************************************************************************/
+ HardwareThreadScheduler& HardwareThreadScheduler::The()
+ {
+ return kHardwareThreadScheduler;
+ }
+
+ /***********************************************************************************/
+ /// @brief Get Stack Frame of AP.
+ /***********************************************************************************/
+ HAL::StackFramePtr HardwareThreadScheduler::Leak() noexcept
+ {
+ return fThreadList[fCurrentThread].fStack;
+ }
+
+ /***********************************************************************************/
+ /**
+ * Get Hardware thread at index.
+ * @param idx the index
+ * @return the reference to the hardware thread.
+ */
+ /***********************************************************************************/
+ Ref<HardwareThread*> HardwareThreadScheduler::operator[](const SizeT& idx)
+ {
+ if (idx == 0)
+ {
+ if (fThreadList[idx].Kind() != kAPSystemReserved)
+ {
+ fThreadList[idx].fKind = kAPBoot;
+ }
+ }
+ else if (idx >= kMaxAPInsideSched)
+ {
+ static HardwareThread* fakeThread = nullptr;
+ return {fakeThread};
+ }
+
+ return &fThreadList[idx];
+ }
+
+ /***********************************************************************************/
+ /**
+ * Check if thread pool isn't empty.
+ * @return
+ */
+ /***********************************************************************************/
+ HardwareThreadScheduler::operator bool() noexcept
+ {
+ return !fThreadList.Empty();
+ }
+
+ /***********************************************************************************/
+ /**
+ * Reverse operator bool
+ * @return
+ */
+ /***********************************************************************************/
+ bool HardwareThreadScheduler::operator!() noexcept
+ {
+ return fThreadList.Empty();
+ }
+
+ /***********************************************************************************/
+ /// @brief Returns the amount of core present.
+ /// @return the number of APs.
+ /***********************************************************************************/
+ SizeT HardwareThreadScheduler::Capacity() noexcept
+ {
+ return fThreadList.Count();
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Heap.cc b/dev/Kernel/src/Heap.cc
new file mode 100644
index 00000000..7b2da96d
--- /dev/null
+++ b/dev/Kernel/src/Heap.cc
@@ -0,0 +1,301 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/LPC.h>
+#include <KernelKit/Heap.h>
+#include <NewKit/Crc32.h>
+#include <NewKit/PageMgr.h>
+#include <NewKit/Utils.h>
+#include <ArchKit/ArchKit.h>
+
+/* -------------------------------------------
+
+ Revision History:
+ 10/8/24: FIX: Fix useless long name, alongside a new WR (WriteRead) field.
+ 20/10/24: Fix mm_new_ and mm_delete_ APIs inside Heap.h header. (amlal)
+
+ ------------------------------------------- */
+
+//! @file Heap.cc
+//! @brief This serves as the main memory manager.
+
+#define kKernelHeapMagic (0xD4D7D5)
+#define kKernelHeapAlignSz (__BIGGEST_ALIGNMENT__)
+#define kKernelHeapMaxSize (gib_cast(2))
+
+namespace Kernel
+{
+ /// @brief Contains data structures and algorithms for the heap.
+ namespace Detail
+ {
+ struct PACKED HEAP_INFORMATION_BLOCK;
+
+ /// @brief Kernel heap information block.
+ /// Located before the address bytes.
+ /// | HIB | CLASS/STRUCT/DATA TYPES... |
+ struct PACKED HEAP_INFORMATION_BLOCK final
+ {
+ ///! @brief 32-bit value which contains the magic number of the heap.
+ UInt64 fMagic;
+
+ ///! @brief Boolean value which tells if the heap is allocated.
+ Boolean fPresent : 1;
+
+ /// @brief Is this valued owned by the user?
+ Boolean fWriteRead : 1;
+
+ /// @brief Is this valued owned by the user?
+ Boolean fUser : 1;
+
+ /// @brief Is this a page pointer?
+ Boolean fPagePtr : 1;
+
+ /// @brief 32-bit CRC checksum.
+ UInt32 fCRC32;
+
+ /// @brief 64-bit Allocation flags.
+ UInt64 fFlags;
+
+ /// @brief 64-bit pointer size.
+ SizeT fHeapSize;
+
+ /// @brief 64-bit target offset pointer.
+ UIntPtr fHeapPtr;
+
+ /// @brief Padding bytes for header.
+ UInt8 fPadding[kKernelHeapAlignSz];
+ };
+
+ /// @brief Check for heap address validity.
+ /// @param heap_ptr The address_ptr to check.
+ /// @return Bool if the pointer is valid or not.
+ _Output auto mm_check_heap_address(VoidPtr heap_ptr) -> Bool
+ {
+ if (!heap_ptr)
+ return false;
+
+ /// Add that check in case we're having an integer underflow. ///
+
+ auto base_heap = (IntPtr)(heap_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK);
+
+ if (base_heap < 0)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ typedef HEAP_INFORMATION_BLOCK* HEAP_INFORMATION_BLOCK_PTR;
+ } // namespace Detail
+
+ /// @brief Declare a new size for ptr_heap.
+ /// @param ptr_heap the pointer.
+ /// @return Newly allocated heap header.
+ _Output VoidPtr mm_realloc_heap(VoidPtr ptr_heap, SizeT new_sz)
+ {
+ if (Detail::mm_check_heap_address(ptr_heap) == No)
+ return nullptr;
+
+ if (!ptr_heap || new_sz < 1)
+ return nullptr;
+
+ kcout << "This function is not implemented by minOSKrnl, please use the BSD's realloc instead.\r";
+ ke_panic(RUNTIME_CHECK_PROCESS);
+
+ return nullptr;
+ }
+
+ /// @brief Allocate chunk of memory.
+ /// @param sz Size of pointer
+ /// @param wr Read Write bit.
+ /// @param user User enable bit.
+ /// @return The newly allocated pointer.
+ _Output VoidPtr mm_new_heap(const SizeT sz, const bool wr, const bool user)
+ {
+ auto sz_fix = sz;
+
+ if (sz_fix == 0)
+ return nullptr;
+
+ // We can't allocate that big now.
+ MUST_PASS(sz < kKernelHeapMaxSize);
+
+ sz_fix += sizeof(Detail::HEAP_INFORMATION_BLOCK);
+
+ PageMgr heap_mgr;
+ auto wrapper = heap_mgr.Request(wr, user, No, sz_fix);
+
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ wrapper.VirtualAddress() + sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ heap_info_ptr->fHeapSize = sz_fix;
+ heap_info_ptr->fMagic = kKernelHeapMagic;
+ heap_info_ptr->fCRC32 = 0; // dont fill it for now.
+ heap_info_ptr->fHeapPtr = reinterpret_cast<UIntPtr>(heap_info_ptr) + sizeof(Detail::HEAP_INFORMATION_BLOCK);
+ heap_info_ptr->fPagePtr = No;
+ heap_info_ptr->fWriteRead = wr;
+ heap_info_ptr->fUser = user;
+ heap_info_ptr->fPresent = Yes;
+
+ rt_set_memory(heap_info_ptr->fPadding, 0, kKernelHeapAlignSz);
+
+ auto result = reinterpret_cast<VoidPtr>(heap_info_ptr->fHeapPtr);
+
+ kcout << "Created Heap address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
+
+ return result;
+ }
+
+ /// @brief Makes a page heap.
+ /// @param heap_ptr the pointer to make a page heap.
+ /// @return kErrorSuccess if successful, otherwise an error code.
+ _Output Int32 mm_make_page(VoidPtr heap_ptr)
+ {
+ if (Detail::mm_check_heap_address(heap_ptr) == No)
+ return kErrorHeapNotPresent;
+
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (!heap_info_ptr)
+ return kErrorHeapNotPresent;
+
+ heap_info_ptr->fPagePtr = true;
+
+ kcout << "Created page address: " << hex_number(reinterpret_cast<UIntPtr>(heap_info_ptr)) << endl;
+
+ return kErrorSuccess;
+ }
+
+ /// @brief Overwrites and set the flags of a heap header.
+ /// @param heap_ptr the pointer to update.
+ /// @param flags the flags to set.
+ _Output Int32 mm_make_flags(VoidPtr heap_ptr, UInt64 flags)
+ {
+ if (Detail::mm_check_heap_address(heap_ptr) == No)
+ return kErrorHeapNotPresent;
+
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (!heap_info_ptr)
+ return kErrorHeapNotPresent;
+
+ heap_info_ptr->fFlags = flags;
+
+ return kErrorSuccess;
+ }
+
+ /// @brief Gets the flags of a heap header.
+ /// @param heap_ptr the pointer to get.
+ _Output UInt64 mm_get_flags(VoidPtr heap_ptr)
+ {
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (!heap_info_ptr)
+ return kErrorHeapNotPresent;
+
+ return heap_info_ptr->fFlags;
+ }
+
+ /// @brief Declare pointer as free.
+ /// @param heap_ptr the pointer.
+ /// @return
+ _Output Int32 mm_delete_heap(VoidPtr heap_ptr)
+ {
+ if (Detail::mm_check_heap_address(heap_ptr) == No)
+ return kErrorHeapNotPresent;
+
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)(heap_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (heap_info_ptr && heap_info_ptr->fMagic == kKernelHeapMagic)
+ {
+ if (!heap_info_ptr->fPresent)
+ {
+ return kErrorHeapNotPresent;
+ }
+
+ heap_info_ptr->fHeapSize = 0UL;
+ heap_info_ptr->fPresent = No;
+ heap_info_ptr->fHeapPtr = 0;
+ heap_info_ptr->fCRC32 = 0;
+ heap_info_ptr->fWriteRead = No;
+ heap_info_ptr->fUser = No;
+ heap_info_ptr->fMagic = 0;
+
+ PTEWrapper pageWrapper(No, No, No, reinterpret_cast<UIntPtr>(heap_info_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+ Ref<PTEWrapper> pteAddress{pageWrapper};
+
+ PageMgr heap_mgr;
+ heap_mgr.Free(pteAddress);
+
+ kcout << "Freed Heap address successfully." << endl;
+
+ return kErrorSuccess;
+ }
+
+ return kErrorInternal;
+ }
+
+ /// @brief Check if pointer is a valid Kernel pointer.
+ /// @param heap_ptr the pointer
+ /// @return if it exists.
+ _Output Boolean mm_is_valid_heap(VoidPtr heap_ptr)
+ {
+ if (heap_ptr && HAL::mm_is_bitmap(heap_ptr))
+ {
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)(heap_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (heap_info_ptr && heap_info_ptr->fPresent && heap_info_ptr->fMagic == kKernelHeapMagic)
+ {
+ if (heap_info_ptr->fCRC32 !=
+ ke_calculate_crc32((Char*)heap_info_ptr->fHeapPtr,
+ heap_info_ptr->fHeapSize))
+ {
+ return No;
+ }
+
+ return Yes;
+ }
+ }
+
+ return No;
+ }
+
+ /// @brief Protect the heap with a CRC value.
+ /// @param heap_ptr HIB pointer.
+ /// @return if it valid: point has crc now., otherwise fail.
+ _Output Boolean mm_protect_heap(VoidPtr heap_ptr)
+ {
+ if (heap_ptr)
+ {
+ Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr =
+ reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
+ (UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+
+ if (heap_info_ptr && heap_info_ptr->fPresent && kKernelHeapMagic == heap_info_ptr->fMagic)
+ {
+ heap_info_ptr->fCRC32 =
+ ke_calculate_crc32((Char*)heap_info_ptr->fHeapPtr, heap_info_ptr->fHeapSize);
+
+ return Yes;
+ }
+ }
+
+ return No;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/IDylibObject.cc b/dev/Kernel/src/IDylibObject.cc
new file mode 100644
index 00000000..2bd84a2c
--- /dev/null
+++ b/dev/Kernel/src/IDylibObject.cc
@@ -0,0 +1,15 @@
+/*
+ * ========================================================
+ *
+ * minoskrnl
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <KernelKit/IDylibObject.h>
+#include <KernelKit/DebugOutput.h>
+
+#include <KernelKit/UserProcessScheduler.h>
+
+using namespace Kernel;
diff --git a/dev/Kernel/src/IPEFDylibObject.cc b/dev/Kernel/src/IPEFDylibObject.cc
new file mode 100644
index 00000000..a28f2a94
--- /dev/null
+++ b/dev/Kernel/src/IPEFDylibObject.cc
@@ -0,0 +1,103 @@
+/*
+ * ========================================================
+ *
+ * minoskrnl
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/PEF.h>
+#include <KernelKit/IPEFDylibObject.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/ThreadLocalStorage.h>
+#include <NewKit/Defines.h>
+
+/* -------------------------------------------
+
+ Revision History:
+
+ 01/02/24: Reworked dll ABI, expect a rtl_init_dylib and
+ rtl_fini_dylib (amlel) 15/02/24: Breaking changes, changed the name of the
+ routines. (amlel)
+
+ 07/28/24: Replace rt_library_free with rtl_fini_dylib
+
+ 10/8/24: FIX: Fix log comment.
+
+ ------------------------------------------- */
+
+using namespace Kernel;
+
+/***********************************************************************************/
+/// @file IPEFDylibObject.cc
+/// @brief PEF's Dylib runtime.
+/***********************************************************************************/
+
+/***********************************************************************************/
+/** @brief Library initializer. */
+/***********************************************************************************/
+
+EXTERN_C IDylibRef rtl_init_dylib(UserProcess& thread)
+{
+ IDylibRef dll_obj = tls_new_class<IPEFDylibObject>();
+
+ if (!dll_obj)
+ {
+ thread.Crash();
+ return nullptr;
+ }
+
+ dll_obj->Mount(new IPEFDylibObject::DLL_TRAITS());
+
+ if (!dll_obj->Get())
+ {
+ tls_delete_class(dll_obj);
+ thread.Crash();
+
+ return nullptr;
+ }
+
+ dll_obj->Get()->ImageObject =
+ thread.Image.fBlob;
+
+ if (!dll_obj->Get()->ImageObject)
+ {
+ tls_delete_class(dll_obj);
+ thread.Crash();
+
+ return nullptr;
+ }
+
+ dll_obj->Get()->ImageEntrypointOffset =
+ dll_obj->Load<VoidPtr>(kPefStart, rt_string_len(kPefStart, 0), kPefCode);
+
+ return dll_obj;
+}
+
+/***********************************************************************************/
+/** @brief Frees the dll_obj. */
+/** @note Please check if the dll_obj got freed! */
+/** @param dll_obj The dll_obj to free. */
+/** @param successful Reports if successful or not. */
+/***********************************************************************************/
+
+EXTERN_C Void rtl_fini_dylib(UserProcess& thread, IDylibRef dll_obj, Bool* successful)
+{
+ MUST_PASS(successful);
+
+ // sanity check (will also trigger a bug check if this fails)
+ if (dll_obj == nullptr)
+ {
+ *successful = false;
+ thread.Crash();
+ }
+
+ delete dll_obj->Get();
+ delete dll_obj;
+
+ dll_obj = nullptr;
+
+ *successful = true;
+}
diff --git a/dev/Kernel/src/IndexableProperty.cc b/dev/Kernel/src/IndexableProperty.cc
new file mode 100644
index 00000000..2d64e4d7
--- /dev/null
+++ b/dev/Kernel/src/IndexableProperty.cc
@@ -0,0 +1,57 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <CompilerKit/CompilerKit.h>
+#include <FSKit/IndexableProperty.h>
+#include <NewKit/MutableArray.h>
+#include <NewKit/Utils.h>
+
+/// @brief File indexer API for fast path access.
+/// BUGS: 0
+
+#define kMaxLenIndexer (256U)
+
+namespace Kernel
+{
+ namespace Indexer
+ {
+ IndexProperty& IndexableProperty::Leak() noexcept
+ {
+ return fIndex;
+ }
+
+ Void IndexableProperty::AddFlag(Int16 flag)
+ {
+ fFlags |= flag;
+ }
+
+ Void IndexableProperty::RemoveFlag(Int16 flag)
+ {
+ fFlags &= flag;
+ }
+
+ Int16 IndexableProperty::HasFlag(Int16 flag)
+ {
+ return fFlags & flag;
+ }
+
+ /// @brief Index a file into the indexer instance.
+ /// @param filename filesystem path to access.
+ /// @param filenameLen used bytes in path.
+ /// @param indexer the filesystem indexer.
+ /// @return none, check before if indexer can be claimed (using indexer.HasFlag(kIndexerClaimed)).
+ Void fs_index_file(const Char* filename, SizeT filenameLen, IndexableProperty& indexer)
+ {
+ if (!indexer.HasFlag(kIndexerClaimed))
+ {
+ indexer.AddFlag(kIndexerClaimed);
+ rt_copy_memory((VoidPtr)indexer.Leak().Path, (VoidPtr)filename, filenameLen);
+
+ kcout << "FSKit: Indexed new file: " << filename << endl;
+ }
+ }
+ } // namespace Indexer
+} // namespace Kernel
diff --git a/dev/Kernel/src/Json.cc b/dev/Kernel/src/Json.cc
new file mode 100644
index 00000000..9dff3959
--- /dev/null
+++ b/dev/Kernel/src/Json.cc
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Json.h>
+
+/// @brief Undefined object, is null in length.
+RTL_INIT_OBJECT(Kernel::JSON::kNull, Kernel::JSON);
diff --git a/dev/Kernel/src/KString.cc b/dev/Kernel/src/KString.cc
new file mode 100644
index 00000000..64429c1e
--- /dev/null
+++ b/dev/Kernel/src/KString.cc
@@ -0,0 +1,217 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/KString.h>
+#include <NewKit/Utils.h>
+
+/// @file KString.cc
+/// @brief Kernel String manipulation file.
+
+namespace Kernel
+{
+ Char* KString::Data()
+ {
+ return fData;
+ }
+
+ const Char* KString::CData() const
+ {
+ return fData;
+ }
+
+ Size KString::Length() const
+ {
+ return fDataSz;
+ }
+
+ bool KString::operator==(const KString& rhs) const
+ {
+ if (rhs.Length() != this->Length())
+ return false;
+
+ for (Size index = 0; index < this->Length(); ++index)
+ {
+ if (rhs.fData[index] != fData[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool KString::operator==(const Char* rhs) const
+ {
+ if (rt_string_len(rhs) != this->Length())
+ return false;
+
+ for (Size index = 0; index < rt_string_len(rhs); ++index)
+ {
+ if (rhs[index] != fData[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool KString::operator!=(const KString& rhs) const
+ {
+ if (rhs.Length() != this->Length())
+ return false;
+
+ for (Size index = 0; index < rhs.Length(); ++index)
+ {
+ if (rhs.fData[index] == fData[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool KString::operator!=(const Char* rhs) const
+ {
+ if (rt_string_len(rhs) != this->Length())
+ return false;
+
+ for (Size index = 0; index < rt_string_len(rhs); ++index)
+ {
+ if (rhs[index] == fData[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ ErrorOr<KString> StringBuilder::Construct(const Char* data)
+ {
+ if (!data || *data == 0)
+ return {};
+
+ KString* view = new KString(rt_string_len(data));
+ (*view) += data;
+
+ return ErrorOr<KString>(*view);
+ }
+
+ const Char* StringBuilder::FromBool(const Char* fmt, bool i)
+ {
+ if (!fmt)
+ return ("?");
+
+ const Char* boolean_expr = i ? "YES" : "NO";
+ Char* ret = (Char*)rtl_alloca((sizeof(char) * i) ? 4 : 5 + rt_string_len(fmt));
+
+ if (!ret)
+ return ("?");
+
+ const auto fmt_len = rt_string_len(fmt);
+ const auto res_len = rt_string_len(boolean_expr);
+
+ for (Size idx = 0; idx < fmt_len; ++idx)
+ {
+ if (fmt[idx] == '%')
+ {
+ SizeT result_cnt = idx;
+
+ for (auto y_idx = idx; y_idx < res_len; ++y_idx)
+ {
+ ret[result_cnt] = boolean_expr[y_idx];
+ ++result_cnt;
+ }
+
+ break;
+ }
+
+ ret[idx] = fmt[idx];
+ }
+
+ return ret;
+ }
+
+ bool StringBuilder::Equals(const Char* lhs, const Char* rhs)
+ {
+ if (rt_string_len(rhs) != rt_string_len(lhs))
+ return false;
+
+ for (Size index = 0; index < rt_string_len(rhs); ++index)
+ {
+ if (rhs[index] != lhs[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool StringBuilder::Equals(const WideChar* lhs, const WideChar* rhs)
+ {
+ for (Size index = 0; rhs[index] != 0; ++index)
+ {
+ if (rhs[index] != lhs[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ const Char* StringBuilder::Format(const Char* fmt, const Char* fmt2)
+ {
+ if (!fmt || !fmt2)
+ return ("?");
+
+ Char* ret =
+ (Char*)rtl_alloca(sizeof(char) * rt_string_len(fmt2) + rt_string_len(fmt));
+
+ if (!ret)
+ return ("?");
+
+ for (Size idx = 0; idx < rt_string_len(fmt); ++idx)
+ {
+ if (fmt[idx] == '%')
+ {
+ Size result_cnt = idx;
+ for (Size y_idx = 0; y_idx < rt_string_len(fmt2); ++y_idx)
+ {
+ ret[result_cnt] = fmt2[y_idx];
+ ++result_cnt;
+ }
+
+ break;
+ }
+
+ ret[idx] = fmt[idx];
+ }
+
+ return ret;
+ }
+
+ STATIC void rt_string_append(Char* lhs, const Char* rhs, Int32 cur)
+ {
+ SizeT sz_rhs = rt_string_len(rhs);
+ SizeT rhs_i = 0;
+
+ for (; rhs_i < sz_rhs; ++rhs_i)
+ {
+ lhs[rhs_i + cur] = rhs[rhs_i];
+ }
+ }
+
+ KString& KString::operator+=(const Char* rhs)
+ {
+ rt_string_append(this->fData, rhs, this->fCur);
+ this->fCur += rt_string_len(rhs);
+
+ return *this;
+ }
+
+ KString& KString::operator+=(const KString& rhs)
+ {
+ if (rt_string_len(rhs.fData) > this->Length())
+ return *this;
+
+ rt_string_append(this->fData, const_cast<Char*>(rhs.fData), this->fCur);
+ this->fCur += rt_string_len(const_cast<Char*>(rhs.fData));
+
+ return *this;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/KernelMain.cc b/dev/Kernel/src/KernelMain.cc
new file mode 100644
index 00000000..7875fa7c
--- /dev/null
+++ b/dev/Kernel/src/KernelMain.cc
@@ -0,0 +1,102 @@
+/* -------------------------------------------
+
+ Copyright Amlal EL Mahrouss
+
+ File: Main.cxx
+ Purpose: Main entrypoint of kernel.
+
+------------------------------------------- */
+
+#include <KernelKit/PE.h>
+#include <ArchKit/ArchKit.h>
+#include <CompilerKit/Detail.h>
+#include <FirmwareKit/Handover.h>
+#include <KernelKit/FileMgr.h>
+#include <KernelKit/Heap.h>
+#include <KernelKit/PEF.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/Heap.h>
+#include <NewKit/Json.h>
+#include <NewKit/KString.h>
+#include <NewKit/Utils.h>
+#include <KernelKit/CodeMgr.h>
+#include <CFKit/Property.h>
+#include <KernelKit/Timer.h>
+
+#ifdef __ZKA_AUTO_FORMAT__
+namespace Kernel::Detail
+{
+ /// @brief Filesystem auto formatter, additional checks are also done by the class.
+ class NeFilesystemInstaller final
+ {
+ private:
+ Kernel::NeFileSystemParser* mNeFS{nullptr};
+ Kernel::NeFileSystemJournal mJournal;
+
+ public:
+ /// @brief wizard constructor.
+ explicit NeFilesystemInstaller()
+ {
+ mNeFS = new Kernel::NeFileSystemParser();
+
+ if (mNeFS)
+ {
+ const SizeT kFolderCount = 13;
+ const Char* kFolderStr[kFolderCount] = {
+ "/", "/boot/", "/sys/", "/media/", "/etc/",
+ "/usr/", "/lib/", "/mnt/", "/sbin/", "/n/", "/dev/", "/run/", "/root/"};
+
+ for (Kernel::SizeT dir_index = 0UL; dir_index < kFolderCount; ++dir_index)
+ {
+ auto catalog_folder = mNeFS->GetCatalog(kFolderStr[dir_index]);
+
+ if (catalog_folder)
+ {
+ delete catalog_folder;
+ catalog_folder = nullptr;
+
+ continue;
+ }
+
+ catalog_folder = mNeFS->CreateCatalog(kFolderStr[dir_index], 0,
+ kNeFSCatalogKindDir);
+
+ if (!catalog_folder)
+ continue;
+
+ delete catalog_folder;
+ catalog_folder = nullptr;
+ }
+
+ if (!mJournal.GetJournal(mNeFS))
+ mJournal.CreateJournal(mNeFS);
+
+ mJournal.CommitJournal(mNeFS, "<LOG_XML><FS>NeFS</FS></LOG_XML>", "NeFS Format System");
+ mJournal.ReleaseJournal();
+ }
+ }
+
+ ~NeFilesystemInstaller()
+ {
+ if (mNeFS)
+ delete mNeFS;
+
+ mNeFS = nullptr;
+ }
+
+ ZKA_COPY_DEFAULT(NeFilesystemInstaller);
+ };
+} // namespace Kernel::Detail
+#endif // ifdef __ZKA_AUTO_FORMAT__
+
+/// @brief Kernel entrypoint.
+/// @param Void
+/// @return Void
+EXTERN_C Kernel::Void rtl_kernel_main(Kernel::SizeT argc, char** argv, char** envp, Kernel::SizeT envp_len)
+{
+#ifdef __ZKA_AUTO_FORMAT__
+ Kernel::NeFS::fs_init_nefs();
+ Kernel::Detail::NeFilesystemInstaller installer{};
+#endif // __ZKA_AUTO_FORMAT__
+}
diff --git a/dev/Kernel/src/LPC.cc b/dev/Kernel/src/LPC.cc
new file mode 100644
index 00000000..6d614672
--- /dev/null
+++ b/dev/Kernel/src/LPC.cc
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/LPC.h>
+#include <NewKit/KernelPanic.h>
+
+namespace Kernel
+{
+ STATIC Bool kRaiseOnBugCheck = false;
+
+ /// @brief Does a system wide bug check.
+ /// @param void no params.
+ /// @return if error-free: false, otherwise true.
+ Boolean err_bug_check(void) noexcept
+ {
+ if (kRaiseOnBugCheck)
+ {
+ ke_panic(RUNTIME_CHECK_BAD_BEHAVIOR);
+ }
+
+ return No;
+ }
+
+ /// @brief Tells if we should raise a bug check not.
+ /// @param void
+ /// @return void
+ Void err_bug_check_raise(Void) noexcept
+ {
+ kRaiseOnBugCheck = true;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/LockDelegate.cc b/dev/Kernel/src/LockDelegate.cc
new file mode 100644
index 00000000..8f9a4b1a
--- /dev/null
+++ b/dev/Kernel/src/LockDelegate.cc
@@ -0,0 +1,12 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/LockDelegate.h>
+
+namespace Kernel
+{
+ /// @note Leave it empty for now.
+} // namespace Kernel
diff --git a/dev/Kernel/src/MutableArray.cc b/dev/Kernel/src/MutableArray.cc
new file mode 100644
index 00000000..aa3c76a2
--- /dev/null
+++ b/dev/Kernel/src/MutableArray.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/MutableArray.h>
diff --git a/dev/Kernel/src/Network/IPAddr.cc b/dev/Kernel/src/Network/IPAddr.cc
new file mode 100644
index 00000000..ee9cbc43
--- /dev/null
+++ b/dev/Kernel/src/Network/IPAddr.cc
@@ -0,0 +1,129 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NetworkKit/IP.h>
+#include <NewKit/Utils.h>
+
+namespace Kernel
+{
+ char* RawIPAddress::Address()
+ {
+ return fAddr;
+ }
+
+ RawIPAddress::RawIPAddress(char bytes[4])
+ {
+ rt_copy_memory(bytes, fAddr, 4);
+ }
+
+ bool RawIPAddress::operator==(const RawIPAddress& ipv4)
+ {
+ for (Size index = 0; index < 4; ++index)
+ {
+ if (ipv4.fAddr[index] != fAddr[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool RawIPAddress::operator!=(const RawIPAddress& ipv4)
+ {
+ for (Size index = 0; index < 4; ++index)
+ {
+ if (ipv4.fAddr[index] == fAddr[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ char& RawIPAddress::operator[](const Size& index)
+ {
+ kcout << "[RawIPAddress::operator[]] Fetching Index...\r";
+
+ static char IP_PLACEHOLDER = '0';
+ if (index > 4)
+ return IP_PLACEHOLDER;
+
+ return fAddr[index];
+ }
+
+ RawIPAddress6::RawIPAddress6(char bytes[8])
+ {
+ rt_copy_memory(bytes, fAddr, 8);
+ }
+
+ char& RawIPAddress6::operator[](const Size& index)
+ {
+ kcout << "[RawIPAddress6::operator[]] Fetching Index...\r";
+
+ static char IP_PLACEHOLDER = '0';
+ if (index > 8)
+ return IP_PLACEHOLDER;
+
+ return fAddr[index];
+ }
+
+ bool RawIPAddress6::operator==(const RawIPAddress6& ipv6)
+ {
+ for (SizeT index = 0; index < 8; ++index)
+ {
+ if (ipv6.fAddr[index] != fAddr[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ bool RawIPAddress6::operator!=(const RawIPAddress6& ipv6)
+ {
+ for (SizeT index = 0; index < 8; ++index)
+ {
+ if (ipv6.fAddr[index] == fAddr[index])
+ return false;
+ }
+
+ return true;
+ }
+
+ ErrorOr<KString> IPFactory::ToKString(Ref<RawIPAddress6>& ipv6)
+ {
+ auto str = StringBuilder::Construct(ipv6.Leak().Address());
+ return str;
+ }
+
+ ErrorOr<KString> IPFactory::ToKString(Ref<RawIPAddress>& ipv4)
+ {
+ auto str = StringBuilder::Construct(ipv4.Leak().Address());
+ return str;
+ }
+
+ bool IPFactory::IpCheckVersion4(const Char* ip)
+ {
+ if (!ip)
+ return NO;
+
+ Int32 cnter = 0;
+
+ for (SizeT base = 0; base < rt_string_len(ip); ++base)
+ {
+ if (ip[base] == '.')
+ {
+ cnter = 0;
+ }
+ else
+ {
+ if (cnter == 3)
+ return false;
+
+ ++cnter;
+ }
+ }
+
+ return true;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Network/IPCAddr.cc b/dev/Kernel/src/Network/IPCAddr.cc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Kernel/src/Network/IPCAddr.cc
diff --git a/dev/Kernel/src/Network/IPCMsg.cc b/dev/Kernel/src/Network/IPCMsg.cc
new file mode 100644
index 00000000..5e94b050
--- /dev/null
+++ b/dev/Kernel/src/Network/IPCMsg.cc
@@ -0,0 +1,102 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NetworkKit/IPC.h>
+#include <KernelKit/LPC.h>
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ /// @internal
+ /// @brief The internal sanitize function.
+ Bool ipc_int_sanitize_packet(IPC_MSG* pckt)
+ {
+ auto endian = rtl_deduce_endianess(pckt, ((Char*)pckt)[0]);
+
+ switch (endian)
+ {
+ case Endian::kEndianBig: {
+ if (pckt->IpcEndianess == kIPCLittleEndian)
+ goto ipc_check_failed;
+
+ break;
+ }
+ case Endian::kEndianLittle: {
+ if (pckt->IpcEndianess == kIPCBigEndian)
+ goto ipc_check_failed;
+
+ break;
+ }
+ case Endian::kEndianMixed: {
+ if (pckt->IpcEndianess == kIPCMixedEndian)
+ goto ipc_check_failed;
+
+ break;
+ }
+ default:
+ goto ipc_check_failed;
+ }
+
+ if (pckt->IpcFrom == pckt->IpcTo ||
+ pckt->IpcPacketSize > kIPCMsgSize)
+ {
+ goto ipc_check_failed;
+ }
+
+ return pckt->IpcPacketSize > 1 && pckt->IpcHeaderMagic == kIPCHeaderMagic;
+
+ ipc_check_failed:
+ err_local_get() = kErrorIPC;
+ return false;
+ }
+
+ /// @brief Sanitize packet function
+ /// @retval true packet is correct.
+ /// @retval false packet is incorrect and process has crashed.
+ Bool ipc_sanitize_packet(IPC_MSG* pckt)
+ {
+ if (!pckt ||
+ !ipc_int_sanitize_packet(pckt))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /// @brief Construct packet function
+ /// @retval true packet is correct.
+ /// @retval false packet is incorrect and process has crashed.
+ Bool ipc_construct_packet(_Output IPC_MSG** pckt_in)
+ {
+ // don't act if it's not even valid.
+ if (!pckt_in)
+ return false;
+
+ if (!*pckt_in)
+ *pckt_in = new IPC_MSG();
+
+ if (*pckt_in)
+ {
+ auto endian = rtl_deduce_endianess((*pckt_in), ((Char*)(*pckt_in))[0]);
+
+ (*pckt_in)->IpcHeaderMagic = kIPCHeaderMagic;
+
+ (*pckt_in)->IpcEndianess = static_cast<UInt8>(endian);
+ (*pckt_in)->IpcPacketSize = sizeof(IPC_MSG);
+
+ (*pckt_in)->IpcTo.UserProcessID = 0;
+ (*pckt_in)->IpcTo.UserProcessTeam = 0;
+
+ (*pckt_in)->IpcFrom.UserProcessID = 0;
+ (*pckt_in)->IpcFrom.UserProcessTeam = 0;
+
+ return Yes;
+ }
+
+ return No;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Network/NetworkDevice.cc b/dev/Kernel/src/Network/NetworkDevice.cc
new file mode 100644
index 00000000..2df3af0b
--- /dev/null
+++ b/dev/Kernel/src/Network/NetworkDevice.cc
@@ -0,0 +1,35 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NetworkKit/NetworkDevice.h>
+#include <NewKit/Utils.h>
+
+namespace Kernel
+{
+ /// \brief Getter for fNetworkName.
+ const Char* NetworkDevice::Name() const
+ {
+ return this->fNetworkName;
+ }
+
+ /// \brief Setter for fNetworkName.
+ Boolean NetworkDevice::Name(const Char* strView)
+ {
+ if (strView == nullptr)
+ return false;
+
+ if (*strView == 0)
+ return false;
+
+ if (rt_string_len(strView) > cNetworkNameLen)
+ return false;
+
+ rt_copy_memory((VoidPtr)strView,
+ (VoidPtr)this->fNetworkName, rt_string_len(strView));
+
+ return true;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/New+Delete.cc b/dev/Kernel/src/New+Delete.cc
new file mode 100644
index 00000000..0394112e
--- /dev/null
+++ b/dev/Kernel/src/New+Delete.cc
@@ -0,0 +1,50 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/Heap.h>
+#include <NewKit/New.h>
+
+void* operator new[](size_t sz)
+{
+ if (sz == 0)
+ ++sz;
+
+ return Kernel::mm_new_heap(sz, true, false);
+}
+
+void* operator new(size_t sz)
+{
+ if (sz == 0)
+ ++sz;
+
+ return Kernel::mm_new_heap(sz, true, false);
+}
+
+void operator delete[](void* ptr)
+{
+ if (ptr == nullptr)
+ return;
+
+ Kernel::mm_delete_heap(ptr);
+}
+
+void operator delete(void* ptr)
+{
+ if (ptr == nullptr)
+ return;
+
+ Kernel::mm_delete_heap(ptr);
+}
+
+void operator delete(void* ptr, size_t sz)
+{
+ if (ptr == nullptr)
+ return;
+
+ ZKA_UNUSED(sz);
+
+ Kernel::mm_delete_heap(ptr);
+}
diff --git a/dev/Kernel/src/OwnPtr.cc b/dev/Kernel/src/OwnPtr.cc
new file mode 100644
index 00000000..4feac5b6
--- /dev/null
+++ b/dev/Kernel/src/OwnPtr.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/OwnPtr.h>
diff --git a/dev/Kernel/src/PEFCodeMgr.cc b/dev/Kernel/src/PEFCodeMgr.cc
new file mode 100644
index 00000000..8bcceeee
--- /dev/null
+++ b/dev/Kernel/src/PEFCodeMgr.cc
@@ -0,0 +1,268 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <KernelKit/Heap.h>
+#include <KernelKit/PEFCodeMgr.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <NewKit/Defines.h>
+#include <NewKit/KernelPanic.h>
+#include <NewKit/OwnPtr.h>
+#include <NewKit/KString.h>
+
+/// @brief PEF stack size symbol.
+#define kPefStackSizeSymbol "__PEFSizeOfReserveStack"
+#define kPefHeapSizeSymbol "__PEFSizeOfReserveHeap"
+#define kPefNameSymbol "__PEFProgramName"
+
+namespace Kernel
+{
+ namespace Detail
+ {
+ /***********************************************************************************/
+ /// @brief Get the PEF platform signature according to the compiled architecture.
+ /***********************************************************************************/
+ UInt32 ldr_get_platform(void) noexcept
+ {
+#if defined(__ZKA_32X0__)
+ return kPefArch32x0;
+#elif defined(__ZKA_64X0__)
+ return kPefArch64x0;
+#elif defined(__ZKA_AMD64__)
+ return kPefArchAMD64;
+#elif defined(__ZKA_PPC64__)
+ return kPefArchPowerPC;
+#elif defined(__ZKA_ARM64__)
+ return kPefArchARM64;
+#else
+ return kPefArchInvalid;
+#endif // __32x0__ || __64x0__ || __x86_64__
+ }
+ } // namespace Detail
+
+ /***********************************************************************************/
+ /// @brief PEF loader constructor w/ blob.
+ /// @param blob file blob.
+ /***********************************************************************************/
+ PEFLoader::PEFLoader(const VoidPtr blob)
+ : fCachedBlob(blob)
+ {
+ MUST_PASS(fCachedBlob);
+ fBad = false;
+ }
+
+ /***********************************************************************************/
+ /// @brief PEF loader constructor.
+ /// @param path the filesystem path.
+ /***********************************************************************************/
+ PEFLoader::PEFLoader(const Char* path)
+ : fCachedBlob(nullptr), fBad(false), fFatBinary(false)
+ {
+ fFile.New(const_cast<Char*>(path), kRestrictRB);
+ fPath = StringBuilder::Construct(path).Leak();
+
+ auto kPefHeader = "PEF_CONTAINER";
+
+ fCachedBlob = fFile->Read(kPefHeader, mib_cast(16));
+
+ PEFContainer* container = reinterpret_cast<PEFContainer*>(fCachedBlob);
+
+ if (container->Cpu == Detail::ldr_get_platform() &&
+ container->Magic[0] == kPefMagic[0] &&
+ container->Magic[1] == kPefMagic[1] &&
+ container->Magic[2] == kPefMagic[2] &&
+ container->Magic[3] == kPefMagic[3] &&
+ container->Magic[4] == kPefMagic[4] && container->Abi == kPefAbi)
+ {
+ return;
+ }
+ else if (container->Magic[4] == kPefMagic[0] &&
+ container->Magic[3] == kPefMagic[1] &&
+ container->Magic[2] == kPefMagic[2] &&
+ container->Magic[1] == kPefMagic[3] &&
+ container->Magic[0] == kPefMagic[4] && container->Abi == kPefAbi)
+ {
+ /// This is a fat binary.
+ this->fFatBinary = true;
+ return;
+ }
+
+ fBad = true;
+
+ if (fCachedBlob)
+ mm_delete_heap(fCachedBlob);
+
+ kcout << "PEFLoader: warn: Executable format error!\r";
+
+ fCachedBlob = nullptr;
+ }
+
+ /***********************************************************************************/
+ /// @brief PEF destructor.
+ /***********************************************************************************/
+ PEFLoader::~PEFLoader()
+ {
+ if (fCachedBlob)
+ mm_delete_heap(fCachedBlob);
+
+ fFile.Delete();
+ }
+
+ /***********************************************************************************/
+ /// @brief Finds the symbol according to it's name.
+ /// @param name name of symbol.
+ /// @param kind kind of symbol we want.
+ /***********************************************************************************/
+ VoidPtr PEFLoader::FindSymbol(const Char* name, Int32 kind)
+ {
+ if (!fCachedBlob || fBad || !name)
+ return nullptr;
+
+ PEFContainer* container = reinterpret_cast<PEFContainer*>(fCachedBlob);
+
+ auto blob = fFile->Read(name, mib_cast(16));
+
+ PEFCommandHeader* container_header = reinterpret_cast<PEFCommandHeader*>(blob);
+
+ constexpr auto cMangleCharacter = '$';
+ const Char* cContainerKinds[] = {".code64", ".data64", ".zero64", nullptr};
+
+ ErrorOr<KString> error_or_symbol;
+
+ switch (kind)
+ {
+ case kPefCode: {
+ error_or_symbol = StringBuilder::Construct(cContainerKinds[0]); // code symbol.
+ break;
+ }
+ case kPefData: {
+ error_or_symbol = StringBuilder::Construct(cContainerKinds[1]); // data symbol.
+ break;
+ }
+ case kPefZero: {
+ error_or_symbol = StringBuilder::Construct(cContainerKinds[2]); // block starting symbol.
+ break;
+ }
+ default:
+ return nullptr; // prevent that from the kernel's mode perspective, let that happen if it were
+ // a user process.
+ }
+
+ Char* unconst_symbol = const_cast<Char*>(name);
+
+ for (SizeT i = 0UL; i < rt_string_len(unconst_symbol, kPefNameLen); ++i)
+ {
+ if (unconst_symbol[i] == ' ')
+ {
+ unconst_symbol[i] = cMangleCharacter;
+ }
+ }
+
+ error_or_symbol.Leak().Leak() += name;
+
+ for (SizeT index = 0; index < container->Count; ++index)
+ {
+ if (StringBuilder::Equals(container_header->Name,
+ error_or_symbol.Leak().Leak().CData()))
+ {
+ if (container_header->Kind == kind)
+ {
+ if (container_header->Cpu != Detail::ldr_get_platform())
+ {
+ if (!this->fFatBinary)
+ {
+ mm_delete_heap(blob);
+ return nullptr;
+ }
+ }
+
+ Char* container_blob_value = new Char[container_header->Size];
+
+ rt_copy_memory((VoidPtr)((Char*)blob + sizeof(PEFCommandHeader)), container_blob_value, container_header->Size);
+ mm_delete_heap(blob);
+
+ kcout << "PEFLoader: INFO: Load stub: " << container_header->Name << "!\r";
+
+ return container_blob_value;
+ }
+ }
+ }
+
+ mm_delete_heap(blob);
+ return nullptr;
+ }
+
+ /// @brief Finds the executable entrypoint.
+ /// @return
+ ErrorOr<VoidPtr> PEFLoader::FindStart()
+ {
+ if (auto sym = this->FindSymbol(kPefStart, kPefCode); sym)
+ return ErrorOr<VoidPtr>(sym);
+
+ return ErrorOr<VoidPtr>(kErrorExecutable);
+ }
+
+ /// @brief Tells if the executable is loaded or not.
+ /// @return
+ bool PEFLoader::IsLoaded() noexcept
+ {
+ return !fBad && fCachedBlob;
+ }
+
+ const Char* PEFLoader::Path()
+ {
+ return fPath.Leak().CData();
+ }
+
+ const Char* PEFLoader::AsString()
+ {
+#ifdef __32x0__
+ return "32x0 PEF executable.";
+#elif defined(__64x0__)
+ return "64x0 PEF executable.";
+#elif defined(__x86_64__)
+ return "x86_64 PEF executable.";
+#elif defined(__aarch64__)
+ return "AARCH64 PEF executable.";
+#elif defined(__powerpc64__)
+ return "POWER64 PEF executable.";
+#else
+ return "???? PEF executable.";
+#endif // __32x0__ || __64x0__ || __x86_64__ || __powerpc64__
+ }
+
+ const Char* PEFLoader::MIME()
+ {
+ return kPefApplicationMime;
+ }
+
+ ErrorOr<VoidPtr> PEFLoader::GetBlob()
+ {
+ return ErrorOr<VoidPtr>{this->fCachedBlob};
+ }
+
+ namespace Utils
+ {
+ ProcessID rtl_create_process(PEFLoader& exec, const Int32& process_kind) noexcept
+ {
+ auto errOrStart = exec.FindStart();
+
+ if (errOrStart.Error() != kErrorSuccess)
+ return kProcessInvalidID;
+
+ auto id = UserProcessScheduler::The().Spawn(reinterpret_cast<const Char*>(exec.FindSymbol(kPefNameSymbol, kPefData)), errOrStart.Leak().Leak(), exec.GetBlob().Leak().Leak());
+
+ if (id != kProcessInvalidID)
+ {
+ UserProcessScheduler::The().CurrentTeam().AsArray()[id].Kind = process_kind;
+ UserProcessScheduler::The().CurrentTeam().AsArray()[id].StackSize = *(UIntPtr*)exec.FindSymbol(kPefStackSizeSymbol, kPefData);
+ UserProcessScheduler::The().CurrentTeam().AsArray()[id].MemoryLimit = *(UIntPtr*)exec.FindSymbol(kPefHeapSizeSymbol, kPefData);
+ }
+
+ return id;
+ }
+ } // namespace Utils
+} // namespace Kernel
diff --git a/dev/Kernel/src/PRDT.cc b/dev/Kernel/src/PRDT.cc
new file mode 100644
index 00000000..e0403bce
--- /dev/null
+++ b/dev/Kernel/src/PRDT.cc
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/KString.h>
+#include <StorageKit/PRDT.h>
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief constructs a new PRD.
+ /// @param prd PRD reference.
+ /// @note This doesnt construct a valid, please fill it by yourself.
+ /***********************************************************************************/
+ void construct_prdt(Ref<PRDT>& prd)
+ {
+ prd.Leak().fPhysAddress = 0x0;
+ prd.Leak().fSectorCount = 0x0;
+ prd.Leak().fEndBit = 0x0;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/PageMgr.cc b/dev/Kernel/src/PageMgr.cc
new file mode 100644
index 00000000..9ba0ed4a
--- /dev/null
+++ b/dev/Kernel/src/PageMgr.cc
@@ -0,0 +1,110 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/PageMgr.h>
+
+#ifdef __ZKA_AMD64__
+#include <HALKit/AMD64/Paging.h>
+#elif defined(__ZKA_ARM64__)
+#include <HALKit/ARM64/Paging.h>
+#endif // ifdef __ZKA_AMD64__ || defined(__ZKA_ARM64__)
+
+namespace Kernel
+{
+ PTEWrapper::PTEWrapper(Boolean Rw, Boolean User, Boolean ExecDisable, UIntPtr VirtAddr)
+ : fRw(Rw),
+ fUser(User),
+ fExecDisable(ExecDisable),
+ fVirtAddr(VirtAddr),
+ fCache(false),
+ fShareable(false),
+ fWt(false),
+ fPresent(true),
+ fAccessed(false)
+ {
+ }
+
+ PTEWrapper::~PTEWrapper() = default;
+
+ /// @brief Flush virtual address.
+ /// @param VirtAddr
+ Void PageMgr::FlushTLB()
+ {
+#ifndef __ZKA_MINIMAL_OS__
+ hal_flush_tlb();
+#endif // !__ZKA_MINIMAL_OS__
+ }
+
+ /// @brief Reclaim freed page.
+ /// @return
+ Bool PTEWrapper::Reclaim()
+ {
+ if (!this->fPresent)
+ {
+ this->fPresent = true;
+ return true;
+ }
+
+ return false;
+ }
+
+ /// @brief Request a PTE.
+ /// @param Rw r/w?
+ /// @param User user mode?
+ /// @param ExecDisable disable execution on page?
+ /// @return
+ PTEWrapper PageMgr::Request(Boolean Rw, Boolean User, Boolean ExecDisable, SizeT Sz)
+ {
+ // Store PTE wrapper right after PTE.
+ VoidPtr ptr = Kernel::HAL::mm_alloc_bitmap(Rw, User, Sz, false);
+
+ return PTEWrapper{Rw, User, ExecDisable, reinterpret_cast<UIntPtr>(ptr)};
+ }
+
+ /// @brief Disable BitMap.
+ /// @param wrapper the wrapper.
+ /// @return If the page bitmap was cleared or not.
+ Bool PageMgr::Free(Ref<PTEWrapper>& wrapper)
+ {
+ if (!Kernel::HAL::mm_free_bitmap((VoidPtr)wrapper.Leak().VirtualAddress()))
+ return false;
+
+ return true;
+ }
+
+ /// @brief Virtual PTE address.
+ /// @return The virtual address of the page.
+ const UIntPtr PTEWrapper::VirtualAddress()
+ {
+ return (fVirtAddr);
+ }
+
+ Bool PTEWrapper::Shareable()
+ {
+ return fShareable;
+ }
+
+ Bool PTEWrapper::Present()
+ {
+ return fPresent;
+ }
+
+ Bool PTEWrapper::Access()
+ {
+ return fAccessed;
+ }
+
+ Void PTEWrapper::NoExecute(const bool enable)
+ {
+ fExecDisable = enable;
+ }
+
+ Bool PTEWrapper::NoExecute()
+ {
+ return fExecDisable;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Pmm.cc b/dev/Kernel/src/Pmm.cc
new file mode 100644
index 00000000..ffe58a26
--- /dev/null
+++ b/dev/Kernel/src/Pmm.cc
@@ -0,0 +1,98 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/DebugOutput.h>
+#include <NewKit/Pmm.h>
+
+#if defined(__ZKA_ARM64__)
+#include <HALKit/ARM64/Processor.h>
+#endif // defined(__ZKA_ARM64__)
+
+#if defined(__ZKA_AMD64__)
+#include <HALKit/AMD64/Processor.h>
+#endif // defined(__ZKA_AMD64__)
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Pmm constructor.
+ /***********************************************************************************/
+ Pmm::Pmm()
+ : fPageMgr()
+ {
+ kcout << "[PMM] Allocate PageMemoryMgr";
+ }
+
+ Pmm::~Pmm() = default;
+
+ /***********************************************************************************/
+ /// @param If this returns Null pointer, enter emergency mode.
+ /// @param user is this a user page?
+ /// @param readWrite is it r/w?
+ /***********************************************************************************/
+ Ref<PTEWrapper> Pmm::RequestPage(Boolean user, Boolean readWrite)
+ {
+ PTEWrapper pt = fPageMgr.Leak().Request(user, readWrite, false, kPageSize);
+
+ if (pt.fPresent)
+ {
+ kcout << "[PMM]: Allocation failed.\r";
+ return {};
+ }
+
+ return Ref<PTEWrapper>(pt);
+ }
+
+ Boolean Pmm::FreePage(Ref<PTEWrapper> PageRef)
+ {
+ if (!PageRef)
+ return false;
+
+ PageRef.Leak().fPresent = false;
+
+ return true;
+ }
+
+ Boolean Pmm::TogglePresent(Ref<PTEWrapper> PageRef, Boolean Enable)
+ {
+ if (!PageRef)
+ return false;
+
+ PageRef.Leak().fPresent = Enable;
+
+ return true;
+ }
+
+ Boolean Pmm::ToggleUser(Ref<PTEWrapper> PageRef, Boolean Enable)
+ {
+ if (!PageRef)
+ return false;
+
+ PageRef.Leak().fRw = Enable;
+
+ return true;
+ }
+
+ Boolean Pmm::ToggleRw(Ref<PTEWrapper> PageRef, Boolean Enable)
+ {
+ if (!PageRef)
+ return false;
+
+ PageRef.Leak().fRw = Enable;
+
+ return true;
+ }
+
+ Boolean Pmm::ToggleShare(Ref<PTEWrapper> PageRef, Boolean Enable)
+ {
+ if (!PageRef)
+ return false;
+
+ PageRef.Leak().fShareable = Enable;
+
+ return true;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Property.cc b/dev/Kernel/src/Property.cc
new file mode 100644
index 00000000..6ff430c1
--- /dev/null
+++ b/dev/Kernel/src/Property.cc
@@ -0,0 +1,45 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <CFKit/Property.h>
+
+namespace CFKit
+{
+ /***********************************************************************************/
+ /// @brief Destructor.
+ /***********************************************************************************/
+ Property::~Property() = default;
+
+ /***********************************************************************************/
+ /// @brief Constructor.
+ /***********************************************************************************/
+ Property::Property() = default;
+
+ /***********************************************************************************/
+ /// @brief Check if property's name equals to name.
+ /// @param name string to check.
+ /***********************************************************************************/
+ Bool Property::StringEquals(KString& name)
+ {
+ return this->fName && this->fName == name;
+ }
+
+ /***********************************************************************************/
+ /// @brief Gets the key (name) of property.
+ /***********************************************************************************/
+ KString& Property::GetKey()
+ {
+ return this->fName;
+ }
+
+ /***********************************************************************************/
+ /// @brief Gets the value of the property.
+ /***********************************************************************************/
+ PropertyId& Property::GetValue()
+ {
+ return fValue;
+ }
+} // namespace CFKit
diff --git a/dev/Kernel/src/Ref.cc b/dev/Kernel/src/Ref.cc
new file mode 100644
index 00000000..c25aa786
--- /dev/null
+++ b/dev/Kernel/src/Ref.cc
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Ref.h>
diff --git a/dev/Kernel/src/Semaphore.cc b/dev/Kernel/src/Semaphore.cc
new file mode 100644
index 00000000..b82efbfe
--- /dev/null
+++ b/dev/Kernel/src/Semaphore.cc
@@ -0,0 +1,69 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/Semaphore.h>
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Unlocks process out of the semaphore.
+ /***********************************************************************************/
+ Bool Semaphore::Unlock() noexcept
+ {
+ if (fLockingProcess)
+ fLockingProcess = UserProcess();
+ else
+ return No;
+
+ return Yes;
+ }
+
+ /***********************************************************************************/
+ /// @brief Locks process in the semaphore.
+ /***********************************************************************************/
+ Bool Semaphore::Lock(UserProcess& process)
+ {
+ if (!process || fLockingProcess)
+ return No;
+
+ fLockingProcess = process;
+
+ return Yes;
+ }
+
+ /***********************************************************************************/
+ /// @brief Checks if process is locked.
+ /***********************************************************************************/
+ Bool Semaphore::IsLocked() const
+ {
+ return fLockingProcess;
+ }
+
+ /***********************************************************************************/
+ /// @brief Try lock or wait.
+ /***********************************************************************************/
+ Bool Semaphore::LockOrWait(UserProcess& process, TimerInterface* timer)
+ {
+ if (timer == nullptr)
+ return No;
+
+ this->Lock(process);
+
+ timer->Wait();
+
+ return this->Lock(process);
+ }
+
+ /***********************************************************************************/
+ /// @brief Wait for process to be free.
+ /***********************************************************************************/
+ Void Semaphore::WaitForProcess() noexcept
+ {
+ while (fLockingProcess)
+ ;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/SoftwareTimer.cc b/dev/Kernel/src/SoftwareTimer.cc
new file mode 100644
index 00000000..445ede07
--- /dev/null
+++ b/dev/Kernel/src/SoftwareTimer.cc
@@ -0,0 +1,39 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/Timer.h>
+
+/// @brief SoftwareTimer class, meant to be generic.
+
+using namespace Kernel;
+
+SoftwareTimer::SoftwareTimer(Int64 seconds)
+ : fWaitFor(seconds)
+{
+ fDigitalTimer = new IntPtr();
+ MUST_PASS(fDigitalTimer);
+}
+
+SoftwareTimer::~SoftwareTimer()
+{
+ delete fDigitalTimer;
+ fDigitalTimer = nullptr;
+
+ fWaitFor = 0;
+}
+
+BOOL SoftwareTimer::Wait() noexcept
+{
+ if (fWaitFor < 1)
+ return NO;
+
+ while (*fDigitalTimer < (*fDigitalTimer + fWaitFor))
+ {
+ ++(*fDigitalTimer);
+ }
+
+ return YES;
+}
diff --git a/dev/Kernel/src/Storage/AHCIDeviceInterface.cc b/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
new file mode 100644
index 00000000..7f7392a2
--- /dev/null
+++ b/dev/Kernel/src/Storage/AHCIDeviceInterface.cc
@@ -0,0 +1,35 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <StorageKit/AHCI.h>
+
+using namespace Kernel;
+
+/// @brief Class constructor
+/// @param Out Drive output
+/// @param In Drive input
+/// @param Cleanup Drive cleanup.
+AHCIDeviceInterface::AHCIDeviceInterface(void (*Out)(MountpointInterface* outpacket),
+ void (*In)(MountpointInterface* inpacket),
+ void (*Cleanup)(void))
+ : IDeviceObject(Out, In), fCleanup(Cleanup)
+{
+}
+
+/// @brief Class desctructor
+AHCIDeviceInterface::~AHCIDeviceInterface()
+{
+ MUST_PASS(fCleanup);
+ if (fCleanup)
+ fCleanup();
+}
+
+/// @brief Returns the name of the device interface.
+/// @return it's name as a string.
+const Char* AHCIDeviceInterface::Name() const
+{
+ return "AHCIDeviceInterface";
+}
diff --git a/dev/Kernel/src/Storage/ATADeviceInterface.cc b/dev/Kernel/src/Storage/ATADeviceInterface.cc
new file mode 100644
index 00000000..01443939
--- /dev/null
+++ b/dev/Kernel/src/Storage/ATADeviceInterface.cc
@@ -0,0 +1,88 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <StorageKit/ATA.h>
+
+using namespace Kernel;
+
+/// @brief Class constructor
+/// @param Out Drive output
+/// @param In Drive input
+/// @param Cleanup Drive cleanup.
+ATADeviceInterface::ATADeviceInterface(
+ void (*Out)(MountpointInterface* outpacket),
+ void (*In)(MountpointInterface* inpacket),
+ void (*Cleanup)(void))
+ : IDeviceObject(Out, In), fCleanup(Cleanup)
+{
+}
+
+/// @brief Class desctructor
+ATADeviceInterface::~ATADeviceInterface()
+{
+ MUST_PASS(fCleanup);
+ if (fCleanup)
+ fCleanup();
+}
+
+/// @brief Returns the name of the device interface.
+/// @return it's name as a string.
+const Char* ATADeviceInterface::Name() const
+{
+ return "ATADeviceInterface";
+}
+
+/// @brief Output operator.
+/// @param Data
+/// @return
+ATADeviceInterface& ATADeviceInterface::operator<<(MountpointInterface* Data)
+{
+ if (!Data)
+ return *this;
+
+ for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount)
+ {
+ auto interface = Data->GetAddressOf(driveCount);
+ if ((interface) && rt_string_cmp((interface)->fDriveKind(), "ATA-", 5) == 0)
+ {
+ continue;
+ }
+ else if ((interface) &&
+ rt_string_cmp((interface)->fDriveKind(), "ATA-", 5) != 0)
+ {
+ return *this;
+ }
+ }
+
+ return (ATADeviceInterface&)IDeviceObject<MountpointInterface*>::operator<<(
+ Data);
+}
+
+/// @brief Input operator.
+/// @param Data
+/// @return
+ATADeviceInterface& ATADeviceInterface::operator>>(MountpointInterface* Data)
+{
+ if (!Data)
+ return *this;
+
+ for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount)
+ {
+ auto interface = Data->GetAddressOf(driveCount);
+ if ((interface) && rt_string_cmp((interface)->fDriveKind(), "ATA-", 5) == 0)
+ {
+ continue;
+ }
+ else if ((interface) &&
+ rt_string_cmp((interface)->fDriveKind(), "ATA-", 5) != 0)
+ {
+ return *this;
+ }
+ }
+
+ return (ATADeviceInterface&)IDeviceObject<MountpointInterface*>::operator>>(
+ Data);
+}
diff --git a/dev/Kernel/src/Storage/NVMEDeviceInterface.cc b/dev/Kernel/src/Storage/NVMEDeviceInterface.cc
new file mode 100644
index 00000000..642e581a
--- /dev/null
+++ b/dev/Kernel/src/Storage/NVMEDeviceInterface.cc
@@ -0,0 +1,28 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <StorageKit/NVME.h>
+
+namespace Kernel
+{
+ NVMEDeviceInterface::NVMEDeviceInterface(void (*out)(MountpointInterface* outpacket),
+ void (*in)(MountpointInterface* inpacket),
+ void (*cleanup)(void))
+ : IDeviceObject(out, in), fCleanup(cleanup)
+ {
+ }
+
+ NVMEDeviceInterface::~NVMEDeviceInterface()
+ {
+ if (fCleanup)
+ fCleanup();
+ }
+
+ const Char* NVMEDeviceInterface::Name() const
+ {
+ return ("NVMEDeviceInterface");
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/Storage/SCSIDeviceInterface.cc b/dev/Kernel/src/Storage/SCSIDeviceInterface.cc
new file mode 100644
index 00000000..d1d27c9d
--- /dev/null
+++ b/dev/Kernel/src/Storage/SCSIDeviceInterface.cc
@@ -0,0 +1,11 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <StorageKit/SCSI.h>
+
+///! @brief ATAPI SCSI packet.
+const scsi_packet_type<12> kCDRomPacketTemplate = {0x43, 0, 1, 0, 0, 0,
+ 0, 12, 0x40, 0, 0};
diff --git a/dev/Kernel/src/Stream.cc b/dev/Kernel/src/Stream.cc
new file mode 100644
index 00000000..d898c706
--- /dev/null
+++ b/dev/Kernel/src/Stream.cc
@@ -0,0 +1,12 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: Stream.cc
+ Purpose: Stream object
+
+ Revision History:
+
+------------------------------------------- */
+
+#include <NewKit/Stream.h>
diff --git a/dev/Kernel/src/System/SwapDisk.cc b/dev/Kernel/src/System/SwapDisk.cc
new file mode 100644
index 00000000..590666e0
--- /dev/null
+++ b/dev/Kernel/src/System/SwapDisk.cc
@@ -0,0 +1,47 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025 Amlal EL Mahrouss Labs, all rights reserved.
+
+------------------------------------------- */
+
+#include <SystemKit/SwapDisk.h>
+#include <KernelKit/FileMgr.h>
+
+namespace Kernel
+{
+ BOOL SwapDisk::Write(const Char* fork_name, const SizeT fork_name_len, SWAP_DISK_HEADER_REF data, const SizeT data_len)
+ {
+ if (!fork_name || !fork_name_len)
+ return NO;
+
+ if (data_len > kSwapBlockMaxSize)
+ return NO;
+
+ if (!data)
+ return NO;
+
+ FileStream file(kSwapPageFile, "wb");
+
+ auto ret = file.Write(fork_name, data, sizeof(SWAP_DISK_HEADER) + data_len);
+
+ if (ret.Error())
+ return NO;
+
+ return YES;
+ }
+
+ SWAP_DISK_HEADER_REF SwapDisk::Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len)
+ {
+ if (!fork_name || !fork_name_len)
+ return nullptr;
+
+ if (data_len > kSwapBlockMaxSize)
+ return nullptr;
+
+ FileStream file(kSwapPageFile, "rb");
+
+ VoidPtr blob = file.Read(fork_name, sizeof(SWAP_DISK_HEADER) + data_len);
+
+ return (SWAP_DISK_HEADER_REF)blob;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/ThreadLocalStorage.cc b/dev/Kernel/src/ThreadLocalStorage.cc
new file mode 100644
index 00000000..8bcfe616
--- /dev/null
+++ b/dev/Kernel/src/ThreadLocalStorage.cc
@@ -0,0 +1,67 @@
+/*
+ * ========================================================
+ *
+ * minoskrnl
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <NewKit/KString.h>
+#include <CFKit/Property.h>
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/ThreadLocalStorage.h>
+
+/***********************************************************************************/
+/// @bugs: 0
+/// @file ThreadLocalStorage.cc
+/// @brief Process Thread Local Storage.
+/***********************************************************************************/
+
+using namespace Kernel;
+
+/**
+ * @brief Checks for cookie inside the TIB.
+ * @param tib_ptr the TIB to check.
+ * @return if the cookie is enabled, true; false otherwise
+ */
+
+Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* tib_ptr)
+{
+ if (!tib_ptr ||
+ !tib_ptr->Record)
+ return false;
+
+ ICodec encoder;
+ const Char* tib_as_bytes = encoder.AsBytes(tib_ptr);
+
+ kcout << "TLS: Validating the TIB...\r";
+
+ return tib_as_bytes[kCookieMag0Idx] == kCookieMag0 && tib_as_bytes[kCookieMag1Idx] == kCookieMag1 &&
+ tib_as_bytes[kCookieMag2Idx] == kCookieMag2;
+}
+
+/**
+ * @brief System call implementation of the TLS check.
+ * @param tib_ptr The TIB record.
+ * @return if the TIB record is valid or not.
+ */
+EXTERN_C Bool tls_check_syscall_impl(Kernel::VoidPtr tib_ptr) noexcept
+{
+ if (!tib_ptr)
+ {
+ kcout << "TLS: Failing because of an invalid TIB...\r";
+ return false;
+ }
+
+ THREAD_INFORMATION_BLOCK* tib = reinterpret_cast<THREAD_INFORMATION_BLOCK*>(tib_ptr);
+
+ if (!tls_check_tib(tib))
+ {
+ kcout << "TLS: Failing because of an invalid TIB...\r";
+ return false;
+ }
+
+ kcout << "TLS Passed checked.\r";
+ return true;
+}
diff --git a/dev/Kernel/src/Timer.cc b/dev/Kernel/src/Timer.cc
new file mode 100644
index 00000000..b33a91d8
--- /dev/null
+++ b/dev/Kernel/src/Timer.cc
@@ -0,0 +1,19 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <KernelKit/Timer.h>
+
+///! BUGS: 0
+///! @file Timer.cc
+///! @brief Software Timer implementation
+
+using namespace Kernel;
+
+/// @brief Unimplemented as it is an interface.
+BOOL TimerInterface::Wait() noexcept
+{
+ return NO;
+}
diff --git a/dev/Kernel/src/User.cc b/dev/Kernel/src/User.cc
new file mode 100644
index 00000000..51aa3c72
--- /dev/null
+++ b/dev/Kernel/src/User.cc
@@ -0,0 +1,188 @@
+/*
+ * ========================================================
+ *
+ * ZKA
+ * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+ *
+ * File: User.cc
+ * Purpose: User class, used to provide authentication and security.
+ *
+ * ========================================================
+ */
+
+#include <KernelKit/User.h>
+#include <KernelKit/LPC.h>
+#include <NewKit/KernelPanic.h>
+#include <KernelKit/FileMgr.h>
+#include <KernelKit/Heap.h>
+
+#define kStdUserType (0xCE)
+#define kSuperUserType (0xEC)
+
+/// @file User.cc
+/// @brief User support.
+
+namespace Kernel
+{
+ namespace Detail
+ {
+ ////////////////////////////////////////////////////////////
+ /// \brief Constructs a password by hashing the password.
+ /// \param password password to hash.
+ /// \return the hashed password
+ ////////////////////////////////////////////////////////////
+ const Int32 cred_construct_token(Char* password, const Char* in_password, User* user, SizeT length)
+ {
+ if (!password || !user)
+ return 1;
+
+ kcout << "cred_construct_token: Hashing user password...\r";
+
+ for (Size i_pass = 0; i_pass < length; ++i_pass)
+ {
+ const Char& cur_chr = in_password[i_pass];
+
+ if (cur_chr == 0)
+ break;
+
+ password[i_pass] = cur_chr | (user->IsStdUser() ? kStdUserType : kSuperUserType);
+ }
+
+ kcout << "cred_construct_token: Hashed user password.\r";
+
+ return 0;
+ }
+ } // namespace Detail
+
+ ////////////////////////////////////////////////////////////
+ /// @brief User ring constructor.
+ ////////////////////////////////////////////////////////////
+ User::User(const Int32& sel, const Char* userName)
+ : mUserRing((UserRingKind)sel)
+ {
+ MUST_PASS(sel >= 0);
+ rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName));
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// @brief User ring constructor.
+ ////////////////////////////////////////////////////////////
+ User::User(const UserRingKind& ringKind, const Char* userName)
+ : mUserRing(ringKind)
+ {
+ rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName));
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// @brief User destructor class.
+ ////////////////////////////////////////////////////////////
+ User::~User() = default;
+
+ Bool User::Save(const UserPublicKey password_to_fill) noexcept
+ {
+ if (!password_to_fill ||
+ *password_to_fill == 0)
+ return No;
+
+ SizeT len = rt_string_len(password_to_fill);
+
+ Char* password = new Char[len];
+ MUST_PASS(password);
+
+ // fill data first, generate hash.
+ // return false on error.
+
+ rt_copy_memory((VoidPtr)password_to_fill, password, len);
+
+ if (!Detail::cred_construct_token(password, password_to_fill, this, len))
+ {
+ delete[] password;
+ password = nullptr;
+
+ return No;
+ }
+
+ // then store password.
+
+ rt_copy_memory(password, this->mUserKey, rt_string_len(password_to_fill));
+
+ delete[] password;
+ password = nullptr;
+
+ kcout << "User::Save: Saved password successfully...\r";
+
+ return Yes;
+ }
+
+ Bool User::Matches(const UserPublicKey password_to_fill) noexcept
+ {
+ if (!password_to_fill ||
+ *password_to_fill)
+ return No;
+
+ SizeT len = rt_string_len(password_to_fill);
+
+ Char* password = new Char[len];
+ MUST_PASS(password);
+
+ // fill data first, generate hash.
+ // return false on error.
+
+ rt_copy_memory((VoidPtr)password_to_fill, password, len);
+
+ if (!Detail::cred_construct_token(password, password_to_fill, this, len))
+ {
+ delete[] password;
+ password = nullptr;
+
+ return No;
+ }
+
+ kcout << "User::Matches: Validating hashed passwords...\r";
+
+ // now check if the password matches.
+ if (rt_string_cmp(password, this->mUserKey, rt_string_len(this->mUserKey)) == 0)
+ {
+ kcout << "User::Matches: Password is valid.\r";
+ return Yes;
+ }
+
+ kcout << "User::Matches: Password isn't valid.\r";
+ return No;
+ }
+
+ Bool User::operator==(const User& lhs)
+ {
+ return lhs.mUserRing == this->mUserRing;
+ }
+
+ Bool User::operator!=(const User& lhs)
+ {
+ return lhs.mUserRing != this->mUserRing;
+ }
+
+ Char* User::Name() noexcept
+ {
+ return this->mUserName;
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// @brief Returns the user's ring.
+ /// @return The king of ring the user is attached to.
+ ////////////////////////////////////////////////////////////
+
+ const UserRingKind& User::Ring() noexcept
+ {
+ return this->mUserRing;
+ }
+
+ Bool User::IsStdUser() noexcept
+ {
+ return this->Ring() == UserRingKind::kRingStdUser;
+ }
+
+ Bool User::IsSuperUser() noexcept
+ {
+ return this->Ring() == UserRingKind::kRingSuperUser;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/UserProcessScheduler.cc b/dev/Kernel/src/UserProcessScheduler.cc
new file mode 100644
index 00000000..068e190a
--- /dev/null
+++ b/dev/Kernel/src/UserProcessScheduler.cc
@@ -0,0 +1,607 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ FILE: UserProcessScheduler.cc
+ PURPOSE: Low level/Ring-3 Process scheduler.
+
+------------------------------------------- */
+
+/***********************************************************************************/
+/// @file UserProcessScheduler.cc
+/// @brief Low level/Ring-3 process scheduler.
+/***********************************************************************************/
+
+#include <KernelKit/UserProcessScheduler.h>
+#include <KernelKit/HardwareThreadScheduler.h>
+#include <KernelKit/IPEFDylibObject.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Heap.h>
+#include <NewKit/KString.h>
+#include <KernelKit/LPC.h>
+
+///! BUGS: 0
+
+namespace Kernel
+{
+ /***********************************************************************************/
+ /// @brief Exit Code global variable.
+ /***********************************************************************************/
+
+ STATIC UInt32 kLastExitCode = 0U;
+
+ /***********************************************************************************/
+ /// @brief User Process scheduler global and external reference of thread scheduler.
+ /***********************************************************************************/
+
+ STATIC UserProcessScheduler kProcessScheduler;
+
+ UserProcess::UserProcess() = default;
+ UserProcess::~UserProcess() = default;
+
+ /// @brief Gets the last exit code.
+ /// @note Not thread-safe.
+ /// @return Int32 the last exit code.
+
+ const UInt32& sched_get_exit_code(void) noexcept
+ {
+ return kLastExitCode;
+ }
+
+ /***********************************************************************************/
+ /// @brief Crashes the current process.
+ /***********************************************************************************/
+
+ Void UserProcess::Crash()
+ {
+ if (this->Status != ProcessStatusKind::kRunning)
+ return;
+
+ kcout << this->Name << ": crashed, error id: " << number(kErrorProcessFault) << endl;
+ this->Exit(kErrorProcessFault);
+ }
+
+ /***********************************************************************************/
+ /// @brief boolean operator, check status.
+ /***********************************************************************************/
+
+ UserProcess::operator bool()
+ {
+ return this->Status == ProcessStatusKind::kRunning;
+ }
+
+ /***********************************************************************************/
+ /// @brief Gets the local last exit code.
+ /// @note Not thread-safe.
+ /// @return Int32 the last exit code.
+ /***********************************************************************************/
+
+ const UInt32& UserProcess::GetExitCode() noexcept
+ {
+ return this->fLastExitCode;
+ }
+
+ /***********************************************************************************/
+ /// @brief Error code variable getter.
+ /***********************************************************************************/
+
+ Int32& UserProcess::GetLocalCode() noexcept
+ {
+ return this->fLocalCode;
+ }
+
+ /***********************************************************************************/
+ /// @brief Wakes process header.
+ /// @param should_wakeup if the program shall wakeup or not.
+ /***********************************************************************************/
+
+ Void UserProcess::Wake(const bool should_wakeup)
+ {
+ this->Status =
+ should_wakeup ? ProcessStatusKind::kRunning : ProcessStatusKind::kFrozen;
+ }
+
+ /***********************************************************************************/
+ /** @brief Add pointer to entry. */
+ /***********************************************************************************/
+
+ ErrorOr<VoidPtr> UserProcess::New(const SizeT& sz, const SizeT& pad_amount)
+ {
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ auto vm_register = hal_read_cr3();
+ hal_write_cr3(this->VMRegister);
+
+ auto ptr = mm_new_heap(sz + pad_amount, Yes, Yes);
+
+ hal_write_cr3(vm_register);
+#else
+ auto ptr = mm_new_heap(sz + pad_amount, Yes, Yes);
+#endif
+
+ if (!this->ProcessMemoryHeap)
+ {
+ this->ProcessMemoryHeap = new UserProcess::ProcessMemoryHeapList();
+
+ this->ProcessMemoryHeap->MemoryEntryPad = pad_amount;
+ this->ProcessMemoryHeap->MemoryEntrySize = sz;
+
+ this->ProcessMemoryHeap->MemoryEntry = ptr;
+
+ this->ProcessMemoryHeap->MemoryPrev = nullptr;
+ this->ProcessMemoryHeap->MemoryNext = nullptr;
+ }
+ else
+ {
+ ProcessMemoryHeapList* entry = this->ProcessMemoryHeap;
+ ProcessMemoryHeapList* prev_entry = nullptr;
+
+ while (!entry)
+ {
+ if (entry->MemoryEntry == nullptr)
+ break; // chose to break here, when we get an already allocated memory entry for our needs.
+
+ prev_entry = entry;
+ entry = entry->MemoryNext;
+ }
+
+ entry->MemoryNext = new ProcessMemoryHeapList();
+ entry->MemoryNext->MemoryEntry = ptr;
+
+ entry->MemoryNext->MemoryPrev = entry;
+ entry->MemoryNext->MemoryNext = nullptr;
+ }
+
+ this->UsedMemory += sz;
+
+ return ErrorOr<VoidPtr>(ptr);
+ }
+
+ /***********************************************************************************/
+ /// @brief Gets the name of the current process.
+ /***********************************************************************************/
+
+ const Char* UserProcess::GetName() noexcept
+ {
+ return this->Name;
+ }
+
+ /***********************************************************************************/
+ /// @brief Gets the owner of the process.
+ /***********************************************************************************/
+
+ const User* UserProcess::GetOwner() noexcept
+ {
+ return this->Owner;
+ }
+
+ /// @brief UserProcess status getter.
+ const ProcessStatusKind& UserProcess::GetStatus() noexcept
+ {
+ return this->Status;
+ }
+
+ /***********************************************************************************/
+ /**
+ @brief Affinity is the time slot allowed for the process.
+ */
+ /***********************************************************************************/
+
+ const AffinityKind& UserProcess::GetAffinity() noexcept
+ {
+ return this->Affinity;
+ }
+
+ /***********************************************************************************/
+ /**
+ @brief Exit process method.
+ @param exit_code The process's exit code.
+ */
+ /***********************************************************************************/
+
+ Void UserProcess::Exit(const Int32& exit_code)
+ {
+ this->Status = exit_code > 0 ? ProcessStatusKind::kKilled : ProcessStatusKind::kFrozen;
+ this->fLastExitCode = exit_code;
+
+ kLastExitCode = exit_code;
+
+ auto memory_heap_list = this->ProcessMemoryHeap;
+
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ auto pd = hal_read_cr3();
+ hal_write_cr3(this->VMRegister);
+#endif
+
+ // Deleting memory lists. Make sure to free all of them.
+ while (memory_heap_list)
+ {
+ if (memory_heap_list->MemoryEntry)
+ {
+ MUST_PASS(mm_delete_heap(memory_heap_list->MemoryEntry));
+ }
+
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ hal_write_cr3(pd);
+#endif
+
+ auto next = memory_heap_list->MemoryNext;
+
+ mm_delete_heap(memory_heap_list);
+
+ memory_heap_list = nullptr;
+ memory_heap_list = next;
+ }
+
+ //! Free the memory's page directory.
+ HAL::mm_free_bitmap(this->VMRegister);
+
+ //! Delete image if not done already.
+ if (this->Image.fCode && mm_is_valid_heap(this->Image.fCode))
+ mm_delete_heap(this->Image.fCode);
+
+ if (this->Image.fBlob && mm_is_valid_heap(this->Image.fBlob))
+ mm_delete_heap(this->Image.fBlob);
+
+ if (this->StackFrame && mm_is_valid_heap(this->StackFrame))
+ mm_delete_heap((VoidPtr)this->StackFrame);
+
+ this->Image.fBlob = nullptr;
+ this->Image.fCode = nullptr;
+ this->StackFrame = nullptr;
+
+ if (this->Kind == kExectuableDylibKind)
+ {
+ Bool success = false;
+
+ rtl_fini_dylib(*this, reinterpret_cast<IPEFDylibObject*>(this->DylibDelegate), &success);
+
+ if (!success)
+ {
+ ke_panic(RUNTIME_CHECK_PROCESS);
+ }
+
+ this->DylibDelegate = nullptr;
+ }
+
+ if (this->StackReserve)
+ mm_delete_heap(reinterpret_cast<VoidPtr>(this->StackReserve));
+
+ this->ProcessId = 0;
+ this->Status = ProcessStatusKind::kFinished;
+
+ --this->ProcessParentTeam->mProcessCount;
+
+ delete this;
+ }
+
+ /***********************************************************************************/
+ /// @brief Add process to team.
+ /// @param process the process *Ref* class.
+ /// @return the process index inside the team.
+ /***********************************************************************************/
+
+ ProcessID UserProcessScheduler::Spawn(const Char* name, VoidPtr code, VoidPtr image)
+ {
+ ProcessID pid = this->mTeam.mProcessCount;
+
+ if (pid > kSchedProcessLimitPerTeam)
+ {
+ return kErrorProcessFault;
+ }
+
+ ++this->mTeam.mProcessCount;
+
+ UserProcess& process = this->mTeam.mProcessList[pid];
+
+ process.Image.fCode = code;
+ process.Image.fBlob = image;
+
+ rt_copy_memory(reinterpret_cast<VoidPtr>(const_cast<Char*>(name)), process.Name, rt_string_len(name));
+
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ process.VMRegister = new PDE();
+
+ if (!process.VMRegister)
+ {
+ process.Crash();
+ return kErrorProcessFault;
+ }
+
+ UInt32 flags = HAL::kMMFlagsPresent;
+ flags |= HAL::kMMFlagsWr;
+ flags |= HAL::kMMFlagsUser;
+
+ HAL::mm_map_page((VoidPtr)process.VMRegister, flags);
+#endif // __ZKA_VIRTUAL_MEMORY_SUPPORT__
+
+ process.StackFrame = new HAL::StackFrame();
+
+ if (!process.StackFrame)
+ {
+ process.Crash();
+ return kErrorProcessFault;
+ }
+
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ flags = HAL::kMMFlagsPresent;
+ flags |= HAL::kMMFlagsWr;
+ flags |= HAL::kMMFlagsUser;
+
+ HAL::mm_map_page((VoidPtr)process.StackFrame, flags);
+#endif // __ZKA_VIRTUAL_MEMORY_SUPPORT__
+
+ // React according to process kind.
+ switch (process.Kind)
+ {
+ case UserProcess::kExectuableDylibKind: {
+ process.DylibDelegate = rtl_init_dylib(process);
+ MUST_PASS(process.DylibDelegate);
+ }
+ default: {
+ kcout << "Unknown process kind: " << number(process.Kind) << endl;
+ break;
+ }
+ }
+
+ process.StackReserve = new UInt8[process.StackSize];
+
+ if (!process.StackReserve)
+ {
+ process.Crash();
+ return kErrorProcessFault;
+ }
+
+#ifdef __ZKA_VIRTUAL_MEMORY_SUPPORT__
+ flags = HAL::kMMFlagsPresent;
+ flags |= HAL::kMMFlagsWr;
+ flags |= HAL::kMMFlagsUser;
+
+ HAL::mm_map_page((VoidPtr)process.StackReserve, flags);
+#endif // __ZKA_VIRTUAL_MEMORY_SUPPORT__
+
+ process.ProcessParentTeam = &mTeam;
+
+ process.ProcessId = pid;
+ process.Status = ProcessStatusKind::kStarting;
+ process.PTime = (UIntPtr)AffinityKind::kStandard;
+
+ kcout << "PID: " << number(process.ProcessId) << endl;
+ kcout << "Name: " << process.Name << endl;
+
+ return pid;
+ }
+
+ /***********************************************************************************/
+ /// @brief Retrieves the singleton of the process scheduler.
+ /***********************************************************************************/
+
+ UserProcessScheduler& UserProcessScheduler::The()
+ {
+ return kProcessScheduler;
+ }
+
+ /***********************************************************************************/
+
+ /// @brief Remove process from list.
+ /// @param process_id process slot inside team.
+ /// @retval true process was removed.
+ /// @retval false process doesn't exist in team.
+
+ /***********************************************************************************/
+
+ const Bool UserProcessScheduler::Remove(ProcessID process_id)
+ {
+ // check if process is within range.
+ if (process_id > mTeam.mProcessList.Count())
+ return No;
+
+ mTeam.mProcessList[process_id].Exit(0);
+
+ return Yes;
+ }
+
+ const Bool UserProcessScheduler::IsUser()
+ {
+ return Yes;
+ }
+
+ const Bool UserProcessScheduler::IsKernel()
+ {
+ return No;
+ }
+
+ const Bool UserProcessScheduler::HasMP()
+ {
+ MUST_PASS(kHandoverHeader);
+ return kHandoverHeader->f_HardwareTables.f_MultiProcessingEnabled;
+ }
+
+ /***********************************************************************************/
+ /// @brief Run User scheduler object.
+ /// @return Process count executed within a team.
+ /***********************************************************************************/
+
+ const SizeT UserProcessScheduler::Run() noexcept
+ {
+ SizeT process_index = 0; //! we store this guy to tell the scheduler how many
+ //! things we have scheduled.
+
+ if (mTeam.mProcessCount < 1)
+ {
+ kcout << "UserProcessScheduler::Run(): This team doesn't have any process!\r";
+ return 0;
+ }
+
+ kcout << "UserProcessScheduler::Run(): This team has a process capacity of: " << number(mTeam.mProcessList.Capacity()) << endl;
+
+ for (; process_index < mTeam.AsArray().Capacity(); ++process_index)
+ {
+ auto& process = mTeam.AsArray()[process_index];
+
+ //! check if the process needs to be run.
+ if (UserProcessHelper::CanBeScheduled(process))
+ {
+ // Set current process header.
+ this->GetCurrentProcess() = process;
+
+ process.PTime = static_cast<Int32>(process.Affinity);
+
+ kcout << "Switch to: '" << process.Name << "'.\r";
+
+ // tell helper to find a core to schedule on.
+ if (!UserProcessHelper::Switch(process.Image.fCode, &process.StackReserve[process.StackSize - 1], process.StackFrame,
+ process.ProcessId))
+ {
+ kcout << "Invalid process (UH OH)\r";
+ process.Crash();
+ }
+ }
+ else
+ {
+ --process.PTime;
+ }
+ }
+
+ return process_index;
+ }
+
+ /// @brief Gets the current scheduled team.
+ /// @return
+ UserProcessTeam& UserProcessScheduler::CurrentTeam()
+ {
+ return mTeam;
+ }
+
+ /// @internal
+
+ /// @brief Gets current running process.
+ /// @return
+ Ref<UserProcess>& UserProcessScheduler::GetCurrentProcess()
+ {
+ return mTeam.AsRef();
+ }
+
+ /// @brief Current proccess id getter.
+ /// @return UserProcess ID integer.
+ ErrorOr<PID> UserProcessHelper::TheCurrentPID()
+ {
+ if (!kProcessScheduler.GetCurrentProcess())
+ return ErrorOr<PID>{kErrorProcessFault};
+
+ kcout << "UserProcessHelper::TheCurrentPID: Leaking ProcessId...\r";
+ return ErrorOr<PID>{kProcessScheduler.GetCurrentProcess().Leak().ProcessId};
+ }
+
+ /// @brief Check if process can be schedulded.
+ /// @param process the process reference.
+ /// @retval true can be schedulded.
+ /// @retval false cannot be schedulded.
+ Bool UserProcessHelper::CanBeScheduled(const UserProcess& process)
+ {
+ if (process.Status == ProcessStatusKind::kKilled ||
+ process.Status == ProcessStatusKind::kFinished ||
+ process.Status == ProcessStatusKind::kStarting ||
+ process.Status == ProcessStatusKind::kFrozen)
+ return No;
+
+ if (process.Status == ProcessStatusKind::kInvalid)
+ return No;
+
+ if (!process.Image.fCode)
+ return No;
+
+ if (!process.Name[0])
+ return No;
+
+ return process.PTime < 1;
+ }
+
+ /***********************************************************************************/
+ /**
+ * @brief Start scheduling current AP.
+ */
+ /***********************************************************************************/
+
+ SizeT UserProcessHelper::StartScheduling()
+ {
+ return kProcessScheduler.Run();
+ }
+
+ /***********************************************************************************/
+ /**
+ * \brief Does a context switch in a CPU.
+ * \param the_stack the stackframe of the running app.
+ * \param new_pid the process's PID.
+ */
+ /***********************************************************************************/
+
+ Bool UserProcessHelper::Switch(VoidPtr image_ptr, UInt8* stack, HAL::StackFramePtr frame_ptr, const PID& new_pid)
+ {
+ for (SizeT index = 0UL; index < HardwareThreadScheduler::The().Capacity(); ++index)
+ {
+ if (HardwareThreadScheduler::The()[index].Leak()->Kind() == kInvalidAP ||
+ HardwareThreadScheduler::The()[index].Leak()->Kind() == kAPBoot)
+ continue;
+
+ // a fallback is a special core for real-time tasks which needs immediate execution.
+ if (HardwareThreadScheduler::The()[index].Leak()->Kind() == kAPFallback)
+ {
+ if (UserProcessScheduler::The().GetCurrentProcess().Leak().Affinity != AffinityKind::kRealTime)
+ continue;
+
+ if (HardwareThreadScheduler::The()[index].Leak()->Switch(image_ptr, stack, frame_ptr, new_pid))
+ return YES;
+
+ continue;
+ }
+
+ PID prev_pid = UserProcessHelper::TheCurrentPID();
+ UserProcessHelper::TheCurrentPID().Leak().Leak() = new_pid;
+
+ ////////////////////////////////////////////////////////////
+ /// Prepare task switch. ///
+ ////////////////////////////////////////////////////////////
+
+ HardwareThreadScheduler::The()[index].Leak()->Wake(YES);
+ HardwareThreadScheduler::The()[index].Leak()->Busy(NO);
+
+ auto prev_ptime = HardwareThreadScheduler::The()[index].Leak()->fPTime;
+ HardwareThreadScheduler::The()[index].Leak()->fPTime = UserProcessScheduler::The().CurrentTeam().AsArray()[new_pid].PTime;
+
+ Bool ret = HardwareThreadScheduler::The()[index].Leak()->Switch(image_ptr, stack, frame_ptr, new_pid);
+
+ ////////////////////////////////////////////////////////////
+ /// Rollback on fail. ///
+ ////////////////////////////////////////////////////////////
+ if (!ret)
+ {
+ HardwareThreadScheduler::The()[index].Leak()->fPTime = prev_ptime;
+ UserProcessHelper::TheCurrentPID().Leak().Leak() = prev_pid;
+
+ HardwareThreadScheduler::The()[index].Leak()->Busy(NO);
+ }
+
+ HardwareThreadScheduler::The()[index].Leak()->Wake(NO);
+
+ return Yes;
+ }
+
+ return No;
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// @brief this checks if any process is on the team.
+ ////////////////////////////////////////////////////////////
+ UserProcessScheduler::operator bool()
+ {
+ return mTeam.AsArray().Count() > 0;
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// @brief this checks if no process is on the team.
+ ////////////////////////////////////////////////////////////
+ Bool UserProcessScheduler::operator!()
+ {
+ return mTeam.AsArray().Count() == 0;
+ }
+} // namespace Kernel
diff --git a/dev/Kernel/src/UserProcessTeam.cc b/dev/Kernel/src/UserProcessTeam.cc
new file mode 100644
index 00000000..918a62bb
--- /dev/null
+++ b/dev/Kernel/src/UserProcessTeam.cc
@@ -0,0 +1,58 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+/***********************************************************************************/
+/// @file UserProcessTeam.cc
+/// @brief Process teams implementation.
+/***********************************************************************************/
+
+#include <KernelKit/UserProcessScheduler.h>
+
+namespace Kernel
+{
+ UserProcessTeam::UserProcessTeam()
+ {
+ for (SizeT i = 0U; i < this->mProcessList.Count(); ++i)
+ {
+ this->mProcessList[i] = UserProcess();
+ this->mProcessList[i].Status = ProcessStatusKind::kKilled;
+ }
+
+ this->mProcessCount = 0UL;
+ }
+
+ /***********************************************************************************/
+ /// @brief UserProcess list array getter.
+ /// @return The list of process to schedule.
+ /***********************************************************************************/
+
+ Array<UserProcess, kSchedProcessLimitPerTeam>& UserProcessTeam::AsArray()
+ {
+ return this->mProcessList;
+ }
+
+ /***********************************************************************************/
+ /// @brief Get team ID.
+ /// @return The team's ID.
+ /***********************************************************************************/
+
+ ProcessID& UserProcessTeam::Id() noexcept
+ {
+ return this->mTeamId;
+ }
+
+ /***********************************************************************************/
+ /// @brief Get current process getter as Ref.
+ /// @return The current process header.
+ /***********************************************************************************/
+
+ Ref<UserProcess>& UserProcessTeam::AsRef()
+ {
+ return this->mCurrentProcess;
+ }
+} // namespace Kernel
+
+// last rev 05-03-24
diff --git a/dev/Kernel/src/Utils.cc b/dev/Kernel/src/Utils.cc
new file mode 100644
index 00000000..c5a82305
--- /dev/null
+++ b/dev/Kernel/src/Utils.cc
@@ -0,0 +1,219 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Utils.h>
+
+namespace Kernel
+{
+ Int32 rt_string_cmp(const Char* src, const Char* cmp, Size size)
+ {
+ Int32 counter = 0;
+
+ for (Size index = 0; index < size; ++index)
+ {
+ if (src[index] != cmp[index])
+ ++counter;
+ }
+
+ return counter;
+ }
+
+ Void rt_zero_memory(voidPtr pointer, Size len)
+ {
+ rt_set_memory(pointer, 0, len);
+ }
+
+ SizeT rt_string_len(const Char* str, SizeT _len)
+ {
+ SizeT len{0};
+
+ do
+ {
+ if (len > _len)
+ {
+ return _len;
+ }
+
+ ++len;
+ } while (str[len] != '\0');
+
+ return len;
+ }
+
+ Size rt_string_len(const Char* ptr)
+ {
+ SizeT cnt{0};
+
+ while (ptr[cnt] != 0)
+ ++cnt;
+
+ return cnt;
+ }
+
+ voidPtr rt_set_memory(voidPtr src, UInt32 value, Size len)
+ {
+ UInt32* start = reinterpret_cast<UInt32*>(src);
+
+ while (len)
+ {
+ *start = value;
+ ++start;
+ --len;
+ }
+
+ return (voidPtr)start;
+ }
+
+ Int rt_move_memory(const voidPtr src, voidPtr dst, Size len)
+ {
+ Char* srcChr = reinterpret_cast<Char*>(src);
+ Char* dstChar = reinterpret_cast<Char*>(dst);
+ SizeT index = 0;
+
+ while (index < len)
+ {
+ dstChar[index] = srcChr[index];
+ srcChr[index] = 0;
+
+ ++index;
+ }
+
+ return 0;
+ }
+
+ Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len)
+ {
+ char* srcChr = reinterpret_cast<char*>(src);
+ char* dstChar = reinterpret_cast<char*>(dst);
+ Size index = 0;
+
+ while (index < len)
+ {
+ dstChar[index] = srcChr[index];
+ ++index;
+ }
+
+ dstChar[index] = 0;
+
+ return index;
+ }
+
+ const Char* rt_alloc_string(const Char* src)
+ {
+ const Char* string = new Char[rt_string_len(src) + 1];
+
+ if (!string)
+ return nullptr;
+
+ voidPtr v_src = reinterpret_cast<voidPtr>(const_cast<char*>(src));
+ voidPtr v_dst = reinterpret_cast<voidPtr>(const_cast<char*>(string));
+
+ rt_copy_memory(v_src, v_dst, rt_string_len(src) + 1);
+
+ return string;
+ }
+
+ Int32 rt_to_uppercase(Int32 character)
+ {
+ if (character >= 'a' && character <= 'z')
+ return character - 0x20;
+
+ return character;
+ }
+
+ Int32 rt_to_lower(Int32 character)
+ {
+ if (character >= 'A' && character <= 'Z')
+ return character + 0x20;
+
+ return character;
+ }
+
+ Boolean is_space(Char chr)
+ {
+ return chr == ' ';
+ }
+
+ Boolean is_newln(Char chr)
+ {
+ return chr == '\n';
+ }
+
+ VoidPtr rt_string_in_string(const Char* in, const Char* needle)
+ {
+ for (SizeT i = 0; i < rt_string_len(in); ++i)
+ {
+ if (rt_string_cmp(in + i, needle, rt_string_len(needle)) == 0)
+ return reinterpret_cast<voidPtr>(const_cast<char*>(in + i));
+ }
+
+ return nullptr;
+ }
+
+ Char rt_to_char(UInt64 base, Int32 limit)
+ {
+ const Char kNumbers[17] = "0123456789ABCDEF";
+ return kNumbers[base % limit];
+ }
+
+ Bool rt_to_string(Char* str, UInt64 base, Int32 limit)
+ {
+#ifdef __ZKA_AMD64__
+ auto i = 0;
+
+ auto final_number = base;
+
+ auto mult = 1;
+ auto elems = 0L;
+
+ base /= 10;
+
+ while (base > 0)
+ {
+ elems++;
+ mult *= 10;
+ base /= 10;
+ }
+
+ while (elems > -1)
+ {
+ final_number = (final_number % mult) * 10 + final_number / mult;
+ str[i] = rt_to_char(final_number, limit);
+
+ --elems;
+ ++i;
+ }
+#endif
+
+ return YES;
+ }
+
+ /// @brief Checks for a string start at the character.
+
+ Char* rt_string_has_char(Char* str, const Char chr)
+ {
+ while (*str != chr)
+ {
+ ++str;
+
+ if (*str == 0)
+ return nullptr;
+ }
+
+ return str;
+ }
+} // namespace Kernel
+
+EXTERN_C void* memset(void* dst, int c, long long unsigned int len)
+{
+ return Kernel::rt_set_memory(dst, c, len);
+}
+
+EXTERN_C void* memcpy(void* dst, const void* src, long long unsigned int len)
+{
+ Kernel::rt_copy_memory(const_cast<void*>(src), dst, len);
+ return dst;
+}
diff --git a/dev/Kernel/src/Variant.cc b/dev/Kernel/src/Variant.cc
new file mode 100644
index 00000000..7d62cb98
--- /dev/null
+++ b/dev/Kernel/src/Variant.cc
@@ -0,0 +1,33 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <NewKit/Variant.h>
+
+namespace Kernel
+{
+ const Char* Variant::ToString()
+ {
+ switch (fKind)
+ {
+ case VariantKind::kXML:
+ return ("Class:{XML}");
+ case VariantKind::kJson:
+ return ("Class:{Json}");
+ case VariantKind::kString:
+ return ("Class:{String}");
+ case VariantKind::kBlob:
+ return ("Class:{Blob}");
+ default:
+ return ("Class:{Null}");
+ }
+ }
+
+ /// @brief Leak variant's instance.
+ VoidPtr Variant::Leak()
+ {
+ return fPtr;
+ }
+} // namespace Kernel
diff --git a/dev/LibSCI/CompilerHint.h b/dev/LibSCI/CompilerHint.h
new file mode 100644
index 00000000..319e924c
--- /dev/null
+++ b/dev/LibSCI/CompilerHint.h
@@ -0,0 +1,25 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef SCI_HINT_H
+#define SCI_HINT_H
+
+#ifdef __TK__
+#pragma compiler(hint_manifest)
+#endif
+
+#define _Input
+#define _Output
+
+#define _Optional
+
+#define _StrictCheckInput
+#define _StrictCheckOutput
+
+#define _InOut
+#define _StrictInOut
+
+#endif // ifndef SCI_HINT_H
diff --git a/dev/LibSCI/GPU.h b/dev/LibSCI/GPU.h
new file mode 100644
index 00000000..a032e87b
--- /dev/null
+++ b/dev/LibSCI/GPU.h
@@ -0,0 +1,52 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+File: GPU.h
+Purpose: GFX System Calls.
+
+------------------------------------------- */
+
+#ifndef SCIKIT_GPU_H
+#define SCIKIT_GPU_H
+
+#include <SCI.h>
+
+struct GPUCmdBuffer;
+
+/// ------------------------------------------------------------------------------------------ //
+/// @brief GPU API.
+/// ------------------------------------------------------------------------------------------ //
+
+/// ------------------------------------------------------------------------------------------ //
+/// @brief Command buffer structure type.
+/// ------------------------------------------------------------------------------------------ //
+struct GPUCmdBuffer final
+{
+ SizeT X, Y, Z;
+ VoidPtr FrameData;
+ SizeT FrameDataSz;
+ SizeT BackBufferLayer;
+ Bool IsGPGPUData;
+ Bool BackBufferFirst;
+
+ Bool isGPGPUData()
+ {
+ return !this->BackBufferFirst && this->IsGPGPUData;
+ }
+
+ Bool isValid()
+ {
+ return this->FrameData && this->FrameDataSz > 0;
+ }
+};
+
+typedef VoidPtr GPUObject;
+
+IMPORT_C GPUObject GPUNewFromDeviceName(_Input const Char* device_name);
+
+IMPORT_C SInt32 GPUDisposeDevice(GPUObject gpu_handle, Bool cancel_all, Bool flush_all);
+
+IMPORT_C SInt32 GPUSendCmdBufferListWithCnt(GPUCmdBuffer** cmd_list, SizeT cmd_list_cnt);
+
+#endif // ifndef SCIKIT_GPU_H
diff --git a/dev/LibSCI/LPC.h b/dev/LibSCI/LPC.h
new file mode 100644
index 00000000..2034cb3c
--- /dev/null
+++ b/dev/LibSCI/LPC.h
@@ -0,0 +1,56 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Macros.h>
+
+/// @file LPC.h
+/// @brief Local Process Code type and values.
+
+#define err_local_ok() (kLastError == kErrorSuccess)
+#define err_local_fail() (kLastError != kErrorSuccess)
+#define err_local_get() (kLastError)
+
+typedef SInt32 ErrObject;
+
+inline constexpr ErrObject kErrorSuccess = 0;
+inline constexpr ErrObject kErrorExecutable = 33;
+inline constexpr ErrObject kErrorExecutableLib = 34;
+inline constexpr ErrObject kErrorFileNotFound = 35;
+inline constexpr ErrObject kErrorDirectoryNotFound = 36;
+inline constexpr ErrObject kErrorDiskReadOnly = 37;
+inline constexpr ErrObject kErrorDiskIsFull = 38;
+inline constexpr ErrObject kErrorProcessFault = 39;
+inline constexpr ErrObject kErrorSocketHangUp = 40;
+inline constexpr ErrObject kErrorThreadLocalStorage = 41;
+inline constexpr ErrObject kErrorMath = 42;
+inline constexpr ErrObject kErrorNoNetwork = 43;
+inline constexpr ErrObject kErrorHeapOutOfMemory = 44;
+inline constexpr ErrObject kErrorNoSuchDisk = 45;
+inline constexpr ErrObject kErrorFileExists = 46;
+inline constexpr ErrObject kErrorFormatFailed = 47;
+inline constexpr ErrObject kErrorNetworkTimeout = 48;
+inline constexpr ErrObject kErrorInternal = 49;
+inline constexpr ErrObject kErrorForkAlreadyExists = 50;
+inline constexpr ErrObject kErrorOutOfTeamSlot = 51;
+inline constexpr ErrObject kErrorHeapNotPresent = 52;
+inline constexpr ErrObject kErrorNoEntrypoint = 53;
+inline constexpr ErrObject kErrorDiskIsCorrupted = 54;
+inline constexpr ErrObject kErrorDisk = 55;
+inline constexpr ErrObject kErrorInvalidData = 56;
+inline constexpr ErrObject kErrorAsync = 57;
+inline constexpr ErrObject kErrorNonBlocking = 58;
+inline constexpr ErrObject kErrorIPC = 59;
+inline constexpr ErrObject kErrorSign = 60;
+inline constexpr ErrObject kErrorInvalidCreds = 61;
+inline constexpr ErrObject kErrorCDTrayBroken = 62;
+inline constexpr ErrObject kErrorUnrecoverableDisk = 63;
+inline constexpr ErrObject kErrorFileLocked = 64;
+inline constexpr ErrObject kErrorUnimplemented = 0;
+
+/// @brief The last error reported by the system to the process.
+IMPORT_C ErrObject kLastError;
diff --git a/dev/LibSCI/Macros.h b/dev/LibSCI/Macros.h
new file mode 100644
index 00000000..8d5a08d0
--- /dev/null
+++ b/dev/LibSCI/Macros.h
@@ -0,0 +1,56 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+File: Macros.h
+Purpose: LibSCI Macros header.
+
+------------------------------------------- */
+
+#pragma once
+
+/***********************************************************************************/
+/// @file LibSCI/Macros.h
+/// @brief Macros and core types.
+/***********************************************************************************/
+
+#include <CompilerHint.h>
+
+#define ATTRIBUTE(X) __attribute__((X))
+
+#define IMPORT_CXX extern "C++"
+#define IMPORT_C extern "C"
+
+#define DEPRECATED ATTRIBUTE(deprecated)
+
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+
+#define FILE_MAX_LEN 256
+
+typedef bool Bool;
+typedef void Void;
+
+typedef __UINT64_TYPE__ UInt64;
+typedef __UINT32_TYPE__ UInt32;
+typedef __UINT16_TYPE__ UInt16;
+typedef __UINT8_TYPE__ UInt8;
+
+typedef __SIZE_TYPE__ SizeT;
+
+typedef __INT64_TYPE__ SInt64;
+typedef __INT32_TYPE__ SInt32;
+typedef __INT16_TYPE__ SInt16;
+typedef __INT8_TYPE__ SInt8;
+
+typedef void* VoidPtr;
+typedef __UINTPTR_TYPE__ UIntPtr;
+typedef char Char;
+
+typedef VoidPtr SCIObject;
+
+typedef SCIObject IOObject;
+typedef IOObject FSObject;
+typedef SCIObject DLLObject;
+typedef SCIObject ThreadObject;
+typedef SCIObject SocketObject;
diff --git a/dev/LibSCI/SCI.h b/dev/LibSCI/SCI.h
new file mode 100644
index 00000000..0fca4913
--- /dev/null
+++ b/dev/LibSCI/SCI.h
@@ -0,0 +1,293 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+File: SCI.h
+Purpose: System Calls.
+
+------------------------------------------- */
+
+#ifndef SCIKIT_FOUNDATION_H
+#define SCIKIT_FOUNDATION_H
+
+#include <Macros.h>
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Dynamic Loader API.
+// ------------------------------------------------------------------------------------------ //
+
+/// @brief Get function which is part of the DLL.
+/// @param symbol the symbol to look for
+/// @param dll_handle the DLL handle.
+/// @return the proc pointer.
+IMPORT_C SCIObject LdrGetDLLSymbolFromHandle(_Input const Char* symbol, _Input SCIObject dll_handle);
+
+/// @brief Open DLL handle.
+/// @param path
+/// @param drv
+/// @return
+IMPORT_C SCIObject LdrOpenDLLHandle(_Input const Char* path, _Input const Char* drive_letter);
+
+/// @brief Close DLL handle
+/// @param dll_handle
+/// @return
+IMPORT_C Void LdrCloseDLLHandle(_Input SCIObject* dll_handle);
+
+// ------------------------------------------------------------------------------------------ //
+// File API.
+// ------------------------------------------------------------------------------------------ //
+
+/// @brief Opens a file from a drive.
+/// @param fs_path the filesystem path.
+/// @param drive_letter drive name, use NULL to use default drive location.
+/// @return the file descriptor of the file.
+IMPORT_C SCIObject IoOpenFile(const Char* fs_path, const Char* drive_letter);
+
+/// @brief Closes a file and flushes its content.
+/// @param file_desc the file descriptor.
+/// @return Function doesn't return a type.
+IMPORT_C Void IoCloseFile(_Input SCIObject file_desc);
+
+/// @brief Write data to a file.
+/// @param file_desc the file descriptor.
+/// @param out_data the data to write.
+/// @param sz_data the size of the data to write.
+/// @return the number of bytes written.
+IMPORT_C UInt32 IoWriteFile(_Input SCIObject file_desc, _Output VoidPtr out_data, SizeT sz_data);
+
+/// @brief Read data from a file.
+/// @param file_desc the file descriptor.
+/// @param out_data the data to read.
+/// @param sz_data the size of the data to read.
+IMPORT_C UInt32 IoReadFile(_Input SCIObject file_desc, _Output VoidPtr* out_data, SizeT sz_data);
+
+/// @brief Rewind the file pointer to the beginning of the file.
+/// @param file_desc the file descriptor.
+/// @return the number of bytes read.
+IMPORT_C UInt64 IoRewindFile(_Input SCIObject file_desc);
+
+/// @brief Tell the current position of the file pointer.
+/// @param file_desc the file descriptor.
+/// @return the current position of the file pointer.
+IMPORT_C UInt64 IoTellFile(_Input SCIObject file_desc);
+
+/// @brief Seek file offset from file descriptor.
+IMPORT_C UInt64 IoSeekFile(_Input SCIObject file_desc, UInt64 file_offset);
+
+// ------------------------------------------------------------------------
+// Process API.
+// ------------------------------------------------------------------------
+
+/// @brief Spawns a Thread Information Block and Global Information Block inside the current process.
+/// @param void.
+/// @return > 0 error ocurred or already present, = 0 success.
+IMPORT_C UInt32 RtlSpawnIB(Void);
+
+/// @brief Spawns a process with a unique pid (stored as UIntPtr).
+/// @param process_path process filesystem path.
+/// @return > 0 process was created.
+IMPORT_C UIntPtr RtlSpawnProcess(const Char* process_path, SizeT argc, Char** argv, Char** envp, SizeT envp_len);
+
+/// @brief Exits a process with an exit_code.
+/// @return if it has succeeded true, otherwise false.
+IMPORT_C Bool RtlExitProcess(UIntPtr handle, UIntPtr exit_code);
+
+/// @brief Get current PID of process.
+/// @return Current process ID.
+IMPORT_C UIntPtr RtlCurrentPID(Void);
+
+// ------------------------------------------------------------------------
+// Memory Manager API.
+// ------------------------------------------------------------------------
+
+/// @brief Creates a new heap from the process's address space.
+/// @param len the length of it.
+/// @param flags the flags of it.
+/// @return heap pointer.
+IMPORT_C VoidPtr MmCreateHeap(_Input SizeT len, _Input UInt32 flags);
+
+/// @brief Destroys the pointer
+/// @param heap the heap itself.
+/// @return void.
+IMPORT_C Void MmDestroyHeap(_Input VoidPtr heap);
+
+/// @brief Change protection flags of a memory region.
+IMPORT_C Void MmSetHeapFlags(_Input VoidPtr heap, _Input UInt32 flags);
+
+/// @brief Change protection flags of a memory region.
+IMPORT_C UInt32 MmGetHeapFlags(_Input VoidPtr heap);
+
+/// @brief Fill memory region with CRC32.
+IMPORT_C UInt32 MmFillCRC32Heap(_Input VoidPtr heap);
+
+/// @brief Copy memory region.
+IMPORT_C VoidPtr MmCopyMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len);
+
+/// @brief Compare memory regions.
+IMPORT_C SInt64 MmCmpMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len);
+
+/// @brief Fill memory region.
+IMPORT_C VoidPtr MmFillMemory(_Input VoidPtr dest, _Input SizeT len, _Input UInt8 value);
+
+/// @brief Compare string regions.
+IMPORT_C SInt64 MmStrCmp(_Input const Char* dest, _Input const Char* src);
+
+/// @brief Get length of string.
+IMPORT_C SInt64 MmStrLen(const Char* str);
+
+// ------------------------------------------------------------------------
+// Error API.
+// ------------------------------------------------------------------------
+
+IMPORT_C SInt32 ErrGetLastError(Void);
+
+// ------------------------------------------------------------------------
+// Threading API.
+// ------------------------------------------------------------------------
+
+/// @brief Exit the current thread.
+/// @param exit_code the exit code.
+IMPORT_C Void ThrExitCurrentThread(_Input SInt32 exit_code);
+
+/// @brief Exit the main thread.
+/// @param exit_code the exit code.
+IMPORT_C Void ThrExitMainThread(_Input SInt32 exit_code);
+
+/// @brief Exit a thread.
+/// @param thread the thread to exit.
+/// @param exit_code the exit code.
+IMPORT_C Void ThrExitThread(_Input ThreadObject thread, _Input SInt32 exit_code);
+
+/// @brief Thread procedure function type.
+typedef Void (*thread_proc_kind)(int argc, char** argv);
+
+/// @brief Creates a thread.
+/// @param procedure the thread procedure.
+/// @param argument_count number of arguments inside that thread.
+/// @param flags Thread flags.
+/// @return the thread object.
+IMPORT_C ThreadObject ThrCreateThread(thread_proc_kind procedure, SInt32 argument_count, SInt32 flags);
+
+/// @brief Yields the current thread.
+/// @param thread the thread to yield.
+IMPORT_C Void ThrYieldThread(ThreadObject thrd);
+
+/// @brief Joins a thread.
+/// @param thread the thread to join.
+IMPORT_C Void ThrJoinThread(ThreadObject thrd);
+
+/// @brief Detach a thread.
+/// @param thread the thread to detach.
+IMPORT_C Void ThrDetachThread(ThreadObject thrd);
+
+// ------------------------------------------------------------------------
+// Drive Management API.
+// ------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Get the default drive letter.
+/// @param void.
+/// @return the drive letter.
+// ------------------------------------------------------------------------------------------ //
+IMPORT_C Char* DrvGetDefaultDriveLetter(Void);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Get the drive letter from a path.
+/// @param path the path.
+/// @return the drive letter.
+// ------------------------------------------------------------------------------------------ //
+IMPORT_C Char* DrvGetDriveLetterFromPath(_Input const Char* path);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Get a mounted drive from a letter.
+/// @param letter the letter (A..Z).
+/// @return the drive object.
+// ------------------------------------------------------------------------------------------ //
+IMPORT_C SCIObject DrvGetMountedDrive(_Input const Char letter);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Mount a drive.
+/// @param path the path to mount.
+/// @param letter the letter to mount.
+// ------------------------------------------------------------------------------------------ //
+IMPORT_C Void DrvMountDrive(_Input const Char* path, _Input const Char* letter);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Unmount a drive.
+/// @param letter the letter to unmount.
+// ------------------------------------------------------------------------------------------ //
+IMPORT_C Void DrvUnmountDrive(_Input const Char letter);
+
+// ------------------------------------------------------------------------
+// Event handling API, use to listen to OS specific events.
+// ------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Add an event listener.
+/// @param event_name the event name.
+/// @param listener the listener to add.
+/// @return the event listener.
+// ------------------------------------------------------------------------------------------ //
+
+IMPORT_C Void EvtAddListener(_Input const Char* event_name, _Input SCIObject listener);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Remove an event listener.
+/// @param event_name the event name.
+/// @param listener the listener to remove.
+/// @return the event listener.
+// ------------------------------------------------------------------------------------------ //
+
+IMPORT_C Void EvtRemoveListener(_Input const Char* event_name, _Input SCIObject listener);
+
+// ------------------------------------------------------------------------------------------ //
+/// @brief Dispatch an event.
+/// @param event_name the event name.
+/// @param event_data the event data.
+/// @return the event data.
+// ------------------------------------------------------------------------------------------ //
+
+IMPORT_C VoidPtr EvtDispatchEvent(_Input const Char* event_name, _Input VoidPtr event_data);
+
+// ------------------------------------------------------------------------------------------ //
+// Power API.
+// ------------------------------------------------------------------------------------------ //
+
+enum
+{
+ kPowerCodeShutdown,
+ kPowerCodeReboot,
+ kPowerCodeSleep,
+ kPowerCodeWake,
+ kPowerCodeCount,
+};
+
+IMPORT_C SInt32 PwrReadCode(_Output SInt32& code);
+
+IMPORT_C SInt32 PwrSendCode(_Output SInt32& code);
+
+// ------------------------------------------------------------------------------------------ //
+// CD-ROM API.
+// ------------------------------------------------------------------------------------------ //
+
+IMPORT_C SInt32 CdEjectDrive(_Input const Char drv_letter);
+
+IMPORT_C SInt32 CdOpenTray(Void);
+
+IMPORT_C SInt32 CdCloseTray(Void);
+
+// ------------------------------------------------------------------------------------------ //
+// Console API.
+// ------------------------------------------------------------------------------------------ //
+
+IMPORT_C SInt32 ConOut(IOObject file /* nullptr to direct to stdout */, const Char* fmt, ...);
+
+IMPORT_C SInt32 ConIn(IOObject file /* nullptr to direct to stdout */, const Char* fmt, ...);
+
+IMPORT_C IOObject ConCreate(Void);
+
+IMPORT_C SInt32 ConRelease(IOObject);
+
+IMPORT_C IOObject ConGet(const Char* path);
+
+#endif // ifndef SCIKIT_FOUNDATION_H
diff --git a/dev/LibSCI/doc/LibSCI.drawio b/dev/LibSCI/doc/LibSCI.drawio
new file mode 100644
index 00000000..132eacc1
--- /dev/null
+++ b/dev/LibSCI/doc/LibSCI.drawio
@@ -0,0 +1,28 @@
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="_vc7fxBdNKI2W8YhI8VA">
+ <mxGraphModel dx="756" dy="528" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="eRehIIeIVOPW1y23kRkx-2" target="eRehIIeIVOPW1y23kRkx-8" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-2" value="LibSCI Header (Foundation.h)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="200" y="450" width="226" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="eRehIIeIVOPW1y23kRkx-3" target="eRehIIeIVOPW1y23kRkx-2" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-3" value="LibSCI" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" parent="1" vertex="1">
+ <mxGeometry x="283" y="290" width="60" height="80" as="geometry"/>
+ </mxCell>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-8" value="WindowMgr" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="253" y="570" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="eRehIIeIVOPW1y23kRkx-10" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;System Call Interface&lt;/h1&gt;&lt;p&gt;A set of core functions made to call the microkernel.&lt;/p&gt;&lt;p&gt;These calls takes care of I/O, Heap and process control.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="450" y="240" width="320" height="100" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/dev/LibSCI/libsci.json b/dev/LibSCI/libsci.json
new file mode 100644
index 00000000..8b54828d
--- /dev/null
+++ b/dev/LibSCI/libsci.json
@@ -0,0 +1,20 @@
+{
+ "compiler_path": "x86_64-w64-mingw32-g++",
+ "compiler_std": "c++20",
+ "headers_path": ["../", "./"],
+ "sources_path": ["src/*.cc", "src/*.o"],
+ "output_name": "libSCI.dylib",
+ "compiler_flags": [
+ "-fPIC",
+ "-ffreestanding",
+ "-shared",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-Wl,--subsystem=17"
+ ],
+ "cpp_macros": [
+ "kSCIVersion=0x0100",
+ "kSCIVersionHighest=0x0100",
+ "kSCIVersionLowest=0x0100"
+ ]
+}
diff --git a/dev/LibSCI/src/GPU.cc b/dev/LibSCI/src/GPU.cc
new file mode 100644
index 00000000..e5aae8d4
--- /dev/null
+++ b/dev/LibSCI/src/GPU.cc
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+File: GPU.cc
+Purpose: GPU Interface.
+
+------------------------------------------- */
+
+#include <LPC.h>
diff --git a/dev/LibSCI/src/LPC.cc b/dev/LibSCI/src/LPC.cc
new file mode 100644
index 00000000..7b6af907
--- /dev/null
+++ b/dev/LibSCI/src/LPC.cc
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+File: LPC.cc
+Purpose: Local Procedure Codes.
+
+------------------------------------------- */
+
+#include <LPC.h>
diff --git a/dev/LibSCI/src/LibSCI+IO.asm b/dev/LibSCI/src/LibSCI+IO.asm
new file mode 100644
index 00000000..0beb9e1c
--- /dev/null
+++ b/dev/LibSCI/src/LibSCI+IO.asm
@@ -0,0 +1,50 @@
+;; /*
+;; * ========================================================
+;; *
+;; * LibSCI
+;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+[bits 64]
+
+section .text
+
+global sci_syscall_arg_1
+global sci_syscall_arg_2
+global sci_syscall_arg_3
+global sci_syscall_arg_4
+
+sci_syscall_arg_1:
+ mov r8, rcx
+ syscall
+ ret
+
+sci_syscall_arg_2:
+ mov r8, rcx
+ mov r9, rdx
+ syscall
+ ret
+
+sci_syscall_arg_3:
+ mov rbx, r8
+
+ mov r8, rcx
+ mov r9, rdx
+ mov r10, rbx
+
+ syscall
+ ret
+
+sci_syscall_arg_4:
+ mov rbx, r8
+ mov rax, r9
+
+ mov r8, rcx
+ mov r9, rdx
+ mov r10, rbx
+ mov r11, rax
+
+ syscall
+ ret
diff --git a/dev/LibSCI/src/Makefile b/dev/LibSCI/src/Makefile
new file mode 100644
index 00000000..eb655ed5
--- /dev/null
+++ b/dev/LibSCI/src/Makefile
@@ -0,0 +1,16 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the bootloader makefile.
+##################################################
+
+ASM=nasm
+FLAGS=-f win64
+
+.PHONY: error
+error:
+ @echo "==> Invalid rule."
+ @echo "==> Use sci_asm_io_<arch> instead."
+
+.PHONY: sci_asm_io_x64
+sci_asm_io_x64:
+ $(ASM) $(FLAGS) LibSCI+IO.asm -o LibSCI+IO.o
diff --git a/dev/LibSCI/src/SCI.cc b/dev/LibSCI/src/SCI.cc
new file mode 100644
index 00000000..92cfc54b
--- /dev/null
+++ b/dev/LibSCI/src/SCI.cc
@@ -0,0 +1,45 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <SCI.h>
+
+/// @file LibSCI.cc
+/// @brief Source file for the memory functions of the LibSCI.
+
+/// @brief Copy memory region.
+IMPORT_C VoidPtr MmCopyMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len)
+{
+ if (!len ||
+ !dest ||
+ !src)
+ {
+ return nullptr;
+ }
+
+ for (SizeT i = 0; i < len; i++)
+ {
+ ((Char*)dest)[i] = ((Char*)src)[i];
+ }
+
+ return dest;
+}
+
+/// @brief Fill memory region with **value**.
+IMPORT_C VoidPtr MmFillMemory(_Input VoidPtr dest, _Input SizeT len, _Input UInt8 value)
+{
+ if (!len ||
+ !dest)
+ {
+ return nullptr;
+ }
+
+ for (SizeT i = 0; i < len; i++)
+ {
+ ((Char*)dest)[i] = value;
+ }
+
+ return dest;
+}
diff --git a/dev/Mod/ACPI/ACPI.h b/dev/Mod/ACPI/ACPI.h
new file mode 100644
index 00000000..3a895430
--- /dev/null
+++ b/dev/Mod/ACPI/ACPI.h
@@ -0,0 +1,88 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __ACPI__
+#define __ACPI__
+
+/**
+ https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html
+*/
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ class PACKED SDT
+ {
+ public:
+ Char Signature[4];
+ UInt32 Length;
+ UInt8 Revision;
+ Char Checksum;
+ Char OemId[6];
+ Char OemTableId[8];
+ UInt32 OemRev;
+ UInt32 CreatorID;
+ UInt32 CreatorRevision;
+ };
+
+ class PACKED RSDP : public SDT
+ {
+ public:
+ UInt32 RsdtAddress;
+ UIntPtr XsdtAddress;
+ UInt8 ExtendedChecksum;
+ UInt8 Reserved0[3];
+ };
+
+ class PACKED ConfigHeader
+ {
+ public:
+ UInt64 BaseAddress;
+ UInt16 PciSegGroup;
+ UInt8 StartBus;
+ UInt8 EndBus;
+ UInt32 Reserved;
+ };
+
+ enum ACPI_ADDRESS_SPACE_KIND : UInt8
+ {
+ eSystemMemory = 0,
+ eSystemIO = 1,
+ ePci = 2,
+ eController = 3,
+ eSmBus = 4,
+ eCount = 5,
+ eInvalid = 0xFF,
+ };
+
+ class PACKED ACPI_ADDRESS final
+ {
+ public:
+ UInt8 AddressSpaceId;
+ UInt8 RegisterBitWidth;
+ UInt8 RegisterBitOffset;
+ UInt8 Reserved;
+ UIntPtr Address;
+ };
+
+ class PACKED RSDT final
+ {
+ public:
+ Char Signature[4];
+ UInt32 Length;
+ UInt8 Revision;
+ Char Checksum;
+ Char OemId[6];
+ Char OemTableId[8];
+ UInt32 OemRev;
+ UInt32 CreatorID;
+ UInt32 CreatorRevision;
+ UInt32 AddressArr[];
+ };
+} // namespace Kernel
+
+#endif // !__ACPI__
diff --git a/dev/Mod/ACPI/ACPIFactoryInterface.h b/dev/Mod/ACPI/ACPIFactoryInterface.h
new file mode 100644
index 00000000..2153a409
--- /dev/null
+++ b/dev/Mod/ACPI/ACPIFactoryInterface.h
@@ -0,0 +1,60 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef __MOD_ACPI_H__
+#define __MOD_ACPI_H__
+
+#include <KernelKit/DebugOutput.h>
+#include <Mod/ACPI/ACPI.h>
+#include <NewKit/ErrorOr.h>
+#include <NewKit/Defines.h>
+#include <NewKit/Ref.h>
+
+namespace Kernel
+{
+ class ACPIFactoryInterface;
+
+ typedef ACPIFactoryInterface PowerFactoryInterface;
+
+ class ACPIFactoryInterface final
+ {
+ public:
+ explicit ACPIFactoryInterface(voidPtr rsp_ptr);
+ ~ACPIFactoryInterface() = default;
+
+ ACPIFactoryInterface& operator=(const ACPIFactoryInterface&) = default;
+ ACPIFactoryInterface(const ACPIFactoryInterface&) = default;
+
+ public:
+ Void Shutdown(); // shutdown
+ Void Reboot(); // soft-reboot
+
+ public:
+ /// @brief Descriptor find factory.
+ /// @param signature The signature of the descriptor table (MADT, ACPI...)
+ /// @return the blob inside an ErrorOr object.
+ ErrorOr<voidPtr> Find(const Char* signature);
+
+ /// @brief Checksum factory.
+ /// @param checksum the data to checksum
+ /// @param len it's size
+ /// @return if it succeed
+ bool Checksum(const Char* checksum, SSizeT len); // watch for collides!
+
+ public:
+ ErrorOr<voidPtr> operator[](const Char* signature)
+ {
+ return this->Find(signature);
+ }
+
+ private:
+ VoidPtr fRsdp{nullptr}; // pointer to root descriptor.
+ SSizeT fEntries{0UL}; // number of entries, -1 tells that no invalid entries were
+ // found.
+ };
+} // namespace Kernel
+
+#endif // !__MOD_ACPI_H__
diff --git a/dev/Mod/AHCI/.gitkeep b/dev/Mod/AHCI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/AHCI/.gitkeep
diff --git a/dev/Mod/AHCI/AHCI.h b/dev/Mod/AHCI/AHCI.h
new file mode 100644
index 00000000..08846e85
--- /dev/null
+++ b/dev/Mod/AHCI/AHCI.h
@@ -0,0 +1,365 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: AHCI.h
+ Purpose: AHCI protocol defines.
+
+ Revision History:
+
+ 03/02/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#if defined(__AHCI__)
+
+#include <NewKit/Defines.h>
+#include <Mod/ACPI/ACPI.h>
+
+/// @file AHCI.h
+/// @brief AHCI support.
+
+#define kAHCISectorSize (512)
+
+struct HbaPort;
+struct FisData;
+struct FisRegD2H;
+struct FisRegH2D;
+
+/// @brief Frame information type.
+enum
+{
+ kFISTypeRegH2D = 0x27, // Register FIS - host to device
+ kFISTypeRegD2H = 0x34, // Register FIS - device to host
+ kFISTypeDMAAct = 0x39, // DMA activate FIS - device to host
+ kFISTypeDMASetup = 0x41, // DMA setup FIS - bidirectional
+ kFISTypeData = 0x46, // Data FIS - bidirectional
+ kFISTypeBIST = 0x58, // BIST activate FIS - bidirectional
+ kFISTypePIOSetup = 0x5F, // PIO setup FIS - device to host
+ kFISTypeDevBits = 0xA1, // Set device bits FIS - device to host
+};
+
+enum
+{
+ kAHCICmdIdentify = 0xEC,
+ kAHCICmdReadDma = 0xC8,
+ kAHCICmdReadDmaEx = 0x25,
+ kAHCICmdWriteDma = 0xCA,
+ kAHCICmdWriteDmaEx = 0x35
+};
+
+typedef struct FisRegH2D final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_REG_H2D
+
+ Kernel::UInt8 PortMul : 4; // Port multiplier
+ Kernel::UInt8 Reserved0 : 3; // Reserved
+ Kernel::UInt8 CmdOrCtrl : 1; // 1: Command, 0: Control
+
+ Kernel::UInt8 Command; // Command register
+ Kernel::UInt8 Featurel; // Feature register, 7:0
+
+ // DWORD 1
+ Kernel::UInt8 Lba0; // LBA low register, 7:0
+ Kernel::UInt8 Lba1; // LBA mid register, 15:8
+ Kernel::UInt8 Lba2; // LBA high register, 23:16
+ Kernel::UInt8 Device; // Device register
+
+ // DWORD 2
+ Kernel::UInt8 Lba3; // LBA register, 31:24
+ Kernel::UInt8 Lba4; // LBA register, 39:32
+ Kernel::UInt8 Lba5; // LBA register, 47:40
+ Kernel::UInt8 FeatureHigh; // Feature register, 15:8
+
+ // DWORD 3
+ Kernel::UInt8 CountLow; // Count register, 7:0
+ Kernel::UInt8 CountHigh; // Count register, 15:8
+ Kernel::UInt8 Icc; // Isochronous command completion
+ Kernel::UInt8 Control; // Control register
+
+ // DWORD 4
+ Kernel::UInt8 Reserved1[4]; // Reserved
+} FisRegH2D;
+
+typedef struct FisRegD2H final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_REG_D2H
+
+ Kernel::UInt8 PortMul : 4; // Port multiplier
+ Kernel::UInt8 Reserved0 : 2; // Reserved
+ Kernel::UInt8 InterruptBit : 1; // Interrupt bit
+ Kernel::UInt8 Reserved1 : 1; // Reserved
+
+ Kernel::UInt8 Status; // Status register
+ Kernel::UInt8 Rrror; // Error register
+
+ // DWORD 1
+ Kernel::UInt8 Lba0; // LBA low register, 7:0
+ Kernel::UInt8 Lba1; // LBA mid register, 15:8
+ Kernel::UInt8 Lba2; // LBA high register, 23:16
+ Kernel::UInt8 Device; // Device register
+
+ // DWORD 2
+ Kernel::UInt8 Lba3; // LBA register, 31:24
+ Kernel::UInt8 Lba4; // LBA register, 39:32
+ Kernel::UInt8 Lba5; // LBA register, 47:40
+ Kernel::UInt8 Rsv2; // Reserved
+
+ // DWORD 3
+ Kernel::UInt8 CountLow; // Count register, 7:0
+ Kernel::UInt8 CountHigh; // Count register, 15:8
+ Kernel::UInt8 Rsv3[2]; // Reserved
+
+ // DWORD 4
+ Kernel::UInt8 Rsv4[4]; // Reserved
+} FisRegD2H;
+
+typedef struct FisData final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_DATA
+
+ Kernel::UInt8 PortMul : 4; // Port multiplier
+ Kernel::UInt8 Reserved0 : 4; // Reserved
+
+ Kernel::UInt8 Reserved1[2]; // Reserved
+
+ // DWORD 1 ~ N
+ Kernel::UInt32 Data[1]; // Payload
+} FisData;
+
+typedef struct FisPioSetup final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_PIO_SETUP
+
+ Kernel::UInt8 PortMul : 4; // Port multiplier
+ Kernel::UInt8 Reserved0 : 1; // Reserved
+ Kernel::UInt8 DTD : 1; // Data transfer direction, 1 - device to host
+ Kernel::UInt8 InterruptBit : 1; // Interrupt bit
+ Kernel::UInt8 Reserved1 : 1;
+
+ Kernel::UInt8 Status; // Status register
+ Kernel::UInt8 Error; // Error register
+
+ // DWORD 1
+ Kernel::UInt8 Lba0; // LBA low register, 7:0
+ Kernel::UInt8 Lba1; // LBA mid register, 15:8
+ Kernel::UInt8 Lba2; // LBA high register, 23:16
+ Kernel::UInt8 Device; // Device register
+
+ // DWORD 2
+ Kernel::UInt8 Lba3; // LBA register, 31:24
+ Kernel::UInt8 Lba4; // LBA register, 39:32
+ Kernel::UInt8 Lba5; // LBA register, 47:40
+ Kernel::UInt8 Rsv2; // Reserved
+
+ // DWORD 3
+ Kernel::UInt8 CountLow; // Count register, 7:0
+ Kernel::UInt8 CountHigh; // Count register, 15:8
+ Kernel::UInt8 Rsv3; // Reserved
+ Kernel::UInt8 EStatus; // New value of status register
+
+ // DWORD 4
+ Kernel::UInt16 TranferCount; // Transfer count
+ Kernel::UInt8 Rsv4[2]; // Reserved
+} FisPioSetup;
+
+typedef struct FisDmaSetup final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_DMA_SETUP
+
+ Kernel::UInt8 PortMul : 4; // Port multiplier
+ Kernel::UInt8 Reserved0 : 1; // Reserved
+ Kernel::UInt8 DTD : 1; // Data transfer direction, 1 - device to host
+ Kernel::UInt8 InterruptBit : 1; // Interrupt bit
+ Kernel::UInt8 AutoEnable : 1; // Auto-activate. Specifies if DMA Activate FIS is needed
+
+ Kernel::UInt8 Reserved1[2]; // Reserved
+
+ // DWORD 1&2
+ Kernel::UInt64 DmaBufferId; // DMA Buffer Identifier. Used to Identify DMA buffer in
+ // host memory. SATA Spec says host specific and not in
+ // Spec. Trying AHCI spec might work.
+
+ // DWORD 3
+ Kernel::UInt32 Rsvd; // More reserved
+
+ // DWORD 4
+ Kernel::UInt32 DmabufOffset; // Byte offset into buffer. First 2 bits must be 0
+
+ // DWORD 5
+ Kernel::UInt32 TransferCount; // Number of bytes to transfer. Bit 0 must be 0
+
+ // DWORD 6
+ Kernel::UInt32 Reserved3; // Reserved
+} FisDmaSetup;
+
+typedef struct FisDevBits final
+{
+ // DWORD 0
+ Kernel::UInt8 FisType; // FIS_TYPE_DMA_SETUP (A1h)
+
+ Kernel::UInt8 Reserved0 : 5; // Reserved
+ Kernel::UInt8 R0 : 1;
+ Kernel::UInt8 InterruptBit : 1;
+ Kernel::UInt8 N : 1;
+
+ Kernel::UInt8 StatusLow : 3;
+ Kernel::UInt8 R1 : 1;
+ Kernel::UInt8 StatusHigh : 3;
+
+ Kernel::UInt8 R2 : 1;
+ Kernel::UInt8 Error;
+
+ // DWORD 1
+ Kernel::UInt32 Act;
+} FisDevBits;
+
+/// \brief Enable AHCI device bit in GHC register.
+#ifndef kAhciGHC_AE
+#define kAhciGHC_AE (31)
+#endif //! ifndef kAhciGHC_AE
+
+typedef struct HbaPort final
+{
+ Kernel::UInt32 Clb; // 0x00, command list base address, 1K-byte aligned
+ Kernel::UInt32 Clbu; // 0x04, command list base address upper 32 bits
+ Kernel::UInt32 Fb; // 0x08, FIS base address, 256-byte aligned
+ Kernel::UInt32 Fbu; // 0x0C, FIS base address upper 32 bits
+ Kernel::UInt32 Is; // 0x10, interrupt status
+ Kernel::UInt32 Ie; // 0x14, interrupt enable
+ Kernel::UInt32 Cmd; // 0x18, command and status
+ Kernel::UInt32 Reserved0; // 0x1C, Reserved
+ Kernel::UInt32 Tfd; // 0x20, task file data
+ Kernel::UInt32 Sig; // 0x24, signature
+ Kernel::UInt32 Ssts; // 0x28, SATA status (SCR0:SStatus)
+ Kernel::UInt32 Sctl; // 0x2C, SATA control (SCR2:SControl)
+ Kernel::UInt32 Serr; // 0x30, SATA error (SCR1:SError)
+ Kernel::UInt32 Sact; // 0x34, SATA active (SCR3:SActive)
+ Kernel::UInt32 Ci; // 0x38, command issue
+ Kernel::UInt32 Sntf; // 0x20, SATA notification (SCR4:SNotification)
+ Kernel::UInt32 Fbs; // 0x40, FIS-based switch control
+ Kernel::UInt32 Reserved1[11]; // 0x44 ~ 0x6F, Reserved
+ Kernel::UInt32 Vendor[4]; // 0x70 ~ 0x7F, vendor specific
+} HbaPort;
+
+typedef struct HbaMem final
+{
+ // 0x00 - 0x2B, Generic Host Control
+ Kernel::UInt32 Cap; // 0x00, Host capability
+ Kernel::UInt32 Ghc; // 0x04, Global host control
+ Kernel::UInt32 Is; // 0x08, Interrupt status
+ Kernel::UInt32 Pi; // 0x0C, Port implemented
+ Kernel::UInt32 Vs; // 0x10, Version
+ Kernel::UInt32 Ccc_ctl; // 0x14, Command completion coalescing control
+ Kernel::UInt32 Ccc_pts; // 0x18, Command completion coalescing ports
+ Kernel::UInt32 Em_loc; // 0x1C, Enclosure management location
+ Kernel::UInt32 Em_ctl; // 0x20, Enclosure management control
+ Kernel::UInt32 Cap2; // 0x24, Host capabilities extended
+ Kernel::UInt32 Bohc; // 0x28, BIOS/OS handoff control and status
+
+ Kernel::UInt8 Resv0[0xA0 - 0x2C];
+ Kernel::UInt8 Vendor[0x100 - 0xA0];
+
+ HbaPort Ports[32]; // 1 ~ 32, 32 is the max ahci devices per controller.
+} HbaMem;
+
+typedef struct HbaCmdHeader final
+{
+ // DW0
+ Kernel::UInt8 Cfl : 5; // Command FIS length in DWORDS, 2 ~ 16
+ Kernel::UInt8 Atapi : 1; // ATAPI
+ Kernel::UInt8 Write : 1; // Write, 1: H2D, 0: D2H
+ Kernel::UInt8 Prefetchable : 1; // Prefetchable
+
+ Kernel::UInt8 Reset : 1; // Reset
+ Kernel::UInt8 BIST : 1; // BIST
+ Kernel::UInt8 Clear : 1; // Clear busy upon R_OK
+ Kernel::UInt8 Reserved0 : 1; // Reserved
+ Kernel::UInt8 Pmp : 4; // Port multiplier port
+
+ Kernel::UInt16 Prdtl; // Physical region descriptor table length in entries
+ volatile Kernel::UInt32 Prdbc; // Physical region descriptor byte count transferred
+
+ Kernel::UInt32 Ctba; // Command table descriptor base address
+ Kernel::UInt32 Ctbau; // Command table descriptor base address upper 32 bits
+
+ Kernel::UInt32 Reserved1[4]; // Reserved
+} HbaCmdHeader;
+
+typedef struct HbaFis final
+{
+ // 0x00
+ FisDmaSetup Dsfis; // DMA Setup FIS
+ Kernel::UInt8 Pad0[4];
+ // 0x20
+ FisPioSetup Psfis; // PIO Setup FIS
+ Kernel::UInt8 Pad1[12];
+ // 0x40
+ FisRegD2H Rfis; // Register – Device to Host FIS
+ Kernel::UInt8 Pad2[4];
+ // 0x58
+ FisDevBits Sdbfis; // Set Device Bit FIS
+ // 0x60
+ Kernel::UInt8 Ufis[64];
+ // 0xA0
+ Kernel::UInt8 Rsv[0x100 - 0xA0];
+} HbaFis;
+
+typedef struct HbaPrdtEntry final
+{
+ Kernel::UInt32 Dba; // Data base address
+ Kernel::UInt32 Dbau; // Data base address upper 32 bits
+ Kernel::UInt32 Reserved0; // Reserved
+ // DW3
+ Kernel::UInt32 Dbc : 22; // Byte count, 4M max
+ Kernel::UInt32 Reserved1 : 9; // Reserved
+ Kernel::UInt32 InterruptBit : 1; // Interrupt on completion
+} HbaPrdtEntry;
+
+typedef struct HbaCmdTbl final
+{
+ Kernel::UInt8 Cfis[64]; // Command FIS
+ Kernel::UInt8 Acmd[16]; // ATAPI command, 12 or 16 bytes
+ Kernel::UInt8 Rsv[48]; // Reserved
+ struct HbaPrdtEntry PrdtEntries[1]; // Physical region descriptor table entries, 0 ~ 65535
+} HbaCmdTbl;
+
+/// @brief Initializes an AHCI disk.
+/// @param PortsImplemented the amount of port that have been detected.
+/// @return
+Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented);
+
+Kernel::Boolean drv_std_detected(Kernel::Void);
+
+/// @brief Read from AHCI disk.
+/// @param lba
+/// @param buf
+/// @param sector_sz
+/// @param buf_sz
+/// @return
+Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::Char* buf, Kernel::SizeT sector_sz, Kernel::SizeT buf_sz);
+
+/// @brief Write to AHCI disk.
+/// @param lba
+/// @param buf
+/// @param sector_sz
+/// @param buf_sz
+/// @return
+Kernel::Void drv_std_write(Kernel::UInt64 lba, Kernel::Char* buf, Kernel::SizeT sector_sz, Kernel::SizeT buf_sz);
+
+/// @brief Gets the sector count from AHCI disk.
+Kernel::SizeT drv_get_sector_count();
+
+/// @brief Gets the AHCI disk size.
+Kernel::SizeT drv_get_size();
+
+#endif // ifdef __AHCI__
+
+/* EOF */
diff --git a/dev/Mod/APM/APM.h b/dev/Mod/APM/APM.h
new file mode 100644
index 00000000..31128841
--- /dev/null
+++ b/dev/Mod/APM/APM.h
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+namespace Kernel
+{
+ typedef Int32 APMPowerCmd;
+
+ enum
+ {
+ kAPMPowerCommandInvalid = 0x00,
+ kAPMPowerCommandStop = 0x01,
+ kAPMPowerCommandStart = 0x02,
+ kAPMPowerCommandSleep = 0x04,
+ kAPMPowerCommandWakeup = 0x06,
+ kAPMPowerCommandShutdown = 0x07,
+ kAPMPowerCommandReboot = 0x08,
+ };
+
+ /// @brief Send a APM command into it's own DMA space.
+ /// @param base_dma the DMA base address.
+ /// @param cmd the command.
+ /// @return status code.
+ EXTERN_C Int32 apm_send_dma_command(Ptr64 register_addr, APMPowerCmd value);
+
+ /// @brief Send a APM command into it's own IO space.
+ /// @param base_dma the IO base port.
+ /// @param cmd the command.
+ /// @return status code.
+ EXTERN_C Int32 apm_send_io_command(UInt16 cmd, APMPowerCmd value);
+} // namespace Kernel
diff --git a/dev/Mod/ATA/ATA.h b/dev/Mod/ATA/ATA.h
new file mode 100644
index 00000000..07226a97
--- /dev/null
+++ b/dev/Mod/ATA/ATA.h
@@ -0,0 +1,156 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: Defines.h
+ Purpose: ATA header.
+
+ Revision History:
+
+ 03/02/24: Added file (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#ifndef __AHCI__
+
+#include <CompilerKit/CompilerKit.h>
+#include <NewKit/Defines.h>
+
+///! Status register
+#define ATA_SR_BSY 0x80
+#define ATA_SR_DRDY 0x40
+#define ATA_SR_DF 0x20
+#define ATA_SR_DSC 0x10
+#define ATA_SR_DRQ 0x08
+#define ATA_SR_CORR 0x04
+#define ATA_SR_IDX 0x02
+#define ATA_SR_ERR 0x01
+
+///! Error register
+#define ATA_ER_BBK 0x80
+#define ATA_ER_UNC 0x40
+#define ATA_ER_MC 0x20
+#define ATA_ER_IDNF 0x10
+#define ATA_ER_MCR 0x08
+#define ATA_ER_ABRT 0x04
+#define ATA_ER_TK0NF 0x02
+#define ATA_ER_AMNF 0x01
+
+#define ATA_CMD_READ_PIO 0x20
+#define ATA_CMD_READ_PIO_EXT 0x24
+#define ATA_CMD_READ_DMA 0xC8
+#define ATA_CMD_READ_DMA_EXT 0x25
+#define ATA_CMD_WRITE_PIO 0x30
+#define ATA_CMD_WRITE_PIO_EXT 0x34
+#define ATA_CMD_WRITE_DMA 0xCA
+#define ATA_CMD_WRITE_DMA_EXT 0x35
+#define ATA_CMD_CACHE_FLUSH 0xE7
+#define ATA_CMD_CACHE_FLUSH_EXT 0xEA
+#define ATA_CMD_PACKET 0xA0
+#define ATA_CMD_IDENTIFY_PACKET 0xA1
+#define ATA_CMD_IDENTIFY 0xEC
+
+///! ident offsets, use with data that we got from ATA_CMD_IDENTIFY.
+#define ATA_IDENT_DEVICE_TYPE 0
+#define ATA_IDENT_CYLINDERS 2
+#define ATA_IDENT_HEADS 6
+#define ATA_IDENT_SECTORS 12
+#define ATA_IDENT_SERIAL 20
+#define ATA_IDENT_MODEL 54
+#define ATA_IDENT_CAPABILITIES 98
+#define ATA_IDENT_FIELDVALID 106
+#define ATA_IDENT_MAX_LBA 120
+#define ATA_IDENT_COMMANDSETS 164
+#define ATA_IDENT_MAX_LBA_EXT 200
+
+#define ATA_MASTER 0x00
+#define ATA_SLAVE 0x01
+
+///! Register
+#define ATA_REG_DATA 0x00
+#define ATA_REG_ERROR 0x01
+#define ATA_REG_FEATURES 0x01
+#define ATA_REG_SEC_COUNT0 0x02
+#define ATA_REG_LBA0 0x03
+#define ATA_REG_LBA1 0x04
+#define ATA_REG_LBA2 0x05
+#define ATA_REG_HDDEVSEL 0x06
+#define ATA_REG_COMMAND 0x07
+#define ATA_REG_STATUS 0x07
+#define ATA_REG_SEC_COUNT1 0x08
+#define ATA_REG_LBA3 0x09
+#define ATA_REG_LBA4 0x0A
+#define ATA_REG_LBA5 0x0B
+#define ATA_REG_CONTROL 0x0C
+#define ATA_REG_ALT_STATUS 0x0C
+#define ATA_REG_DEV_ADDRESS 0x0D
+
+#define ATA_REG_NEIN 0x01
+
+#define ATA_PRIMARY_IO 0x1F0
+#define ATA_SECONDARY_IO 0x170
+#define ATA_PRIMARY_DCR_AS 0x3F6
+#define ATA_SECONDARY_DCR_AS 0x376
+
+///! Irq
+#define ATA_PRIMARY_IRQ 14
+#define ATA_SECONDARY_IRQ 15
+
+///! Channels
+#define ATA_PRIMARY 0x00
+#define ATA_SECONDARY 0x01
+
+#define ATA_CYL_LOW 3
+#define ATA_CYL_MID 4
+#define ATA_CYL_HIGH 5
+
+///! IO Direction
+#define ATA_READ 0x00
+#define ATA_WRITE 0x013
+
+#define ATA_PRIMARY_SEL 0xA0
+#define ATA_SECONDARY_SEL 0xB0
+
+///! ATA address register.
+#define ATA_ADDRESS1(x) (x + 3)
+#define ATA_ADDRESS2(x) (x + 4)
+#define ATA_ADDRESS3(x) (x + 5)
+
+///! ATA command register.
+#define ATA_COMMAND(x) (x + 7)
+
+#define kATASectorSize (512U)
+
+enum
+{
+ kATADevicePATA,
+ kATADeviceSATA,
+ kATADevicePATA_PI,
+ kATADeviceSATA_PI,
+ kATADeviceCount,
+};
+
+#if defined(__ATA_PIO__) || defined(__ATA_DMA__)
+
+Kernel::Boolean drv_std_init(Kernel::UInt16 in_bus, Kernel::UInt8 drive, Kernel::UInt16& out_bus, Kernel::UInt8& out_master);
+
+Kernel::Boolean drv_std_detected(Kernel::Void);
+
+Kernel::Void drv_std_select(Kernel::UInt16 bus);
+
+Kernel::Boolean drv_std_wait_io(Kernel::UInt16 io);
+
+Kernel::Void drv_std_read(Kernel::UInt64 lba, Kernel::UInt16 io, Kernel::UInt8 is_master, Kernel::Char* buf, Kernel::SizeT sec_sz, Kernel::SizeT buf_sz);
+
+Kernel::Void drv_std_write(Kernel::UInt64 lba, Kernel::UInt16 io, Kernel::UInt8 is_master, Kernel::Char* buf, Kernel::SizeT sec_sz, Kernel::SizeT buf_sz);
+
+/// @brief get sector count.
+Kernel::SizeT drv_get_sector_count();
+
+/// @brief get device size.
+Kernel::SizeT drv_get_size();
+
+#endif // ifdef __MINOSKRNL__
+#endif // ifndef __ATA_PIO__ || __AHCI__
diff --git a/dev/Mod/CoreGfx/AccessibilityMgr.h b/dev/Mod/CoreGfx/AccessibilityMgr.h
new file mode 100644
index 00000000..5d153ac8
--- /dev/null
+++ b/dev/Mod/CoreGfx/AccessibilityMgr.h
@@ -0,0 +1,41 @@
+/* -------------------------------------------
+
+ Copyright Amlal EL Mahrouss.
+
+------------------------------------------- */
+
+#ifndef GFX_MGR_ACCESSIBILITY_H
+#define GFX_MGR_ACCESSIBILITY_H
+
+#include <NewKit/NewKit.h>
+#include <KernelKit/LPC.h>
+#include <Mod/CoreGfx/FBMgr.h>
+#include <Mod/CoreGfx/MathMgr.h>
+#include <ArchKit/ArchKit.h>
+
+namespace FB
+{
+ using namespace Kernel;
+
+ /// @brief common User interface class.
+ class UIAccessibilty final
+ {
+ explicit UIAccessibilty() = default;
+ ~UIAccessibilty() = default;
+
+ public:
+ ZKA_COPY_DELETE(UIAccessibilty);
+
+ static Int64 Width() noexcept
+ {
+ return kHandoverHeader->f_GOP.f_Width;
+ }
+
+ static Int64 Height() noexcept
+ {
+ return kHandoverHeader->f_GOP.f_Height;
+ }
+ };
+} // namespace FB
+
+#endif // !GFX_MGR_ACCESSIBILITY_H_
diff --git a/dev/Mod/CoreGfx/FBMgr.h b/dev/Mod/CoreGfx/FBMgr.h
new file mode 100644
index 00000000..955855f0
--- /dev/null
+++ b/dev/Mod/CoreGfx/FBMgr.h
@@ -0,0 +1,150 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+#define fb_init() Kernel::SizeT kCGCursor = 0
+
+#define fb_color(R, G, B) RGB(R, G, B)
+
+#define fb_get_clear_clr() fb_color(0x20, 0x20, 0x20)
+
+#define fb_clear() kCGCursor = 0
+
+#ifdef __ZKA_AMD64__
+/// @brief Performs Alpha drawing on the framebuffer.
+#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) \
+ for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \
+ { \
+ for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \
+ { \
+ *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ i + \
+ 4 * u))) |= (reg_ptr)[kCGCursor]; \
+ \
+ ++kCGCursor; \
+ } \
+ }
+
+/// @brief Performs drawing on the framebuffer.
+#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) \
+ for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \
+ { \
+ for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \
+ { \
+ *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ i + \
+ 4 * u))) = (reg_ptr)[kCGCursor]; \
+ \
+ ++kCGCursor; \
+ } \
+ }
+
+#define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y) \
+ for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \
+ { \
+ for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \
+ { \
+ *(((Kernel::UInt32*)(_Rgn + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ i + \
+ 4 * u))) = (reg_ptr)[kCGCursor]; \
+ \
+ ++kCGCursor; \
+ } \
+ }
+
+/// @brief Cleans a resource.
+#define CGClearRegion(height, width, base_x, base_y) \
+ for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \
+ { \
+ for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \
+ { \
+ *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ i + \
+ 4 * u))) = fb_get_clear_clr(); \
+ } \
+ }
+
+/// @brief Draws inside a zone.
+#define FBDrawInRegion(_Clr, height, width, base_x, base_y) \
+ for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \
+ { \
+ for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \
+ { \
+ *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ x_base + \
+ 4 * y_base))) = _Clr; \
+ } \
+ }
+
+/// @brief Draws inside a zone.
+#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) \
+ for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \
+ { \
+ for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \
+ { \
+ *(((volatile Kernel::UInt32*)(_Rgn + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ x_base + \
+ 4 * y_base))) = _Clr[kCGCursor]; \
+ ++kCGCursor; \
+ } \
+ }
+
+#define FBDrawInRegionA(_Clr, height, width, base_x, base_y) \
+ for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \
+ { \
+ for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \
+ { \
+ *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \
+ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \
+ x_base + \
+ 4 * y_base))) |= _Clr; \
+ } \
+ }
+#else
+#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y)
+#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y)
+#define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y)
+#define CGClearRegion(height, width, base_x, base_y)
+#define FBDrawInRegion(_Clr, height, width, base_x, base_y)
+#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y)
+#define FBDrawInRegionA(_Clr, height, width, base_x, base_y)
+#define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y)
+#define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y)
+#define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y)
+#define CGClearRegion(height, width, base_x, base_y)
+#define FBDrawInRegion(_Clr, height, width, base_x, base_y)
+#define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y)
+#define FBDrawInRegionA(_Clr, height, width, base_x, base_y)
+#endif // __ZKA_AMD64__
+
+#ifndef GFX_MGR_ACCESSIBILITY_H
+#include <Mod/CoreGfx/AccessibilityMgr.h>
+#endif // ifndef GFX_MGR_ACCESSIBILITY_H
+
+namespace FB
+{
+ struct FB_CONTROL_BLOCK;
+
+ inline void fb_clear_video() noexcept
+ {
+ fb_init();
+
+ FBDrawInRegion(fb_get_clear_clr(), FB::UIAccessibilty::Height(), FB::UIAccessibilty::Width(),
+ 0, 0);
+
+ fb_clear();
+ }
+
+} // namespace FB \ No newline at end of file
diff --git a/dev/Mod/CoreGfx/MathMgr.h b/dev/Mod/CoreGfx/MathMgr.h
new file mode 100644
index 00000000..87f674df
--- /dev/null
+++ b/dev/Mod/CoreGfx/MathMgr.h
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright Amlal EL Mahrouss.
+
+------------------------------------------- */
+
+#pragma once
+
+/// @file MathMgr.h
+/// @brief Linear interpolation implementation.
+
+namespace UI
+{
+#ifdef ZKA_GFX_MGR_USE_DOUBLE
+ typedef double fb_real_t;
+#else
+ typedef float fb_real_t;
+#endif
+
+ /// @brief Linear interpolation equation solver.
+ /// @param from where to start
+ /// @param to to which value.
+ /// @param stat
+ /// @return Linear interop value.
+ inline fb_real_t fb_math_lerp(fb_real_t to, fb_real_t from, fb_real_t stat)
+ {
+ return (from) + (to - from) * stat;
+ }
+} // namespace UI \ No newline at end of file
diff --git a/dev/Mod/CoreGfx/TextMgr.h b/dev/Mod/CoreGfx/TextMgr.h
new file mode 100644
index 00000000..d54cd327
--- /dev/null
+++ b/dev/Mod/CoreGfx/TextMgr.h
@@ -0,0 +1,178 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <Mod/CoreGfx/FBMgr.h>
+
+#define kFontSizeX 8
+#define kFontSizeY 8
+#define kFontNOFChars 128
+
+inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = {
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0000 (nul)
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0001
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0002
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0003
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0004
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0005
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0006
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0007
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0008
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0009
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000A
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000B
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000C
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000D
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000E
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000F
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0010
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0011
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0012
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0013
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0014
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0015
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0016
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0017
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0018
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0019
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001A
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001B
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001C
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001D
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001E
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001F
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space)
+ {0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!)
+ {0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 (")
+ {0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#)
+ {0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($)
+ {0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%)
+ {0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&)
+ {0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (')
+ {0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (()
+ {0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ())
+ {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*)
+ {0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+)
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,)
+ {0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-)
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.)
+ {0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/)
+ {0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0)
+ {0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1)
+ {0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2)
+ {0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3)
+ {0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4)
+ {0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5)
+ {0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6)
+ {0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7)
+ {0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8)
+ {0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9)
+ {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:)
+ {0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (;)
+ {0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<)
+ {0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=)
+ {0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>)
+ {0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?)
+ {0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@)
+ {0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A)
+ {0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B)
+ {0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C)
+ {0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D)
+ {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E)
+ {0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F)
+ {0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G)
+ {0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H)
+ {0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I)
+ {0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J)
+ {0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K)
+ {0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L)
+ {0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M)
+ {0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N)
+ {0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O)
+ {0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P)
+ {0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q)
+ {0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R)
+ {0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S)
+ {0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T)
+ {0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U)
+ {0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V)
+ {0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W)
+ {0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X)
+ {0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y)
+ {0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z)
+ {0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([)
+ {0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\)
+ {0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (])
+ {0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^)
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_)
+ {0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`)
+ {0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a)
+ {0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b)
+ {0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c)
+ {0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d)
+ {0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e)
+ {0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f)
+ {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g)
+ {0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h)
+ {0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i)
+ {0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j)
+ {0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k)
+ {0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l)
+ {0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m)
+ {0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n)
+ {0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o)
+ {0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p)
+ {0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q)
+ {0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r)
+ {0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s)
+ {0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t)
+ {0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u)
+ {0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v)
+ {0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w)
+ {0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x)
+ {0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y)
+ {0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z)
+ {0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({)
+ {0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|)
+ {0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (})
+ {0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~)
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // U+007F
+
+};
+
+inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, const Kernel::SizeT& x_sz, const Kernel::SizeT& y_sz, Kernel::Int32& x_dst, Kernel::Int32& y_dst, Kernel::Int32& color)
+{
+ Kernel::Int32 x, y;
+ Kernel::Int32 set;
+
+ x = 0;
+ y = 0;
+ set = 0;
+
+ for (; y < y_sz; ++y)
+ {
+ for (x = 0; x < x_sz; ++x)
+ {
+ set = bitmap[x] & (1 << y);
+
+ if (set)
+ {
+ FBDrawInRegion(color, 1, 1, ((x_dst) + x), ((y_dst) + y));
+ }
+ }
+ }
+}
+
+inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_dst, Kernel::Int32 y_dst, Kernel::Int32 color)
+{
+ for (Kernel::SizeT i = 0; text[i] != 0; ++i)
+ {
+ fb_render_string_for_bitmap(&kFontBitmap[text[i]][0], kFontSizeX, kFontSizeY, x_dst, y_dst, color);
+ y_dst += kFontSizeY;
+ }
+}
diff --git a/dev/Mod/GPRS/.keepme b/dev/Mod/GPRS/.keepme
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/GPRS/.keepme
diff --git a/dev/Mod/HPET/.gitkeep b/dev/Mod/HPET/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/HPET/.gitkeep
diff --git a/dev/Mod/HPET/Defines.h b/dev/Mod/HPET/Defines.h
new file mode 100644
index 00000000..79f44794
--- /dev/null
+++ b/dev/Mod/HPET/Defines.h
@@ -0,0 +1,42 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: HPET.h
+ Purpose: HPET builtin.
+
+ Revision History:
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <Mod/ACPI/ACPI.h>
+
+namespace Kernel
+{
+ struct PACKED HPETAddressStructure final
+ {
+ Kernel::UInt8 AddressSpaceId; // 0 - system memory, 1 - system I/O
+ Kernel::UInt8 RegisterBitWidth;
+ Kernel::UInt8 RegisterBitOffset;
+ Kernel::UInt8 Reserved;
+ Kernel::UInt64 Address;
+ };
+
+ struct PACKED HPETHeader final : public SDT
+ {
+ Kernel::UInt8 HardwareRevId;
+ Kernel::UInt8 ComparatorCount : 5;
+ Kernel::UInt8 CounterSize : 1;
+ Kernel::UInt8 Reserved : 1;
+ Kernel::UInt8 LegacyReplacement : 1;
+ Kernel::UInt16 PciVendorId;
+ HPETAddressStructure Address;
+ Kernel::UInt8 HpetNumber;
+ Kernel::UInt16 MinimumTick;
+ Kernel::UInt8 PageProtection;
+ };
+
+} // namespace Kernel
diff --git a/dev/Mod/IEEE802/.gitkeep b/dev/Mod/IEEE802/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/IEEE802/.gitkeep
diff --git a/dev/Mod/LTE/LTE.h b/dev/Mod/LTE/LTE.h
new file mode 100644
index 00000000..a1069fdb
--- /dev/null
+++ b/dev/Mod/LTE/LTE.h
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved..
+
+File: LTE\LTE.h.
+Purpose: LTE Standard Library.
+
+------------------------------------------- */
+
+#ifndef _INC_NETWORK_LTE_H_
+#define _INC_NETWORK_LTE_H_
+
+#include <NewKit/Defines.h>
+#include <NewKit/KString.h>
+
+/// @brief Long Term Evolution I/O routines.
+
+/// @brief Turn on SIM slot.
+Kernel::Boolean lte_turn_on_sim(Kernel::Int32 simSlot);
+
+/// @brief Turn off SIM slot.
+Kernel::Boolean lte_turn_off_sim(Kernel::Int32 simSlot);
+
+/// @brief Send AT command.
+Kernel::Boolean lte_send_at_command(Kernel::Char* buf,
+ Kernel::Size bufReadSz,
+ Kernel::Int32 simSlot);
+
+Kernel::Boolean lte_write_sim_file(Kernel::Char* file,
+ Kernel::VoidPtr buf,
+ Kernel::Size bufSz,
+ Kernel::Size offset,
+ Kernel::Int32 simSlot);
+
+Kernel::VoidPtr lte_read_sim_file(Kernel::Char* file,
+ Kernel::Size bufSz,
+ Kernel::Size offset,
+ Kernel::Int32 simSlot);
+
+#endif // ifndef _INC_NETWORK_LTE_H_
diff --git a/dev/Mod/MBCI/Interface.h b/dev/Mod/MBCI/Interface.h
new file mode 100644
index 00000000..8cfe73a9
--- /dev/null
+++ b/dev/Mod/MBCI/Interface.h
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <Mod/MBCI/MBCI.h>
diff --git a/dev/Mod/MBCI/MBCI.h b/dev/Mod/MBCI/MBCI.h
new file mode 100644
index 00000000..7770706c
--- /dev/null
+++ b/dev/Mod/MBCI/MBCI.h
@@ -0,0 +1,84 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef _INC_MODULE_MBCI_H_
+#define _INC_MODULE_MBCI_H_
+
+#include <NewKit/Defines.h>
+#include <Mod/ACPI/ACPI.h>
+
+/**
+- VCC (IN) (OUT for MCU)
+- CLK (IN) (OUT for MCU)
+- ACK (BI) (Contains an Acknowledge Packet Frame)
+- D0- (IN) (Starts with the Host Interface Packet Frame)
+- D1- (IN) (Starts with the Host Interface Packet Frame)
+- D0+ (OUT) (Starts with the Host Interface Packet Frame)
+- D1+ (OUT) (Starts with the Host Interface Packet Frame)
+- GND (IN) (OUT for MCU)
+ */
+
+#define kMBCIZeroSz (8)
+
+namespace Kernel
+{
+ struct IMBCIHost;
+
+ enum
+ {
+ kMBCISpeedDeviceInvalid,
+ kMBCILowSpeedDevice,
+ kMBCIHighSpeedDevice,
+ kMBCISpeedDeviceCount,
+ };
+
+ /// @brief MBCI Host header.
+ struct PACKED IMBCIHost final
+ {
+ UInt32 Magic;
+ UInt32 HostId;
+ UInt16 VendorId;
+ UInt16 DeviceId;
+ UInt8 MemoryType;
+ UInt16 HostType;
+ UInt16 HostFlags;
+ UInt8 Error;
+ UInt8 Status;
+ UInt8 InterruptEnable;
+ UInt64 BaseAddressRegister;
+ UInt64 BaseAddressRegisterSize;
+ Char Zero[kMBCIZeroSz];
+ };
+
+ /// @brief MBCI host flags.
+ enum MBCIHostFlags
+ {
+ kMBCIHostFlagsSupportsNothing, // Invalid MBCI device.
+ kMBCIHostFlagsSupportsAPM, // Advanced Power Management.
+ kMBCIHostFlagsSupportsDaisyChain, // Is daisy chained.
+ kMBCIHostFlagsSupportsHWInterrupts, // Has HW interrupts.
+ kMBCIHostFlagsSupportsDMA, // Has DMA.
+ kMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table.
+ };
+
+ enum MBCIHostKind
+ {
+ kMBCIHostKindHardDisk,
+ kMBCIHostKindOpticalDisk,
+ kMBCIHostKindKeyboardLow,
+ kMBCIHostKindMouseLow,
+ kMBCIHostKindMouseHigh,
+ kMBCIHostKindKeyboardHigh,
+ kMBCIHostKindNetworkInterface,
+ kMBCIHostKindDaisyChain,
+ kMBCIHostKindStartExtended = __UINT16_MAX__, // Extended vendor table limit.
+ };
+
+ /// @brief An AuthKey is a context used to decrpy data from an MBCI packet.
+ typedef UInt64 MBCIAuthKeyType;
+} // namespace Kernel
+
+#endif // ifndef _INC_MODULE_MBCI_H_
diff --git a/dev/Mod/MFlash/MFlash.h b/dev/Mod/MFlash/MFlash.h
new file mode 100644
index 00000000..05cfb2c8
--- /dev/null
+++ b/dev/Mod/MFlash/MFlash.h
@@ -0,0 +1,21 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#ifdef ZKA_USE_MBCI_FLASH
+
+#include <NewKit/Defines.h>
+
+Kernel::SizeT drv_get_sector_count(Kernel::Int32 slot);
+
+Kernel::SizeT drv_get_size(Kernel::Int32 slot);
+
+Kernel::Void drv_enable_at(Kernel::Int32 slot);
+
+Kernel::Void drv_disable_at(Kernel::Int32 slot);
+
+#endif // ifdef ZKA_USE_MBCI_FLASH
diff --git a/dev/Mod/NVME/NVME.h b/dev/Mod/NVME/NVME.h
new file mode 100644
index 00000000..e42a609b
--- /dev/null
+++ b/dev/Mod/NVME/NVME.h
@@ -0,0 +1,113 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ Revision History:
+
+ ??/??/24: Added file (amlel)
+ 23 Jul 24: Update filename to Defines.h and using ZKA_ALIGN_NVME for NVME structs. (amlel)
+
+------------------------------------------- */
+
+#ifndef __MODULE_NVME_H__
+#define __MODULE_NVME_H__
+
+#include <NewKit/Defines.h>
+
+/// @file NVME.h
+/// @brief NVME driver.
+
+#define ZKA_ALIGN_NVME ATTRIBUTE(aligned(sizeof(Kernel::UInt32)))
+
+namespace Kernel
+{
+ struct ZKA_ALIGN_NVME HAL_NVME_BAR_0 final
+ {
+ UInt32 fCapabilities;
+ UInt32 fVersion;
+ UInt32 fIntMaskSet;
+ UInt32 fIntMaskClr;
+ UInt32 fContrlConf;
+ UInt32 fContrlStat;
+ UInt32 fAdminQueueAttr;
+ UInt32 fAdminSubmissionQueue;
+ UInt32 fAdminCompletionQueue;
+ };
+
+ struct ZKA_ALIGN_NVME HAL_NVME_QUEUE final
+ {
+ UInt32 fOpcode;
+ UInt32 fNSID;
+ UInt32 fReserved[3];
+ UInt32 fMetadataPtr[5];
+ UInt32 fDataPtr[9];
+ UInt32 CommandSpecific[15];
+ };
+
+ enum
+ {
+ kCreateCompletionQueueNVME = 0x05,
+ kCreateSubmissionQueueNVME = 0x01,
+ kIdentifyNVME = 0x06,
+ kReadNVME = 0x02,
+ kWriteNVME = 0x01,
+ };
+
+ /// @brief Creates an admin command for a DMA operation.
+ template <Int32 Opcode>
+ inline Bool nvme_create_admin_command(HAL_NVME_QUEUE* entry, UInt32 nsid, UInt32 prpTransfer[3], UInt32 startingLba[2], UInt32 lowTransferBlocks)
+ {
+ if (entry == nullptr)
+ return false;
+
+ entry->CommandSpecific[9] = startingLba[0];
+ entry->CommandSpecific[10] = startingLba[1];
+
+ entry->CommandSpecific[11] = lowTransferBlocks;
+
+ entry->CommandSpecific[5] = prpTransfer[0];
+ entry->CommandSpecific[6] = prpTransfer[1];
+ entry->CommandSpecific[7] = prpTransfer[2];
+
+ entry->CommandSpecific[0] = nsid;
+
+ return true;
+ }
+
+ /// @brief Creates an I/O command for a DMA operation.
+ template <Int32 Opcode>
+ inline Bool nvme_create_io_command(HAL_NVME_QUEUE* entry, UInt64 baseAddress, UInt32 identLoAndQueueSizeHi, UInt32 flagsLoAndQueueComplIdHi, UInt32 identify, Bool provideIdentify = false, Bool namespaceIdentify = false)
+ {
+ if (entry == nullptr)
+ return false;
+
+ if (baseAddress == 0)
+ return false;
+
+ entry->fOpcode = Opcode;
+
+ entry->CommandSpecific[5] = (baseAddress & 0xFF);
+ entry->CommandSpecific[6] = static_cast<UInt32>(baseAddress);
+
+ if (!provideIdentify)
+ {
+ entry->CommandSpecific[9] = identLoAndQueueSizeHi;
+ entry->CommandSpecific[10] = flagsLoAndQueueComplIdHi;
+ }
+ else
+ {
+ entry->CommandSpecific[9] = identify;
+
+ if (namespaceIdentify)
+ {
+ entry->CommandSpecific[0] = 1;
+ }
+ }
+
+ // Use (1 << 0) as contigunous is better supported.
+
+ return true;
+ }
+} // namespace Kernel
+
+#endif // ifndef __MODULE_NVME_H__
diff --git a/dev/Mod/OHCI/.gitkeep b/dev/Mod/OHCI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/OHCI/.gitkeep
diff --git a/dev/Mod/ReadMe.md b/dev/Mod/ReadMe.md
new file mode 100644
index 00000000..a5b037fa
--- /dev/null
+++ b/dev/Mod/ReadMe.md
@@ -0,0 +1,12 @@
+# Kernel Mod
+
+## Brief
+
+They are pluggable modules for builtin hardware support.
+
+## To-Do
+
+- [X] AHCI kernel module.
+- [X] MBCI kernel module.
+
+###### Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. All rights reserved.
diff --git a/dev/Mod/SCSI/.gitkeep b/dev/Mod/SCSI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/SCSI/.gitkeep
diff --git a/dev/Mod/SCSI/SCSI.h b/dev/Mod/SCSI/SCSI.h
new file mode 100644
index 00000000..6f353c6f
--- /dev/null
+++ b/dev/Mod/SCSI/SCSI.h
@@ -0,0 +1,15 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+/// @file SCSI.h
+/// @brief Serial SCSI driver.
+
+template <int PacketBitLen>
+using scsi_packet_type = Kernel::UInt16[PacketBitLen];
diff --git a/dev/Mod/WiFi/.gitkeep b/dev/Mod/WiFi/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/WiFi/.gitkeep
diff --git a/dev/Mod/XHCI/.gitkeep b/dev/Mod/XHCI/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Mod/XHCI/.gitkeep
diff --git a/dev/Mod/XHCI/Defines.h b/dev/Mod/XHCI/Defines.h
new file mode 100644
index 00000000..7f948128
--- /dev/null
+++ b/dev/Mod/XHCI/Defines.h
@@ -0,0 +1,70 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+ File: Defines.h
+ Purpose: XHCI (and backwards) header.
+
+ Revision History:
+
+ 01/02/24: Added file (amlel)
+ 03/02/24: Update filename to Defines.h (amlel)
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+
+using namespace Kernel;
+
+#define kUSBCommand (UInt16)0x0
+#define kUSBStatus (UInt16)0x2
+#define kUSBInterruptEnable (UInt16)0x4
+#define kUSBFrameNum (UInt16)0x6
+#define kUSBFrameListBaseAddress (UInt16)0x8
+#define kUSBFrameModifyStart (UInt16)0xC
+#define kUSBPort1StatusCtrl (UInt16)0x10
+#define kUSBPort2StatusCtrl (UInt16)0x12
+
+typedef struct USBCommandRegister final
+{
+ UInt8 mReserved[8]; // Reserved
+ UInt8
+ mMaxPacket; // 0 = Max packet size 32 bits 1 = Max packet size 64 bits
+ UInt8 mConfigure;
+ UInt8 mSoftwareDebug;
+ UInt8 mGlobalResume;
+ UInt8 mGlobalSuspend;
+ UInt8 mHostCtrlReset;
+ UInt8 mRun; // 1 = Controller execute frame list entries
+} USBCommandRegister;
+
+typedef struct USBStatusRegister final
+{
+ UInt8 mReserved[8]; // Reserved
+ UInt8 mHalted; // 1 = bit 0 in CMD is zero 0 = bit 0 in CMD is 1
+ UInt8 mProcessError;
+ UInt8 mSystemError;
+ UInt8 mResumeDetected;
+ UInt8 mErrorInterrupt;
+ UInt8 mInterrupt;
+} USBStatusRegister;
+
+typedef struct USBInterruptEnableRegister final
+{
+ UInt8 mReserved[4]; // Reserved
+ UInt8 mShortPacket; // 1=Enable interrupt 0=Disable interrupt
+ UInt8 mComplete; // 1=Enable interrupt 0=Disable interrupt
+ UInt8 mResume; // 1=Enable interrupt 0=Disable interrupt
+ UInt8 mTimeoutCRC; // 1=Enable interrupt 0=Disable interrupt
+} USBInterruptEnableRegister;
+
+/*
+ Some terminology:
+
+ Frame Number: Number of processed entry of the Frame List.
+ Frame List Base Address:
+ 32-bit physical adress of Frame List. Remember that first 12 bytes are
+ always 0. The Frame List must contain 1024 entries.
+*/
diff --git a/dev/Usr/.keepme b/dev/Usr/.keepme
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Usr/.keepme
diff --git a/dev/Usr/External/.gitkeep b/dev/Usr/External/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Usr/External/.gitkeep
diff --git a/dev/Usr/LibCompress/API.h b/dev/Usr/LibCompress/API.h
new file mode 100644
index 00000000..883730a7
--- /dev/null
+++ b/dev/Usr/LibCompress/API.h
@@ -0,0 +1,18 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifndef COMPRESSKIT_RLE_H
+#define COMPRESSKIT_RLE_H
+
+#include <External/Defines.h>
+// #include <LibCompress/Exports.h>
+
+namespace Kernel
+{
+ class ICompressProxy;
+} // namespace Kernel
+
+#endif // !ifndef COMPRESSKIT_RLE_H
diff --git a/dev/Usr/LibCompress/LCCompress.s b/dev/Usr/LibCompress/LCCompress.s
new file mode 100644
index 00000000..c490bbba
--- /dev/null
+++ b/dev/Usr/LibCompress/LCCompress.s
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024 Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.text \ No newline at end of file
diff --git a/dev/Usr/LibCompress/LCDecompress.s b/dev/Usr/LibCompress/LCDecompress.s
new file mode 100644
index 00000000..c490bbba
--- /dev/null
+++ b/dev/Usr/LibCompress/LCDecompress.s
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024 Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+.text \ No newline at end of file
diff --git a/dev/Usr/LibSystem/.keepme b/dev/Usr/LibSystem/.keepme
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Usr/LibSystem/.keepme
diff --git a/dev/Usr/LibWS/.keepme b/dev/Usr/LibWS/.keepme
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/dev/Usr/LibWS/.keepme
diff --git a/doc/DDK.pdf b/doc/DDK.pdf
new file mode 100644
index 00000000..7029e0cc
--- /dev/null
+++ b/doc/DDK.pdf
Binary files differ
diff --git a/doc/EPM.pdf b/doc/EPM.pdf
new file mode 100644
index 00000000..d9eeebc9
--- /dev/null
+++ b/doc/EPM.pdf
Binary files differ
diff --git a/doc/GUI-System.drawio b/doc/GUI-System.drawio
new file mode 100644
index 00000000..bd31ac14
--- /dev/null
+++ b/doc/GUI-System.drawio
@@ -0,0 +1,34 @@
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="yf45V2V4Ppj0j8o4dQoi">
+ <mxGraphModel dx="530" dy="567" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-2" value="LibSCI" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="50" y="450" width="450" height="140" as="geometry"/>
+ </mxCell>
+ <mxCell id="2" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="mspNsT0Gx7HsNPX6GqQO-3" target="mspNsT0Gx7HsNPX6GqQO-13">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-3" value="LibGUI" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="250" y="210" width="270" height="160" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.093;entryY=1.019;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="mspNsT0Gx7HsNPX6GqQO-2" target="mspNsT0Gx7HsNPX6GqQO-3" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-12" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;GUI System&lt;span style=&quot;white-space: pre;&quot;&gt;&#9;&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;The system works by a set of&lt;/p&gt;&lt;p&gt;Interface files (.ib) and Style files&lt;/p&gt;&lt;p&gt;(.style) describing how a control should look. an Interface can also contain C code.&lt;/p&gt;&lt;p&gt;Lets put it straight, we need to support&lt;/p&gt;&lt;p&gt;the GPU for our Graphics stack.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="560" y="260" width="220" height="220" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-13" value="ZkaOS Subsystem&lt;div&gt;App&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="55" y="40" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.526;entryY=-0.025;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="mspNsT0Gx7HsNPX6GqQO-13" target="mspNsT0Gx7HsNPX6GqQO-3" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="mspNsT0Gx7HsNPX6GqQO-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.743;entryY=0.002;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="mspNsT0Gx7HsNPX6GqQO-3" target="mspNsT0Gx7HsNPX6GqQO-2" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/doc/MFlash.pdf b/doc/MFlash.pdf
new file mode 100644
index 00000000..2e6d7d42
--- /dev/null
+++ b/doc/MFlash.pdf
Binary files differ
diff --git a/doc/NeFS.pdf b/doc/NeFS.pdf
new file mode 100644
index 00000000..1b804346
--- /dev/null
+++ b/doc/NeFS.pdf
Binary files differ
diff --git a/doc/OS-Design.drawio b/doc/OS-Design.drawio
new file mode 100644
index 00000000..130c3d3e
--- /dev/null
+++ b/doc/OS-Design.drawio
@@ -0,0 +1,25 @@
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="lDkK2i6CeL2VbSOVDvrP">
+ <mxGraphModel dx="1144" dy="743" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-2" value="LibSCI Dylib (RING 3) (EL0)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="340" width="360" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-3" value="Dylibs and Applications. (RING 3) (EL0)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="295" width="360" height="35" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-8" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;OS's Design&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: 12px; font-weight: 400;&quot;&gt;This describes how ZKA is structued and how we're supposed to deal with (rings included.)&lt;/span&gt;&lt;/h1&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="620" y="310" width="180" height="180" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-13" value="NewOS MP Kernel, DDK and it's drivers. (RING 0) (EL1)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="450" width="360" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="4" value="LibSCI and DDK syscalls/kerncalls (RING 0/RING 2) (EL0, EL1)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="380" width="360" height="60" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/doc/OS-Scheduler-Design.drawio b/doc/OS-Scheduler-Design.drawio
new file mode 100644
index 00000000..c8a382c4
--- /dev/null
+++ b/doc/OS-Scheduler-Design.drawio
@@ -0,0 +1,25 @@
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="lDkK2i6CeL2VbSOVDvrP">
+ <mxGraphModel dx="764" dy="289" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-2" value="LibSCI DLL inside code (RING 3)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="340" width="360" height="30" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-3" value="Running code (RING 3)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="295" width="360" height="35" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-8" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;ZKA Scheduler&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: 12px; font-weight: 400; background-color: initial;&quot;&gt;This describes how ZKA is structued to schedule tasks.&lt;/span&gt;&lt;br&gt;&lt;/h1&gt;&lt;div&gt;A UserProcess may be attached to another one (thread)&lt;/div&gt;&lt;div&gt;Otherwise it's a process within a team.&lt;/div&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="620" y="290" width="180" height="200" as="geometry"/>
+ </mxCell>
+ <mxCell id="ifhO3zQZNW-sXvZMTmu8-13" value="UserProcess structure (RING 0)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="235.5" y="380" width="360" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="4" value="HardwareThread, HardwareThreadScheduler and UserProcessScheduler (RING 0)" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="234" y="450" width="360" height="60" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/doc/OS-Timer-Design.drawio b/doc/OS-Timer-Design.drawio
new file mode 100644
index 00000000..ca081fd3
--- /dev/null
+++ b/doc/OS-Timer-Design.drawio
@@ -0,0 +1,49 @@
+<mxfile host="65bd71144e">
+ <diagram name="Page-1" id="SMmOiZGLec9H7ruN5qyQ">
+ <mxGraphModel dx="764" dy="289" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
+ <root>
+ <mxCell id="0"/>
+ <mxCell id="1" parent="0"/>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="c-_7pHU60HQ0aR4bwu-4-1" target="c-_7pHU60HQ0aR4bwu-4-2" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="c-_7pHU60HQ0aR4bwu-4-1" target="c-_7pHU60HQ0aR4bwu-4-4" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="c-_7pHU60HQ0aR4bwu-4-1" target="c-_7pHU60HQ0aR4bwu-4-6" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-1" value="TIME_INFO" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="340" y="230" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-2" value="APIC/PIC/IOAPIC" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="340" y="400" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-4" value="GT" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="530" y="400" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-6" value="CLINT" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="150" y="400" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="c-_7pHU60HQ0aR4bwu-4-8" target="c-_7pHU60HQ0aR4bwu-4-1" edge="1">
+ <mxGeometry relative="1" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-8" value="Scheduler context switch (on non MT mode),&lt;br&gt;Also SoftwareTimer gets implemented." style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="130" y="75" width="120" height="90" as="geometry"/>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="c-_7pHU60HQ0aR4bwu-4-10" edge="1">
+ <mxGeometry relative="1" as="geometry">
+ <mxPoint x="530" y="120" as="sourcePoint"/>
+ <mxPoint x="430" y="230" as="targetPoint"/>
+ </mxGeometry>
+ </mxCell>
+ <mxCell id="c-_7pHU60HQ0aR4bwu-4-10" value="Hook 2 system calls for timing purposes.&lt;br&gt;(Wait, WaitUntil)" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="560" y="90" width="120" height="60" as="geometry"/>
+ </mxCell>
+ <mxCell id="2" value="It is either abstracted like this, or has a direct interface to it." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+ <mxGeometry x="490" y="235" width="200" height="55" as="geometry"/>
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile> \ No newline at end of file
diff --git a/doc/SCHED-DESIGN.drawio b/doc/SCHED-DESIGN.drawio
new file mode 100644
index 00000000..ab75d000
--- /dev/null
+++ b/doc/SCHED-DESIGN.drawio
@@ -0,0 +1,34 @@
+<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" version="24.7.14">
+ <diagram name="Page-1" id="6QVppPX6dMcFLP7eY7Ap">
+ <mxGraphModel dx="1368" dy="717" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+ <root>
+ <mxCell id="0" />
+ <mxCell id="1" parent="0" />
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="V4mTDnC5FWkVb8QuH4lW-1" target="V4mTDnC5FWkVb8QuH4lW-2">
+ <mxGeometry relative="1" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-1" value="ISCHEDOBJECT INTERFACE" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="90" y="70" width="670" height="60" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="V4mTDnC5FWkVb8QuH4lW-2" target="V4mTDnC5FWkVb8QuH4lW-4">
+ <mxGeometry relative="1" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-2" value="USER SCHEDULER/THREAD SCHEDULER/HW THREAD SCHEDULER" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="90" y="170" width="670" height="50" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-4" value="ANOTHER SCHEDULER OR DIRECT CALL TO DRIVER/HAL." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
+ <mxGeometry x="90" y="280" width="670" height="60" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-12" value="PROCESS BANKS CPU 1..N" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" vertex="1" parent="1">
+ <mxGeometry x="338" y="450" width="175" height="80" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="V4mTDnC5FWkVb8QuH4lW-4" target="V4mTDnC5FWkVb8QuH4lW-12">
+ <mxGeometry relative="1" as="geometry" />
+ </mxCell>
+ <mxCell id="V4mTDnC5FWkVb8QuH4lW-15" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;Raise error checks when:&lt;/h1&gt;&lt;p&gt;- Kernel level tasks crashes.&lt;/p&gt;&lt;p&gt;- An assertion fails.&lt;/p&gt;&lt;p&gt;- System Call isn&#39;t returning correctly.&lt;/p&gt;&lt;p&gt;- Driver is at an uncertain state.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" vertex="1" parent="1">
+ <mxGeometry x="580" y="390" width="180" height="210" as="geometry" />
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile>
diff --git a/doc/ZXD.drawio b/doc/ZXD.drawio
new file mode 100644
index 00000000..f71ddba5
--- /dev/null
+++ b/doc/ZXD.drawio
@@ -0,0 +1,31 @@
+<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" version="24.7.12">
+ <diagram name="Page-1" id="PApGwmLcT2JRCILoETeI">
+ <mxGraphModel dx="1368" dy="717" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
+ <root>
+ <mxCell id="0" />
+ <mxCell id="1" parent="0" />
+ <mxCell id="5xbXWvOdvmnQnRAweQaM-1" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;ZXD&lt;/h1&gt;&lt;p&gt;ZKA eXtended Driver Format.&lt;/p&gt;&lt;p&gt;An Extended PE32+&lt;/p&gt;&lt;p&gt;With additional headers and such.&lt;/p&gt;" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
+ <mxGeometry x="40" y="40" width="210" height="130" as="geometry" />
+ </mxCell>
+ <mxCell id="5xbXWvOdvmnQnRAweQaM-2" value="ZKA HEADER" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="40" y="180" width="310" height="60" as="geometry" />
+ </mxCell>
+ <mxCell id="5xbXWvOdvmnQnRAweQaM-3" value="PE32+ ZONE" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="40" y="260" width="310" height="60" as="geometry" />
+ </mxCell>
+ <mxCell id="5xbXWvOdvmnQnRAweQaM-4" value="ZXD STUB [1..N]" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
+ <mxGeometry x="40" y="340" width="310" height="60" as="geometry" />
+ </mxCell>
+ <mxCell id="FgewEam9b60nFajCTQDb-1" value="StubHeapSz, StubStackSz, StubPageFlags..." style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+ <mxGeometry x="380" y="355" width="290" height="30" as="geometry" />
+ </mxCell>
+ <mxCell id="FgewEam9b60nFajCTQDb-2" value="Executable image type..." style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+ <mxGeometry x="380" y="274" width="290" height="30" as="geometry" />
+ </mxCell>
+ <mxCell id="FgewEam9b60nFajCTQDb-5" value="ZKA executable header." style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
+ <mxGeometry x="380" y="194" width="290" height="30" as="geometry" />
+ </mxCell>
+ </root>
+ </mxGraphModel>
+ </diagram>
+</mxfile>
diff --git a/kernel b/kernel
new file mode 120000
index 00000000..85b1d35f
--- /dev/null
+++ b/kernel
@@ -0,0 +1 @@
+dev/Kernel/ \ No newline at end of file
diff --git a/make_docs.sh b/make_docs.sh
new file mode 100755
index 00000000..801a0f52
--- /dev/null
+++ b/make_docs.sh
@@ -0,0 +1,5 @@
+# !/bin/zsh
+
+mkdir -p html
+
+XSDocgen --source ./dev/ --output ./html --undocumented --project-name "ZKA MicroKernel" --enable-c++ --project-copyright "Amlal EL Mahrouss &copy; %Y - All rights Reserved" --project-version "930.2024.1" --company-name "Amlal EL Mahrouss"
diff --git a/modules b/modules
new file mode 120000
index 00000000..2db0d53f
--- /dev/null
+++ b/modules
@@ -0,0 +1 @@
+dev/Mod/ \ No newline at end of file
diff --git a/public/frameworks/.keep b/public/frameworks/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/frameworks/.keep
diff --git a/public/tools/.keep b/public/tools/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/.keep
diff --git a/public/tools/make_app/Common.h b/public/tools/make_app/Common.h
new file mode 100644
index 00000000..7dead76c
--- /dev/null
+++ b/public/tools/make_app/Common.h
@@ -0,0 +1,19 @@
+/**
+ Sat Oct 26 07:03:28 AM CEST 2024
+ (c) Amlal EL Mahrouss.
+*/
+
+#ifndef APPS_COMMON_H
+#define APPS_COMMON_H
+
+#include <cstdint>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <cstring>
+#include <sstream>
+#include <filesystem>
+#include <cstdlib>
+#include <vector>
+
+#endif // APPS_COMMON_H
diff --git a/public/tools/make_app/Framework.h b/public/tools/make_app/Framework.h
new file mode 100644
index 00000000..48db2599
--- /dev/null
+++ b/public/tools/make_app/Framework.h
@@ -0,0 +1,17 @@
+/**
+ Thu Oct 17 07:57:43 CEST 2024
+ (c) Amlal EL Mahrouss.
+*/
+
+#ifndef APPS_FRAMEWORK_H
+#define APPS_FRAMEWORK_H
+
+#include <Common.h>
+
+#define kExecDirectory "ML/Exec/"
+#define kRsrcDirectory "ML/Resources/"
+#define kRootDirectory "ML/"
+#define kFKExtension ".fwrk"
+#define kAppExtension ".app"
+
+#endif // !APPS_FRAMEWORK_H
diff --git a/public/tools/make_app/Steps.h b/public/tools/make_app/Steps.h
new file mode 100644
index 00000000..d7f78b81
--- /dev/null
+++ b/public/tools/make_app/Steps.h
@@ -0,0 +1,14 @@
+/**
+ Thu Oct 17 07:57:43 CEST 2024
+ (c) Amlal EL Mahrouss.
+*/
+
+#ifndef APPS_STEPS_H
+#define APPS_STEPS_H
+
+#include <Common.h>
+#include <Framework.h>
+
+#define kStepsExtension ".steps"
+
+#endif // ifndef APPS_STEPS_H \ No newline at end of file
diff --git a/public/tools/make_app/dist/.keep b/public/tools/make_app/dist/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/make_app/dist/.keep
diff --git a/public/tools/make_app/make_app.json b/public/tools/make_app/make_app.json
new file mode 100644
index 00000000..abfe5cd3
--- /dev/null
+++ b/public/tools/make_app/make_app.json
@@ -0,0 +1,12 @@
+{
+ "compiler_path": "g++",
+ "compiler_std": "c++20",
+ "headers_path": ["./"],
+ "sources_path": ["src/CommandLine.cc"],
+ "output_name": "./dist/make_app",
+ "cpp_macros": [
+ "kMKFVersion=0x0100",
+ "kMKFVersionHighest=0x0100",
+ "kMKFVersionLowest=0x0100"
+ ]
+}
diff --git a/public/tools/make_app/src/CommandLine.cc b/public/tools/make_app/src/CommandLine.cc
new file mode 100644
index 00000000..f2f4f26d
--- /dev/null
+++ b/public/tools/make_app/src/CommandLine.cc
@@ -0,0 +1,80 @@
+/*
+ * Created on Thu Oct 17 08:00:42 CEST 2024
+ *
+ * Copyright (c) 2024 Amlal EL Mahrouss
+ */
+
+#include <Framework.h>
+#include <Steps.h>
+
+/// @brief This program makes a framework directory for ZKA OS.
+
+int main(int argc, char* argv[])
+{
+ std::vector<std::string> files;
+
+ auto ext = kFKExtension;
+
+ for (size_t i = 2UL; i < argc; ++i)
+ {
+ if (strcmp(argv[i], "-h") == 0)
+ {
+ std::cout << "make_app: Framework/Application Creation Tool.\n";
+ std::cout << "make_app: © Amlal EL Mahrouss, All rights reserved.\n";
+
+ std::cout << "make_app: -app: Application directory.\n";
+ std::cout << "make_app: -steps: Steps (Setup pages) directory.\n";
+ std::cout << "make_app: -fwrk: Framework directory.\n";
+
+ return EXIT_SUCCESS;
+ }
+
+ if (strcmp(argv[i], "-app") == 0)
+ {
+ ext = kAppExtension;
+ continue;
+ }
+ else if (strcmp(argv[i], "-steps") == 0)
+ {
+ ext = kStepsExtension;
+ continue;
+ }
+ else if (strcmp(argv[i], "-fwrk") == 0)
+ {
+ ext = kFKExtension;
+ continue;
+ }
+
+ files.push_back(argv[i]);
+ }
+
+ auto path = std::string(argv[1]);
+
+ if (!std::filesystem::exists(path))
+ return EXIT_FAILURE;
+
+ std::filesystem::path path_arg = path + ext;
+
+ if (std::filesystem::create_directory(path_arg))
+ {
+ std::filesystem::create_directory(path_arg / kRootDirectory);
+ std::filesystem::create_directory(path_arg / kExecDirectory);
+
+ for (auto& file : files)
+ {
+ std::string file_cpy = file;
+
+ while (file_cpy.find("/") != std::string::npos)
+ {
+ file_cpy.erase(0, file_cpy.find("/"));
+ file_cpy.erase(file_cpy.find("/"), 1);
+ }
+
+ std::filesystem::copy(path, path_arg / kExecDirectory / file_cpy);
+ }
+
+ return EXIT_SUCCESS;
+ }
+
+ return EXIT_FAILURE;
+}
diff --git a/public/tools/open/dist/.keep b/public/tools/open/dist/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/open/dist/.keep
diff --git a/public/tools/open/open.json b/public/tools/open/open.json
new file mode 100644
index 00000000..04012ab3
--- /dev/null
+++ b/public/tools/open/open.json
@@ -0,0 +1,13 @@
+{
+ "compiler_path": "cscc",
+ "compiler_std": "c++20",
+ "headers_path": ["./"],
+ "sources_path": ["src/CommandLine.cc"],
+ "output_name": "./dist/open",
+ "compiler_flags": "-lSCI",
+ "cpp_macros": [
+ "kOpenVersion=0x0100",
+ "kOpenVersionHighest=0x0100",
+ "kOpenVersionLowest=0x0100"
+ ]
+}
diff --git a/public/tools/open/src/CommandLine.cc b/public/tools/open/src/CommandLine.cc
new file mode 100644
index 00000000..86282059
--- /dev/null
+++ b/public/tools/open/src/CommandLine.cc
@@ -0,0 +1,49 @@
+/*
+ * Created on Thu Oct 17 08:00:42 CEST 2024
+ *
+ * Copyright (c) 2024 Amlal EL Mahrouss
+ */
+
+#include <LibSCI/SCI.h>
+
+/// @brief This program opens an application from **OPEN_APP_BASE_PATH**
+
+#define OPEN_APP_APP_FLAG "-a"
+#define OPEN_APP_HELP_FLAG "-h"
+#define OPEN_APP_BASE_PATH "/app/"
+
+int main(int argc, char* argv[])
+{
+ if (argc == 1)
+ return EXIT_FAILURE;
+
+ for (SizeT i = 1UL; i < argc; ++i)
+ {
+ if (MmStrCmp(argv[i], OPEN_APP_HELP_FLAG) == 0)
+ {
+ ConOut(nullptr, "open: Open Tool.\n");
+ ConOut(nullptr, "open: © Amlal EL Mahrouss, All rights reserved.\n");
+
+ ConOut(nullptr, "open: %s: Application is taken as input (opens a PEF/PE32+/ELF program depending on architecture).\n", OPEN_APP_APP_FLAG);
+
+ return EXIT_SUCCESS;
+ }
+ else if (MmStrCmp(argv[i], OPEN_APP_APP_FLAG) == 0)
+ {
+ if ((i + 1) == argc)
+ return EXIT_FAILURE;
+
+ Char base_path[FILE_MAX_LEN] = OPEN_APP_BASE_PATH;
+ MmCopyMemory(base_path + MmStrLen(OPEN_APP_BASE_PATH), argv[i + 1], MmStrLen(argv[i + 1]));
+
+ Bool ret = RtlSpawnProcess(base_path, 0, nullptr, nullptr, 0);
+
+ if (ret > 0)
+ return EXIT_SUCCESS;
+
+ break;
+ }
+ }
+
+ return EXIT_FAILURE;
+}
diff --git a/release_ahci.sh b/release_ahci.sh
new file mode 100755
index 00000000..f2e89007
--- /dev/null
+++ b/release_ahci.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export AHCI_SUPPORT=1
+
+cd dev/Kernel
+make -f amd64-desktop.make all
+cd ../Boot
+make -f amd64-desktop.make all
+make -f amd64-desktop.make run-efi-amd64-ahci \ No newline at end of file
diff --git a/release_ata.sh b/release_ata.sh
new file mode 100755
index 00000000..6c65b211
--- /dev/null
+++ b/release_ata.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export ATA_PIO_SUPPORT=1
+
+cd dev/Kernel
+make -f amd64-desktop.make all
+cd ../Boot
+make -f amd64-desktop.make all
+make -f amd64-desktop.make run-efi-amd64-ata \ No newline at end of file
diff --git a/res/zka-disk.svg b/res/zka-disk.svg
new file mode 100644
index 00000000..6c169292
--- /dev/null
+++ b/res/zka-disk.svg
@@ -0,0 +1,20 @@
+<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2602_13)">
+<rect width="110" height="110" fill="#202020"/>
+<path d="M94.1839 22.3695C93.8082 21.1058 93.0339 19.9975 91.9766 19.21C90.9193 18.4225 89.6356 17.9981 88.3173 18H21.4617C20.1224 17.999 18.8198 18.438 17.7543 19.2496C16.6888 20.0611 15.9194 21.2002 15.5645 22.4917L6.88672 57.7222H102.892L94.1839 22.3695Z" fill="url(#paint0_linear_2602_13)"/>
+<path d="M6 63.8333V85.2222C6 86.843 6.64385 88.3974 7.7899 89.5434C8.93596 90.6895 10.4903 91.3333 12.1111 91.3333H97.6667C99.2874 91.3333 100.842 90.6895 101.988 89.5434C103.134 88.3974 103.778 86.843 103.778 85.2222V63.8333H6ZM91.5556 79.1111H79.3333V73H91.5556V79.1111Z" fill="url(#paint1_linear_2602_13)"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_2602_13" x1="54.8895" y1="18" x2="54.8895" y2="57.7222" gradientUnits="userSpaceOnUse">
+<stop stop-color="#6C6C6C"/>
+<stop offset="1" stop-color="#D2D2D2"/>
+</linearGradient>
+<linearGradient id="paint1_linear_2602_13" x1="6" y1="77.5833" x2="103.778" y2="77.5833" gradientUnits="userSpaceOnUse">
+<stop stop-color="#D2D2D2"/>
+<stop offset="1" stop-color="#6C6C6C"/>
+</linearGradient>
+<clipPath id="clip0_2602_13">
+<rect width="110" height="110" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/res/zka-has-disk.svg b/res/zka-has-disk.svg
new file mode 100644
index 00000000..031dc802
--- /dev/null
+++ b/res/zka-has-disk.svg
@@ -0,0 +1,30 @@
+<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2602_13)">
+<rect width="110" height="110" fill="#202020"/>
+<path d="M94.1839 22.3695C93.8082 21.1058 93.0339 19.9975 91.9766 19.21C90.9193 18.4225 89.6356 17.9981 88.3173 18H21.4617C20.1224 17.999 18.8198 18.438 17.7543 19.2496C16.6888 20.0611 15.9194 21.2002 15.5645 22.4917L6.88672 57.7222H102.892L94.1839 22.3695Z" fill="url(#paint0_linear_2602_13)"/>
+<path d="M6 63.8333V85.2222C6 86.843 6.64385 88.3974 7.7899 89.5434C8.93596 90.6895 10.4903 91.3333 12.1111 91.3333H97.6667C99.2874 91.3333 100.842 90.6895 101.988 89.5434C103.134 88.3974 103.778 86.843 103.778 85.2222V63.8333H6ZM91.5556 79.1111H79.3333V73H91.5556V79.1111Z" fill="url(#paint1_linear_2602_13)"/>
+<path d="M30.5 57C30.5 53.6513 31.1596 50.3354 32.4411 47.2416C33.7226 44.1478 35.6009 41.3367 37.9688 38.9688C40.3367 36.6009 43.1478 34.7226 46.2416 33.4411C49.3354 32.1596 52.6513 31.5 56 31.5C59.3487 31.5 62.6646 32.1596 65.7584 33.4411C68.8522 34.7226 71.6633 36.6009 74.0312 38.9688C76.3991 41.3367 78.2774 44.1478 79.5589 47.2416C80.8404 50.3354 81.5 53.6513 81.5 57C81.5 63.763 78.8134 70.249 74.0312 75.0312C69.249 79.8134 62.763 82.5 56 82.5C49.237 82.5 42.751 79.8134 37.9688 75.0312C33.1866 70.249 30.5 63.763 30.5 57Z" fill="url(#paint2_linear_2602_13)"/>
+<path d="M65.0107 49.197L52.8132 61.4285L46.8802 55.4955C46.6827 55.2979 46.4481 55.1412 46.19 55.0343C45.9318 54.9273 45.6551 54.8723 45.3757 54.8723C45.0963 54.8723 44.8196 54.9273 44.5615 55.0343C44.3034 55.1412 44.0688 55.2979 43.8712 55.4955C43.6737 55.6931 43.5169 55.9276 43.41 56.1858C43.3031 56.4439 43.248 56.7206 43.248 57C43.248 57.2794 43.3031 57.5561 43.41 57.8142C43.5169 58.0724 43.6737 58.3069 43.8712 58.5045L51.3087 65.942C51.5061 66.1399 51.7406 66.2969 51.9988 66.404C52.257 66.5112 52.5337 66.5663 52.8132 66.5663C53.0927 66.5663 53.3695 66.5112 53.6277 66.404C53.8858 66.2969 54.1203 66.1399 54.3177 65.942L68.0197 52.1975C68.4063 51.7962 68.6197 51.2591 68.6141 50.7019C68.6085 50.1447 68.3843 49.612 67.9897 49.2186C67.5952 48.8251 67.0618 48.6024 66.5046 48.5984C65.9474 48.5943 65.411 48.8093 65.0107 49.197Z" fill="url(#paint3_linear_2602_13)"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_2602_13" x1="54.8895" y1="18" x2="54.8895" y2="57.7222" gradientUnits="userSpaceOnUse">
+<stop stop-color="#6C6C6C"/>
+<stop offset="1" stop-color="#D2D2D2"/>
+</linearGradient>
+<linearGradient id="paint1_linear_2602_13" x1="6" y1="77.5833" x2="103.778" y2="77.5833" gradientUnits="userSpaceOnUse">
+<stop stop-color="#D2D2D2"/>
+<stop offset="1" stop-color="#6C6C6C"/>
+</linearGradient>
+<linearGradient id="paint2_linear_2602_13" x1="32.3232" y1="41.0625" x2="67.5175" y2="77.6295" gradientUnits="userSpaceOnUse">
+<stop stop-color="#52D17C"/>
+<stop offset="1" stop-color="#22918B"/>
+</linearGradient>
+<linearGradient id="paint3_linear_2602_13" x1="48.0107" y1="50.4082" x2="52.0737" y2="70.6425" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="#E3FFD9"/>
+</linearGradient>
+<clipPath id="clip0_2602_13">
+<rect width="110" height="110" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/res/zka-no-disk.svg b/res/zka-no-disk.svg
new file mode 100644
index 00000000..1e8f07f2
--- /dev/null
+++ b/res/zka-no-disk.svg
@@ -0,0 +1,30 @@
+<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2602_13)">
+<rect width="110" height="110" fill="#202020"/>
+<path d="M94.1839 22.3695C93.8082 21.1058 93.0339 19.9975 91.9766 19.21C90.9193 18.4225 89.6356 17.9981 88.3173 18H21.4617C20.1224 17.999 18.8198 18.438 17.7543 19.2496C16.6888 20.0611 15.9194 21.2002 15.5645 22.4917L6.88672 57.7222H102.892L94.1839 22.3695Z" fill="url(#paint0_linear_2602_13)"/>
+<path d="M6 63.8333V85.2222C6 86.843 6.64385 88.3974 7.7899 89.5434C8.93596 90.6895 10.4903 91.3333 12.1111 91.3333H97.6667C99.2874 91.3333 100.842 90.6895 101.988 89.5434C103.134 88.3974 103.778 86.843 103.778 85.2222V63.8333H6ZM91.5556 79.1111H79.3333V73H91.5556V79.1111Z" fill="url(#paint1_linear_2602_13)"/>
+<path d="M59.6415 35.2115C59.1803 34.3868 58.5075 33.7 57.6924 33.222C56.8774 32.7439 55.9496 32.4919 55.0047 32.4919C54.0598 32.4919 53.132 32.7439 52.317 33.222C51.5019 33.7 50.8291 34.3868 50.368 35.2115L30.1677 71.345C29.7158 72.1532 29.4831 73.0655 29.4925 73.9914C29.5018 74.9173 29.7531 75.8246 30.2212 76.6235C30.6894 77.4224 31.3582 78.085 32.1614 78.5457C32.9646 79.0064 33.8743 79.2492 34.8002 79.25H75.1922C76.1185 79.25 77.0287 79.0077 77.8325 78.5473C78.6363 78.0869 79.3057 77.4243 79.7744 76.6253C80.243 75.8263 80.4946 74.9187 80.5042 73.9924C80.5138 73.0662 80.281 72.1535 79.829 71.345L59.6415 35.2115Z" fill="url(#paint2_linear_2602_13)"/>
+<path d="M58.1875 67.5625C58.1875 68.4079 57.8517 69.2186 57.2539 69.8164C56.6561 70.4142 55.8454 70.75 55 70.75C54.1546 70.75 53.3439 70.4142 52.7461 69.8164C52.1483 69.2186 51.8125 68.4079 51.8125 67.5625C51.8125 66.7171 52.1483 65.9064 52.7461 65.3086C53.3439 64.7108 54.1546 64.375 55 64.375C55.8454 64.375 56.6561 64.7108 57.2539 65.3086C57.8517 65.9064 58.1875 66.7171 58.1875 67.5625ZM52.875 58V47.375C52.875 46.8114 53.0989 46.2709 53.4974 45.8724C53.8959 45.4739 54.4364 45.25 55 45.25C55.5636 45.25 56.1041 45.4739 56.5026 45.8724C56.9011 46.2709 57.125 46.8114 57.125 47.375V58C57.125 58.5636 56.9011 59.1041 56.5026 59.5026C56.1041 59.9011 55.5636 60.125 55 60.125C54.4364 60.125 53.8959 59.9011 53.4974 59.5026C53.0989 59.1041 52.875 58.5636 52.875 58Z" fill="url(#paint3_linear_2602_13)"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_2602_13" x1="54.8895" y1="18" x2="54.8895" y2="57.7222" gradientUnits="userSpaceOnUse">
+<stop stop-color="#6C6C6C"/>
+<stop offset="1" stop-color="#D2D2D2"/>
+</linearGradient>
+<linearGradient id="paint1_linear_2602_13" x1="6" y1="77.5833" x2="103.778" y2="77.5833" gradientUnits="userSpaceOnUse">
+<stop stop-color="#D2D2D2"/>
+<stop offset="1" stop-color="#6C6C6C"/>
+</linearGradient>
+<linearGradient id="paint2_linear_2602_13" x1="37.4565" y1="25.1857" x2="66.5817" y2="85.7312" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FFCD0F"/>
+<stop offset="1" stop-color="#FE8401"/>
+</linearGradient>
+<linearGradient id="paint3_linear_2602_13" x1="46.5" y1="45.25" x2="56.9805" y2="73.1938" gradientUnits="userSpaceOnUse">
+<stop stop-color="#4A4A4A"/>
+<stop offset="1" stop-color="#212121"/>
+</linearGradient>
+<clipPath id="clip0_2602_13">
+<rect width="110" height="110" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/run_debugger.sh b/run_debugger.sh
new file mode 100755
index 00000000..30254da3
--- /dev/null
+++ b/run_debugger.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gdb -q -x boot/gdbinit
diff --git a/run_format.sh b/run_format.sh
new file mode 100755
index 00000000..576fa410
--- /dev/null
+++ b/run_format.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+THIS_PATH="$(realpath "$0")"
+THIS_DIR="$(dirname "$THIS_PATH")"
+
+# Find all files in THIS_DIR which end in .ino, .cpp, etc., as specified
+# in the regular expression just below
+FILE_LIST="$(find "$THIS_DIR" | grep -E ".*(\.cc|\.cpp|\.c|\.h|\.hpp|\.h|\.cxx|\.hh|\.inl)$")"
+
+echo -e "Files found to format = \n\"\"\"\n$FILE_LIST\n\"\"\""
+
+# Format each file.
+# - NB: do NOT put quotes around `$FILE_LIST` below or else the `clang-format` command will
+# mistakenly see the entire blob of newline-separated file names as a SINGLE file name instead
+# of as a new-line separated list of *many* file names!
+clang-format --verbose -i --style=file $FILE_LIST
diff --git a/setup_amd64.sh b/setup_amd64.sh
new file mode 100755
index 00000000..be110a3b
--- /dev/null
+++ b/setup_amd64.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd dev/Boot
+make -f amd64-desktop.make efi
+make -f amd64-desktop.make epm-img \ No newline at end of file
diff --git a/setup_arm64.sh b/setup_arm64.sh
new file mode 100755
index 00000000..6725707c
--- /dev/null
+++ b/setup_arm64.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd dev/Boot
+make -f arm64-desktop.make efi
+make -f arm64-desktop.make epm-img \ No newline at end of file
diff --git a/syscalls b/syscalls
new file mode 120000
index 00000000..fbb7db52
--- /dev/null
+++ b/syscalls
@@ -0,0 +1 @@
+dev/LibSCI/ \ No newline at end of file
diff --git a/tests/.keep b/tests/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/.keep
diff --git a/tests/dev/.keep b/tests/dev/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/dev/.keep
diff --git a/tests/fs/.keep b/tests/fs/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/fs/.keep
diff --git a/tests/net/.keep b/tests/net/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/net/.keep
diff --git a/tests/process/.keep b/tests/process/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/process/.keep
diff --git a/usr b/usr
new file mode 120000
index 00000000..c304bf80
--- /dev/null
+++ b/usr
@@ -0,0 +1 @@
+dev/Usr/ \ No newline at end of file