Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,501,966
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-29-24 06:24 PM
Guest: Register | Login

Main - Posts by rcpinto


rcpinto
Posted on 08-12-15 07:59 PM, in General Megaman Hacking Thread (rev. 2 of 08-12-15 08:01 PM) Link | Quote | ID: 160637

Newcomer
Level: 5

Posts: 1/4
EXP: 451
Next: 78

Since: 08-12-15

Last post: 3178 days
Last view: 2853 days
Hi, guys! First post. This seems to be the best place to ask for the information I need.

I'm trying to make a mini-map (current screen only, sprites + walls) for MM2 using the FCEUX Lua scripting feature. For now, I'm able to retrieve all sprite positions and types from RAM. Also, I managed to use $2006/$2007 to read the nametables and detect all current 8x8 tiles. However, reading the tiles directly does not give me air/wall information. So, after some research, I'm thinking I'd need to read TSA properties for 16x16 blocks on current screen instead of individual tiles. I could find and read this data directly from the ROM, but I'd need to know where to start reading, in order to capture only the current screen. How can I do that? Is there some pointer in RAM? Another possibility (would be prefered) would be to intercept the game while it reads from ROM to RAM. I suppose there must be some RAM address where the game receives each TSA block on screen. Where is it? I could monitor this RAM address and draw each 16x16 block on my mini-map accordingly as they "arrive", whenever it is a wall.

____________________
Rafael C.P.
http://www.inf.ufrgs.br/~rcpinto

rcpinto
Posted on 08-15-15 10:20 PM, in General Megaman Hacking Thread (rev. 2 of 08-15-15 10:26 PM) Link | Quote | ID: 160666

Newcomer
Level: 5

Posts: 2/4
EXP: 451
Next: 78

Since: 08-12-15

Last post: 3178 days
Last view: 2853 days
I did it!

https://www.youtube.com/watch?v=FRRyGJq-qwM (source included in the video description)

I had to read the ROM and use current stage ($2A) + current screen ($440) + scroll X ($1F) from RAM to figure out the exact position of current screen info. First stage is at $10 in rom, starting with solidity info. $510 stores the map layout itself, composed by 32x32 macro blocks with 4 16x16 micro blocks each. Each code in the map maps to the 4 micro blocks' properties at the $10 region. Next level starts at $4010 , the next at $8010 and so on. Rock5easily's editor helped a lot to figure out the codes and addresses.

____________________
Rafael C.P.
http://www.inf.ufrgs.br/~rcpinto

rcpinto
Posted on 08-16-15 01:28 AM, in General Megaman Hacking Thread Link | Quote | ID: 160672

Newcomer
Level: 5

Posts: 3/4
EXP: 451
Next: 78

Since: 08-12-15

Last post: 3178 days
Last view: 2853 days
I'm glad you liked it!!

About the video, dunno, it shows in 360p here for me. The Bubble Man portion is the worst, but from Heat Man and on, it seems pretty sharp here. Really dunno. I'll see what I can do about that.

The color coding is actually pretty simple, I just used the sprite ID as the R color component, sprite flags as the G component and the instance index as the B component.

But actually, the map isn't my goal. I'm working with some AI algorithms applied to old games. You can see my Genetic Algorithm VS Airman V3.0 video from 2014 in my channel. That one just learns the perfect button sequence "blindly". Now I'm going to try a reactive approach, so the AI needs input from the environment. That's where the map comes in

____________________
Rafael C.P.
http://www.inf.ufrgs.br/~rcpinto

rcpinto
Posted on 08-17-15 12:43 AM, in General Megaman Hacking Thread (rev. 2 of 08-17-15 12:47 AM) Link | Quote | ID: 160680

Newcomer
Level: 5

Posts: 4/4
EXP: 451
Next: 78

Since: 08-12-15

Last post: 3178 days
Last view: 2853 days
Thanks, Zieldak, you explained everything I was going to say, even shared the HD video I JUST uploaded hahaha. Just 2 more things:
1) Bizhawk supports it too. It is a kind of standard API called emulua (other non-nes emulators like snes9x and gens support it too)
2) The reason to make this, Mike, is explained in the video description, video annotation and also in my previous comment here. I needed to learn how to extract map data for other use. That is also why it is not a proper rom hack.

____________________
Rafael C.P.
http://www.inf.ufrgs.br/~rcpinto

Main - Posts by rcpinto

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

Page rendered in 0.325 seconds. (331KB of memory used)
MySQL - queries: 46, rows: 62/62, time: 0.321 seconds.