Skip to content

Commit

Permalink
Merge pull request #1027 from partlyhuman/lynx-fix-electrocop
Browse files Browse the repository at this point in the history
Fix for overdumping Electrocop/Lynx
  • Loading branch information
sanni authored Sep 16, 2024
2 parents a19a10b + dcf4aa8 commit 7ad0706
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Cart_Reader/LYNX.ino
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// | 34 |- SWVCC
// +----+
//
// Version 1.1
// Version 1.2
// By @partlyhuman
// This implementation would not be possible without the invaluable
// documentation on
Expand Down Expand Up @@ -125,9 +125,11 @@ static bool waitPressButton_LYNX(bool ret = false) {

static void compareStride_LYNX(uint8_t b, int i, int stride) {
uint8_t other = readByte_LYNX(i + stride);
if (other == 0xff) {
// If this is a flash cart, these in-between spaces should be formatted to all 1's
if (other == 0xff || other == 0x00) {
// If this is NOR flash, these in-between spaces should be formatted to all 1's
// in which case, we DON'T report this as an unmirrored area
// Additionally, we have encountered commercial carts where the maskrom is larger than it needs to be
// and in this case, the maskrom will be initialized to 0s, not 1s.
return;
}
if (b != other) {
Expand Down

0 comments on commit 7ad0706

Please sign in to comment.