emulator.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _EMULATOR_H_
  2. #define _EMULATOR_H_
  3. #include <stdio.h>
  4. //#include <time.h>
  5. #include <stdlib.h>
  6. #include <fcntl.h>
  7. #include <string.h>
  8. #include <stdint.h>
  9. #include <signal.h>
  10. //#include <sys/wait.h>
  11. #include <errno.h>
  12. #include <stdbool.h>
  13. //#include <pthread.h>
  14. //#include <readline/readline.h>
  15. //#include <readline/history.h>
  16. #ifdef WEBSOCKETS
  17. #include <libwebsockets.h>
  18. #endif
  19. // Windows compatibility
  20. typedef struct Emulator Emulator;
  21. typedef struct Cpu Cpu;
  22. typedef struct Port_1 Port_1;
  23. typedef struct Usci Usci;
  24. typedef struct Bcm Bcm;
  25. typedef struct Timer_a Timer_a;
  26. typedef struct Status_reg Status_reg;
  27. typedef struct Debugger Debugger;
  28. typedef struct Server Server;
  29. typedef struct Packet Packet;
  30. #include "devices/peripherals/bcm.h"
  31. #include "devices/peripherals/timer_a.h"
  32. #include "devices/peripherals/port1.h"
  33. #include "devices/peripherals/usci.h"
  34. #include "devices/cpu/registers.h"
  35. #include "devices/utilities.h"
  36. #include "devices/memory/memspace.h"
  37. #ifdef WEBSOCKETS
  38. #include "debugger/websockets/emu_server.h"
  39. #endif
  40. #include "devices/cpu/decoder.h"
  41. #include "debugger/debugger.h"
  42. #include "debugger/register_display.h"
  43. #include "debugger/disassembler.h"
  44. #include "win.h"
  45. #ifdef PYTHON
  46. #include "python/py_interface.h"
  47. #endif
  48. struct Emulator {
  49. Cpu *cpu;
  50. Debugger *debugger;
  51. };
  52. #endif