News:

11 March 2016 - Forum Rules

Main Menu

MORTAL KOMBAT II SPECIAL NES

Started by drax01, January 25, 2023, 02:46:40 PM

Previous topic - Next topic

drax01

Quote from: tacoschip on April 22, 2023, 09:10:41 PMTo teach people (partly) how to deal with nametable graphics, let's use "Mortal Kombat II (Asia) (Aftermarket)"

1. Get this tool by FrankenGraphics (constantly updated)
https://frankengraphics.itch.io/nexxt


2. Load up the title screen in fceux


- This game is MK1, not MK2.


3a. Open nametable viewer. Appears to be 32w x 60h


3b. Open hex editor. Dump ppu memory.


3c. Open nexxt, change canvas size.
--

3d. Load ppu memory dump.



And we get this. Scroll down to see bottom half.
--

Like me, you'll be thinking "what??" Check the fceux nametable viewer at scanline 230.


This means our game is swapping out chr banks mid-screen somewhere. Bleh.


4a. Open fceux debugger. Click on "Step into" to activate.


If done correctly, you'll get to here. This is what a NMI handler looks like.



4b. Keep smashing "Step over" with the keyboard "ENTER" until we get here.


That rti is critical!


4c. Dump ppu memory again, since our chr banks are reset.



4d. Reload again into nexxt


Note that my image is messed up because I dumped the ppu too early. Wait for rti!


And we get this now.


Scroll up. Yes!


Select the palettes box to get the tiles to color correctly.



You'll have to play tile jigsaw now on your own. It's a powerful graphics tool though. If you have suggestions or improvement ideas, send them here
https://forums.nesdev.org/viewtopic.php?t=24079


5a. Edit your tiles and .. okay. I haven't figured this out yet. I'd "save session" + "save all binaries" + export everything for later.

Note that there are smart tile options like "Remove duplicates" and "Remove unused".


Getting everything back into the ROM could require a hacker, as likely you'll run into graphics + nametable compression. Anyways post your "wip" result someday and we'll see where to go next! I have other work to tend to. :)

Thank you very much, you are great!  ;D

drax01

#61
The stage "El Portal" is edited removing the 2 monks in the background, I thought the 2 animated monks in the front look better. Red eyes are removed from the "Goro's Lair" stage. Thanks to @Tacoschip who manages to make the clouds in "The Pit 1" stage move again like they do in mortal kombat 2 on the NES (which is actually MK 1).


drax01

We have progress in music, the stages have been completed:

- Tower
- Pit2
- Goro's Lair



Thanks to:

Amilgi: https://www.romhacking.net/community/4246/
Rkk: https://www.youtube.com/channel/UCzfRJsXG_LmTR7nDVEYaOuA

tacoschip

Continuing the MK1 title tutorial.

1. Edit the graphics. I chose to slide some tiles around. Save the nametable.
--


2. You'll need a Run-Length Encoder (RLE) tool
https://github.com/tacoschip/tacoschip/raw/47413095c50d0cc2965936197ca210a033fa5bc3/main.cpp
https://github.com/tacoschip/tacoschip/raw/47413095c50d0cc2965936197ca210a033fa5bc3/packer.exe

Drag-and-drop your new nametable file onto the packer.exe. It squishes 1024 bytes down to 461 bytes.


3. Now to figure out where this nametable lives in the ROM. Explanation on how to find it will not be fully covered, as it requires some work.

At the MK logo screen, open the debugger. Add a breakpoint.
--


Hit run. Get to title menu. This is where it uploads nametable to vram. Seek to $83f0 to find what's there.
--


The memory looks like this. Right-click on the red box. Shows us it's at ROM $83ff.
--

20 00 = nametable vram address. Rest is compressed RLE bytes.


We also need to know where it ends. Double-left click the blue box to add a breakpoint. Then hit run.
--


That red box is where it stops. $85bf. Single left-click the blue box to add it to seek. Then seek to.
--

Notice how it stops with FF FF FF, of which the last 2 FF might be dummy bytes.
- Note: This picture was using a modified ROM. ROM $85E4 is where the next nametable actually starts.


So we take our *.rep file back from step 2 and paste it into the ROM at $83ff+2. Load game again.


It worked! Although it could use some work. Now what if it didn't fit into the original space??
- Try to remove useless tiles on the map
- Put it into Bank 07, assuming it has room
- Ask a hacker


Our next future study will be how to edit those pseky stage tilemaps, like Shang Tsung's throne.

But ask now if something needs more explaining.

tacoschip

1. Load up MK2 Special and startup Shang Tsung's stage. Nametable lives at $2000 vram. Look in hex editor. Choose somewhere that is written.



