nes_conf.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright 2023-2025 Dozingfiretruck
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #pragma once
  17. #include <rtthread.h>
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifdef PKG_NES_ENABLE_SOUND
  22. #define NES_ENABLE_SOUND (1) /* enable sound */
  23. #endif
  24. #define NES_FRAME_SKIP PKG_NES_FRAME_SKIP /* skip frames */
  25. #ifdef PKG_NES_USE_FS
  26. #define NES_USE_FS (1) /* use file system */
  27. #endif
  28. /* Color depth:
  29. * - 16: RGB565
  30. * - 32: ARGB8888
  31. */
  32. #ifdef PKG_NES_COLOR_DEPTH_32
  33. #define NES_COLOR_DEPTH (32) /* color depth */
  34. #else
  35. #define NES_COLOR_DEPTH (16) /* color depth */
  36. #endif
  37. #ifdef PKG_NES_COLOR_SWAP
  38. #define NES_COLOR_SWAP (1) /* swap color channels */
  39. #endif
  40. #define NES_RAM_LACK (0) /* lack of RAM */
  41. /*
  42. * - NES_LOG_LEVEL_NONE Do not log anything.
  43. * - NES_LOG_LEVEL_ERROR Log error.
  44. * - NES_LOG_LEVEL_WARN Log warning.
  45. * - NES_LOG_LEVEL_INFO Log infomation.
  46. * - NES_LOG_LEVEL_DEBUG Log debug.
  47. */
  48. #ifdef PKG_NES_LOG_LEVEL_NONE
  49. #define NES_LOG_LEVEL NES_LOG_LEVEL_NONE
  50. #elif defined(PKG_NES_LOG_LEVEL_ERROR)
  51. #define NES_LOG_LEVEL NES_LOG_LEVEL_ERROR
  52. #elif defined(PKG_NES_LOG_LEVEL_WARN)
  53. #define NES_LOG_LEVEL NES_LOG_LEVEL_WARN
  54. #elif defined(PKG_NES_LOG_LEVEL_INFO)
  55. #define NES_LOG_LEVEL NES_LOG_LEVEL_INFO
  56. #elif defined(PKG_NES_LOG_LEVEL_DEBUG)
  57. #define NES_LOG_LEVEL NES_LOG_LEVEL_DEBUG
  58. #endif
  59. /* log */
  60. #define nes_log_printf(format,...) rt_kprintf(format, ##__VA_ARGS__)
  61. #ifdef __cplusplus
  62. }
  63. #endif