Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Looking for a easy to use ASM Assembler | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
infidelity

Red Paratroopa
Level: 21

Posts: 90/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 06-06-05 04:20 AM Link | Quote
I know how to disassemble a .nes file to .dis file. I used Tracer to disassemble Megaman2.nes to Megaman2.dis" I can open it with a notepad and see all the information. But once I mess around with it, how can I make that .dis file, back into an .nes file? I've searched my ass off for a correct assembler, but no luck. Please, could someone tell me which one to do it with, and the correct keywords to type in? Check out my post on megaman2 visine. That's what this is for. I extremely appreciate any help. How can I assemble?!?! Thank You!

EDIT - also, when I disassemble with Tracer. Should I be disassembling it with 6502 enabled? which is "-n" so is this correct? "tracer -n -o megaman2.nes" ??
Once that's done, it creates "output.dis"

Here is an example of "tracer -n -o megaman2.nes" the first 5 lines
00/FFFF: FF FF FF FF SBC $FFFFFF,X
01/8003: FF FF FF FF SBC $FFFFFF,X
01/8007: FF FF FF 00 SBC $00FFFF,X
01/800B: 00 E0 BRK $E0
01/800D: BF E0 BF 01 LDA $01BFE0,X

Here is an example of "tracer -o megaman2.nes" the first 5 lines
00/8000: 4E 45 53 LSR $5345
00/8003: 1A INC
00/8004: 10 00 BPL $8006
00/8006: 11 00 ORA ($00),Y
00/8008: 00 00 BRK $00

Which Is Correct?!?


(edited by infidelity on 06-05-05 11:26 AM)
(edited by infidelity on 06-05-05 11:27 AM)
(edited by infidelity on 06-05-05 11:31 AM)
(edited by infidelity on 06-05-05 11:35 AM)
Dish

Spiny
Level: 38

Posts: 412/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 06-06-05 05:00 AM Link | Quote
If a disassembler doesn't disassemble with re-assembly in mind -- there IS no way to reassemble short of rewriting the entire thing.




00/8000: 4E 45 53 LSR $5345
00/8003: 1A INC
00/8004: 10 00 BPL $8006
00/8006: 11 00 ORA ($00),Y
00/8008: 00 00 BRK $00




That is the right one of the two you listed (the other seemed to be SNES?) -- although there's no way you'll get anything like that to assemble due to all the crap preceeding the instruction. A proper way to have that typed (if it were even code -- which it isn't -- it's actually data which was treated as code when it was disassembled) would be like the following:




LSR $5345
INC A
BPL somelabel

somelabel:
ORA ($00),Y
BRK
.db $00




That would be closer to assemble-able... although you would still need to do some other kind of work to it.

So like I said -- getting disassembled code to reassemble just isn't going to happen unless you use some sort of utility set which was built with this kind of thing in mind (like a disassebler/reassembler combo). For this you may want to look into Hyde's emu - called "aNESe". I'm unsure of the specifics regarding usage, but I do believe it's primary purpose is to make re-assemblable disassembly for NES games. I don't have a link for you, but I'm sure you can easily google it.

But there is no way in hell you're going to get anything like what you pasted above assembled.


When I did this for FF1, I ended up writing my own disassembler, but it's a mess and I doubt it would work for you if I could even remember how to use it.


(edited by Disch on 06-05-05 12:01 PM)
(edited by Disch on 06-05-05 12:03 PM)
Fx3

Shyguy
Level: 13

Posts: 35/80
EXP: 10252
For next: 15

Since: 04-11-05
From: Brazil

Since last post: 98 days
Last activity: 34 days
Posted on 06-06-05 06:20 AM Link | Quote
Instead of flaming... Taking the facts:

1. TRACER is a disassembler MAINLY for SuperNES 65C816 (correct?) CPU. You could, but I wouldn't recommende it for NES working.

2. A ROM is composed of 3 types of data: PRG (PRoGram data, or ASM code), CHR (CHaRacter data, or game graphics) and TABLES, read by the ASM code in an instruction like LDA $9999.

3. Megaman2 have TABLES at beginning of ROM data (the level data). So, if you disassemble it, you'll get junk... and only junk. Remember what I told you about ENTRY POINT, the RESET vector OR address? Ok...

4. IN FACT, you CAN disassemble ALL the ROM data to a text file, and later locate proper ASM data... err... You will need the RESET vector to locate the code easily.

5. Disch is correct - for games with mappers, there's no tools to generate SOURCE CODE, but chunks of disassembled code (very different, okay?). However, Snowbro did a nice work with mapper#0 games - by generating SOURCE CODE - this way, it was possible to modify & recompile it.

6. If you wanna play ASM programming, I'd suggest that assembler done by Loopy sometime ago...
bbitmaster

Koopa
Level: 18

