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

Author Topic: Megaman Z2  (Read 4901 times)

falchion22

  • Jr. Member
  • **
  • Posts: 29
  • Shoryuken!!
    • View Profile
Megaman Z2
« on: January 21, 2020, 06:13:52 pm »
Zero is back, now with his hair. This is a work in progress which is about about 70% done.
Anyone want to help?









DarkSamus993

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
Re: Megaman Z2
« Reply #1 on: January 21, 2020, 07:06:40 pm »
I might be interested. What's left to do?

xstuff

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Megaman Z2
« Reply #2 on: January 21, 2020, 08:10:48 pm »
Looks good. I had a feeling there would be a sequel :)
I'm also wondering what's left too.
« Last Edit: January 21, 2020, 08:35:08 pm by xstuff »

falchion22

  • Jr. Member
  • **
  • Posts: 29
  • Shoryuken!!
    • View Profile
Re: Megaman Z2
« Reply #3 on: January 22, 2020, 03:44:51 pm »
I might be interested. What's left to do?

What is left?... Some more sprite editing, and dialogue. I do need some help with one particular issue.
During the intro when the Megaman X title is introduced, the "X" is in 3D. I figured since I cannot change the 3D "X" into a 3D "Z", I can however change the palette of the "X" to black to match the background. Only problem is I cannot find the corresponding palette. I have tried using "snespal" to locate it but I was unsuccessful. Can anyone help me out?

kuja killer

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Re: Megaman Z2
« Reply #4 on: January 22, 2020, 10:24:19 pm »
I wondered, is there an actual real graphic anywhere in the ROM for that 3D X ?? just a "base" X anywhere at all.

Or ...is it the CX4 chip using code only, to draw that X with some crazy rotating and whatever type of stuff ??

edit: well this looks interesting. Seems like it's on the "background layer 3" and only uses the very first row of colors on the top left (those 3 whites in the top left corner) ..that's also the same spot, for the 3D mm X head in the intro, just 2 blues and red.
« Last Edit: January 23, 2020, 07:08:34 am by kuja killer »

DarkSamus993

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
Re: Megaman Z2
« Reply #5 on: January 23, 2020, 12:02:43 am »
I wondered, is there an actual real graphic anywhere in the ROM for that 3D X ?? just a "base" X anywhere at all.

Or ...is it the CX4 chip using code only, to draw that X with some crazy rotating and whatever type of stuff ??

The 3D 'X' is not a graphic (none of the wireframes are). I'm trying to figure out the data format so the 'X' can be edited.
Code: [Select]
; $06ACFE - $06AE54 = title screen 3D 'X' data
org $06ACFE

    ; vertex count
    db $24

    ; vertex coordinates
    dw $FFE6, $FFD6, $0090
    dw $0010, $FFD6, $0090
    dw $001A, $FFD6, $0090
    dw $003E, $FFD6, $0090
    dw $FFF2, $FFDE, $0090
    dw $0004, $FFDE, $0090
    dw $0022, $FFDE, $0090
    dw $000A, $FFF5, $0090
    dw $FFFA, $0004, $0090
    dw $000F, $0007, $0090
    dw $FFFE, $0017, $0090
    dw $FFE5, $0030, $0090
    dw $0004, $002E, $0090
    dw $0016, $002E, $0090
    dw $FFCC, $0033, $0090
    dw $FFEB, $0033, $0090
    dw $FFFD, $0033, $0090
    dw $001F, $0033, $0090
    dw $FFE6, $FFD6, $009A
    dw $0010, $FFD6, $009A
    dw $001A, $FFD6, $009A
    dw $003E, $FFD6, $009A
    dw $FFF2, $FFDE, $009A
    dw $0004, $FFDE, $009A
    dw $0022, $FFDE, $009A
    dw $000A, $FFF5, $009A
    dw $FFFA, $0004, $009A
    dw $000F, $0007, $009A
    dw $FFFE, $0017, $009A
    dw $FFE5, $0030, $009A
    dw $0004, $002E, $009A
    dw $0016, $002E, $009A
    dw $FFCC, $0033, $009A
    dw $FFEB, $0033, $009A
    dw $FFFD, $0033, $009A
    dw $001F, $0033, $009A

    ; vector count
    dw $0036

    ; vector index (front)
    dw 0100
    dw 0302
    dw 0400
    dw 0501
    dw 0602
    dw 0804
    dw 0705
    dw 0706
    dw 0903
    dw 0E08
    dw 0D09
    dw 0B0A
    dw 0C0A
    dw 0F0B
    dw 100C
    dw 110D
    dw 0F0E
    dw 1110

    ; vector index (back)
    dw 1312
    dw 1514
    dw 1612
    dw 1713
    dw 1814
    dw 1A16
    dw 1917
    dw 1918
    dw 1B15
    dw 201A
    dw 1F1B
    dw 1D1C
    dw 1E1C
    dw 211D
    dw 221E
    dw 231F
    dw 2120
    dw 2322

    ; vector index (side)
    dw 1200
    dw 1301
    dw 1402
    dw 1503
    dw 1604
    dw 1705
    dw 1806
    dw 1907
    dw 1A08
    dw 1B09
    dw 1C0A
    dw 1D0B
    dw 1E0C
    dw 1F0D
    dw 200E
    dw 210F
    dw 2210
    dw 2311

    ; data table
    db $7F, $BF, $DF, $EF, $F7, $FB, $FD, $FE
    db $80, $40, $20, $10, $08, $04, $02, $01

These are the graphics that are manipulated by the Cx4 chip for shrinking/growing or rotations.
Code: [Select]
; Cx4 manipulated graphics
0x066800 = stage preview (wire sponge)
0x066E00 = stage preview (bubble crab)
0x067400 = stage preview (morph moth)
0x067A00 = stage preview (overdrive ostrich)
0x0FD656 = crystal snail (compressed)
0x135F38 = crystal snail (compressed)
0x143000 = the '2' in the title screen
0x143600 = overdrive ostrich
0x144C80 = magna centipede
0x145540 = stage preview (wheel gator)
0x145B40 = morph moth (larva)
0x150000 = stage preview (crystal snail)
0x150600 = morph moth (larva)
0x152580 = ??? (just a single tile)
0x159500 = stage preview (flame stag)
0x159B00 = Serges
0x15F700 = Agile Flyer (bomb)
0x15FB80 = morph moth (larva)
0x179940 = stage preview (magna centipede)
« Last Edit: January 23, 2020, 12:23:41 am by DarkSamus993 »

kuja killer

  • Full Member
  • ***
  • Posts: 177
    • View Profile
Re: Megaman Z2
« Reply #6 on: January 23, 2020, 07:06:39 am »
Oh wow that's really interesting. :) Kinda looks like those are 16-bit X and Y positions of each frame or something. Though I dont know what the whole "vertex" and "vectors" stuff means in terms of SNES/playstation/nintendo 64 graphics.

I only have experience with NES stuff.

NiO

  • Full Member
  • ***
  • Posts: 111
  • Let's bring order to chaos
    • View Profile
    • https://www.facebook.com/groups/retrogamersmx/
Re: Megaman Z2
« Reply #7 on: January 24, 2020, 07:29:32 am »
Interesting project

Vanya

  • Hero Member
  • *****
  • Posts: 1536
    • View Profile
Re: Megaman Z2
« Reply #8 on: January 24, 2020, 07:21:25 pm »
So this replaces X with Zero?

falchion22

  • Jr. Member
  • **
  • Posts: 29
  • Shoryuken!!
    • View Profile
Re: Megaman Z2
« Reply #9 on: January 26, 2020, 01:23:08 am »
So this replaces X with Zero?

Yes, that is correct. Just like the first hack MegamanZ, Zero is the main character and X is the one who died. You have to find all of X's parts.

January 26, 2020, 01:30:46 am - (Auto Merged - Double Posts are not allowed before 7 days.)
The 3D 'X' is not a graphic (none of the wireframes are). I'm trying to figure out the data format so the 'X' can be edited.

Thank you for continued help. Is it possible to make the 3D "X" a transparent color?
« Last Edit: January 26, 2020, 01:30:46 am by falchion22 »

Reld

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Megaman Z2
« Reply #10 on: January 26, 2020, 07:36:59 pm »


What do you think of this? It doesn't have the extra little cutouts that your Z has, but it has to be better than just blanking out the model completely. Here's a link to an IPS patch. It shouldn't change anything except the X model, so you should be able to apply it directly to your hack if you want.

I was kind of intrigued when I saw DarkSamus's post breaking down the model data and tried my hand at making a model editor (which is what I used to make that Z model).



It looks nicer than it actually is, I think. It's not super user-friendly (clicking in the viewports does nothing, you have to use the controls on the right to edit everything), and it probably has some bugs (the perspective rotation doesn't behave quite like you'd expect because I don't know jack about 3D math), but it does work.

Right now the only model it can edit is the title screen X. I have no idea where any of the other model data is in the ROM. If DarkSamus (or anybody) knows the location for any of the other model data I might be able to make them all editable. For this hack in particular it might be nice to change the X head model from the intro.

