Bug Patches (source only!)

General Mar0 discussion has been moved to this subforum!
Post Reply
MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 00:37

I found a couple of things in mari0 that were not faithful to the original SMB, so i have made a couple of patches to fix.

The first fixes the fire flower, whose animation should start immediately upon appearance from the block, not once it has reached the top of its travel, and also make's it 'gettable' whilst it is still growing from its block

http://mikedx.is-a-geek.com/mari0/flower.patch

The second fixes the multicoin block, which was previously set to 7 coins, but on a NES rom the block seems to be on a timer, lasting approximately 3 seconds
(meaning you can get about 11 coins if you are quick!)

http://mikedx.is-a-geek.com/mari0/multicoins.patch

and one final one which is just for maurice, the getcoin() patch ;)

sorry maurice! having that code in 3 places almost identical bugged me :D

http://mikedx.is-a-geek.com/mari0/getcoin.patch

Star patch *updated* now animates on appearance and gives 1000 points when collected
http://mikedx.is-a-geek.com/mari0/star.diff

Patch to enable pipe noise when mario appears up from pipe (although this does not happen on the nes smb)
http://mikedx.is-a-geek.com/mari0/mariopipeup.diff
Last edited by MikeDX on 10 Mar 2012, 12:15, edited 4 times in total.

User avatar
trosh
Posts: 1594
Joined: 03 Feb 2012, 08:36

Post » 09 Mar 2012, 00:47

didn't try it - it's only for win isn't it ? but I like it. Everything would be lost with an update, no ?

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 00:53

I don't use windows. I have a mac and various linux boxes.

The patches are generated by git and can be applied with patch -p1 < file.patch whilst in the source dir.

User avatar
Zlmpery
Posts: 339
Joined: 05 Feb 2012, 19:12
Contact:

Post » 09 Mar 2012, 01:01

Hmm. I never noticed the coin block thing but I left a comment about the fire flower sprite bug on the original blog post. Hopefully it is fixed because these little things bug me.

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 01:15

Zlmpery wrote:Hmm. I never noticed the coin block thing but I left a comment about the fire flower sprite bug on the original blog post. Hopefully it is fixed because these little things bug me.
With any luck Maurice hasn't fixed these yet and he can just apply the patches.

I'm happy to fix things if i see them, but not much point me even trying to fix 'bigger' bug without knowing what he is working on.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 09 Mar 2012, 07:37

Would it be possible for you to fix the star too? I mean the animation doesn't start until it goes to the top of the block instead of playing it while it's coming up. Oh and it also doesn't play the powerup sound or give you 1000 points. Lolnitpicking :p

SammiSeldowitz
Posts: 7
Joined: 06 Mar 2012, 11:10

Post » 09 Mar 2012, 08:18

How do I apply these patches?

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 10:41

sekuza009 wrote:Would it be possible for you to fix the star too? I mean the animation doesn't start until it goes to the top of the block instead of playing it while it's coming up. Oh and it also doesn't play the powerup sound or give you 1000 points. Lolnitpicking :p
I'm sure I can do that. I'll take a look :)

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 10:41

SammiSeldowitz wrote:How do I apply these patches?
These are source code patches and need to be applied using the gnu 'patch'

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 12:00

This is a patch to fix the star animation, I can't test it fully at the moment, but it looks like it is almost identical to the flower code.

Will see about fixing that score.. Not sure what you mean about the power-up sound though, I'll check on a real rom.

http://mikedx.is-a-geek.com/mari0/star.patch

Franpa
Posts: 409
Joined: 08 Mar 2012, 07:20
Contact:

Post » 09 Mar 2012, 13:14

Can you add a patch to add the tunnel sound effect when returning from a tunnel?

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 13:58

Franpa wrote:Can you add a patch to add the tunnel sound effect when returning from a tunnel?
I'll look into it tonight.

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 14:43

Patch to play sound when mario appears 'up' a pipe

http://mikedx.is-a-geek.com/mari0/mariopipeup.patch

Franpa
Posts: 409
Joined: 08 Mar 2012, 07:20
Contact:

Post » 09 Mar 2012, 14:48

Question: How does one apply or utilize these patches of yours?

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 14:53

Franpa wrote:Question: How does one apply or utilize these patches of yours?
They are source code patches. You can apply them using the gnu patch tool e.g.

Code: Select all

patch -p1 < mario.patch
whilst in the mari0 source directory.

I can't help beyond that I'm afraid!

Franpa
Posts: 409
Joined: 08 Mar 2012, 07:20
Contact:

Post » 09 Mar 2012, 16:42

