Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Questions about changing Sonic sprite in Master Tile Converter.

Reply to topic Goto page Previous  1, 2
Author Message
  • Joined: 19 Apr 2019
  • Posts: 46
  • Location: Málaga, España
Reply with quote
Post Posted: Wed Jun 16, 2021 9:04 pm
EmuBoarding wrote
Ershei wrote
EmuBoarding wrote
I modified some palettes. Here is the ips in case anyone wants to use it.


how you get your change the palette? With Meka? I would be interested in learning

I have tried the hack, and looks nice,


Easy...

Use Emulicious...

go to "Tools" -> "Palette Viewer" or Press "F6"

in Palette Viewer... the first row of colors is for backgrounds and the second for character sprites, enemies.


Place your mouse cursor over the color you want to change.

This way you will find out the color number in Hex and the offset location.

Now using a Hex Editor (I use HxD Hex Editor) let's make the changes.

Open the game ROM on HxD HE. Press Ctrl+G and put the offset you found in Emulicious "62BE" and press Enter.


Now using the Master System color chart, choose which color you will use.


I will use the dark red color. In Hex it is "02".


Now using HxD change Hex "39" to "02" and save.


Now open the game in Emulicious and see if it worked.


Hope this helps. Sorry for my bad English.



Thanks so much for the explanation.
  View user's profile Send private message
  • Joined: 14 Apr 2013
  • Posts: 552
Reply with quote
Post Posted: Thu Jun 17, 2021 10:58 am
Ershei wrote
when I edit the palette in Emulucious, how do I get to save the changes? It only allows me to save to file.pal
I want to change the colors of Ryu's double in Street Fighter 2 so that it looks more like the original arcade, and the same with the rest of the characters and stages.

Hi Ershei,

directly changing the palette only affects the palette that is currently loaded in the emulated system.
If you want to permanently change the palette, you need to find the data or code that is responsible for loading the palette, i.e., the source of it.
Emulicious's Memory Tracer helps finding the source. With the source you can modify the rom and save the modified rom.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Fri Jun 18, 2021 10:42 pm
FeRcHuLeS wrote
This mod looks fantastic, all the aimations are pretty good anyway you seem to forgot the aspect ratio.


I experimented with the correct aspect ratio, by resizing the Genesis version to 70%x80%. I had a hard time squeezing details in the "too wide" version, but this will be even more challenging. As Sonic needs to be thinner, even less pixels will be available horizontally. Even more details from the Genesis will be lost, so it probably will not look like it anymore.
  View user's profile Send private message
  • Joined: 22 Mar 2015
  • Posts: 210
Reply with quote
Post Posted: Sat Jun 19, 2021 5:39 pm
slogra wrote
I experimented with the correct aspect ratio, by resizing the Genesis version to 70%x80%. I had a hard time squeezing details in the "too wide" version, but this will be even more challenging. As Sonic needs to be thinner, even less pixels will be available horizontally. Even more details from the Genesis will be lost, so it probably will not look like it anymore.


I'm surprised and have no expected work for it (faithful 4:3 strechted), I suggest you to pack a patch for it along with the one already released so that people can choose their favourite. Your efforts are welcome and my personal opinion is that with the faithful 4:3 strechted version, Sonic would fit the graphics better than the current release as this is the way the graphics are supposed to be displayed for the game, the current release looks great and next will be great for sure even with less pixels to work with.

By the way I like more the blue pixel deleted next Sonic's eye from 0.1.4 that pixel makes the eyes look rounder but that's just an opinion, Great job!, thanks.

EDIT:
My mistake is not a blue pixel but another design.
  View user's profile Send private message
  • Joined: 19 Apr 2019
  • Posts: 46
  • Location: Málaga, España
Reply with quote
Post Posted: Sat Jun 19, 2021 7:15 pm
Ershei wrote
EmuBoarding wrote
I modified some palettes. Here is the ips in case anyone wants to use it.


how you get your change the palette? With Meka? I would be interested in learning

I have tried the hack, and looks nice,


Hi Emuboarding.

When in Sonic the hedgehog I edit the palette example 39 ... with Hxd, and then I open the rom, the color I edited blinks, why does that happen? Thanks
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Sat Jun 19, 2021 9:17 pm
FeRcHuLeS wrote

