NESe (pronounced "Nessie") is a NES emulator based on the e6502 emulator, also written in C with a focus on speed and portability for use on embedded platforms, especially ARM.
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.

20 line
431B

  1. #include <stdio.h>
  2. #ifdef NESE_DEBUG
  3. #define LOG(l, f, ...) fprintf(stderr, l ": " NESE_DEBUG ": " f "\n" __VA_OPT__(,) __VA_ARGS__)
  4. #else // !NESE_DEBUG
  5. #define LOG(...)
  6. #endif // NESE_DEBUG
  7. #define LOGE(f, ...) LOG("E", f, __VA_ARGS__)
  8. #define LOGW(f, ...) LOG("W", f, __VA_ARGS__)
  9. #define LOGI(f, ...) LOG("I", f, __VA_ARGS__)
  10. #define LOGD(f, ...) LOG("D", f, __VA_ARGS__)
  11. #define LOGV(f, ...) LOG("V", f, __VA_ARGS__)