Posts: 78/103
EXP: 25264
For next: 4633

Since: 03-28-04
From: Knoxville, tTN

Since last post: 12 days
Last activity: 7 days
Posted on 06-06-05 08:45 AM Link | Quote
I actually had something planned to do exactly this. It would use FCEUXD's code/data logs to tell the difference between code and data while disassembling. The main goal was to be able to produce a working disassembly of any game with all of the correct labels in the right places. Just something you could easly edit and re-assemble. It would be a rom hackers dream, since it'd pretty much give you access to the game's source - assuming you played the game enough with FCEUXD's code/data logger running.

I actually made a working program called XDDasm and got it to output a couple of games - and they assembled just fine with CA65. but I began to run into major problems with the program. I was using really messy code trying to throw something together that worked, and it ended up collapsing into a pile of convoluted code that only worked half the time. In other words - the whole thing needed a rewrite!

At the moment the project is on hold. Untill I can stop being so discouraged about it all.

I did produce a really nice disassembly of megaman 3 and I began commenting part of it. I also happen to have a megaman 2 disassembly made by hyde that re-assembles with CA65 too if that's the game you're looking for. Toss me an email at bbitmaster@comcast.net or AIM me at bbitmaster and I'll see if I can give you something to mess with.
infidelity

Red Paratroopa
Level: 21

Posts: 91/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 06-08-05 01:25 AM Link | Quote
I'm having a problem with my Megaman 2 hack. It's a strange glitch.

When I fight Heatman, and I die, I get transported back to the room before heatman. Sounds fine so far right? Ok, but when I'm teleported there, and when I move, the entire screen glitches, and the dragon form wily's castle 1 appears, and it seems like megaman is on a conveyer, and he dies *cause I have lava on the floor* Now, if I let megaman sit there when he teleports, for like 3 seconds, and go into heatman's room, it glitches again. I have no idea why this is happening. Could someone please explain why this is happening?? I really like the way the 2 rooms are set up, and hope I don't have to drasticly edit it. Any ideas?!?!?

"HERE IS MY ORIGINAL POST ON MEGAMAN 2 AND VISINE"
http://board.acmlm.org/thread.php?id=12409

EDIT - Also, I'm looking for the address for Heat Man's Speed, when he flies across the screen. I'd like him to fly a lightning speed, just like in rockman exilr, but I don't know the address. Does anybody know the address for that?!?


(edited by infidelity on 06-07-05 08:27 AM)
(edited by infidelity on 06-07-05 09:39 AM)
bbitmaster

Koopa
Level: 18

Posts: 79/103
EXP: 25264
For next: 4633

Since: 03-28-04
From: Knoxville, tTN

Since last post: 12 days
Last activity: 7 days
Posted on 06-08-05 09:04 PM Link | Quote
Here's the offsets in the megaman2.nes file to affect heatman

The easiest way to edit them is to load the game in FCEUXD, and open the hex editor, and hit View->Rom File. That will let you edit them while the game is running.

2C253 - The speed heat man flies across the screen

If you set the speed too fast, he sometimes goes too far. To remedy that, you must also edit the time he spends flying.

To calculate how much time heat man spends flying toward you
the game takes the X distance you are away from him, multiplies it
by 4, and adds 10 to it. The resulting value is put inside a timer.

flametimer = (megaman_x_position - heatman_x_position) * 4 + 10

2C236 - Change this to EA to make it multiply by 2 instead of 4
2C237 - Change this to EA as well to make it not multiply at all
2C23A - This is the 10 that gets added after multiplying by 4
infidelity

Red Paratroopa
Level: 21

Posts: 92/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 06-09-05 05:00 AM Link | Quote
ok I'll give it a try.

But to my other question, does anybody have an idea as to why the room before heatman crashes/glitches?? This only happens when I lose a life during heatman, or if I die in the room before heatman.

EDIT - hmm, I tried typing in everything you typed, but he's still going from one end of the romm to the other. I even opened up rockamn elite, to see his settings, but all he has changed, was the speed. he has it set to "08" This is pretty confusing. How can I tell where these x positions are? I mean, megaman falls right beside the door when he enters, and heatman is not all the way at the end of the right side of the screen. ?? any ideas?


(edited by infidelity on 06-08-05 12:32 PM)
Fx3

Shyguy
Level: 13

Posts: 39/80
EXP: 10252
For next: 15

Since: 04-11-05
From: Brazil

Since last post: 98 days
Last activity: 34 days
Posted on 06-09-05 06:37 AM Link | Quote
*looks around and blinks*
infidelity

Red Paratroopa
Level: 21

Posts: 93/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 06-09-05 05:49 PM Link | Quote
*sigh* thanks for the flame
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Looking for a easy to use ASM Assembler | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.018 seconds.