I'm surprised and have no expected work for it (faithful 4:3 strechted), I suggest you to pack a patch for it along with the one already released so that people can choose their favourite. Your efforts are welcome and my personal opinion is that with the faithful 4:3 strechted version, Sonic would fit the graphics better than the current release as this is the way the graphics are supposed to be displayed for the game, the current release looks great and next will be great for sure even with less pixels to work with.

By the way I like more the blue pixel deleted next Sonic's eye from 0.1.4 that pixel makes the eyes look rounder but that's just an opinion, Great job!, thanks.

EDIT:
My mistake is not a blue pixel but another design.


Yes, Sonic will fit better with the correct aspect ratio because he will be thinner. But the smaller he gets, the less detail will remain, and less pixels to works with.
For example in v.1.0 his legs are 2 pixels wide in the standing frame. But in aspect ratio corrected version, this does not look right. His legs too wide compared to the rest of his body. And 1 pixel wide legs will look too thin. Also his mouth/cheeks i need to find another way to make it look right again. I suppose something like in the screenshot.

I've attached a the first test version ( facing right only). Although the aspect is correct, all frames will need a lot of manual editing to make it look good as you can see. Basically i will have to start all over again.
Honestly, it will be too much work/trouble for a slightly thinner Sonic...

Do you like his eye in 0.1.4 better than v1.0?

  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Sat Jun 19, 2021 9:25 pm
Ershei wrote

When in Sonic the hedgehog I edit the palette example 39 ... with Hxd, and then I open the rom, the color I edited blinks, why does that happen? Thanks


Please give us more information, like a screenshot or even an ips patch. What do you mean by 39? What exactly did you change in HxD? Offset? Old value? New value?
  View user's profile Send private message
  • Joined: 06 Aug 2015
  • Posts: 82
Reply with quote
Post Posted: Sun Jun 20, 2021 4:19 am
Ershei wrote
Ershei wrote
EmuBoarding wrote
I modified some palettes. Here is the ips in case anyone wants to use it.


how you get your change the palette? With Meka? I would be interested in learning

I have tried the hack, and looks nice,


Hi Emuboarding.

When in Sonic the hedgehog I edit the palette example 39 ... with Hxd, and then I open the rom, the color I edited blinks, why does that happen? Thanks


It's because there is a command for the colors of the water in the back to change. These other colors follow these commands. You just edit all the colors that change to the color you want. Use the emulator's "pause" to get the right offset for each color.
  View user's profile Send private message
  • Joined: 22 Mar 2015
  • Posts: 210
Reply with quote
Post Posted: Sun Jun 20, 2021 5:46 pm
slogra wrote
Yes, Sonic will fit better with the correct aspect ratio because he will be thinner. But the smaller he gets, the less detail will remain, and less pixels to works with.
For example in v.1.0 his legs are 2 pixels wide in the standing frame. But in aspect ratio corrected version, this does not look right. His legs too wide compared to the rest of his body. And 1 pixel wide legs will look too thin. Also his mouth/cheeks i need to find another way to make it look right again. I suppose something like in the screenshot.

I've attached a the first test version ( facing right only). Although the aspect is correct, all frames will need a lot of manual editing to make it look good as you can see. Basically i will have to start all over again.
Honestly, it will be too much work/trouble for a slightly thinner Sonic...

Do you like his eye in 0.1.4 better than v1.0?

It looks good so far just comparing 16bit vs 8bit no strechting vs 8bit with strechting. I like the 0,1,4 better because in 1.0.1 there is a white line down the eye standing out to first view a bit, looks strange in 8bit not in 16bit Sonic.

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Sun Jun 20, 2021 7:39 pm
Kagesan wrote
Changing them will be quite a challenge, then, because you'll have to locate the compressed tiles in ROM and store the compressed data of the new tiles in their place, provided they fit.


The compressed data blob seems to start at 0B:3AF8, I can't tell which compressor is used but I've seen it just often goes over the same 4 bytes from ROM and writes them all 4 times in a row, not sure why. I hope this helps anyone in identifying it.
The unpacker code is at $405 and gets called with DE = $3000 (the VRAM destination address of the data blob, as it's not copying only the tiles you want to hack). The data for the tiles you need to change seem to begin at 0B:3BB0 as that's what gets into VRAM $3300, where you have those shoes. Good luck!
call_unpack.png (9.99 KB)
calling the unpacker
call_unpack.png

  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Sun Jun 20, 2021 8:52 pm
FeRcHuLeS wrote

It looks good so far just comparing 16bit vs 8bit no strechting vs 8bit with strechting. I like the 0,1,4 better because in 1.0.1 there is a white line down the eye standing out to first view a bit, looks strange in 8bit not in 16bit Sonic.


What white line do you mean exactly? The one under the blue and grey pixel?

I tried to make his stand frame to look as good as possible because that is what you see first. I've attached a couple of considerations going from v0.1.4 to v1.0.1.

I minimized the use of the dark brown color, which is replaced by red to turn his shoes red. Too much red in his face or belly does not look good imo.
stand_compare.png (10.55 KB)
stand_compare.png

  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Sun Jun 20, 2021 9:01 pm
sverx wrote

The compressed data blob seems to start at 0B:3AF8, I can't tell which compressor is used but I've seen it just often goes over the same 4 bytes from ROM and writes them all 4 times in a row, not sure why. I hope this helps anyone in identifying it.
The unpacker code is at $405 and gets called with DE = $3000 (the VRAM destination address of the data blob, as it's not copying only the tiles you want to hack). The data for the tiles you need to change seem to begin at 0B:3BB0 as that's what gets into VRAM $3300, where you have those shoes. Good luck!


Thanks!

For anyone who haven't found these links yet:

Decoder code:
https://www.smspower.org/Development/SonicTheHedgehogTileDecoder

And more info here:
http://info.sonicretro.org/SCHG:Sonic_the_Hedgehog_%288-bit%29#Header
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Sun Jun 20, 2021 9:16 pm
oh, I had never seen that page before. Good you found it, so you probably know how to fix the source data now :)
  View user's profile Send private message Visit poster's website
  • Joined: 22 Mar 2015
  • Posts: 210
Reply with quote
Post Posted: Sun Jun 20, 2021 10:33 pm
slogra wrote
What white line do you mean exactly? The one under the blue and grey pixel?

I tried to make his stand frame to look as good as possible because that is what you see first. I've attached a couple of considerations going from v0.1.4 to v1.0.1.

I minimized the use of the dark brown color, which is replaced by red to turn his shoes red. Too much red in his face or belly does not look good imo.


I'm pointing out the ones that stand out white color, it is like the eyes look bigger on the other hand ok for the 16bits's because the sprite is bigger, thanks for considering other people opinions since people is sometimes jelaous of their work.
stand_compare_432.png (11.36 KB)
stand_compare_432.png

  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Mon Jun 21, 2021 1:23 pm
sverx wrote
oh, I had never seen that page before. Good you found it, so you probably know how to fix the source data now :)

I still have no clue where to start :).
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Mon Jun 21, 2021 1:28 pm
FeRcHuLeS wrote

I'm pointing out the ones that stand out white color, it is like the eyes look bigger on the other hand ok for the 16bits's because the sprite is bigger, thanks for considering other people opinions since people is sometimes jelaous of their work.


I like those 3 on the right. His mouth/cheeks are slightly bigger, so his eye may look smaller in comparison.
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Mon Jun 21, 2021 1:37 pm
slogra wrote
.
Honestly, it will be too much work/trouble for a slightly thinner Sonic...


There is still hope. In the first attempt i used the original genesis sprites and resized those. But next attempt i will use my already resized and optimized the frames from v1.0.1 and resize those. It should give much better results right away.

However everything that got cut off, i have to add again.
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Mon Jun 21, 2021 8:02 pm
Yes, it turned out much better this way. Check it out.

  View user's profile Send private message
  • Joined: 22 Mar 2015
  • Posts: 210
Reply with quote
Post Posted: Tue Jun 22, 2021 4:54 pm
slogra wrote
Yes, it turned out much better this way. Check it out.