Is it possible to make it so you can re-activate Check Points to the left of the currently active Check Point? Or make it so you have to touch a Check Point entity to activate the checkpoint instead of passing it?

At the moment I can't have a Horizontal (Flip the U on it's side) U-Turn area with a Check Point above and below with the later one being positioned behind the first Check Point you encounter.

Also it would be nice if you could create a patch to convert Coins to Entities so that they can be placed in front of Backdrops/background instead of overwriting backdrops/backgrounds.

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 09 Mar 2012, 22:41

Updated patches in the top post.

Franpa, I dont think what you are asking for is within reach. as far as I'm aware the checkpoint is based on the entire X direction and the respawn would only happen on the ground.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 00:41

MikeDX wrote:This is a patch to fix the star animation, I can't test it fully at the moment, but it looks like it is almost identical to the flower code.

Will see about fixing that score.. Not sure what you mean about the power-up sound though, I'll check on a real rom.

http://mikedx.is-a-geek.com/mari0/star.patch
I mean the sound that plays when you get a mushroom or a fireflower. :P

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 10 Mar 2012, 00:47

sekuza009 wrote: I mean the sound that plays when you get a mushroom or a fireflower. :P
Oh ok, i wasnt aware a star made that noise.... I'll check

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 00:56

Okay. :3

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 10 Mar 2012, 01:05

sekuza009 wrote:Okay. :3
Ok i can confirm the NES rom does make the power up noise when the star is collected!

but strangely, the pipe sound was not heard when i appeared 'up' a pipe....

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 01:07

Can you also make a patch that makes it so you can jump on the blooper? And cool :P
Edit: It also seems like the mushrooms and fireflowers come out faster on Mari0 but that isn't really that big of a deal.
Edit again: I'd ask you to fix being able to shoot fireballs while crouching, but Maurice is probably going to fix it in the next update.

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 10 Mar 2012, 01:22

sekuza009 wrote:Can you also make a patch that makes it so you can jump on the blooper? And cool :P
Edit: It also seems like the mushrooms and fireflowers come out faster on Mari0 but that isn't really that big of a deal.
Edit again: I'd ask you to fix being able to shoot fireballs while crouching, but Maurice is probably going to fix it in the next update.
The appearance speed is very easy to tweak, but this could also be a case of PAL vs NTSC game rom.

the fireballs I'm sure Maurice has under control...


when can you jump on a blooper????

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 02:04

MikeDX wrote:
sekuza009 wrote:Can you also make a patch that makes it so you can jump on the blooper? And cool :P
Edit: It also seems like the mushrooms and fireflowers come out faster on Mari0 but that isn't really that big of a deal.
Edit again: I'd ask you to fix being able to shoot fireballs while crouching, but Maurice is probably going to fix it in the next update.
The appearance speed is very easy to tweak, but this could also be a case of PAL vs NTSC game rom.

the fireballs I'm sure Maurice has under control...


when can you jump on a blooper????
You can always jump on bloopers. Have you have ever played the lost levels?

Franpa
Posts: 409
Joined: 08 Mar 2012, 07:20
Contact:

Post » 10 Mar 2012, 06:04

You can only jump on them when you are not "Swimming", in the Lost Levels. As for the pipe tunnel sound issue, I may have been confused with how it works in later Mario games, I still thank you for the patch of course.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 06:19

I'm still confused on how to apply the actual patches, though. :<
Edit: I have the gnu patch tool but I'm still wondering how to actually apply it.

User avatar
teryakisan
Posts: 53
Joined: 08 Mar 2012, 06:16
Contact:

Post » 10 Mar 2012, 11:16

sekuza009 wrote:I'm still confused on how to apply the actual patches, though. :<
Edit: I have the gnu patch tool but I'm still wondering how to actually apply it.
If you are on windows xp (which is the only way I know how to do this), put patch.exe in windows/system32.

Then go to start -> run -> and type the word command.

You will be presented with a command prompt that reads something like C:\DOCUME~1\YOURNAME> This is telling you which directory you are currently working within.

I have a folder on my desktop that contains my mari0 installation, along with any patches I have downloaded.

My installation consists of a shiny new copy of Love 0.8.0 and all of the files from the source. These source files can be obtained by downloading the source and changing the name of mari0.love to mari0.zip. Windows xp handles zip files natively so were good to go. Open up the zip file and unzip all to your mari0 folder.

Now you should have Love 0.8.0 , mari0.zip, your patch files, and a bunch of .lua files in the same folder.

I repeat, patches go in the root folder of your mari0 installation. Basically flower.lua and flower.patch should be in the same folder. So I'm going to need to get to that folder in the command prompt.

This is easily achieved with the cd command. cd tells the command prompt to change directory..cd.

