Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,564,249
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-09-24 01:43 AM
Guest: Register | Login

0 users currently in ROM Hacking | 1 guest | 1 bot

Main - ROM Hacking - Help figuring out a routine in a Rockman 2 hack New thread | New reply


fabiansummers
Posted on 05-15-19 04:32 AM Link | Quote | ID: 166997


Goomba
Level: 12

Posts: 10/20
EXP: 6609
Next: 1312

Since: 05-28-09

Last post: 1510 days
Last view: 1450 days
I'm trying to figure out the code Misty used in an early version of Rockman Mindroar to enable gravity switching with the select button. My goal is to port this functionality back to vanilla Rockman 2 so that interested hackers could use it in future works if they wished. I've been trying to track down the relevant code, and I think that I'm on the right track. Being a complete newbie with this kind of hacking, however, I don't really know what to do next, and I'm looking for advice.

I do know that RAM addresses 0077 and 0078 are somehow connected to the gravity switch through my tests in FCEUX. I also know that #00 indicates the press of the select button. The code below seems to have all the relevant parts. I just don't know what the next steps of an intelligent investigation would be if I wanted to pin down the code responsible for the gravity switch.

Here's the code:

$F8B9:A5 F9 LDA $00F9 = #$00 A:04 X:02 Y:00 S:FB P:nvUbdIzc
$F8BB0 2F BNE $F8EC A:00 X:02 Y:00 S:FB P:nvUbdIZc
$F8BD:AD A0 04 LDA $04A0 = #$B4 A:00 X:02 Y:00 S:FB P:nvUbdIZc
$F8C0:C9 09 CMP #$09 A4 X:02 Y:00 S:FB P:NvUbdIzc
$F8C2:90 28 BCC $F8EC A4 X:02 Y:00 S:FB P:NvUbdIzC
$F8C4:A5 78 LDA $0078 = #$00 A4 X:02 Y:00 S:FB P:NvUbdIzC
$F8C60 24 BNE $F8EC A:00 X:02 Y:00 S:FB P:nvUbdIZC
$F8C8:A5 79 LDA $0079 = #$00 A:00 X:02 Y:00 S:FB P:nvUbdIZC
$F8CA0 20 BNE $F8EC A:00 X:02 Y:00 S:FB P:nvUbdIZC
$F8CC:A9 3F LDA #$3F A:00 X:02 Y:00 S:FB P:nvUbdIZC
$F8CE:20 51 C0 JSR $C051 A:3F X:02 Y:00 S:FB P:nvUbdIzC
$C051:A4 66 LDY $0066 = #$00 A:3F X:02 Y:00 S:F9 P:nvUbdIzC
$C053:C0 10 CPY #$10 A:3F X:02 Y:00 S:F9 P:nvUbdIZC
$C0550 05 BCS $C05C A:3F X:02 Y:00 S:F9 P:NvUbdIzc
$C057:99 80 05 STA $0580,Y @ $0580 = #$30 A:3F X:02 Y:00 S:F9 P:NvUbdIzc
$C05A:E6 66 INC $0066 = #$00 A:3F X:02 Y:00 S:F9 P:NvUbdIzc
$C05C:60 RTS (from $C051) --------------------------- A:3F X:02 Y:00 S:F9 P:nvUbdIzc
$F8D1:A9 02 LDA #$02 A:3F X:02 Y:00 S:FB P:nvUbdIzc
$F8D3:85 78 STA $0078 = #$00 A:02 X:02 Y:00 S:FB P:nvUbdIzc
$F8D5:A5 77 LDA $0077 = #$00 A:02 X:02 Y:00 S:FB P:nvUbdIzc
$F8D7:49 01 EOR #$01 A:00 X:02 Y:00 S:FB P:nvUbdIZc
$F8D9:85 77 STA $0077 = #$00 A:01 X:02 Y:00 S:FB P:nvUbdIzc
$F8DB:A9 00 LDA #$00 A:01 X:02 Y:00 S:FB P:nvUbdIzc
$F8DD:38 SEC A:00 X:02 Y:00 S:FB P:nvUbdIZc
$F8DE:ED 60 06 SBC $0660 = #$C0 A:00 X:02 Y:00 S:FB P:nvUbdIZC
$F8E1:8D 60 06 STA $0660 = #$C0 A:40 X:02 Y:00 S:FB P:nvUbdIzc
$F8E4:A9 00 LDA #$00 A:40 X:02 Y:00 S:FB P:nvUbdIzc
$F8E6:ED 40 06 SBC $0640 = #$FF A:00 X:02 Y:00 S:FB P:nvUbdIZc
$F8E9:8D 40 06 STA $0640 = #$FF A:00 X:02 Y:00 S:FB P:nvUbdIZc

Any advice you more experienced hackers might have would be much appreciated.

NARFNra
Posted on 05-16-19 04:05 PM Link | Quote | ID: 167004


Koopa
Level: 25

Posts: 114/114
EXP: 87757
Next: 1863

Since: 02-13-10
From: Texas

Last post: 1819 days
Last view: 1819 days
Hey, just dropping in to say that for what it's worth, Yum found a random rom patch on 2ch that seems to be Misty's original gravity flip code for Rockman 2. Perhaps that'll help you in the investigation, although I guess it might just be the same info you already have - including so that it's easier for you to narrow down what you're looking at, I guess?

http://acmlm.kafuka.org/uploader/get.php?id=5363

fabiansummers
Posted on 05-16-19 11:05 PM Link | Quote | ID: 167005


Goomba
Level: 12

Posts: 11/20
EXP: 6609
Next: 1312

Since: 05-28-09

Last post: 1510 days
Last view: 1450 days
This is exactly the thing I was trying to do! I'm glad it has been done so that I can study it. Thank you so, so much for this, NARF! Where do you and Yum go to find your information? I can never tell whether I should check 2ch or 5ch or somewhere else.

Main - ROM Hacking - Help figuring out a routine in a Rockman 2 hack New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (347KB of memory used)
MySQL - queries: 47, rows: 70/70, time: 0.016 seconds.