Super Mario World 2 (finished)

Page 1 of 3 1, 2, 3  Next

Go down

Super Mario World 2 (finished) Empty Super Mario World 2 (finished)

Post by Conn Thu 25 Jan 2018 - 15:51

Project finished:

https://www.zeldix.net/t1611-super-mario-world-2

Ok guys, did I ever say Nintendo games being easy to msu? Well, this game proved me wrong!

This is a light patch and a beta. I know that the map themes change as well as the title theme when dark. Don't ask me to implement. It was hard enough!

I didn't play from beginning to end so I do not know whether I missed to map some themes or a major bug occurs somewhere.

Here's the theme list:
Themelist:

sd2snes is not supported, Super FX games are not possible to play with sd2snes (yet).


Anything else to say? Yes: have fun  Very Happy

Patch v14: sound fix
http://bszelda.zeldalegends.net/stuff/Con/smw2_msu1_patch.zip

Enmet's PCMSet v2:
Version 2 with ending split

daniloroxette's PCMSet v2:
https://drive.google.com/file/d/10okv6jNGVd7pqtz-s8zoHdsHUkEoes8T/view?usp=sharing


Last edited by Conn on Mon 29 Jan 2018 - 15:43; edited 26 times in total
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Thu 25 Jan 2018 - 16:23

Latest bsnes-plus versions do not require XML mapping, you can play MSU-1 roms right straight (just like Snes9x 1.55):
http://www.emucr.com/search/label/bsnes-plus?&max-results=16
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by pev Thu 25 Jan 2018 - 17:37

This is true. Verified.

Sent from Topic'it App

pev

Super Mario World 2 (finished) Image211

Since : 2017-10-16

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Thu 25 Jan 2018 - 18:00

If something sounds too good to be true it often isn't Sad

This emulator doesn't play my patch due to a bug in the emulator:

