NESCarts.h 876 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 <types.h>
  16. #define iNES_MIRROR 0x01
  17. #define iNES_BATTERY 0x02
  18. #define iNES_TRAINER 0x04
  19. #define iNES_4SCREEN 0x08
  20. typedef struct NesCart_
  21. {
  22. unsigned long PROMSize, /* Size of PROM */
  23. VROMSize; /* Size of VROM */
  24. char MapperID; /* Mapper Type */
  25. byte Flags;
  26. char *FileName;
  27. byte *File; /* Pointer on the file in memory */
  28. byte *PROMBanks; /* Pointer on the first PROM */
  29. byte *VROMBanks; /* Pointer on the first VROM */
  30. } NesCart;
  31. void DumpCartProperties();
  32. int LoadCart(const char *filename, NesCart * cart);
  33. #endif