News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Dr Mario punishment blocks counter  (Read 1319 times)

birtles

  • Newbie
  • *
  • Posts: 2
    • View Profile
Dr Mario punishment blocks counter
« on: October 21, 2017, 12:46:15 am »
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.
« Last Edit: October 22, 2017, 10:39:21 am by birtles »

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Dr Mario punishment blocks counter
« Reply #1 on: October 23, 2017, 01:07:48 am »
Not sure if this helps, but changing the value at $$17CA from #16 to #1E will give you a better pause screen while playtesting.

(Or, use Game Genie code TOUOZYTO.)