First it reads my opcodes normal (just alike snes9x:

01f08b lda $0401 [000401] A:00ff X:0008 Y:0000 S:01ef D:0000 DB:00 NvmxdIzC V:198 H:181 F:39
01f08e and #$00ff A:ff00 X:0008 Y:0000 S:01ef D:0000 DB:00 NvmxdIzC V:198 H:191 F:39

And suddenly...:

01f08b lda $0401 [0f0401] A:0020 X:0009 Y:003c S:01e0 D:0000 DB:0f nvmxdIzc V:225 H: 88 F:39
01f08d tsb $29 [000029] A:207e X:0009 Y:003c S:01e0 D:0000 DB:0f nvmxdIzc V:225 H:102 F:39
... and crash.
LDA $0401 ;check busy flag
AND #$00FF
BEQ $03
It seems like it starts to read the ad 01 04 as 2 bytes instead 3 bytes.

I'll report it, until it gets possibly fixed, use snes9x 1.55
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by pev Thu 25 Jan 2018 - 18:06

Good to know. So far, it plays other MSU1 games fine. Just not SMW2 (for now). But I know you'll get it fixed somehow.

pev

Super Mario World 2 (finished) Image211

Since : 2017-10-16

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Thu 25 Jan 2018 - 19:11

I tried a lot, also with other places to hook in nmi, no way. It is a bug with bsnes I guess. I reported the problem on github:
https://github.com/devinacker/bsnes-plus/issues/158

I can't do anything here. For now this patch is snes9x 1.55 (and higan maybe?) only.
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by pev Thu 25 Jan 2018 - 19:27

That really sucks.

pev

Super Mario World 2 (finished) Image211

Since : 2017-10-16

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by daniloroxette Thu 25 Jan 2018 - 19:40

OMG, now it will be possible to play SMW2 only with SFX (that's my wish since long). Thank you so much, Conn & RedScorpion.  Very Happy

I tested here and I reached level 4. Seems perfect for me.

I'll help with pcms wherever possible. I'll search for alternative themes soon. By now, If it helps, I put your map on a google Spreadsheet that anyone can edit:

https://docs.google.com/spreadsheets/d/1tQ6vGqbg_zBRmdb6rHn6xz1uKaAgbfFo1Vrtlcr8CNk/edit?usp=sharing
daniloroxette
daniloroxette

Super Mario World 2 (finished) Image110

Since : 2017-09-25

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Thu 25 Jan 2018 - 20:19

Ah Red wasn't part of this party.
I just copied/pasted a tutorial and his name remained in the header... great that it works so far Very Happy

And again much appreciated if you can make pcm:s again Very Happy Very Happy Very Happy
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Thu 25 Jan 2018 - 21:55

Sorry Conn, but your higan manifest file is dated, and won't work.

However, I made one compatible with latest higan versions:
https://bin.smwcentral.net/u/26932/smw2_msu1.zip

Unfortunately, the patch is also broken on higan-accuracy, therefore, I'm afraid to say that if SD2SNES ever supports Super FX, it won't work either.

Snes9x is known to have quite buggy Super FX emulation, that's probably why it works, because it lacks accuracy. bsnes-plus might be right after all, and it's your patch that is faulty.

I suggest you to test your patch against higan v106 to ensure hardware compability, since as of now, it doesn't seem to work on any accurate emulator. =(

Edit: link updated, wrong files inside.
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Thu 25 Jan 2018 - 22:25

My manifest is the same as yours only that mine will also support older versions.
The reason why mine didn't work for you is that you need to import the rom, as I described it in the tutorial, so that the name is program.rom in higans emulation folder.
Your bml requires the name smw2_msu1.sfc; therefore mine didn't work for you.
So I leave mine, but thanks for your help Smile

higan uses bsnes core, so it is a problem with this "family tree". Let's see whether the staff of bsnes can fix it, if not it remains snes9x only *shrugs, if I come to no other solution
It surely is an emulator flaw, I experimented a bit:

01f091 tsb $ea       [0000ea] A:2c2c X:0008 Y:001d S:01e4 D:0000 DB:17 nvmxdIzC V:225 H:131 F:52
01f097 sbc $03f000,x [03f008] A:3c7d X:0008 Y:001d S:01e4 D:0000 DB:17 nvmxdIzC V:225 H:182 F:52
01f09d beq $f048     [01f048] A:7c7f X:0008 Y:001d S:01e4 D:0000 DB:17 nvmxdIzC V:225 H:222 F:52
01f09f brk #$00               A:7c7f X:0008 Y:001d S:01e4 D:0000 DB:17 nvmxdIzC V:225 H:235 F:52
01f0a5 brk #$aa               A:7c7f X:0008 Y:001d S:01e4 D:0000 DB:17 nvmxdIzC V:225 H:275 F:52

01f091 tsb $ea       [0000ea] A:2c2c
01f097 sbc $03f000,x
As you can see here, the address incrementation gets completely crazy, it jumps 6 bytes from 01f091 to 01f097 where only 2 bytes should be incremented.
The code in smw2 is special, the nmi is executed in ram, then I jump back to normal code addressing, that is an exception not addressed by this emulator generation.
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Thu 25 Jan 2018 - 22:41

Oh, you are right, I only saw the first template of the bml, I haven't scrolled down to see the others, your version is in fact better for supporting older versions Wink

higan uses bsnes core

On contrary, it's bsnes-plus that uses higan core, and I must say, an older one (bsnes-plus is forked from bsnes-classic, which in turn, forked higan at v073)

Indeed, it's really weird behavior, maybe byuu might have overlooked it, I will open a topic at his message forum detailing the problem, but keep in mind that your patch is broken on every accurate emulator, let's cross ours fingers and hope that this is just an emulation oversight.
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 0:59

I think the problem is in the Super FX emulation. I do not know the technical specs, but a lot of code data is transferred into ram (has something to do with it).
Then, code is executed in the ram, like the nmi:
Code:
*** NMI
$00/0108 5C 00 C0 7E JMP $7EC000[$7E:C000]   A:59FF X:00FE Y:0000
$7E/C000 78          SEI                     A:59FF X:00FE Y:0000
$7E/C001 C2 38       REP #$38                A:59FF X:00FE Y:0000
You notice that the code execution is in ram bank 7E/c000 and not, as usual in a rom bank.
For msu I needed to hook in this ram back to a rom bank, and think the emulation core of bsnes/higan does not like that, while snes9x accepts it.

Means... I must give up at this point and release the code exclusively for snes9x for now. There is no way to build my code in another way. If sd2snes ever gets Super FX support, I'm curious to see how this will behave.

but keep in mind that your patch is broken on every accurate emulator, let's cross ours fingers and hope that this is just an emulation oversight.
I'm happy with snes9x Very Happy broken patch or broken emulator... whatever... why is it so important for you to work with "accurate emulator" when sd2snes can't play it anyway? Sure, high compatibilty with all systems is nice, but maybe out of reach in this case.
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Fri 26 Jan 2018 - 1:25

Conn wrote:I'm happy with snes9x Very Happy broken patch or broken emulator... whatever... why is it so important for you to work with "accurate emulator" when sd2snes can't play it? Sure, high compatibilty with all system is nice, but maybe out of reach.

You do realize that theoretically higan or bsnes-plus are the closest representation of the real SNES hardware in software, right?

Sorry for nitpicking the subject, it isn't my intention to bother you, but if this isn't working on accurate emulators, there are high chances this isn't going to work on Real Hardware as well, in case SD2SNES finally adds Super FX support.

Of course, higan might be wrong on this one, but that's what we are going to find out.

You are more than welcome to accept it the way it is, but you have opened a whole can of worms that is interesting to an accuracy standpoint, and it's exactly that what moves the SNES hacking scene forward, if it wasn't for byuu seeking madly for accuracy, MSU-1 wouldn't even had existed. Wink
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 1:43

As said, I cannot do anything here. Devin Acker (bsnes dev) already replied and will look into it Very Happy

I give it out of my hands and concentrate on the pcm:s and the snes9x release. Nothing else I can do, sorry.
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Fri 26 Jan 2018 - 1:51

That's great news.

Really, wasn't expecting you to feel obligated to do anything, just pointing out how important it is to always having the real hardware as goal, so things always get improving Wink

I truly apologize if any hostil attitude went towards you, it's already wonderful to have this patch, I just want to ensure it will work on SD2SNES too in the future =)
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by pev Fri 26 Jan 2018 - 9:14

I'll keep hoping too, but the reality is there is just not enough space in the sd2snes's FPGA to squeeze FX support in there. Unless people want to sacrifice other support chips just to play a few FX games. I wouldn't.

All we can do is wait. If FX ever gets added, then my poor SNES can leave it's attic prison.

Sent from Topic'it App

pev

Super Mario World 2 (finished) Image211

Since : 2017-10-16

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 9:37

Alright, I followed an advice from Devin Acker to keep the msu code exectuted in ram, now it should work in bsnes and higan.

Redownload patch from first post.
The title screen runs at 30fps, and it seems in bsnes also the msu1 is run at half speed then (snes9x has not this problem). Please don't blame me for this.

daniloroxette, I also fixed a bug with the intro (when at night it played the wrong theme, please also redownload, and reapply the new patch) Wink

Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 13:49

Argh, just released a v3, not all spc were mute. Please re-download from first post.

The title screen theme has a quite small spc tune in night mode until it gets muted - I can't get rid of it - but it sounds like a sfx because you pressed start. That's ok Smile
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Fri 26 Jan 2018 - 14:53

Conn wrote:The title screen runs at 30fps, and it seems in bsnes also the msu1 is run at half speed then (snes9x has not this problem).

Like stated, Snes9x Super FX emulation is shitty, aside from being HLE, it probably bypass too many crucial hardware operations, if there isn't too much to process, it's likely going to be fast. On the other hand, higan/bsnes does its job, you need horse power to play it but at least future hardware compability is granted, supposedly.

pepillopev wrote:I'll keep hoping too, but the reality is there is just not enough space in the sd2snes's FPGA to squeeze FX support in there

It's way beyond that, what's the point of hacking a SNES game that is doomed to never, ever work on real hardware? You can't even call it a SNES game anymore if you are going to do stuff impossible for the SNES to render.

Also, and if anyone comes up with another FPGA? Or whatever Super FX + MSU-1 implementation? Too many efforts would be wasted for a single Win32 application, instead of a SNES rom hack.

Even the Snes9x authors themselves concur with this concept, given they are aware of their own faulty Super FX emulation:
https://board.byuu.org/viewtopic.php?f=8&t=1954

So yeah, with great power comes great responsibility Smile

now it should work in bsnes and higan

i was right then, interesting xD Razz
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 16:18

If you look into the asm the code isn't trivial. It took me a lot of effort to fix and get it done. Together with all the other stuff I took care of in the last days I reached my limits. I'll take care of maintenance if further bugs are present and be a helping hand for other projects if necessary, but that's it.
My personal list of games needing msu is done with this hack, and I'll reject any further request. Time for retirement +Smile
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Colines Fri 26 Jan 2018 - 16:46

If you look into the asm the code isn't trivial. It took me a lot of effort to fix and get it done.
I speak for everyone in here when I say how much grateful we all are for your efforts. =^.^=

You code is now to be served for future generations, who will get inspired for everything you've done Wink

The same way back in 2015 when you started it all, and gave birth to this recent MSU-1 wave, newcomers will have their minds in place and contribute even more, so not only Super FX or SA-1, but SPC7110, ST018, S-DD1, S-RTC and so on will all get improved =D

Thank you very much, and sorry being a PITA, but quality over quantity Wink
Colines
Colines

Super Mario World 2 (finished) Image111

Since : 2015-05-24

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by qwertymodo Fri 26 Jan 2018 - 17:33

Conn, thanks for sticking it out and getting it working in bsnes/higan! When I saw you were going to just leave it as Snes9x-only, all I could think was that we had the first MSU-1 equivalent of the ZSNES-only SMW music hacks, and that would have been really sad...
qwertymodo
qwertymodo

Super Mario World 2 (finished) Image212

Since : 2014-10-21

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Fri 26 Jan 2018 - 19:02

Thanks the both of you. I cross fingers that no further evil surprises emerge Wink but I tested most crucial places with only the msu file and no pcm and all was muted nicely so far (I needed to make different nmi countdown for long and short tracks) so the code is a bit fragile.
Also the msu test with dummy pcm:s went well, both snes9x and bsnes, so with luck this patch is accomplished Razz

As for snes9x, this still is my favorite emulator but I'm happy that all, snes9x, sd2snes and bsnes accept the format I release gamename.pcm without requiring additional files. If only higan would accept both gamename.pcm and track.pcm. But well with mercurial magic I create manifests in 5 minutes Very Happy
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Super Mario World 2 (finished) Empty Re: Super Mario World 2 (finished)

Post by Conn Sat 27 Jan 2018 - 6:04

Again, an update: I got rid of the short spc theme play (just a tune) at the title screen, so now it is a perfect mute in v4.

A strange occurence in snes9x: I updated my code, and the new code wasn't updated when restarting the game. First when I renamed my rom it took effect (renaming the rom back resulted in the old code again). It is the part of the code that needs to be shifted to ram, so maybe snes9x keeps the ram somewhere saved.
Conn
Conn

Super Mario World 2 (finished) Image212

Since : 2013-06-30

Back to top Go down

Page 1 of 3 1, 2, 3  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum