Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. /*
  2. * 86Box A hypervisor and IBM PC system emulator that specializes in
  3. * running old operating systems and software designed for IBM
  4. * PC systems and compatibles from 1981 through fairly recent
  5. * system designs based on the PCI bus.
  6. *
  7. * This file is part of the 86Box distribution.
  8. *
  9. * Emulation for other CPUs than x86.
  10. *
  11. * Version: @(#)othercpu.h 1.0.0 2019/10/15
  12. *
  13. * Authors: Melissa Goad
  14. *
  15. * Copyright 2019 Melissa Goad.
  16. */
  17. #include <stdio.h>
  18. #include <stdint.h>
  19. #include <string.h>
  20. #include <stdarg.h>
  21. #include <stdlib.h>
  22. #include <wchar.h>
  23. #include "../86box.h"
  24. #include "../device.h"
  25. #include "../timer.h"
  26.  
  27. enum
  28. {
  29. DATABUS_8BIT,
  30. DATABUS_16BIT,
  31. DATABUS_32BIT,
  32. DATABUS_64BIT
  33. };
  34.  
  35. typedef struct _othercpu_device_
  36. {
  37. int databus_width;
  38. uint64_t addressbus_mask;
  39. int num_memory_spaces;
  40.  
  41. uint8_t (*read_byte)(int space, uint64_t addr, void *priv);
  42. uint16_t (*read_word)(int space, uint64_t addr, void *priv);
  43. uint32_t (*read_dword)(int space, uint64_t addr, void *priv);
  44. uint64_t (*read_qword)(int space, uint64_t addr, void *priv);
  45.  
  46. void (*write_byte)(int space, uint64_t addr, uint8_t val, void *priv);
  47. void (*write_word)(int space, uint64_t addr, uint16_t val, void *priv);
  48. void (*write_dword)(int space, uint64_t addr, uint32_t val, void *priv);
  49. void (*write_qword)(int space, uint64_t addr, uint64_t val, void *priv);
  50.  
  51. pc_timer_t clock_timer;
  52.  
  53. uint64_t clock;
  54.  
  55. device_t device;
  56. } othercpu_device_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement