News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Help Replacing Akumajou Densetsu Title Screen!  (Read 7260 times)

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #20 on: April 22, 2015, 03:58:34 pm »
Not only is the logo not centered correctly, but half of it is lower than it should be:


Here it is all sewn together and imposed over the mockup so you can see how it's unaligned:

Have you tried pausing the game at that exact moment where it overlaps and seeing how the X, Y offsets are being set there?
Perhaps you just have to lower Y one pixel and that would fix it.

Are you using FCEUX?

FixtySour

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #21 on: April 22, 2015, 04:03:50 pm »
I am using FCEUX, but the thing is, when everything overlaps and it fully shows the title screen in-game, it's all how it should be. It's only during the lightning flashes that they're incorrect. The image I showed you in my post above was just all the lightning flashes superimposed over each other in GIMP so you could better see the issue.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #22 on: April 22, 2015, 04:45:54 pm »
Wild guess...
Did you modify anything related to positions about the main title screen?
If that so, you might want to do something similar with the lighting flashes, since I think the tiles are being handled by something else and the game is still grabbing the old positions just for that part.

By seeing how the tiles are being output in your last image I can see that all of them are being pushed one tile to the left of the Main Title Screen.

I recommend you pause the game exactly at the moment in which the overlap occurs and try changing the X, Y offset as I told your, perhaps that could help. Do so only when the flashing occurs and accommodate them with the Table Viewer (I think it's that one, I might be wrong though).

Let me know how it goes.

FixtySour

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #23 on: April 22, 2015, 05:07:29 pm »
I didn't modify anything related to positions on the main title screen. Didn't even know changing X or Y positions was a thing, actually, before yesterday I had never made any hex modifications to an NES game besides maybe swapping out a color palette once. The "old positions" no longer exist, or at least they shouldn't, since the entire main title screen was overwritten with new tile placements so that it would show my logo correctly. I have no idea how to change X or Y offsets, I'm 95% noob when it comes to NES hacking.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #24 on: April 22, 2015, 05:13:45 pm »
Don't worry, I'm almost at the same spot as you, I only did that once and that was to fix a quotation mark position in the credits of Akumajou Densetsu. XD

Check the HEX values given at that point, those should be a pair of bytes (X1 X2), switch their places (X2 X1) and search for that combination of HEX values in the ROM's data, then try to change it to another position in the screen.
You can always check the position of a tile with the Table Viewer's X and Y positions.

I don't have access to FCEUX at the moment, I might be able to help you out more some hours until I get out of work.
If you want to experiment ATM, open up the Table Viewer with the screen paused where you want to change the flashing tiles position, move the mouse over to the tiles you want to reposition and check the X, Y values that the Table shows you.

I will try to dive into it with more detail once I open up FCEUX and remember what I did.

FixtySour

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #25 on: April 22, 2015, 05:40:03 pm »
Still don't understand what I'm doing, so I'll have to wait until either you or Disch is available to provide more help. Was this not an issue you had when inserting Vanya's title screen, though?

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #26 on: April 22, 2015, 05:47:59 pm »
Still don't understand what I'm doing, so I'll have to wait until either you or Disch is available to provide more help. Was this not an issue you had when inserting Vanya's title screen, though?

Not that I recall.
Or maybe I didn't even noticed and it could be there.

I'll check it out!

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #27 on: April 22, 2015, 07:01:02 pm »
Looks like the game uses in-game "screen active" drawing code to do this effect.  It uses a totally different format.  I'm decoding it now.  Stay tuned



EDIT:

Holy crap this code is cool.  There's like extra checks to split the drawing up across several frames if it's too much to draw in one frame.  This is really clever.

ANYWAY

While backtracing how it was doing the drawing for the lightning flash part, I ended up decoding a lot of unnecessary formatting.  I'll spare you the details, but ultimately I found out the game is using the exact same drawing data to draw that part of the title... so if you have it drawing correctly for the main menu, it should also be drawing correctly for the lightning flash part.


The only thing I can see that's different is that is uses a different pointer table.  So if you changed the pointer for your drawing, you'll have to change it in this other table as well.   This table appears to start at offset 0x0B80F -- but for the title screen, you can see the first entry in that table is '$B540' which points to the exact same title screen data.
« Last Edit: April 22, 2015, 08:14:27 pm by Disch »

FixtySour

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #28 on: April 22, 2015, 08:47:06 pm »
Didn't change any pointers, as far as I'm aware. I don't see why It would display the logo incorrectly as it is. :-\ How dare Konami not make it easy to modify their 26 year old game.

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #29 on: April 22, 2015, 08:56:39 pm »
Hrm.  Well I don't really know what to tell you. =/

If you can send me a copy of the game I might be able to take a look at it.  Maybe I can see what's going wrong.

FixtySour

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #30 on: April 22, 2015, 09:08:33 pm »
Sent you it. Worst case scenario, I guess it'll just have to do being the way it is now.

ShadowOne333

  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #31 on: April 22, 2015, 11:17:47 pm »
Goddamnit, I can't remember how I did it. XD
All I know is that you gotta take into account the tile ID, which should be the same tile numbers that each 8x8 tile has under the PPU Viewer, and the other info should be the data in the PPU Viewer at the Name table viewer.

Let's try a different method though...

Ok first off, pause the game at the EXACT time you can see almost the whole overlapped tiles in the flashing sequence and go over to the PPU viewer under "Debug"
You shall see the tiles that are being used at the moment that you paused the ROM, and some of those should be your title screen tiles.
Check the tile ID for the tile that has the first half of the letter "D" (the one at the very right) AND the tile ID for the white line next to it, the one that is a part of the white square surrounding the title screen. Should be something like F8 (in my hack it is F8).

Now check the tile ID for the rest of the D and the "RACULA'S CURSE" tiles.
WRITE THEM DOWN.

Now go to the HEX Editor included within FCEUX, go to File-> ROM File.
Remember the Tile IDs for both the first half of the letter D and the white line?
Now open up the Find option within the Hex Editor and type the two HEX valuesNEXT TO EACH OTHER from the TIle ID you got from those.
Select "Hex" so that the Finder searches for HEX values and click FIND NEXT (or enter).
You should now see something like "(HEX value for the first half of the letter D) F8" followed by something like a 00.

After two or three HEX values after the F8 (white line tile ID) you should start seeing that the rest of the "RACULA'S CURSE" tile ID hex values are being written NEXT TO EACH OTHER.
For example, the top part of the number "III" in my hack is "A2 A3 A4 A5", and you can see them right next to each other in the ROM data.

THIS is how you can replace how the tiles are being written in order.
This is one way to do it (and the easy one at it).
Let's hope this helps you to try to change the order of the tiles in the flashing sequence.

If you have doubts, let me know.

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Help Replacing Akumajou Densetsu Title Screen!
« Reply #32 on: April 23, 2015, 12:10:10 pm »
OOooookay.

So while the game DOES use the same graphic data for the title after the lightning flashes (on the $2000 NT), it uses DIFFERENT data for the title during the lightning flashes (on the $2800 NT).

This data is in the same format, starts at offset 0x3DAA9, and runs to the FF terminator at 3DC1B.  At first glance it looks to be like a mini version of the title screen.  It still draws the entire nametable, but it leaves out things like the outline box and stuff -- and it also seems to use different attributes (presumably so that different portions of the title will highlight during different lightning flashes).