2. Reload stage at VS screen. Set a PPU write breakpoint. Run. It should look very familiar to MK1 tutorial. Set a breakpoint on blue box and restart VS screen again.



3. Nametable is at address $E09F. Go through hex editor routine. Surprise! Notice how it's at ROM $20AF.
-- --


4. Now place breakpoint to find stop. Notice the FF FF and 20 00.
--


5. Run game and open debugger. Do ppu hex dump. Load into Nexxt. Scroll right to see other nametable.
--


6. Now to find the upper graphics. Place breakpoint in picture - it's an IRQ routine that lets us swap chr banks. Step out this time to see the RTI.
--


7. Dump ppu memory again and load into Nexxt.
--


8. Now the tricky evil part. Save chr bank only. Call these tiles upper.chr.



9. Load the ppu memory dump for the lower half. Save chr bank again. Call this lower.chr.



10. Now we can play with the tilemap.



11. To work on the upper half, load the upper.chr tiles.



12. Play with the upper part.



13. When done, export the tilemap. Run it into the packer and write back into ROM. At $20AF+2. Make sure it fits! That's your responsibility!



14. Test result.



15. We only changed the left 32 tiles. Now you must edit the right half of the screen. When done, export that nametable-2.


16. But where do we insert the new packer data? The code that writes the nametable actually runs twice - one for left (2000 ppu), other for right (2400 ppu). So use $c05b breakpoint twice to see it lives at $E334 or ROM $2342+2. ROM $247E is where it stops. And you have free space to ROM $3010. Plus more free space in bank 0.


17. Finally, what if we want to completely destroy the image? You'll have to figure out Nexxt and get it to create new tiles for you. The twisted part is that you have to fit left+right tiles within the 256-tile limit. Only a hacker can move the split line between upper and lower half, which gives you more tiles to use for either area. This requires some communication.

drax01

Quote from: tacoschip on April 25, 2023, 08:27:30 PMContinuing the MK1 title tutorial.

1. Edit the graphics. I chose to slide some tiles around. Save the nametable.
--


2. You'll need a Run-Length Encoder (RLE) tool
https://github.com/tacoschip/tacoschip/raw/47413095c50d0cc2965936197ca210a033fa5bc3/main.cpp
https://github.com/tacoschip/tacoschip/raw/47413095c50d0cc2965936197ca210a033fa5bc3/packer.exe

Drag-and-drop your new nametable file onto the packer.exe. It squishes 1024 bytes down to 461 bytes.


3. Now to figure out where this nametable lives in the ROM. Explanation on how to find it will not be fully covered, as it requires some work.

At the MK logo screen, open the debugger. Add a breakpoint.
--


Hit run. Get to title menu. This is where it uploads nametable to vram. Seek to $83f0 to find what's there.
--


The memory looks like this. Right-click on the red box. Shows us it's at ROM $83ff.
--

20 00 = nametable vram address. Rest is compressed RLE bytes.


We also need to know where it ends. Double-left click the blue box to add a breakpoint. Then hit run.
--


That red box is where it stops. $85bf. Single left-click the blue box to add it to seek. Then seek to.
--

Notice how it stops with FF FF FF, of which the last 2 FF might be dummy bytes.
- Note: This picture was using a modified ROM. ROM $85E4 is where the next nametable actually starts.


So we take our *.rep file back from step 2 and paste it into the ROM at $83ff+2. Load game again.


It worked! Although it could use some work. Now what if it didn't fit into the original space??
- Try to remove useless tiles on the map
- Put it into Bank 07, assuming it has room
- Ask a hacker


Our next future study will be how to edit those pseky stage tilemaps, like Shang Tsung's throne.

But ask now if something needs more explaining.


Hello tacochip!!! I've been busy with my job, I've opened a new forum to discuss the issues separately. I have passed all your explanation here:

https://www.romhacking.net/forum/index.php?topic=37002.0

tacoschip

Quote from: drax01 on March 30, 2023, 03:56:53 AMThe reason I need this scenario to be indexed in the game is to take advantage of this space to design a scenario that is in MK2 (The Dead Pool). What would this be:

I might play around with this for a bit, if I learn more info. I ask for your help identifying these graphics.


- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like some shiny pool or mirror.



- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like a fireball?



- It looks like a sun or moon but I have zero idea where / if it's used.



- Don't know if this is used or which stage.


My opinion is that some gfx mini-banks can be freed up, like a jigsaw puzzle. This much work would require an asm hacker anyway, which is why I'm exploring.

SuperStarFox

Quote from: tacoschip on April 27, 2023, 09:52:02 PMI might play around with this for a bit, if I learn more info. I ask for your help identifying these graphics.


- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like some shiny pool or mirror.



- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like a fireball?



- It looks like a sun or moon but I have zero idea where / if it's used.



- Don't know if this is used or which stage.


My opinion is that some gfx mini-banks can be freed up, like a jigsaw puzzle. This much work would require an asm hacker anyway, which is why I'm exploring.

I know what that sun or moon thing is, it's the J.Y. Company logo. J.Y. Company is known for their bootleg Famicom games as well as publishing games from Hummer Team.

drax01

#68
Quote from: tacoschip on April 27, 2023, 09:52:02 PMI might play around with this for a bit, if I learn more info. I ask for your help identifying these graphics.


- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like some shiny pool or mirror.



- What is the bottom half? Is it used in MK2 or was only for MK1? Looks like a fireball?



- It looks like a sun or moon but I have zero idea where / if it's used.



- Don't know if this is used or which stage.


My opinion is that some gfx mini-banks can be freed up, like a jigsaw puzzle. This much work would require an asm hacker anyway, which is why I'm exploring.

Answers :)

This:



The image is Sub-Zero's "ice lagoon":



Second:



I show you the graphs of Kintaro's power of the MK2:





Third:



I couldn't find any of this in the game of 1 and 2, I don't know where I'll be using it

Fourth:



all this is part of the scenario "The Tower", I have erased some sprites to find it:


tacoschip

Excellent! Very helpful. Two more questions.

Is this part unused? See right panel.


Also unclear for me if the fireball explosion is used. See right panel.



The why. Portal uses 3 different chr banks. I've noticed that Forest + Portal chr animations can maybe be duplicated with careful bank swap timing, freeing 4 banks. And I can mix-match parts of other banks. So your complex pictures could (possibly) be chopped up into 3-4-5 sections, space permitting.

tacoschip

Quote from: SuperStarFox on April 28, 2023, 04:11:41 AMI know what that sun or moon thing is, it's the J.Y. Company logo. J.Y. Company is known for their bootleg Famicom games as well as publishing games from Hummer Team.

Thanks! Hmm. Wonder if it's hidden somewhere.

drax01

Quote from: tacoschip on April 28, 2023, 08:51:39 AMExcellent! Very helpful. Two more questions.

Is this part unused? See right panel.


Also unclear for me if the fireball explosion is used. See right panel.



The why. Portal uses 3 different chr banks. I've noticed that Forest + Portal chr animations can maybe be duplicated with careful bank swap timing, freeing 4 banks. And I can mix-match parts of other banks. So your complex pictures could (possibly) be chopped up into 3-4-5 sections, space permitting.

Answers :)

Firt:

the tiles on the left side are used, on the right side they are not, they must be from mk1



Second:

if you use up the entire block, it goes by so fast that you won't get a capture in the game.



Third:

If you use the 3 banks, if you scroll in the CHR you will notice that the stage is found 3 times, the difference is that there are changes in the drawings, which are 2 different drawings for the monks' cassock and the lightning bolt from the portal in the background, This is how "Hummer Team" achieves the animation, changing the background 3 times in sequence, but what we see is an animation.

tacoschip

Okay! I'll have to be mindful of those tiles.


Quote from: drax01 on April 28, 2023, 11:14:43 AMIf you use the 3 banks, if you scroll in the CHR you will notice that the stage is found 3 times, the difference is that there are changes in the drawings, which are 2 different drawings for the monks' cassock and the lightning bolt from the portal in the background, This is how "Hummer Team" achieves the animation, changing the background 3 times in sequence, but what we see is an animation.

Portal "upper" is 7d010 - 88010 - 8a010. Then there's the "middle" screen (7c010 - 7e010 - 89010); only the bottom 2 rows animate in these banks but they are same as the "upper" chr banks (7d010 - 88010 - 8a010). And only 3 tiles change in these last 2 rows.

My untested opinion is that if we swap the banks at the right time, we can squash the 3 middle banks into 1, moving all the animated tiles into the "upper" banks.


Forest also has the same situation. ~3-4 tiles are changing in "middle" section and we can hopefully squash these 3 banks into 1.


If it fails, we still have the 2 Shang Tsung throne banks to use for Dead Pool.

drax01

Quote from: tacoschip on April 28, 2023, 11:46:12 AMOkay! I'll have to be mindful of those tiles.


Portal "upper" is 7d010 - 88010 - 8a010. Then there's the "middle" screen (7c010 - 7e010 - 89010); only the bottom 2 rows animate in these banks but they are same as the "upper" chr banks (7d010 - 88010 - 8a010). And only 3 tiles change in these last 2 rows.

My untested opinion is that if we swap the banks at the right time, we can squash the 3 middle banks into 1, moving all the animated tiles into the "upper" banks.


