hardware.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /****************************************************************************
  2. * *
  3. * Third Year Project *
  4. * *
  5. * An IBM PC Emulator *
  6. * For Unix and X Windows *
  7. * *
  8. * By David Hedley *
  9. * *
  10. * *
  11. * This program is Copyrighted. Consult the file COPYRIGHT for more details *
  12. * *
  13. ****************************************************************************/
  14. #ifndef HARDWARE_H
  15. #define HARDWARE_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #include "mytypes.h"
  20. #define PIC_TIMER 1
  21. #define PIC_KEYBOARD 2
  22. #define TICKSPERSEC (1193180.0/65536.0)
  23. int port60_buffer_ok(int);
  24. void put_scancode(BYTE *, int);
  25. void init_timer(void);
  26. void disable(void);
  27. void enable(void);
  28. void starttimer(void);
  29. void stoptimer(void);
  30. BYTE read_port(unsigned);
  31. void write_port(unsigned, BYTE);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif