lol its in c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

  1. #ifndef GBSDK_SGB_H
  2. #define GBSDK_SGB_H
  3. #include <stdint.h>
  4. #if SGB
  5. #define SGB_PAL01 0x00 //Set SGB Palette 0 & 1
  6. #define SGB_PAL23 0x01 //Set SGB Palette 2 & 3
  7. #define SGB_PAL03 0x02 //Set SGB Palette 0 & 3
  8. #define SGB_PAL12 0x03 //Set SGB Palette 1 & 2
  9. #define SGB_ATTR_BLK 0x04 //"Block" Area Designation Mode
  10. #define SGB_ATTR_LIN 0x05 //"Line" Area Designation Mode
  11. #define SGB_ATTR_DIV 0x06 //"Divide" Area Designation Mode
  12. #define SGB_ATTR_CHR 0x07 //"1CHR" Area Designation Mode
  13. #define SGB_SOUND 0x08 //Sound On/Off
  14. #define SGB_SOU_TRN 0x09 //Transfer Sound PRG/DATA
  15. #define SGB_PAL_SET 0x0A //Set SGB Palette Indirect
  16. #define SGB_PAL_TRN 0x0B //Set System Color Palette Data
  17. #define SGB_ATRC_EN 0x0C //Enable/disable Attraction Mode
  18. #define SGB_TEST_EN 0x0D //Speed Function
  19. #define SGB_ICON_EN 0x0E //SGB Function
  20. #define SGB_DATA_SND 0x0F //SUPER NES WRAM Transfer 1
  21. #define SGB_DATA_TRN 0x10 //SUPER NES WRAM Transfer 2
  22. #define SGB_MLT_REQ 0x11 //Controller 2 Request
  23. #define SGB_JUMP 0x12 //Set SNES Program Counter
  24. #define SGB_CHR_TRN 0x13 //Transfer Character Font Data
  25. #define SGB_PCT_TRN 0x14 //Set Screen Data Color Data
  26. #define SGB_ATTR_TRN 0x15 //Set Attribute from ATF
  27. #define SGB_ATTR_SET 0x16 //Set Data to ATF
  28. #define SGB_MASK_EN 0x17 //Game Boy Window Mask
  29. #define SGB_OBJ_TRN 0x18 //Super NES OBJ Mode
  30. #define SGB_HEADER(command, length) ((uint8_t)(((command) << 3) | (length)))
  31. void sgb_send(const uint8_t* packet);
  32. #endif
  33. #endif