NESCarts.h 906 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Cart manager - The TI-NESulator Project
  3. * NESCart.h
  4. *
  5. * Created by Manoel TRAPIER.
  6. * Copyright (c) 2003-2008 986Corp. All rights reserved.
  7. *
  8. * $LastChangedDate$
  9. * $Author$
  10. * $HeadURL$
  11. * $Revision$
  12. */
  13. #ifndef NESCARTS_H
  14. #define NESCARTS_H
  15. #include <stdint.h>
  16. #include <types.h>
  17. #define iNES_MIRROR 0x01
  18. #define iNES_BATTERY 0x02
  19. #define iNES_TRAINER 0x04
  20. #define iNES_4SCREEN 0x08
  21. typedef struct NesCart_
  22. {
  23. uint32_t PROMSize, /* Size of PROM */
  24. VROMSize; /* Size of VROM */
  25. char MapperID; /* Mapper Type */
  26. uint8_t Flags;
  27. char *FileName;
  28. uint8_t *File; /* Pointer on the file in memory */
  29. uint8_t *PROMBanks; /* Pointer on the first PROM */
  30. uint8_t *VROMBanks; /* Pointer on the first VROM */
  31. } NesCart;
  32. void DumpCartProperties();
  33. int LoadCart(const char *filename, NesCart * cart);
  34. #endif