I type cd desktop\mari0 (Thats cd space desktop slash mari0...your mileage may vary depending on where your mari0 install is.)

Also, The command prompt normally starts you in the documents and settings\yourusername folder. What if your mari0 install is at the root of your C:\ drive? cd to the rescue again. just type cd .. (thats cd space period period) over and over again hitting enter each time till you get to C:\ . Easy breezy.

Now the command prompt reflects that I am indeed in C:\documen~1\USERNAME\Desktop\mari0 (or whatever folder you stored it in)

Type patch -p1 < mario.patch
or
type patch -p1 < flower.patch
or
whichever ones you downloaded.

Now, drag and drop the patched (original) file back to your mari0.zip file. Say yes on overwrite?

drag and drop your mari0.zip to the Love icon and booyah your running the patched files. No need to turn it back to a .love to run on windows. :D

Yay patching complete and future patch system installed and ready.

Good luck!!

akiedit- added unzip source and drag n drop operations.
Last edited by teryakisan on 10 Mar 2012, 13:30, edited 2 times in total.

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 10 Mar 2012, 12:07

An excellent tutorial, thanks!

I think there is room for a tool to do the following

Unzip mari0.love

Patch files

Rezip mari0


I dont run windows so i cant really say the best way!

User avatar
teryakisan
Posts: 53
Joined: 08 Mar 2012, 06:16
Contact:

Post » 10 Mar 2012, 12:45

edits made.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 10 Mar 2012, 14:53

Hey, I was too lazy to learn how to use .patch files, so I did all these things for 1.5. Hooray.

User avatar
teryakisan
Posts: 53
Joined: 08 Mar 2012, 06:16
Contact:

Post » 10 Mar 2012, 14:58

yay!

MikeDX
Posts: 22
Joined: 08 Mar 2012, 23:49

Post » 10 Mar 2012, 15:09

Maurice wrote:Hey, I was too lazy to learn how to use .patch files, so I did all these things for 1.5. Hooray.
Be interesting to see how you solved those things compared to how I did them.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 20:57

teryakisan wrote:
sekuza009 wrote:I'm still confused on how to apply the actual patches, though. :<
Edit: I have the gnu patch tool but I'm still wondering how to actually apply it.
-wall of text-
Thanks! Although the gnu patch tool didn't work so I had to use Git bash. Oh btw can you add the sound to the star? o:

User avatar
teryakisan
Posts: 53
Joined: 08 Mar 2012, 06:16
Contact:

Post » 10 Mar 2012, 21:30

teryakisan wrote:-wall of text-
That's exactly how I felt when I was writing it.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 10 Mar 2012, 21:41

teryakisan wrote:
teryakisan wrote:-wall of text-
That's exactly how I felt when I was writing it.
Lol. Also something strange I noticed: Apparently Piranha Plants can come out of the pipe even if there is a portal on the pipe. Probably not a bug but meh.
loledit: I found another bug, yay. When you get the fire flower as big Mario while it's coming out of the block it doesn't disappear. It just kind of stays where it was when you collected it.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 11 Mar 2012, 11:58

Yay for not being able to sleep. I figured out that the scoring in Mari0 is a little bit off. Most enemies only give you 100 points on stomping and 200 points on a fireball kill. But on the original the scores are different. Since I'm lazy and tired I'll just post a image with all of the scores you get from killing enemies. Image
Oh and in the lost levels you get 1000 points from stomping a blooper.

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 12 Mar 2012, 22:47

-bump-

Franpa
Posts: 409
Joined: 08 Mar 2012, 07:20
Contact:

Post » 13 Mar 2012, 18:22

sekuza009 wrote:loledit: I found another bug, yay. When you get the fire flower as big Mario while it's coming out of the block it doesn't disappear. It just kind of stays where it was when you collected it.
Do you mean how if Mario occupies the space the flower is spawning in while it is in the process of spawning, Mario won't collect it until he leaves the area the flower sprite occupies, then returns to said area?

User avatar
sekuza009
Posts: 14
Joined: 05 Mar 2012, 09:17

Post » 13 Mar 2012, 23:43

Franpa wrote:
sekuza009 wrote:loledit: I found another bug, yay. When you get the fire flower as big Mario while it's coming out of the block it doesn't disappear. It just kind of stays where it was when you collected it.
Do you mean how if Mario occupies the space the flower is spawning in while it is in the process of spawning, Mario won't collect it until he leaves the area the flower sprite occupies, then returns to said area?
I guess so. Also I've noticed in the original you can collect mushrooms and 1ups mid block too. I wonder why it doesn't disappear when you collect it mid block on Mari0 :p

Post Reply