COOLGIRL

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

supercat
Posts: 161
Joined: Thu Apr 18, 2019 9:13 am

Re: COOLGIRL

Post by supercat » Fri Apr 19, 2019 2:27 pm

zeroone wrote:
jswami123 wrote:I don't think you will be having issue in game play.
This is true. However, if you power-cycle/reset a game with NVRAM, it displays the message, "SAVING... KEEP POWER ON!", indefinitely. I assume that if the flash emulation were functional, that message would eventually be replaced by the main menu.
A typical parallel flash memory device will guarantee that while a byte is being programmed or erased, any attempt to read that byte will yield a value where bit 7 will be the opposite of the value the byte will receive after programming, and bit 6 will be the opposite of the previous value read. Once the operation is complete, reads will simply yield the final contents of the storage. Thus, if one knows what value should be in the memory, one can read it to see if the value matches. Alternatively, one can read the value twice and know that they won't match unless the operation has completed (in which case they will report the final storage contents).

I don't remember the exact sequence of operations required to erase a page of flash, but if the emulator's logic doesn't recognize it, code which repeatedly reads a byte of flash to see if it gets FF (implying the operation is complete) may wait forever if the emulator doesn't recognize the erase command. Since some flash devices support multiple erase commands, it may be that the program is using an erase command that the emulator doesn't recognize.

User avatar
zeroone
Posts: 932
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: COOLGIRL

Post by zeroone » Sun Apr 21, 2019 9:13 am

I don't know how to test the FCEUX implementation. If it actually works, could someone explain how it reads from the flash array?

lidnariq
Posts: 9503
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: COOLGIRL

Post by lidnariq » Sun Apr 21, 2019 10:37 am

It should be able to read from the SAVE_FLASH array any time one of the REG_x_CHIP flag is set to 0x11 inside COOLGIRL_Sync_PRG()...

(edit: this was my 8259th post, the Interrupt Controller inside the original PC. And now I know of no further interesting numbers than correspond to my post count for quite a while)
Last edited by lidnariq on Sun Apr 21, 2019 11:21 am, edited 1 time in total.

User avatar
zeroone
Posts: 932
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: COOLGIRL

Post by zeroone » Sun Apr 21, 2019 11:02 am

lidnariq wrote:It should be able to read from the SAVE_FLASH array any time one of the REG_x_CHIP flag is set to 0x11 inside COOLGIRL_Sync_PRG()...
You're right. I missed that. I'll study this further. Thanks.

User avatar
zeroone
Posts: 932
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: COOLGIRL

Post by zeroone » Sun Apr 21, 2019 11:38 am

zeroone wrote:
lidnariq wrote:It should be able to read from the SAVE_FLASH array any time one of the REG_x_CHIP flag is set to 0x11 inside COOLGIRL_Sync_PRG()...
You're right. I missed that. I'll study this further. Thanks.
That did the job. Thanks.

Post Reply