+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Hard coded text movement (NES)
Pages: [1]
Author Topic: Hard coded text movement (NES)  (Read 1 times)
Squall
Guest
« on: September 08, 2011, 12:40:20 am »

Hi, everyone! I am working on Kunio Kun no Nekketsu Soccer League (J).nes. I got stock again Undecided\ I hope someone help me.

I want to move (4P) in the following screen :


I can move (P) But not 4. It seems 4 is hard coded. I tried using Name Table Viewer :


Then I insert a write breakpoint for 2074 at PPU in debugger. Debugger stopped two times right before showing up (4P).

First stop and some code backward :
07:E9F9:AD 02 20  LDA $2002 = #$14
07:E9FC:A5 2F     LDA $002F = #$20
07:E9FE:8D 06 20  STA $2006 = #$74
07:EA01:A5 2E     LDA $002E = #$74
07:EA03:8D 06 20  STA $2006 = #$74
07:EA06:A5 1C     LDA $001C = #$84
07:EA08:8D 07 20  STA $2007 = #$9D

Second stop and some code backward :
07:F035:8D 91 06  STA $0691 = #$00
07:F038:AD 02 20  LDA $2002 = #$14
07:F03B:AD B6 06  LDA $06B6 = #$20
07:F03E:8D 06 20  STA $2006 = #$74
07:F041:AD B7 06  LDA $06B7 = #$74
07:F044:8D 06 20  STA $2006 = #$74
07:F047:A2 00     LDX #$00
07:F049:AC B8 06  LDY $06B8 = #$01
07:F04C:C0 21     CPY #$21
07:F04E:B0 E3     BCS $F033
07:F050:BD B9 06  LDA $06B9,X @ $06B9 = #$84
07:F053:8D 07 20  STA $2007 = #$BF

I couldn't go any farther.  :banghead:
KingMike
Guest
« Reply #1 on: September 08, 2011, 11:09:51 am »

I'm assuming 84 is the hex value for the number 4.
Then you'll have to trace how it got into RAM $06B9.
Squall
Guest
« Reply #2 on: September 08, 2011, 12:33:09 pm »

Wow, KingMike is answering my question! What an honor. Thanks  :crazy:

Yes, 84 is Hex value of 4 but I don't want to change the value! I want to move its position, but I don't know what the routine for placing 4 in that position is. Can you help me understand position routine by giving me an example code? Then I can found out what code should I look for.
« Last Edit: September 08, 2011, 02:01:20 pm by Kunio »
Kagemusha
Guest
« Reply #3 on: September 08, 2011, 12:44:57 pm »

You want to trace back to the origin of #$74 or set a write breakpoint $06B7. That'll get you started, but you might have to set more breakpoints to get the bottom of things. Easy-peasy is what I say.
Squall
Guest
« Reply #4 on: September 08, 2011, 01:59:56 pm »

Oh, thanks man, you are great!  Cheesy But how did you find out it? Please teach me the concept.

A write Breakpoint for $06B7 :
05:8D2B:B9 66 8D  LDA $8D66,Y @ $8D67 = #$74
05:8D2E:99 B6 06  STA $06B6,Y @ $06B7 = #$AD

And $8D67 points to 14D77 in ROM file.
Kagemusha
Guest
« Reply #5 on: September 08, 2011, 02:12:55 pm »

I'm not really good at explaining this stuff, I just know how everything works. That said, all I needed to see what that you still hadn't found where the #$74 came from. That #$74 corresponds to part of the PPU position and the position you want.
FinS
Guest
« Reply #6 on: September 08, 2011, 03:31:47 pm »

He knows his ppu registers. I'm not very familiar with them myself because I don't work with NES but all you need is a good register doc like this and to have a good understanding of it. Then you should be able to figure out exactly how it is working.
Pages: [1]  


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