Mercurial > repos > blastem
comparison blastem.c @ 346:aff29d50afd5
Fix a region detection bug
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 19 May 2013 18:40:34 -0700 |
parents | 29d2ca563499 |
children | 2f264d2a60c2 |
comparison
equal
deleted
inserted
replaced
345:29d2ca563499 | 346:aff29d50afd5 |
---|---|
1132 | 1132 |
1133 #define REGION_START 0x1F0 | 1133 #define REGION_START 0x1F0 |
1134 | 1134 |
1135 int detect_specific_region(char region) | 1135 int detect_specific_region(char region) |
1136 { | 1136 { |
1137 return cart[REGION_START/2] & 0xFF == region || (cart[REGION_START/2]) >> 8 == region || cart[REGION_START/2+1] & 0xFF == region; | 1137 return (cart[REGION_START/2] & 0xFF) == region || (cart[REGION_START/2] >> 8) == region || (cart[REGION_START/2+1] & 0xFF) == region; |
1138 } | 1138 } |
1139 | 1139 |
1140 void detect_region() | 1140 void detect_region() |
1141 { | 1141 { |
1142 if (detect_specific_region('U')|| detect_specific_region('B') || detect_specific_region('4')) { | 1142 if (detect_specific_region('U')|| detect_specific_region('B') || detect_specific_region('4')) { |