Looks good! Still I find too much of white cheek/eye part, It feels like Sonic is out of place since the shadows colors of another sprites in the game use dark colors, yours is a port from 16bits where there are more colors to deal with so Sonic should fit a bit more the 8bits graphics and consider the tweaks I did the one within the red block if I'm not wrong is the one of the latest patch, just 2 pixels one light orange for the cheek instead of a white and one blue instead of light gray. Still fantastic work thanks.
stand_compare_432.png (11.17 KB)
stand_compare_432.png

  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Tue Jun 22, 2021 8:00 pm
Yeah, i understand what you mean.
At least you only changed 2 pixels, and not the entire frame ;).
I didn't add the orange pixel there because i did not want his cheek to be too "tall". I used grey pixel instead of blue for more smoothness.



In the aspect ratio corrected version, this issue is even tougher, because there are less pixel to use for his eye and mouth (in some frames).
Attached you will find a new version. I've added the left facing frames. It is unfinished but at least it's complete and playable.

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Wed Jun 23, 2021 5:15 pm
slogra wrote
sverx wrote
oh, I had never seen that page before. Good you found it, so you probably know how to fix the source data now :)

I still have no clue where to start :).


Well, I don't know how you're changing the art at the moment. If you are changing uncompressed art only, you have to figure out how to update compressed art.

I would probably use BMP2Tile, provided there's a SonicTile compressor plugin (which I suspect is missing which seems to be available!) feeding it the uncompressed data you can dump from VRAM into a binary file. The compressed output should go into the ROM at 0B:3AF8 (bank 0B, offset 3AF8) - hopefully it will fit there or you'll have to relocate it to some other place.

Otherwise, I hope there is some other tool that you can use, but I'm not an expert on ROM hacking tools so I can't help you much here.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Wed Jun 23, 2021 6:52 pm
Yes, so far i just changed uncompressed tiles with Master Tile Converter.

Thanks for your instructions.
I've downloaded BMP2Tile and the Sonic1compressor.
Then i loaded the my changed tile (8x8 bitmap) and saved it as shoetip.soniccompr (32bytes).

I only know how Master Tile Converter and a hex editor works. So i'm not sure what "bank 0B" means. And i don't know how to insert shoetip.soniccompr there. Can you explain?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Wed Jun 23, 2021 7:46 pm
There is a chunk of several tiles decompressed including this one. You need to extract that whole chunk, which is a bit tricky, then edit, recompress and re-insert - hoping the data does not get bigger than the original.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Thu Jun 24, 2021 12:09 pm
you should probably screenshot the VRAM contents from an emulator, convert them to a paletted image using the same palette the game uses, then modify that image the way you like it.

now you have the source for BMP2Tile and you save your Sonic1 compressed data

you copy that data (with an hex editor) into the ROM at location 0B:3AF8 over the existing data. Since each bank is 16 KB the location of 0B:3AF8 is
0B×16KB + 3AF8 = 2FAF8


edit: actually the compressed chunk of tiles you have to replace starts at 0B:392E (or as they wrote in the code, at 09:B92E) that is
0B×16KB + 392E = 2F92E
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jun 24, 2021 10:02 pm
How many tiles should the chunk contain? The full vram? Or only a part of it?
mekatiles.png (20.76 KB)
mekatiles.png

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Fri Jun 25, 2021 9:14 am
from VRAM $3000 to VRAM $3800, that is from tile 384 (the big white digits) to 448 excluded: 64 tiles total

edit: I suspect confirm that the last 12 are actually empty tiles.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Fri Jun 25, 2021 4:49 pm
Thank you so much sverx!!! It turned out perfectly!

Looks like it is smaller than the original because I can see some repetition after the inserted hex values.

38 00 38 38 10 00 38 38 7C 00 7C 7C FE 00 7C 00 7C 7C FE 00

I did not notice any issues while playing so far (first 2 levels).

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2974
Reply with quote
Post Posted: Sun Jun 27, 2021 4:52 pm
slogra wrote
Looks like it is smaller than the original because I can see some repetition after the inserted hex values.


good, you can leave those values there, they won't disturb
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jul 08, 2021 1:22 pm
Right now i'm trying to change the background tiles of Greenhill.

