Mercurial > hg > sidinfo
changeset 132:b3e034b8c4b9
Change how certain flags (for SID model and clock) are handled.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 02 Jun 2017 02:38:41 +0300 |
parents | c2d2369feadc |
children | 9cfa0553e7f9 |
files | sidinfo.c sidlib.c sidlib.h |
diffstat | 3 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/sidinfo.c Fri Jun 02 02:11:36 2017 +0300 +++ b/sidinfo.c Fri Jun 02 02:38:41 2017 +0300 @@ -467,11 +467,11 @@ break; case 5: if (psid->version >= 2) - PR("%s", NULL, si_get_sid_clock_str(psid->flags)); + PR("%s", NULL, si_get_sid_clock_str((psid->flags >> 2) & PSF_CLOCK_MASK)); break; case 6: if (psid->version >= 2) - PR("%s", NULL, si_get_sid_model_str(psid->flags)); + PR("%s", NULL, si_get_sid_model_str((psid->flags >> 4) & PSF_MODEL_MASK)); break; case 7: PR("%d", "$%08x", psid->dataOffset); break;
--- a/sidlib.c Fri Jun 02 02:11:36 2017 +0300 +++ b/sidlib.c Fri Jun 02 02:38:41 2017 +0300 @@ -216,7 +216,7 @@ const char *si_get_sid_clock_str(const int flags) { - switch (flags & PSF_CLOCK_MASK) + switch (flags) { case PSF_CLOCK_UNKNOWN : return "Unknown"; case PSF_CLOCK_PAL : return "PAL 50Hz"; @@ -229,7 +229,7 @@ const char *si_get_sid_model_str(const int flags) { - switch (flags & PSF_MODEL_MASK) + switch (flags) { case PSF_MODEL_UNKNOWN : return "Unknown"; case PSF_MODEL_MOS6581 : return "MOS6581";
--- a/sidlib.h Fri Jun 02 02:11:36 2017 +0300 +++ b/sidlib.h Fri Jun 02 02:38:41 2017 +0300 @@ -72,20 +72,20 @@ enum { - PSF_PLAYER_TYPE = 0x0001, // 0 = built-in, 1 = Compute! SIDPlayer MUS - PSF_PLAYSID_TUNE = 0x0002, // 0 = Real C64-compatible, 1 = PlaySID specific (v2NG) + PSF_PLAYER_TYPE = 0x01, // 0 = built-in, 1 = Compute! SIDPlayer MUS + PSF_PLAYSID_TUNE = 0x02, // 0 = Real C64-compatible, 1 = PlaySID specific (v2NG) - PSF_CLOCK_UNKNOWN = 0x0000, // Video standard used (v2NG) - PSF_CLOCK_PAL = 0x0004, - PSF_CLOCK_NTSC = 0x0008, - PSF_CLOCK_ANY = 0x000c, - PSF_CLOCK_MASK = 0x000c, + PSF_CLOCK_UNKNOWN = 0x00, // Video standard used (v2NG+) + PSF_CLOCK_PAL = 0x01, + PSF_CLOCK_NTSC = 0x02, + PSF_CLOCK_ANY = 0x03, + PSF_CLOCK_MASK = 0x03, - PSF_MODEL_UNKNOWN = 0x0000, // SID model (v2NG) - PSF_MODEL_MOS6581 = 0x0010, - PSF_MODEL_MOS8580 = 0x0020, - PSF_MODEL_ANY = 0x0030, - PSF_MODEL_MASK = 0x0030, + PSF_MODEL_UNKNOWN = 0x00, // SID model (v2NG+) + PSF_MODEL_MOS6581 = 0x01, + PSF_MODEL_MOS8580 = 0x02, + PSF_MODEL_ANY = 0x03, + PSF_MODEL_MASK = 0x03, };