ram.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**********************************
  2. Copyright (C) Rick Wong (Lick)
  3. Credits: Amadeus, Chishm, Cory1492, Lazy1, Pepsiman, Viruseb
  4. Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
  5. and GPLv2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt) licenses.
  6. ***********************************/
  7. #ifndef __RAM
  8. #define __RAM
  9. #include <nds/ndstypes.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef enum { DETECT_RAM=0, SC_RAM, M3_RAM, OPERA_RAM, G6_RAM, EZ_RAM } RAM_TYPE;
  14. // Call this before the others
  15. bool ram_init (RAM_TYPE);
  16. // Returns the type of the RAM device
  17. RAM_TYPE ram_type (void);
  18. // Returns the type of the RAM device in a string
  19. const char* ram_type_string (void);
  20. // Returns the total amount of RAM in bytes
  21. u32 ram_size (void);
  22. // Unlocks the RAM and returns a pointer to the begin
  23. vu16* ram_unlock (void);
  24. // Locks the RAM
  25. void ram_lock (void);
  26. // enable = set lowest waitstates, disable = set default waitstates
  27. void ram_turbo (bool enable);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif