+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Having weird problems with Dr. Mario's title screen
Pages: [1]
Author Topic: Having weird problems with Dr. Mario's title screen  (Read 2 times)
fartnugg
Guest
« on: February 11, 2008, 06:30:39 pm »

So... I've completely changed all of Dr. Mario except for the small area of the title screen that has the player select and copyright info, but I seem to have hit a brick wall.  Changing ANY tiles within that space seems to look fine, but then once I start the game it freezes after the first pill drops.   Just to give an example of what I am talking about, here are a few screenshots of changing the copyright date to an arbitrary number.

Original:


Copyright year changed, game freezes:


Aesthetically, it looks like everything is fine, but like I said before, as soon as the game starts and the first pill drops, the game freezes.  I have completely overhauled every other screen in this game with no issues whatsoever, so I am at a complete loss as to how/why this is happening.  I would SINCERELY appreciate any help that any of you more experienced guys could offer.  The addresses that I changed in that example are 0x003ca6-0x003ca9, although it does the same thing when I change any of the player text on the lines above it.  Again, any help at all would be greatly appreciated.
fartnugg
Guest
« Reply #1 on: February 11, 2008, 06:57:44 pm »

Actually, I just realized that when I rearrange ANY tile on the title screen, it freezes the game.. not just the area near the copyright date / player select.  Either way, if anyone that could help me figure out what the heck is going on I would be eternally grateful.
Ryusui
Guest
« Reply #2 on: February 11, 2008, 07:33:56 pm »

Might be a checksum issue. Try rearranging bytes rather than replacing them (i.e. try "9901" on that date) and see what happens.
Googie
Guest
« Reply #3 on: February 11, 2008, 08:00:59 pm »

I tried changing the year too, froze up on me. You're better off hacking the title screen in a way that'll have your name with the year animating etc. Too bad some games are like that, I hadda few hacks I wanted to do but they'd freeze on me with the first graphic change I did.
KingMike
Guest
« Reply #4 on: February 11, 2008, 09:29:22 pm »

Quote from: Ryusui on February 11, 2008, 07:33:56 pm
Might be a checksum issue. Try rearranging bytes rather than replacing them (i.e. try "9901" on that date) and see what happens.

Yep. Try 9109, and it stills run. Probably a checksum (likely for copy-protection).
fartnugg
Guest
« Reply #5 on: February 11, 2008, 10:54:44 pm »

Ahh thanks for the really quick replies everybody!  I didn't even think about it being a checksum problem.  Is there any way around this, or am I limited to rearranging the tiles instead of replacing them?  I've never encountered this issue before.  Thanks again!
frantik
Guest
« Reply #6 on: February 11, 2008, 11:00:09 pm »

the way around it is to find the checksum routine and disable it, or find the checksum value and use a new correct value.. but to do that you will have to know how the checksum works and if you know that you might as well just disable it
rveach
Guest
« Reply #7 on: February 11, 2008, 11:51:21 pm »

Here's your checksum crasher:

8DAF   AD 40 07       LDA $0740 = #FF
8DB2   F0 05       BEQ $8DB9

when 0740 becomes -1, it will crash the game. 0 will play the game as normal. It checks 0740 everytime a piece hits the "floor".
The checksum routine begins at 91D0.

91D0   A9 B9       LDA #$B9
91D2   85 48       STA $48 = #B9
91D4   A0 00       LDY #$00
91D6   84 47       STY $47 = #00
91D8   84 49       STY $49 = #00
91DA   8C 40 07       STY $0740 = #00
91DD   B1 47       LDA ($47),Y @ $B900 = #8D
91DF   18       CLC
91E0   65 49       ADC $49 = #00
91E2   85 49       STA $49 = #00
91E4   C8       INY
91E5   D0 F6       BNE $91DD
91E7   E6 48       INC $48 = #B9
91E9   A5 48       LDA $48 = #B9
91EB   C9 BE       CMP #$BE
91ED   D0 EE       BNE $91DD
91EF   A5 49       LDA $49 = #00
91F1   C9 C1       CMP #$C1 <------------ value you need to change for new checksum
91F3   F0 05       BEQ $91FA <----------- jumps on passed checksum, falls through when fails
91F5   A9 FF       LDA #$FF <------------| check sum failed
91F7   8D 40 07       STA $0740 = #00 <--|
91FA   60       RTS = $987A
fartnugg
Guest
« Reply #8 on: February 12, 2008, 01:36:08 am »

Wow!  You guys are great... I asked a question less than 5 hours ago and I've already gotten a bunch of helpful replies.  Thanks a ton for all of the info... I never would have figured out what the problem was on my own.

Anyway, I changed the value that rveach pointed me to, and so far all of the changes I've done to the title screen don't make the game freeze.  What worries me is that I simply changed the number randomly from c9 c1 to b9 b1.  Oh well, I guess I shouldn't look a gift horse in the mouth.. haha.

Seriously, you guys are awesome.  Thanks again.
Ryusui
Guest
« Reply #9 on: February 12, 2008, 03:58:03 am »

Might be safer to change $91F5 to A9 00. This defangs the checksum routine, turning it into an LDA $00 (i.e. it loads 0 instead of the deadly -1).
rveach
Guest
« Reply #10 on: February 12, 2008, 09:20:59 am »

Quote from: fartnugg on February 12, 2008, 01:36:08 am
I simply changed the number randomly from c9 c1 to b9 b1.

I wouldn't go around changing opcodes randomly. You just got lucky with the opcode you changed it to isn't anything serious. Otherwise you could crash or cause the game to really mess up.

If you know how to set breakpoints, set one at 91EF and see what the new checksum value is that is stored in $49 and change the C1 in "C9 C1" to that new value.
Otherwise doing what Ryusui said is fine.
fartnugg
Guest
« Reply #11 on: February 13, 2008, 03:30:21 am »

Thanks guys!  I followed the advice of rveach and Ryusui and everything is working great.  I honestly would have messed around with this forever and never gotten it to work.  You guys are awesome!
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC