Note: The ScratchX86 Project (formerly known as the Scratch386 project) is currently unfinished and NOT stable. Many instruction opcodes are still missing and/or being implemented. What is the ScratchX86 project? The ScratchX86 project is an attempt to emulate an x86 machine on Scratch, with the goal of running Operating Systems such as Windows NT, MS-DOS, Linux, UNIX, and any other x86 Operating System you can think of. What can it do as of now? Right now, the only thing that ScratchX86 can do is load a 64KiB - 256KiB BIOS ROM into memory. How do I run programs? As of now, the only programs you can run are BIOS ROMs. Support for other types of programs (such as boot sector programs, kernels, etc) are not possible (as of now). It's running so slow. How can I fix it? Running the project directly from Scratch puts many limitations on ScratchX86. For example, running the emulator from Scratch would limit the emulator to only 195 KiB of RAM instead of the more massive 16 MiB of RAM. It is best to run the project through TurboWarp to gain more performance, and to remove any limitations. How can I debug the emulator? To debug the emulator, press 'D' to enable the debugger, then press 'Space' to enable stepper mode. This will allow you to step through each instruction being executed. WARNING: Please do not remove any text below this warning. Any act of defiance upon this request will result in a take-down of your project. This project was created by sleepy_jai, and sleepy_jai2 ScratchX86 (2026)
Credits: Lynx5805 for small optimization techniques bilman66 for big integer and bitwise functions Please run on TurboWarp. Stable branch changelogs (top = oldest, bottom = latest): October 8th, 2023: Initial release May 20th, 2024: Added MOD/RM decoding, rewritten most of the code in the project. July 13th, 2024: Added more bitwise operations, added a conditional jump instruction, and optimized the emulator. January 28th, 2025: Rewritten the entire emulator to be modular, and more optimized. August 8th, 2025: Added a WIP CMOS support module, WIP DMA support module, and added more support for opcodes August 9th, 2025: Changed thumbnail art. Added support for a bit more opcodes. August 10th, 2025: Greatly optimized ScratchX86. August 14th, 2025: The CPU can now triple fault, double fault, and get other trap interrupts. August 16th, 2025: Added support for more BIOS ROMs (including small UEFI ones), switched to a QEMU BIOS ROM, and optimized the emulator a bit more. August 18th, 2025: Added support for loading a GDT and IDT, and protected mode kinda but also kinda doesn't work. ;-; August 19th, 2025: The CPU can now enter 32-bit protected mode :) August 20th, 2025: Added support for more opcodes, optimized the emulator and gained a performance boost of 67% :) August 23rd, 2025: Added more support for opcodes, optimized the emulator a bit more, and added a debugger module. August 24th, 2025: Optimized the emulator November 5th, 2025: Preparing for the big update.. December 12th, 2025: The big update has come. ScratchX86 now uses a BIOS built specifically for it, more instructions are supported, and you even get WAY farther into the BIOS! June 17th, 2026: CMOS NVRAM now only updates when read instead of every frame, which gives an approximated 85% performance boost. Disassembly is also disabled for performance purposes.