This patch allows to use the bonus star counter as a Yoshi Coin counter that will reflect in how many levels you have obtained all Yoshi coins. It also completely disables the bonus stars. Take into account that you should use it alongside the SRAM/BWRAM plus patch in order to make the Yoshi coins not reappear every time you reenter the level: you have to save 0D bytes counting from $1F2F onwards (the Yoshi coin collected table) and the !sram adress defined in the asm file (default $1FFF). The counter can get up to 99 so you can have that many levels with Yoshi coins in your hack.
In the freecode portion of this patch, BCC .return was changed to BNE .return in order to prevent the !sram counter from incrementing for each Yoshi Coin collected beyond the fifth in a given level. This was deemed too significant an oversight not to change, but too simple a fix to warrant complete rejection.
Note that, while the define !sram may be changed, it MUST be absolute (four digits, $XXXX) or the game will crash.
Overall this is a simple and effective patch, useful to those who want to give Yoshi coins some extra function without straying too far from the classic Yoshi coin feel. If there's ever an update to this patch in the future, there are a couple very minor improvements that could be made:
Tested with Asar 1.71, Lunar Magic 3.10, SA-1 1.32, Snes9x 1.59.2.