
Anyhow, go ahead and post the revision here, please revise or reuse that code any way you like.
Moderators: B00daW, Moderators
Greenliant's GLS27SF flash is compatible with Microchip's SST39SF flash. For those parts, they still use a "manufacturer" of $BF, but the second byte changes:Bananmos wrote:As the "manufacturer id" doesn't necessarily need to be equal to $BF, I was thinking of putting something different in there for the Powerpak implementation. Say $BB (=BunnyBoy) on the Powerpak, and $ED for the Everdrive. This could allow software to know which of the 3 implementations it is running on, in case it needs to make compromises on one target platform (like for example the mentioned optimisation to avoid writing all bytes after clearing sectors)
Software could use this for crappy DRM purposes. I don't know if that's important or not.Thoughts on this?
Thanks for mentioning that. Although looking at the data sheet:lidnariq wrote:Greenliant's GLS27SF flash is compatible with Microchip's SST39SF flash. For those parts, they still use a "manufacturer" of $BF, but the second byte changes:Bananmos wrote:As the "manufacturer id" doesn't necessarily need to be equal to $BF, I was thinking of putting something different in there for the Powerpak implementation. Say $BB (=BunnyBoy) on the Powerpak, and $ED for the Everdrive. This could allow software to know which of the 3 implementations it is running on, in case it needs to make compromises on one target platform (like for example the mentioned optimisation to avoid writing all bytes after clearing sectors)
Upper nybble=$A = Greenliant. Upper nybble=$B = Microchip.
Lower nybble specifies size as 2^(n+12) bytes, or 2^n 4KiB sectors.
Macronix seems to be other remaining vendor of all-new 5V parallel NOR flash; their parts use a much larger sector size.
Software could use this for crappy DRM purposes. I don't know if that's important or not.Thoughts on this?
... you know, I read the data sheet repeatedly and kept on managing to overlook that? At least the "27" part of the part number is less bewildering to me now.Bananmos wrote:I'm not sure how relevant [GLS27SF] is, as it doesn't have the sector erase command, and the chip erase, byte-write and software id are all accessed by forcing a 12V voltage on one of the pins. So I would never expect to see this part in a self-flashable configuration, as I can't see how software running on the NES would access this anyway?
Heh, fair enough.If anyone wants to add some very minimal copy protection, then by all means let them have a go at it. I would personally just see it as just yet-another neat trick. And if people want to crack it, they might just gain some NES knowledge along the way and bring fresh blood to our aging community...![]()
Basically, neither sector erase nor the bitwise-and-behavior when writing cleared sectors are supported. But as long as you follow the rule "always write the exact byte you wish to read back in the future", you shouldn't have any problems. The memory writes are protected by requiring the specific write sequence for flash writes, no matter which page is written to.rainwarrior wrote: We could use some documentation on exactly what this compatibility subset of flash save actually supports, and how to set up the .SAV before starting. I didn't see anything that really describes it in the readme.
No .sav file should be needed AFAIK. Said that, I did keep a .sav file in the directory myself while refining the solution, so didn't actually test that all menus in fact work as expected without it...rainwarrior wrote: Is the first 8k of PRG automatically replaced by the save file on load? Is it always 8k or does the size of the provided .SAV file affect it?
No, you shouldn't need a .sav file at all.rainwarrior wrote: I was a bit uncertain about what I should put in the .SAV file before running the ROM the first time. I just used 8k files filled with $FF. Presumably one should put a copy of the original PRG in there?
Writes anywhere will work, and the whole 512kB PRG *is* saved to the .NES file on the CF card. For example, Black Box Challenge writes its save data to somewhere in the middle of the PRG.rainwarrior wrote:Oh.... so for mapper 30 the save file is just a placebo and it just writes directly back to the .NES? (...and consequently loads its save from there too?)
Will writes to everywhere work (despite note being saved) or is only the low 8k writable?