Forest also has the same situation. ~3-4 tiles are changing in "middle" section and we can hopefully squash these 3 banks into 1.


If it fails, we still have the 2 Shang Tsung throne banks to use for Dead Pool.

You could try to use the stage space "Skang Tsung's Throne".

no if this information is useful, they gave me a rom where they manage to incorporate the "Dead Pool" scenario in the "Mortal Kombat 2 Special", you can see it in this video at the time: 05:39

tacoschip

#74
Quote from: drax01 on April 28, 2023, 12:22:42 PMno if this information is useful, they gave me a rom where they manage to incorporate the "Dead Pool" scenario in the "Mortal Kombat 2 Special", you can see it in this video at the time: 05:39

Someone converted "Dead Pool" already??? Clearly I missed it and wasted my time. :laugh: :laugh:  :D  :D  ::)  ::)  :huh: :huh:  :o  :o  ;) ;)  :happy:  >:D :angel:

(note: my laziness meter has now exponentially increased and hacking interest has evaporated substantially. There's apparently a new experienced sheriff from some other town!!)


Can they also convert The Armoury? And out of curiosity, The Wasteland?

(not like I have to volunteer anymore. Honestly, they should be able to add all these maps without expanding the rom, or needing my help. :police: )


I am happy you have a dedicated, very capable team helping you along! :cookie: I will now sit back and later enjoy the finished product.

drax01

#75
Quote from: tacoschip on April 28, 2023, 12:57:47 PMSomeone converted "Dead Pool" already??? Clearly I missed it and wasted my time. :laugh: :laugh:  :D  :D  ::)  ::)  :huh: :huh:  :o  :o  ;) ;)  :happy:  >:D :angel:

(note: my laziness meter has now exponentially increased and hacking interest has evaporated substantially. There's apparently a new experienced sheriff from some other town!!)


Can they also convert The Armoury? And out of curiosity, The Wasteland?

(not like I have to volunteer anymore. Honestly, they should be able to add all these maps without expanding the rom, or needing my help. :police: )


I am happy you have a dedicated, very capable team helping you along! :cookie: I will now sit back and later enjoy the finished product.

Wait tacoschip, I think they have misunderstood me, and I also forgot to put the link, I restart my comment:

-Another person made a hack that incorporated this scenario, I think it might be important to analyze how he did it, because it was also in a version of "MK2 Special"

- This video shows the stage and the download link:




Excuse me if I didn't know how to make myself understood. I don't know if the translator correctly interprets what I want to say.

This person is not with me, does not cooperate and does not contribute to me either, I was using an example as an analysis aid.

Note: in the improvement that I am doing there is not the "Dead Pool" scenario

tacoschip

This MK3EX is a Russian hack of .. "Mortal Kombat II (Asia) (En) (Rev B) (Aftermarket) (Pirate).nes" aka MK1.


Dead Pool has a very strong resemblance to your earlier rendition. How they fit it within 256 tiles is beyond me.


So we can either straight rip it and call it a day, or you can later edit it to your further liking.


Russian version of The Tomb has some cheating. Some dithering removed and the guard rail.

tacoschip

Figured out what was required to make it work in Special, but the screen stops 8 tiles earlier on the right side than MK3EX.




Not releasing files yet as I should start fixing up the source.

tacoschip

(stupid double post; oh well, make use of this new one)


I did not notice this earlier

Quote from: drax01 on April 14, 2023, 03:41:49 AMI took the stages below from reference to this page:

https://www.spriters-resource.com/nes/mortalkombat3bootleg/sheet/93114/


which I now realize where MK3EX took some of their graphics from, and also improved other ones.
https://bootleggames.fandom.com/wiki/Mortal_Kombat_3_(Super_Game)


They impressively squished some digitized graphics into 256 tiles, which means you'll have room for all 3 missing stages now.

drax01

#79
Quote from: tacoschip on April 28, 2023, 11:45:13 PM(stupid double post; oh well, make use of this new one)


I did not notice this earlier


which I now realize where MK3EX took some of their graphics from, and also improved other ones.
https://bootleggames.fandom.com/wiki/Mortal_Kombat_3_(Super_Game)


They impressively squished some digitized graphics into 256 tiles, which means you'll have room for all 3 missing stages now.


Hello Tacoschip, thank you very much for your great contributions, can I send you my rom by internal message so that you can work on it? or by intern give me an email that I can send it to you. I'm sorry to abuse her generosity and time. :)

I also want to apologize to the community if I have ever sounded rude or selfish, but I use a translator and I don't know if he interprets what I really mean. Very grateful for the great support I have been receiving and the help.