News: 11 March 2016 - Forum Rules

Author Topic: Do you know how to take advantage of that mistake in the Mario Brothers?  (Read 937 times)

looks png

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
It's the big white Mario Brothers. When facing Bowser Koopa, he needs to stand in front of the axe, and then cut the rope the moment Bowser Koopa meets him. He is injured, the bridge is broken, and Bowser Koopa falls. At this time, he will become a big man after eating mushrooms, and then eat mushrooms and flowers again in the next level, and become a small white man who can fire bullets.

So far, I don't seem to see the use of this small tile in the HD version. I want to use it. The tile found in the tile command of mesen is probably: < tile > 0,32, ff372716288,64,1, and there are many behind n

This is a hexadecimal code. How do I turn it into a decimal recognized by mesen?

(I want to use the HD package Super Mario Bros. flash to modify it, but it seems to be written in decimal system. Its tile command is as follows: < tile > 1,1,15,54,23,32512, n)

Oh, forgive me, I'm really not interested in binary conversion...
« Last Edit: December 01, 2021, 11:52:41 am by looks png »

mkwong98

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #1 on: December 01, 2021, 10:08:47 pm »
Open Calculator on your computer. Change to Programmer mode, select HEX format and key in the hexadecimal value. It will show the value as decimal directly on top or you need to switch back to DEC format depending on which version is your Calculator.

looks png

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #2 on: December 01, 2021, 11:17:16 pm »
Yes, I used the conversion function of the calculator to change the base, but it doesn't seem to work? It may be that the correct tile position cannot be found (if the position is correct, the tiles recorded by mesen but not processed should have white block background color)

I don't know, but this is the case: without conversion, all HD files can't be read. The picture is full of pixel blocks. After conversion, the picture is HD, but the location of these codes is not recorded. They don't have a white block background

I'm trying to learn the new editors you released. I hope I can integrate them

Thank you very much for your patience and help for such a long time


mkwong98

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #3 on: December 02, 2021, 01:34:08 am »
If you open the hires.txt, you can see the version number at the top. Mesen switches to HEX when the version number is 104 or above.

Can you post the lines you added here? I can take a look.

looks png

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #4 on: December 02, 2021, 03:25:15 am »
This is the tile code file of the little white man I recorded separately:
===============================================================
<ver>105
<scale>4
<supportedRom>2AA4889C417C219943407E1652D7C1C1E2A57475
<img>Chr_00_0.png

#Chr_00_0.png
<tile>0,32,FF372716,288,64,1,N
<tile>0,33,FF372716,288,96,1,N
<tile>0,34,FF372716,320,64,1,N
<tile>0,35,FF372716,320,96,1,N
<tile>0,36,FF372716,352,64,1,N
<tile>0,37,FF372716,352,96,1,N
<tile>0,38,FF372716,384,64,1,N
<tile>0,39,FF372716,384,96,1,N
<tile>0,3A,FF372716,416,64,1,N
<tile>0,3B,FF372716,416,96,1,N
<tile>0,3C,FF372716,448,64,1,N
<tile>0,3D,FF372716,448,96,1,N
<tile>0,3E,FF372716,480,64,1,N
<tile>0,3F,FF372716,480,96,1,N
<tile>0,40,FF372716,0,128,1,N
<tile>0,41,FF372716,0,160,1,N
<tile>0,42,FF372716,32,128,1,N
<tile>0,43,FF372716,32,160,1,N
<tile>0,44,FF372716,64,128,1,N
<tile>0,45,FF372716,64,160,1,N
<tile>0,46,FF372716,96,128,1,N
<tile>0,47,FF372716,96,160,1,N
<tile>0,48,FF372716,128,128,1,N
<tile>0,49,FF372716,128,160,1,N
<tile>0,4F,FF372716,224,160,1,N
<tile>0,90,FF372716,256,256,1,N
<tile>0,91,FF372716,256,288,1,N
<tile>0,92,FF372716,288,256,1,N
<tile>0,93,FF372716,288,288,1,N
<tile>0,9E,FF372716,480,256,1,N
<tile>0,9F,FF372716,480,288,1,N

===============================================================

This is the tile code file content of Mario Flash version:

<scale>4
<img>smb01.png
<img>smb02.png
<tile>0,0,22,39,24,256,832,N
<tile>0,1,55,39,22,0,256,N
<tile>0,1,48,39,25,0,128,N
<tile>0,1,26,48,39,0,0,N
<tile>0,1,22,48,39,0,384,N
<tile>0,1,15,54,23,0,512,N
<tile>0,1,12,60,28,0,640,N
<tile>0,1,28,54,23,0,896,N
<tile>0,1,0,48,16,576,0,N
<tile>1,0,22,39,24,288,832,N
<tile>1,1,55,39,22,32,256,N
<tile>1,1,48,39,25,32,128,N
<tile>1,1,26,48,39,32,0,N
<tile>1,1,22,48,39,32,384,N

===============================================================
There are many tile position records behind, which is a small part of the interception.

The two img documents are not written separately and the version number is not indicated.

They are all written together and are not distinguished by the < img > command.

So, how do I merge the above version 105 into this file without version number?
« Last Edit: December 02, 2021, 03:30:47 am by looks png »

mkwong98

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #5 on: December 02, 2021, 04:29:14 am »
The file doesn't have a version number means it comes from another emulator called HDNes before this feature is picked up by Mesen.

To merge the version 105 into the other one, follow these steps:
1. You need to add the line <img>Chr_00_0.png below the other two <img> lines. This means those three files contain the HD graphics we want to apply.
2. You need to change the first number in each of the <tile> lines to 2. This is because the images are referred by a number assigned to them based on the order of the <img> lines in the file. And the emulator assigns numbers starting from 0, so Chr_00_0.png is the third image and will be assigned 2. For example <tile>0,32,FF372716,288,64,1,N will become <tile>2,32,FF372716,288,64,1,N
3. You need convert the palette value to 3 decimal values. Split the HEX value into 4 parts, discard the first part and convert those values into decimal values. For example FF372716 => FF,37,27,16 and we remove FF to get 37, 27, 16 and these 3 HEX number become 55,39,22 in decimal. So <tile>2,32,FF372716,288,64,1,N will become <tile>2,32,55,39,22,288,64,1,N

looks png

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Do you know how to take advantage of that mistake in the Mario Brothers?
« Reply #6 on: December 03, 2021, 01:17:39 am »
I solved this problem with that simulator - look, I made an elf!

But I have a new problem:

After eating gold coins in the water, my newly added tile will be reflected there!

What's going on?

====================
New Elf


Why did the gold coins I ate become my increased tile? No, it shouldn't be here! This should be blue water