System7
An open-source reimplementation of Apple Macintosh System 7 for modern x86 hardware, bootable via GRUB2/Multiboot2
Install / Use
/learn @Kelsidavis/System7README
System 7 - Portable Open-Source Reimplementation
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 | Русский | Українська | العربية | 日本語 | 简体中文 | 繁體中文 | 한국어 | हिन्दी | বাংলা | اردو
<img width="793" height="657" alt="System 7 running on modern hardware" src="https://github.com/user-attachments/assets/be84b83e-191c-4f9d-a786-11d0bd04203b" /> <img width="801" height="662" alt="simpletextworks" src="https://github.com/user-attachments/assets/7c9ebe5b-22b4-4612-93a1-2076909d77cd" /> <img width="803" height="661" alt="macpaint" src="https://github.com/user-attachments/assets/cd3ed04a-fdde-4dd5-88ef-5b19b3a13a54" />⚠️ 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.
🎯 Project Status
Current State: Active development with ~94% core functionality complete
Latest Updates (November 2025)
Sound Manager Enhancements ✅ 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)
Previous Session Accomplishments
- ✅ 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
📊 Project Completeness
Overall Core Functionality: ~94% complete (estimated)
What Works Fully ✅
- 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
Partially Implemented ⚠️
- 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)
Not Yet Implemented ❌
- Printing: No print system
- Networking: No AppleTalk or network functionality
- Desk Accessories: Framework only
- Advanced Audio: Sample playback, mixing (PC speaker limitation)
Subsystems Not Compiled 🔧
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
Technical Specifications
- 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
Codebase Statistics
- 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
🔨 Building
Requirements
- 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
Ubuntu/Debian Installation
sudo apt-get install build-essential gcc-multilib grub-pc-bin xorriso qemu-system-x86 python3 vim-common
Build Commands
# 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
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
