How ned3y2k/zephyr_loader works
Main Components
a) Core Emulation Layer:
• CD-ROM Emulator (CdRom.cpp/h)
• CD File System (CdFs.cpp/h)
• CD Audio Player (CdAudioPlayer.cpp/h)
b) Audio Subsystem:
• DirectSound Implementation (MyDirectSound.cpp/h)
• Audio File Handlers:
• OGG Support (OggFile.cpp/h)
• Wave Support (WaveFile.cpp/h)
• Generic Sound Interface (SoundFile.cpp/h)
c) Hook System:
• Windows API Hooks:
• File API (hooker_fileapi.cpp/h)
• WinMM (hooker_winmm.cpp/h)
• User32 (hooker_user32.cpp/h)
• OLE32 (hooker_ole32.cpp)
• Time Functions (hooker_time.cpp/h)
d) Loader Component:
• Separate executable for launching the game
[Game Application]
• ↓
[Hook Layer (Detours)]
• ↓
[Emulation Layer]
• ↙ ↓ ↘
[CDFS] [CD-ROM] [CD Audio]
• ↓ ↓ ↓
[File System] [Disk Management] [Audio System]
• ↓
[Physical Storage]
Important Relationships
• Hook system intercepting Windows API calls
• CD-ROM emulator's interaction with both file system and audio
• Audio pipeline from CD Audio → DirectSound
• File system redirection from virtual to physical paths
Technical Details
• Supported formats (OGG, WAV)
• External dependencies (libogg, libvorbis, Detours)
• Virtual directory structure
• Hook points for Windows APIs
Implementation Notes
• The separation between real and emulated components
• The hook system's central role
• The audio subsystem's complexity
• File system virtualization