kbeckmann / game-and-watch-retro-go

Emulator collection for Nintendo® Game & Watch™
GNU General Public License v2.0
440 stars 133 forks source link

gw_flash: Detect non-genuine flash chips #150

Open kbeckmann opened 3 years ago

kbeckmann commented 3 years ago

Some chips that are sourced from ebay, aliexpress and similar sources are not what they seem.

A popular chip reports JEDEC ID: C2 25 38 even though it isn't a genuine chip. It doesn't support quad i/o mode.

One way to solve this is to read a known value on the flash. If this fails, fall back using the generic SPI driver and try again.

Ideally we should probe in a better way.