No, actually I stole it from the Gens author that added the Streets of Rage 2 force feedback driver. I don't even know how he did it. I read about it a couple years ago and was wondering how this might work. I thought it would be a cool addition to add to ZSNES since everyone using the Xbox port will have a controller with force feedback capability. Then I came up with the idea of monitoring addresses.
nes6502's approach is very prone to errors
How is that?
Seems much harder to patch the game itself. How would you notify the emulator that a rumble needed to occur? It also seems 10 times more difficult to find the actual code in the ROM that decrements life, lives, etc.. I can find the address by searching in 10 seconds or less.
With my apprach I can start and stop the rumble on any of these scenarios:
1) Rumble on value change and stop rumbling when the timer expires
2) Rumble on value decrease and stop rumbling when the timer expires
3) Rumble on value increase and stop rumbling when the timer expires
4) Rumble on value change and stop rumbling when the value changes
5) Rumble on value change and stop rumbling when the value decreases
6) Rumble on value change and stop rumbling when the value increases
7) Rumble on value decrease and stop rumbling when the value changes
8) Rumble on value decrease and stop rumbling when the value decreases
9) Rumble on value decrease and stop rumbling when the value increases
10) Rumble on value increase and stop rumbling when the value changes
11) Rumble on value increase and stop rumbling when the value decreases
12) Rumble on value increase and stop rumbling when the value increases
That will cover virtually any scenario a game can have. Although, there are some situations that I have yet to isolate an address for. Some games use the same address to do lots of things. This can be great in some cases. For example, searching for a rumble for jumping might give you an address that controls jumping, landing, shooting a weapon, and losing energy. I've found a lot of addresses that can be used like this.
Sometimes, however, this is not desirable. For example, I've yet to find a rumble address for going off the track in Super Mario Kart that is used "only" for going off the track. But I did find one for running over the rough spots of the track in F-Zero (starts rumbling as soon as you enter it and stops as soon as you leave it). Add that to the rumble when hitting cars, losing energy, landing from jumps, and using turbos makes for a really cool F-Zero experience.
But in practice, I have been able to make rumbles for 99.9% of anything I've ever wanted (and usually with less than a minutes worth of searching).
I will admit that the rumbles to skip is only really valid when the game is first started. I will sometimes get rumbles between stages, fights, etc... But it doesn't really happen all that much (in fact, almost never).
I wonder if he'll add MP3 and MPEG playback next
No interest in MP3 or MPEG. But I do have a lot of interest in GBS, NSF, GYM, VGM, SPC, and VGZ.