English | Franรงais | Deutsch | Espaรฑol | Italiano | Portuguรชs | Nederlands | Dansk | Norsk | Svenska | Suomi | รslenska | ฮฮปฮปฮทฮฝฮนฮบฮฌ | Tรผrkรงe | Polski | ฤeลกtina | Slovenฤina | Slovenลกฤina | Hrvatski | Magyar | Romรขnรฃ | ะัะปะณะฐััะบะธ | Shqip | Eesti | Latvieลกu | Lietuviลณ | ะะฐะบะตะดะพะฝัะบะธ | Crnogorski | ะ ัััะบะธะน | ะฃะบัะฐัะฝััะบะฐ | ุงูุนุฑุจูุฉ | ๆฅๆฌ่ช | ็ฎไฝไธญๆ | ็น้ซไธญๆ | ํ๊ตญ์ด | เคนเคฟเคจเฅเคฆเฅ | เฆฌเฆพเฆเฆฒเฆพ | ุงุฑุฏู
โ ๏ธ PROOF OF CONCEPT - This is an experimental, educational reimplementation of Apple's Macintosh System 7. This is NOT a finished product and should not be considered production-ready software.
An open-source reimplementation of Apple Macintosh System 7 for modern x86 hardware, bootable via GRUB2/Multiboot2. This project aims to recreate the classic Mac OS experience while documenting the System 7 architecture through reverse engineering analysis.
Current State: Active development with ~94% core functionality complete
- Optimized MIDI conversion: Shared
SndMidiNoteToFreq()helper with 37-entry lookup table (C3-B5) and octave-based fallback for full MIDI range (0-127) - Async playback support: Complete callback infrastructure for both file playback (
FilePlayCompletionUPP) and command execution (SndCallBackProcPtr) - Channel-based audio routing: Multi-level priority system with mute and enable controls
- 4-level priority channels (0-3) for hardware output routing
- Independent mute and enable controls per channel
SndGetActiveChannel()returns highest-priority active channel- Proper channel initialization with enabled flag by default
- Production-quality implementation: All code compiles cleanly, no malloc/free violations detected
- Commits: 07542c5 (MIDI optimization), 1854fe6 (async callbacks), a3433c6 (channel routing)
- โ Advanced Features Phase: Sound Manager command processing loop, multi-run style serialization, extended MIDI/synthesis features
- โ Window Resize System: Interactive resizing with proper chrome handling, grow box, and desktop cleanup
- โ PS/2 Keyboard Translation: Full set 1 scancode to Toolbox key code mapping
- โ Multi-platform HAL: x86, ARM, and PowerPC support with clean abstraction
Overall Core Functionality: ~94% complete (estimated)
- Hardware Abstraction Layer (HAL): Complete platform abstraction for x86/ARM/PowerPC
- Boot System: Successfully boots via GRUB2/Multiboot2 on x86
- Serial Logging: Module-based logging with runtime filtering (Error/Warn/Info/Debug/Trace)
- Graphics Foundation: VESA framebuffer (800x600x32) with QuickDraw primitives including XOR mode
- Desktop Rendering: System 7 menu bar with rainbow Apple logo, icons, and desktop patterns
- Typography: Chicago bitmap font with pixel-perfect rendering and proper kerning, extended Mac Roman (0x80-0xFF) for European accented characters
- Internationalization (i18n): Resource-based localization with 38 languages (English, French, German, Spanish, Italian, Portuguese, Dutch, Danish, Norwegian, Swedish, Finnish, Icelandic, Greek, Turkish, Polish, Czech, Slovak, Slovenian, Croatian, Hungarian, Romanian, Bulgarian, Albanian, Estonian, Latvian, Lithuanian, Macedonian, Montenegrin, Russian, Ukrainian, Arabic, Japanese, Simplified Chinese, Traditional Chinese, Korean, Hindi, Bengali, Urdu), Locale Manager with boot-time language selection, CJK multi-byte encoding infrastructure
- Font Manager: Multi-size support (9-24pt), style synthesis, FOND/NFNT parsing, LRU caching
- Input System: PS/2 keyboard and mouse with complete event forwarding
- Event Manager: Cooperative multitasking via WaitNextEvent with unified event queue
- Memory Manager: Zone-based allocation with 68K interpreter integration
- Menu Manager: Complete dropdown menus with mouse tracking and SaveBits/RestoreBits
- File System: HFS with B-tree implementation, folder windows with VFS enumeration
- Window Manager: Dragging, resizing (with grow box), layering, activation
- Time Manager: Accurate TSC calibration, microsecond precision, generation checking
- Resource Manager: O(log n) binary search, LRU cache, comprehensive validation
- Gestalt Manager: Multi-architecture system information with architecture detection
- TextEdit Manager: Complete text editing with clipboard integration
- Scrap Manager: Classic Mac OS clipboard with multiple flavor support
- SimpleText Application: Full-featured MDI text editor with cut/copy/paste
- List Manager: System 7.1-compatible list controls with keyboard navigation
- Control Manager: Standard and scrollbar controls with CDEF implementation
- Dialog Manager: Keyboard navigation, focus rings, keyboard shortcuts
- Segment Loader: Portable ISA-agnostic 68K segment loading system with relocation
- M68K Interpreter: Full instruction dispatch with 84 opcode handlers, all 14 addressing modes, exception/trap framework
- Sound Manager: Command processing, MIDI conversion, channel management, callbacks
- Device Manager: DCE management, driver installation/removal, and I/O operations
- Startup Screen: Complete boot UI with progress tracking, phase management, and splash screen
- Color Manager: Color state management with QuickDraw integration
- Application Integration: M68K interpreter and segment loader complete; integration testing needed to verify real applications execute
- Window Definition Procedures (WDEF): Core structure in place, partial dispatch
- Speech Manager: API framework and audio passthrough only; speech synthesis engine not implemented
- Exception Handling (RTE): Return from exception partially implemented (currently halts instead of restoring context)
- Printing: No print system
- Networking: No AppleTalk or network functionality
- Desk Accessories: Framework only
- Advanced Audio: Sample playback, mixing (PC speaker limitation)
The following have source code but aren't integrated into the kernel:
- AppleEventManager (8 files): Inter-application messaging; deliberately excluded due to pthread dependencies incompatible with freestanding environment
- FontResources (header only): Font resource type definitions; actual font support provided by compiled FontResourceLoader.c
- Architecture: Multi-architecture via HAL (x86, ARM, PowerPC ready)
- Boot Protocol: Multiboot2 (x86), platform-specific bootloaders
- Graphics: VESA framebuffer, 800x600 @ 32-bit color
- Memory Layout: Kernel loads at 1MB physical address (x86)
- Timing: Architecture-agnostic with microsecond precision (RDTSC/timer registers)
- Performance: Cold resource miss <15ยตs, cache hit <2ยตs, timer drift <100ppm
- 225+ source files with ~57,500+ lines of code
- 145+ header files across 28+ subsystems
- 69 resource types extracted from System 7.1
- Compilation time: 3-5 seconds on modern hardware
- Kernel size: ~4.16 MB
- ISO size: ~12.5 MB
- GCC with 32-bit support (
gcc-multilibon 64-bit) - GNU Make
- GRUB tools:
grub-mkrescue(fromgrub2-commonorgrub-pc-bin) - QEMU for testing (
qemu-system-i386) - Python 3 for resource processing
- xxd for binary conversion
- (Optional) powerpc-linux-gnu cross toolchain for PowerPC builds
sudo apt-get install build-essential gcc-multilib grub-pc-bin xorriso qemu-system-x86 python3 vim-common# Build kernel (x86 by default)
make
# Build for specific platform
make PLATFORM=x86
make PLATFORM=arm # requires ARM bare-metal GCC
make PLATFORM=ppc # experimental; requires PowerPC ELF toolchain
# Create bootable ISO
make iso
# Build with all languages
make LOCALE_FR=1 LOCALE_DE=1 LOCALE_ES=1 LOCALE_JA=1 LOCALE_ZH=1 LOCALE_KO=1 LOCALE_RU=1 LOCALE_UK=1 LOCALE_PL=1 LOCALE_CS=1 LOCALE_SQ=1 LOCALE_BG=1 LOCALE_HR=1 LOCALE_DA=1 LOCALE_NL=1 LOCALE_ET=1 LOCALE_FI=1 LOCALE_EL=1 LOCALE_HU=1 LOCALE_IS=1 LOCALE_IT=1 LOCALE_LV=1 LOCALE_LT=1 LOCALE_MK=1 LOCALE_ME=1 LOCALE_NO=1 LOCALE_PT=1 LOCALE_RO=1 LOCALE_SK=1 LOCALE_SL=1 LOCALE_SV=1 LOCALE_TR=1 LOCALE_HI=1 LOCALE_TW=1 LOCALE_AR=1 LOCALE_BN=1 LOCALE_UR=1
# Build with a single additional language
make LOCALE_FR=1
# Build and run in QEMU
make run
# Clean artifacts
make clean
# Display build statistics
make info# Standard run with serial logging
make run
# Manually with options
qemu-system-i386 -cdrom system71.iso -serial file:/tmp/serial.log -display sdl -vga std -m 256M# With console serial output
qemu-system-i386 -cdrom system71.iso -serial stdio -display sdl -m 256M
# Headless (no graphics display)
qemu-system-i386 -cdrom system71.iso -serial stdio -display none -m 256M
# With GDB debugging
make debug
# In another terminal: gdb kernel.elf -ex "target remote :1234"- Control Manager:
docs/components/ControlManager/ - Dialog Manager:
docs/components/DialogManager/ - Font Manager:
docs/components/FontManager/ - Serial Logging:
docs/components/System/ - Event Manager:
docs/components/EventManager.md - Menu Manager:
docs/components/MenuManager.md - Window Manager:
docs/components/WindowManager.md - Resource Manager:
docs/components/ResourceManager.md
- Locale Manager:
include/LocaleManager/โ runtime locale switching, boot-time language selection - String Resources:
resources/strings/โ per-language STR# resource files (34 languages) - Extended Fonts:
include/chicago_font_extended.hโ Mac Roman 0x80-0xFF glyphs for European characters - CJK Support:
include/TextEncoding/CJKEncoding.h,include/FontManager/CJKFont.hโ multi-byte encoding and font infrastructure
- IMPLEMENTATION_PRIORITIES.md: Planned work and completeness tracking
- IMPLEMENTATION_STATUS_AUDIT.md: Detailed audit of all subsystems
Archaeological Approach with evidence-based implementation:
- Backed by Inside Macintosh documentation and MPW Universal Interfaces
- All major decisions tagged with Finding IDs referencing supporting evidence
- Goal: behavioral parity with original System 7, not modernization
- Clean-room implementation (no original Apple source code)
- Icon Drag Artifacts: Minor visual artifacts during desktop icon dragging
- M68K Execution Stubbed: Segment loader complete, execution loop not implemented
- No TrueType Support: Bitmap fonts only (Chicago)
- HFS Read-Only: Virtual file system, no real disk write-back
- No Stability Guarantees: Crashes and unexpected behavior are common
This is primarily a learning/research project:
- Bug Reports: File issues with detailed reproduction steps
- Testing: Report results on different hardware/emulators
- Documentation: Improve existing docs or add new guides
- Inside Macintosh (1992-1994): Official Apple Toolbox documentation
- MPW Universal Interfaces 3.2: Canonical header files and struct definitions
- Guide to Macintosh Family Hardware: Hardware architecture reference
- Mini vMac: System 7 emulator for behavioral reference
- ResEdit: Resource editor for studying System 7 resources
- Ghidra/IDA: For ROM disassembly analysis
This is a clean-room reimplementation for educational and preservation purposes:
- No Apple source code was used
- Based on public documentation and black-box analysis only
- "System 7", "Macintosh", "QuickDraw" are Apple Inc. trademarks
- Not affiliated with, endorsed by, or sponsored by Apple Inc.
Original System 7 ROM and software remain property of Apple Inc.
- Apple Computer, Inc. for creating the original System 7
- Inside Macintosh authors for comprehensive documentation
- Classic Mac preservation community for keeping the platform alive
- 68k.news and Macintosh Garden for resource archives
- Lines of Code: ~57,500+ (including 2,500+ for segment loader)
- Compilation Time: ~3-5 seconds
- Kernel Size: ~4.16 MB (kernel.elf)
- ISO Size: ~12.5 MB (system71.iso)
- Error Reduction: 94% of core functionality working
- Major Subsystems: 28+ (Font, Window, Menu, Control, Dialog, TextEdit, etc.)
Planned Work:
- Complete M68K interpreter execution loop
- Add TrueType font support
- CJK bitmap font resources for Japanese, Chinese, and Korean rendering
- Implement additional controls (text fields, pop-ups, sliders)
- Disk write-back for HFS file system
- Advanced Sound Manager features (mixing, sampling)
- Basic desk accessories (Calculator, Note Pad)
Status: Experimental - Educational - In Development
Last Updated: November 2025 (Sound Manager Enhancements Complete)
For questions, issues, or discussion, please use GitHub Issues.