emulator.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. typedef struct Emulator Emulator;
  20. typedef struct Cpu Cpu;
  21. typedef struct Port_1 Port_1;
  22. typedef struct Usci Usci;
  23. typedef struct Bcm Bcm;
  24. typedef struct Timer_a Timer_a;
  25. typedef struct Status_reg Status_reg;
  26. typedef struct Debugger Debugger;
  27. typedef struct Server Server;
  28. typedef struct Packet Packet;
  29. #include "devices/peripherals/bcm.h"
  30. #include "devices/peripherals/timer_a.h"
  31. #include "devices/peripherals/port1.h"
  32. #include "devices/peripherals/usci.h"
  33. #include "devices/cpu/registers.h"
  34. #include "devices/utilities.h"
  35. #include "devices/memory/memspace.h"
  36. #ifdef WEBSOCKETS
  37. #include "debugger/websockets/emu_server.h"
  38. #endif
  39. #include "devices/cpu/decoder.h"
  40. #include "debugger/debugger.h"
  41. #include "debugger/register_display.h"
  42. #include "debugger/disassembler.h"
  43. #ifdef PYTHON
  44. #include "python/py_interface.h"
  45. #endif
  46. struct Emulator {
  47. Cpu *cpu;
  48. Debugger *debugger;
  49. };
  50. #endif