I'm not sure if this is considered 'rom hacking' as such, but recently I've started dabbling in a bit of lua scripting with FCEUX. I made a little script that counts how many of the various pill colour combinations are dropped, kind of like the Statistics in NES Tetris. If anyone is interested in seeing it, I can clean it up and post it somewhere. It's not very pretty at the moment.
Something I'd really like to add is a counter of the number of times you clear more than one line with a single pill, which drops random blocks on your opponent in two-player mode. (We always called this 'rain' when I was growing up. I don't know if it has a proper name?)
Counting the number of pills was quite easy because you just have to look at a couple of RAM addresses to look at which colours the new pill is, but I'm a little out of my depth trying to look for a trigger for a 'rain'. I suppose I need to either find a memory address that's written to when a 'rain' is triggered, or some other way? Can anyone point me in the right direction?
I came across this thread: https://www.romhacking.net/forum/index.php?topic=23298.0
but I'm at a loss for how to get from there to what I'm trying to do.
Edit: I should have mentioned I'm using NES Dr Mario.
Edit: After poking around a bit more, I finally worked it out. Thanks largely to the thread I linked above which I used as a starting point, I worked out that the number of pending punishment blocks is written to $0318 (for Player 2) and $0398 (for Player 1). This number of blocks then falls on that player at the next opportunity, ie. after they've put their current pill into place.
Thanks again to those who did the work in that other thread. My knowledge of assembly and debugger skills are very slowly developing.