I'm building an emulator for the x86 architecture atm (running on a Sony PSP). I'm currently using the following directory structure:
***
basicio: Basic i/o functions (to/from hard disks, mounting, booting and basic port I/O registration/execution functionality to be used by hardware, bios and MMU).
bios: My homemade BIOS and related functionality.
compiler_output: For moving .o etc. files
cpu: CPU support (x86 emulation)
- cpu / 801/2/3/486: Directories containing files concerning those CPU's.
debugger: Debugger support for the CPU.
emu: Emulator functions and core (main.c).
- emu/core: Core functions for running.
- emu/debugger: Debugger support.
- emu/gpu: SDL Video I/O.
- emu/io: Handlers for user input (virtual keyboard etc.)
- emu/support: Support for the emulator itself.
exception: Exception handler (external library).
hardware: All hardware of the x86 architecture (which is called by the CPU and interrupts).
- hardware/vga: VGA files.
- hardware/midi: MIDI (MPU-401) files
headers: All headers, with the same structure as this list.
interrupts: All interrupts (BIOS interrupts of the x86 architecture)
mmu: Emulator memory I/O support (x86 MMU, virtual memory, Memory Mapped I/O etc.)
support: All functions supporting the emulator (BMP files, SF2 files, Logging etc.)
***
Anyone knows if this is a good structure to use or has a better way to organise my emulator source code? Dosbox seems to be O.K. but has all files stuffed into one large directory (which makes it more difficult to find my files).