It seems to be stored in a different way than the compressed shoetip.
I noticed the shoetip starts with HEX values "HY", but level art does not.

I believe Greenhill "tiles" start at $337A8 according to the information here:
http://info.sonicretro.org/SCHG:Sonic_the_Hedgehog_%288-bit%29#Level_Art

Is that the right place? Should i use different compression settings with level art?

What is the difference between "level art" and "tiles".
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Thu Jul 08, 2021 1:48 pm
I think the “header” offsets are what you want. The compression format is the same for all sprites and background tiles (where compressed).
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jul 08, 2021 4:10 pm
Excellent, i was indeed looking at the wrong offset. It works now.

Thanks for the super fast answer!
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jul 08, 2021 9:28 pm
Unfortunately there is very little room for changes. Any alteration will result in a bigger compressed chunk. I tried a couple of different tile changes but no luck, all of them turned out bigger.

How does the compression work? Does it look at lines of 8 pixels wide, to find duplicates?

It will be hard to adjust the my new "artwork" to that.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Thu Jul 08, 2021 9:51 pm
The Sonic compression works by matching rows of 8 pixels that are identical within the entire set of tiles. To do a more advanced hack, you might try to rearrange the data automatically, and/or replace the compression algorithm with a better one.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Fri Jul 09, 2021 5:17 pm
Quote
rearrange the data automatically


I like it already. What tool can i use for that?

Compression sounds a bit more (too) complicated to me. I guess i have to replace the decompress code in the rom somehow. Is recompression of all compressed tiles needed?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Sat Jul 10, 2021 12:03 am
It’s not easy. I’d use WLA DX to background the ROM, unbackground to remove the compressed data, then reinsert it all as separate files, with the necessary references inserted using labels. Then in theory i can rebuild the ROM but I can also resize some of those data chunks. Finally if I cover all the data, I can also swap out the decompression code. It’s a fairly large undertaking for an experienced ROM hacker.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jul 22, 2021 2:55 pm
Well, that sounds very complicated that i won't be able to do.
Would it be possible to create an uncompressed rom? I guess not, but i just wondered. Is that easier to do?

Another question. Does anyone know where the animal capsule sprite (at the end of a level) is located in the rom? I was not able to find it.

And would it be possible change the bridge zone music to marble zone music?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Thu Jul 22, 2021 5:09 pm
Replacing graphics with uncompressed graphics is if anything slightly harder than repacking or changing the compression algorithm.

One thing that would be simpler - but probably still require an experienced coder - would be to patch the code to load your changes on top of the existing data just after decompression.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Thu Jul 22, 2021 9:45 pm
Thanks Maxim. I guess I'll have to make the graphics fit with the original compression. Not easy either :), but i'm making some progress. It's hard to predict how big compressed graphics will be compared to the original compressed graphics.

B.t.w What does "background the rom" mean?
  View user's profile Send private message
  • Joined: 16 May 2002
  • Posts: 1250
  • Location: italy
Reply with quote
Post Posted: Fri Jul 23, 2021 7:59 am
slogra wrote
And would it be possible change the bridge zone music to marble zone music?
Go to location $C718 and replace 4A 57 with 0A 4D.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13805
  • Location: London
Reply with quote
Post Posted: Fri Jul 23, 2021 9:42 am
slogra wrote
B.t.w What does "background the rom" mean?

This is a concept from WLA DX whereby you put the original ROM in the background and then build patches on top of it. It’s like editing in a hex editor built in to the assembler process.
  View user's profile Send private message Visit poster's website
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Fri Jul 23, 2021 10:15 pm
[quote="Tom"]
slogra wrote
Go to location $C718 and replace 4A 57 with 0A 4D.


I was hoping it would be this easy to change. Thanks Tom!
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 126
Reply with quote
Post Posted: Fri Jul 23, 2021 10:38 pm
Maxim wrote
This is a concept from WLA DX whereby you put the original ROM in the background and then build patches on top of it. It’s like editing in a hex editor built in to the assembler process.


Thanks for the excellent and brief explanation. I might (need to) try it some time.
  View user's profile Send private message
Reply to topic Goto page Previous  1, 2



Back to the top of this page

Back to SMS Power!