(data)
| 43 | |
| 44 | @staticmethod |
| 45 | def is_valid_for_data(data): |
| 46 | hdr = data.read(0, 128) |
| 47 | if len(hdr) < 128: |
| 48 | return False |
| 49 | if hdr[0:5] != "NESM\x1a": |
| 50 | return False |
| 51 | song_count = struct.unpack("B", hdr[6])[0] |
| 52 | if song_count < 1: |
| 53 | log_info("Appears to be an NSF, but no songs.") |
| 54 | return False |
| 55 | return True |
| 56 | |
| 57 | def init(self): |
| 58 | try: |