Here's a link to the editor if anyone wants to mess around with it. It comes with the Z model, and a model of a cube.

EDIT: The IPS patch I linked originally didn't work. I should have tested it before uploading. I've edited that link to one that should work.
« Last Edit: January 27, 2020, 12:00:14 am by Reld »

Metalwario64

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Megaman Z2
« Reply #11 on: January 26, 2020, 07:45:36 pm »
Would it be possible to add tiles to Zero's Get Weapon screen graphic?

I feel like with his hair flowing like this it would look much, much better:


I could do the graphics work (and I have some adjustments to some parts in mind as well, if the author doesn't mind).

NiO

  • Full Member
  • ***
  • Posts: 111
  • Let's bring order to chaos
    • View Profile
    • https://www.facebook.com/groups/retrogamersmx/
Re: Megaman Z2
« Reply #12 on: January 27, 2020, 05:56:52 am »
Impressive work on the Z  :o

Metalwario64

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Megaman Z2
« Reply #13 on: January 27, 2020, 09:51:44 am »
Impressive work on the Z  :o
Yeah... I never ever dreamed someone would ever make an editor for the wireframe models in X2... :o

metatron724

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Megaman Z2
« Reply #14 on: January 27, 2020, 09:59:41 am »
falchion you could fix the hair in mega man z

DarkSamus993

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
Re: Megaman Z2
« Reply #15 on: January 27, 2020, 12:32:34 pm »
Right now the only model it can edit is the title screen X. I have no idea where any of the other model data is in the ROM. If DarkSamus (or anybody) knows the location for any of the other model data I might be able to make them all editable.
Here is the disassembly I did for all the 3D wireframe model data: https://drive.google.com/open?id=1oj-eU5b7lEmQ0h63maErJ_eWqHEwFfNT

The rest of the wireframe data is stored slightly differently than the title screen 'X':
(1) the data is stored as big endian because it is read directly by the Cx4 chip.
(2) the vector data is stored as pointers (a,b) to the vertex data, followed by which color to use.
(3) if a vertex pointer uses the value $FFFF, then use the previous vertex pointer (I'm guessing it saves CPU cycles?).

See 'code\cx4_title_x.asm' for a breakdown of the title screen 'X' model data.
See 'code\cx4_demo_grid.asm' for a breakdown of the demo mode 'grid' model data.
I split the rest of the model data into separate '.bin' files to save time.

----------------------------------------

I suppose I should do a disassembly of the Mega Man X3 wireframe model data so we can get support for that game too. :thumbsup:
« Last Edit: January 27, 2020, 02:46:30 pm by DarkSamus993 »

Reld

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: Megaman Z2
« Reply #16 on: January 27, 2020, 10:21:31 pm »
Nice work, DarkSamus! I don't think I would have been able to find those other models on my own. I haven't done any work on getting these loaded in my editor yet, but I've gone over the format and given it some thought. I don't think it should be too hard.

I suppose I should do a disassembly of the Mega Man X3 wireframe model data so we can get support for that game too. :thumbsup:

Definitely let me know if you do! Should I make a separate thread about this? I don't want to derail falchion's thread too much. There might not be that much to discuss about it so I don't know. I do intend to post here if I can get an edited X head working, since that's relevant to this project.

DarkSamus993

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
Re: Megaman Z2
« Reply #17 on: January 28, 2020, 12:47:29 am »
Definitely let me know if you do! Should I make a separate thread about this? I don't want to derail falchion's thread too much. There might not be that much to discuss about it so I don't know. I do intend to post here if I can get an edited X head working, since that's relevant to this project.
Yeah, it'd probably be a good idea to start a separate thread. It will help those interested to find it. :thumbsup:

Also, here's my disassembly of the Mega Man X3 Cx4 wireframe model data: https://drive.google.com/open?id=1Lcw3qiDWu5Nr2IvfNn-vOYGMKeUmu2kl
It uses the same two data formats as MMX2, so that keeps things simple.

albrechtmyers

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Megaman Z2
« Reply #18 on: January 28, 2020, 02:49:53 am »
cool. how much time did it take you?
https://4kpornindex.com/
« Last Edit: February 20, 2020, 04:02:45 am by albrechtmyers »

DarkSamus993

  • Sr. Member
  • ****
  • Posts: 280
    • View Profile
Re: Megaman Z2
« Reply #19 on: January 28, 2020, 08:53:18 am »
cool. how much time did it take you?
MMX3 only took me about 45 minutes to track the model and palette data down, and then split and format it all neatly for the disassembly. It was very easy because it used the same loading methods as MMX2, so two tracelogs revealed all the model data, and a couple more for the palettes.