Romhacking.net

Romhacking => Personal Projects => Topic started by: McDenDen on February 23, 2019, 03:56:40 pm

Title: My Neighbour Totoro (SMB1)
Post by: McDenDen on February 23, 2019, 03:56:40 pm
Hello folks,

I've been thinking for a while that there really should have been some Totoro games on classic consoles. I couldn't find anything so I thought I'd make something (if there are any Studio Ghibli hacks out there already I'd love to know). This is the first time I've done anything this extensive so I consider myself to be 'entry level' in this whole ROM hacking thing. This is a hack of Super Mario Bros. 1 on NES.

Where I am with this project;

Done
Character sprites and animations.
Backgrounds
Some levels
Some enemies
Title screen

ToDo
Music
More levels
More enemies
Update remaining original sprites
Ongoing refinement

If anyone has had any experience doing NES music on SMB, any pointers are appreciated. Also, if anyone can point me towards hacks with good level design that would be helpful, I'm in need of some inspiration! General thoughts and feedback also welcome.

Thanks,
Cakewarden.
Spoiler:
(http://den-mail.com/1.png) (http://den-mail.com/4.png) (http://den-mail.com/2.png) (http://den-mail.com/3.png)

Update 1 - 07/03

More levels completed - up to midway through world 2
Yubaba from Spirited Away to replace Bowser
Tweaked title screen
Few more enemy types
I am able to edit music - still working on composition.
Coins changed to acorns

Spoiler:
(http://den-mail.com/5.png) (http://den-mail.com/6.png) (http://den-mail.com/7.png) (http://den-mail.com/8.png) (http://den-mail.com/9.png)

Update 2 - 19/03

Some progress on the music, but it's slow progress. Not all notes are represented in all octaves from what I can see in the guides. :huh:
Levels for world 1 are complete, world 2 about 50%.
Minor graphical updates to question mark boxes etc.

Spoiler:

Video of music hacking experiment (https://youtu.be/Z2tY9UkPR6I)
Video of World 1 Levels (https://youtu.be/A5FORLG8Tz0)
Video of World 2 Levels (https://youtu.be/0a0vf8QyI9o)


(http://den-mail.com/12.png)(http://den-mail.com/13.png)(http://den-mail.com/14.png)(http://den-mail.com/15.png)(http://den-mail.com/16.png)

Update 3 - 02/04

Level design for the most part, experimenting with auto-scrolling levels and a bunch of stuff Eden GT sent my way.
Been having a look at the tool FCandChill has made, need to revisit the music properly and redo in FamiTracker to test that.
Had a play around with some backgrounds, trying to add a bit of depth to the levels. Still unsure, might tweak pallets or abandon that idea . . .
Might try and get a demo together to see if I can get any feedback on the level design . . . any takers?

Spoiler:
(http://den-mail.com/Woods.PNG)
Title: Re: My Neighbour Totoro (SMB1)
Post by: CountBuggula on February 23, 2019, 08:59:10 pm
Cute idea!  Normally I don't care much for total conversion-type mods or changing main characters in games, but I also love Studio Ghibli and you're right - there should have been some games along these lines.

What are you doing story-wise for this hack?  That will help guide you towards what you want for level design.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Vanya on February 23, 2019, 09:18:36 pm
Ha! That's pretty cool. I like it.
If I have any one suggestion it is to try to add something to the game play to differentiate it from the base game. Even if it is something as "simple" as a double jump ability to replace the fire flower or whatever.
Title: Re: My Neighbour Totoro (SMB1)
Post by: cralso on February 23, 2019, 09:31:58 pm
Heh this looks pretty nice, although I'm not a fan of SMB (although I considered SMB3 an really good game) I think could be great view something like this, ah, I haven't viewed yet this movie haha, but Studio Ghibli make great things indeed ;D

I would like view something like this idea but with Spirited Away.
 :woot!:
Title: Re: My Neighbour Totoro (SMB1)
Post by: DannyPlaysSomeGames on February 23, 2019, 11:21:24 pm
What a cute idea. As a fan of the original, this looks so nice and cuddly. Keep up the good work.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Midna on February 24, 2019, 02:57:42 am
I've been thinking for a while that there really should have been some Totoro games on classic consoles. I couldn't find anything so I thought I'd make something (if there are any Studio Ghibli hacks out there already I'd love to know).

This is because Hayao Miyazaki doesn't like video games, so he doesn't license Studio Ghibli's properties out for them. He did take a gamble once back in the mid-'80s and had a few games put out based on Nausicaa, but they were at best inadequate and at worst barely qualified as "games," and either way they didn't convince him it was worth the extra money.

The hack itself looks very cute, though. Hope it'll be fun! (And not like the Nausicaa games.)
Title: Re: My Neighbour Totoro (SMB1)
Post by: Timbo on February 24, 2019, 03:16:29 am
Ha! That's pretty cool. I like it.
If I have any one suggestion it is to try to add something to the game play to differentiate it from the base game. Even if it is something as "simple" as a double jump ability to replace the fire flower or whatever.

^This

Also, you should change the coins into acorns and the "?" images on the boxes into something else. Catbus face maybe...
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on February 24, 2019, 03:57:23 am
^This

Also, you should change the coins into acorns and the "?" images on the boxes into something else. Catbus face maybe...

I had been thinking that needed something. The fire ball has been changed to acorns already but I dunno, this isn't set in stone.

Love the idea of Catbus!
Title: Re: My Neighbour Totoro (SMB1)
Post by: Shade Aurion on February 24, 2019, 06:59:17 am
Maybe change the ? block into a leaf block maybe and give different power ups. As Timbo said, maybe a double jump? You could make it an umbrella power up ^_^ You could also make a yell attack instead of a fireball. I'll be keeping an eye on this one. Good work <3
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on February 24, 2019, 11:41:41 am
Maybe change the ? block into a leaf block maybe and give different power ups. As Timbo said, maybe a double jump? You could make it an umbrella power up ^_^ You could also make a yell attack instead of a fireball. I'll be keeping an eye on this one. Good work <3

Thanks, I did have a similar thought about an umbrella power up but I ran into issues with the amount of space I had and the limitations of the tiles.

I really like the yell attack idea although I have no idea how I would approach this. I might have to do some thinking on that . . .
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 07, 2019, 07:34:13 am
Update in original post.

Thanks for the feedback all, I'm trying to incorporate where I have the ability to do so.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Shade Aurion on March 07, 2019, 04:44:56 pm
Wow, this is coming along great! If I might add, perhaps turn used item boxes into rocks and maybe smashable bricks into dirt clods? Just to add to the natural aesthetic. Turning the pipes into trees looks really nice. Well done!
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 07, 2019, 06:26:49 pm
Wow, this is coming along great! If I might add, perhaps turn used item boxes into rocks and maybe smashable bricks into dirt clods? Just to add to the natural aesthetic. Turning the pipes into trees looks really nice. Well done!

Thanks - I like the idea of rocks and the more natural aesthetic. Just quickly knocked this up, think it needs a bit more work though.

(http://den-mail.com/11.png)
Title: Re: My Neighbour Totoro (SMB1)
Post by: Shade Aurion on March 08, 2019, 03:48:20 am
That immediately looks much better  :thumbsup:
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 10, 2019, 01:58:55 pm
This is a cute hack. Good job.

ToDo
Music
More levels
More enemies
Update remaining original sprites
Ongoing refinement

If anyone has had any experience doing NES music on SMB, any pointers are appreciated. Also, if anyone can point me towards hacks with good level design that would be helpful, I'm in need of some inspiration! General thoughts and

Dr. Floppy created a music guide on this game way back...
https://www.romhacking.net/documents/390/

and it was further elaborated on by w7n...
https://www.romhacking.net/documents/630/

As far as I know, most hackers insert their music in raw hex. I think that's annoying so I developed a C# application that converts FTM files to music data for Ninja Gaiden. Darkmoon2321 has it now and updated it, although the most recent version isn't on Github...

https://github.com/darkmoon2321/NGMusicConvert
Title: Re: My Neighbour Totoro (SMB1)
Post by: Eden.GT on March 13, 2019, 06:44:09 am
Holy shit dude. I haven't seen such a high-quality SMB Hack that has given me this sort of vibes:
https://www.youtube.com/watch?v=Kn_qjEy5pO8
Especially all the graphical execution. Changing the music as well? Extra points!

I'll share some more resources you might find useful via DMs.
Title: Re: My Neighbour Totoro (SMB1)
Post by: eyeballkid on March 13, 2019, 10:04:05 am
This is because Hayao Miyazaki doesn't like video games, so he doesn't license Studio Ghibli's properties out for them. He did take a gamble once back in the mid-'80s and had a few games put out based on Nausicaa, but they were at best inadequate and at worst barely qualified as "games," and either way they didn't convince him it was worth the extra money.

Isn't Ni no Kuni a collaboration between Ghibli and Level 5?
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 13, 2019, 03:37:39 pm
This is a cute hack. Good job.

Dr. Floppy created a music guide on this game way back...
https://www.romhacking.net/documents/390/

and it was further elaborated on by w7n...
https://www.romhacking.net/documents/630/

As far as I know, most hackers insert their music in raw hex. I think that's annoying so I developed a C# application that converts FTM files to music data for Ninja Gaiden. Darkmoon2321 has it now and updated it, although the most recent version isn't on Github...

https://github.com/darkmoon2321/NGMusicConvert

Thanks for the pointers, I'm working through the guides. I have been able to update the various audio channels but the music is only in sheet music format that I can find. I can't read sheet music so it's a bit trail and error getting it into the game and transcribing it. I am using hex.

I really like the idea of an FTM converter. From what I understand the music is quite specific to each game so I think it might be a lot of time to understand the tool and change the application to SMB, also, I don't know C#. But it's really cool that this has been done for any game at all  :thumbsup:

March 13, 2019, 03:52:24 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Holy shit dude. I haven't seen such a high-quality SMB Hack that has given me this sort of vibes:
https://www.youtube.com/watch?v=Kn_qjEy5pO8
Especially all the graphical execution. Changing the music as well? Extra points!

I'll share some more resources you might find useful via DMs.

Thanks  :laugh:

Cheers for the resources  :woot!:
Title: Re: My Neighbour Totoro (SMB1)
Post by: CountBuggula on March 13, 2019, 04:33:48 pm
I have been able to update the various audio channels but the music is only in sheet music format that I can find. I can't read sheet music so it's a bit trail and error getting it into the game and transcribing it. I am using hex.

All the Studio Ghibili midis you could possibly want. (http://www.wingsee.com/ghibli/totoro/music.html)  Obviously you can't convert straight from the midis, but it's probably a way better start than sheet music.
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 13, 2019, 06:22:48 pm
.

March 18, 2019, 09:06:48 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Update in original post.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Googie on March 19, 2019, 01:27:27 pm
Really smooth graphics, this hack is coming along pretty nicely, good job on this hack.  :thumbsup:
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 20, 2019, 08:27:58 pm
Thanks for the pointers, I'm working through the guides. I have been able to update the various audio channels but the music is only in sheet music format that I can find. I can't read sheet music so it's a bit trail and error getting it into the game and transcribing it. I am using hex.

I really like the idea of an FTM converter. From what I understand the music is quite specific to each game so I think it might be a lot of time to understand the tool and change the application to SMB, also, I don't know C#. But it's really cool that this has been done for any game at all  :thumbsup:

Thanks and no problem. I coded the converter for Ninja Gaiden in two days. One day to read the Famitracker text file and the other to converter it to hex and dump to a binary file, albeit there was bugs. Darkmoon has an updated version that writes to the ROM but it's not on GitHub.

I just looked at the guides. To put it nicely, the sound engine for this game looks awful... The bytes values assign to each note are all over the place. Maybe I'll find some motivation to make a converter... The fact length and note data are in one byte with zero formatting will make for some "interesting" code...

March 20, 2019, 08:29:40 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
All the Studio Ghibili midis you could possibly want. (http://All the Studio Ghibili midis you could possibly want.)  Obviously you can't convert straight from the midis, but it's probably a way better start than sheet music.

Your URL is broken, FYI.
Code: [Select]
[url=http://All the Studio Ghibili midis you could possibly want.]
Title: Re: My Neighbour Totoro (SMB1)
Post by: Shade Aurion on March 21, 2019, 03:46:12 pm
As another suggestion, if you didn't want to add the Umbrella as a power up item, you could have it as a level exit instead of the flag pole and shrine entrance. Instead you could have Satsuki and Mei waiting and once Totoro picks up the umbrella, he roars and flies away, perhaps with the girls clutching him. Perhaps you could even have it rain near the end of the level so levels end with him accepting an umbrella from the girls.

I don't really know what you have planned for the plot but I imagine if you're planning on Totoro saving Mei, you could substitute Toad in each castle for another Ghibli character and have the Batbus come and take Totoro to the next level? Have Mei in the final castle and have Totoro take her and Satsuki home?

I dunno man, i'm just spitballing here. I assume you'll add 'TOTORO' to the HUD instead of 'TOTOR' at some point. I assume its just because you edited out 'MARIO' lol

Its looking great and coming along well  :thumbsup:
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 21, 2019, 05:13:52 pm
Really smooth graphics, this hack is coming along pretty nicely, good job on this hack.  :thumbsup:

Thanks  :)

March 21, 2019, 05:29:38 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Thanks and no problem. I coded the converter for Ninja Gaiden in two days. One day to read the Famitracker text file and the other to converter it to hex and dump to a binary file, albeit there was bugs. Darkmoon has an updated version that writes to the ROM but it's not on GitHub.

I just looked at the guides. To put it nicely, the sound engine for this game looks awful... The bytes values assign to each note are all over the place. Maybe I'll find some motivation to make a converter... The fact length and note data are in one byte with zero formatting will make for some "interesting" code...

Wow, 2 days?! I can code a bit but nothing that quick. I have great respect for folks like yourself in the scene who make these tools so chaps like me can edit some ROMs.

I've been finding the sound engine to be a bit harder to contend with than expected. I'm having to move the music a whole step so I can land it on notes that actually exist within the engine. The whole headers/pointers thing is still abstract to me, I need to work with that a bit more to understand.

If you find the motivation to create a music tool, I'd be happy to test it. I've been using famitracker to do quick compositions to try and smooth out some of the timing. There are three coding standards from what I can see in the guides, SQ1 and TRI appear to be the same, SQ2 differs insofar that note length is a property of the value rather than a tempo value defined initially. There is also another coding scheme for NOI channel for percussion and stuff.

March 21, 2019, 05:40:19 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
As another suggestion, if you didn't want to add the Umbrella as a power up item, you could have it as a level exit instead of the flag pole and shrine entrance. Instead you could have Satsuki and Mei waiting and once Totoro picks up the umbrella, he roars and flies away, perhaps with the girls clutching him. Perhaps you could even have it rain near the end of the level so levels end with him accepting an umbrella from the girls.

I don't really know what you have planned for the plot but I imagine if you're planning on Totoro saving Mei, you could substitute Toad in each castle for another Ghibli character and have the Batbus come and take Totoro to the next level? Have Mei in the final castle and have Totoro take her and Satsuki home?

I dunno man, i'm just spitballing here. I assume you'll add 'TOTORO' to the HUD instead of 'TOTOR' at some point. I assume its just because you edited out 'MARIO' lol

Its looking great and coming along well  :thumbsup:

Thanks :)

I really like your ideas and would like to implement them. I just don't have the ability to do so  :'(

But yes - I was thinking of Mei to replace the Princess sprite but just chucked in another small Totoro as a placeholder. I was perhaps entertaining changing the flag pole for the bus stop.

Yes the name on the HUD. That pesky 5 character limit. I have got a solution to this where I could use 5 tiles for 6 characters, but there are a few other bits I need to work thorough before I can hit that.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Shade Aurion on March 21, 2019, 08:35:09 pm
Give it time and mention in the original post that you are seeking those with experience hack SMB to aid you in implementing features you can't do on your own. I've seen hacks go well passed what hackers had hoped to make once they got help from the right person. Still, what you've done is amazing and you should be very proud man <3
Title: Re: My Neighbour Totoro (SMB1)
Post by: CountBuggula on March 22, 2019, 02:52:31 pm
Your URL is broken, FYI.
Code: [Select]
[url=http://All the Studio Ghibili midis you could possibly want.]

That's really bizarre.  It wasn't like that before, because McDenDen was able to follow the link previously.  Anyways, fixed it.  If it breaks again, here's the full url I was pointing to:
http://www.wingsee.com/ghibli/totoro/music.html
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 24, 2019, 05:42:27 pm
Thanks  :)

March 21, 2019, 05:29:38 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Wow, 2 days?! I can code a bit but nothing that quick. I have great respect for folks like yourself in the scene who make these tools so chaps like me can edit some ROMs.

I've been finding the sound engine to be a bit harder to contend with than expected. I'm having to move the music a whole step so I can land it on notes that actually exist within the engine. The whole headers/pointers thing is still abstract to me, I need to work with that a bit more to understand.

If you find the motivation to create a music tool, I'd be happy to test it. I've been using famitracker to do quick compositions to try and smooth out some of the timing. There are three coding standards from what I can see in the guides, SQ1 and TRI appear to be the same, SQ2 differs insofar that note length is a property of the value rather than a tempo value defined initially. There is also another coding scheme for NOI channel for percussion and stuff.

Found some motivation to code a part of it. I'm using the code from my Ninja Gaiden converter. There's actually a method to the madness for the notes on square 1...

Code: [Select]
    private byte ConvertNoteSquare1(string Note, int Length, out bool isBlank)
    {
        isBlank = false;

        byte FirstNibble = 0, LastNibble = 0;

        if (!string.IsNullOrEmpty(Note))
        {
            switch (Note)
            {
                case "B#4": FirstNibble -= 0x0; LastNibble = 0xE; break;
                case "A#4": FirstNibble -= 0x0; LastNibble = 0xC; break;
                case "G-4": FirstNibble -= 0x0; LastNibble = 0xA; break;
                case "F#4": FirstNibble -= 0x0; LastNibble = 0x8; break;
                case "F-4": FirstNibble -= 0x0; LastNibble = 0x6; break;
                case "E-4": FirstNibble -= 0x0; LastNibble = 0x4; break;
                case "E#4": FirstNibble -= 0x0; LastNibble = 0x2; break;
                case "D-4": FirstNibble -= 0x0; LastNibble = 0x0; break;
                case "C-4": FirstNibble -= 0x0; LastNibble = 0xC; break;
                case "B-3": FirstNibble -= 0x1; LastNibble = 0xA; break;
                case "B#3": FirstNibble -= 0x1; LastNibble = 0x8; break;
                case "A-3": FirstNibble -= 0x1; LastNibble = 0x6; break;
                case "G-3": FirstNibble -= 0x1; LastNibble = 0x2; break;
                case "F#3": FirstNibble -= 0x1; LastNibble = 0x0; break;
                case "F-3": FirstNibble -= 0x1; LastNibble = 0xE; break;
                case "E-3": FirstNibble -= 0x1; LastNibble = 0xC; break;
                case "E#3": FirstNibble -= 0x1; LastNibble = 0xA; break;
                case "D-3": FirstNibble -= 0x1; LastNibble = 0x8; break;
                case "C-3": FirstNibble -= 0x1; LastNibble = 0x4; break;
                case "B-2": FirstNibble -= 0x2; LastNibble = 0x2; break;
                case "B#2": FirstNibble -= 0x2; LastNibble = 0x0; break;
                case "A#2": FirstNibble -= 0x2; LastNibble = 0xE; break;
                case "G-2": FirstNibble -= 0x2; LastNibble = 0xC; break;
                case "F#2": FirstNibble -= 0x2; LastNibble = 0xA; break;
                case "F-2": FirstNibble -= 0x2; LastNibble = 0x8; break;
                case "E-2": FirstNibble -= 0x2; LastNibble = 0x6; break;
                case "---": FirstNibble -= 0x2; LastNibble = 0x4; break;
                case "D-6": FirstNibble -= 0x2; LastNibble = 0x2; break;
                case "???": FirstNibble -= 0x0; LastNibble = 0x0; break;
                default: throw new Exception();
            }

            switch (Length)
            {
                case LENGTH1: FirstNibble += 0x3; Data -= 0x00; break;
                case LENGTH4: FirstNibble += 0x3; Data -= 0x01; break;

                case LENGTH6: FirstNibble += 0xB; Data -= 0x00; break;
                case LENGTH2: FirstNibble += 0xB; Data -= 0x01; break;

                case LENGTH8: FirstNibble += 0x7; Data -= 0x00; break;
                case LENGTH3: FirstNibble += 0x7; Data -= 0x01; break;

                case LENGTH5: FirstNibble += 0xF; Data -= 0x00; break;
                case LENGTH7: FirstNibble += 0xF; Data -= 0x01; break;
                default: throw new Exception();
            }
        }
        else isBlank = true;

        return (byte)((FirstNibble << 4) + LastNibble);
    }

The last note (labelled "???") seems to be glitched in the SMB1 sound engine. Sometimes it will be A#.

I really like your ideas and would like to implement them. I just don't have the ability to do so  :'(

But yes - I was thinking of Mei to replace the Princess sprite but just chucked in another small Totoro as a placeholder. I was perhaps entertaining changing the flag pole for the bus stop.

Yes the name on the HUD. That pesky 5 character limit. I have got a solution to this where I could use 5 tiles for 6 characters, but there are a few other bits I need to work thorough before I can hit that.

I recommend learning ASM. I recently learned ASM from this guide.
https://skilldrick.github.io/easy6502/

With the help of this guide. I finished all the ASM hacking for a SNES translation.

Fortunately, you won't have to dissemble any code. The game is rather popular and there's a disassembly...
https://gist.github.com/1wErt3r/4048722

The "MARIO" text is stored under "TwoPlayerGameOver", "TopStatusBarLine", and "TwoPlayerTimeUp".

Meanwhile, the pointers are located under "GameTextOffsets". While the pointer table offset isn't specified in the document, there's byte data directly above that you can search for in the ROM to pinpoint the location. Do note that the string "MARIO" is duplicated twice, judging by the disassembly. Make the pointers point to one string and use the extra space.
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 26, 2019, 05:46:17 pm
I recommend learning ASM. I recently learned ASM from this guide.
https://skilldrick.github.io/easy6502/

With the help of this guide. I finished all the ASM hacking for a SNES translation.

Fortunately, you won't have to dissemble any code. The game is rather popular and there's a disassembly...
https://gist.github.com/1wErt3r/4048722

The "MARIO" text is stored under "TwoPlayerGameOver", "TopStatusBarLine", and "TwoPlayerTimeUp".

Meanwhile, the pointers are located under "GameTextOffsets". While the pointer table offset isn't specified in the document, there's byte data directly above that you can search for in the ROM to pinpoint the location. Do note that the string "MARIO" is duplicated twice, judging by the disassembly. Make the pointers point to one string and use the extra space.

I've been picking through the disassembly and experimenting with some RAM values. I'll try and find some time at the weekend to look through the ASM docs, thanks for sharing these.

Let me know how you get on with the converter, I think I get the gist of your code, looks like it covers the dotted quarter notes? but I'm no developer. Looks like very promising stuff!
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 26, 2019, 11:29:04 pm
I've been picking through the disassembly and experimenting with some RAM values. I'll try and find some time at the weekend to look through the ASM docs, thanks for sharing these.

Let me know how you get on with the converter, I think I get the gist of your code, looks like it covers the dotted quarter notes? but I'm no developer. Looks like very promising stuff!

Just coded again today. Just like with my Ninja Gaiden converter, I dump the translated data to BIN files. The translation is near completion. Here's the current output for the intro to the main theme:

https://mega.nz/#!XrpmWSjA!QHc3ZV4M2naNiUzs4H6PhBOxn0lYGkQBFTQZLSYf6cg

So far, all the channels match the ROM's, except for the noise channel...

March 26, 2019, 11:53:32 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I decided to create a repo for the project...

https://bitbucket.org/FCandChill/smb1musicconverty
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 28, 2019, 04:50:14 pm
Just coded again today. Just like with my Ninja Gaiden converter, I dump the translated data to BIN files. The translation is near completion. Here's the current output for the intro to the main theme:

https://mega.nz/#!XrpmWSjA!QHc3ZV4M2naNiUzs4H6PhBOxn0lYGkQBFTQZLSYf6cg

So far, all the channels match the ROM's, except for the noise channel...

March 26, 2019, 11:53:32 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I decided to create a repo for the project...

https://bitbucket.org/FCandChill/smb1musicconverty


This is a seriously cool project you have on the go here  :thumbsup: I've had a look at the files in Visual Studio. I think I generally get what the code is trying to achieve but not sure how to use it. I was able to build an exe from it, don't know what to do from there though.

Any pointers? I have an FTM I would like to try and run through it.
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 28, 2019, 06:02:25 pm

This is a seriously cool project you have on the go here  :thumbsup: I've had a look at the files in Visual Studio. I think I generally get what the code is trying to achieve but not sure how to use it. I was able to build an exe from it, don't know what to do from there though.

Any pointers? I have an FTM I would like to try and run through it.

Yeah, sorry for not commenting any of the code ... or having a readme! :P

Basically, the program only accepts famitracker files as TXT files, not FTM. You have to export your song as a TXT in famitracker.

The program is a commandline utility. You have to specify one argument: the path to your TXT file. At this point, the program will read the text file and store all the data in a data structure. Then it will read every line of the data structure and convert it to binary data.

The program stores notes and other things in two variables. One for the previously read and one for the currently read. To get the length of a note, I have to read ahead until I hit another note. When I hit another note, I can calculate the length of the note.

As for the note translation code, I couldn't explain it to you. I saw a pattern in how the game was storing its notes. The NOISE channel translation is still broken. I'm busy with other projects, perhaps you could fix it?

March 28, 2019, 06:40:23 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I updated the repo's readme. I also included a sample FTM file I used for testing. I haven't tested extensively, but it's a really good start.

I do have some further ideas. Writing to the ROM and having a GUI to manage the instruments for each song sounds good.

But for right now ... I'm working with Her-Saki for a Metal Slader Glory translation. This is a side project that I coded in some spare time. Seeing a cool hack was a good motivator though, so I do have a desire to continue with it ... but progress will be slow.
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on March 30, 2019, 10:11:07 am
Yeah, sorry for not commenting any of the code ... or having a readme! :P

Basically, the program only accepts famitracker files as TXT files, not FTM. You have to export your song as a TXT in famitracker.

The program is a commandline utility. You have to specify one argument: the path to your TXT file. At this point, the program will read the text file and store all the data in a data structure. Then it will read every line of the data structure and convert it to binary data.

The program stores notes and other things in two variables. One for the previously read and one for the currently read. To get the length of a note, I have to read ahead until I hit another note. When I hit another note, I can calculate the length of the note.

As for the note translation code, I couldn't explain it to you. I saw a pattern in how the game was storing its notes. The NOISE channel translation is still broken. I'm busy with other projects, perhaps you could fix it?

March 28, 2019, 06:40:23 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I updated the repo's readme. I also included a sample FTM file I used for testing. I haven't tested extensively, but it's a really good start.

I do have some further ideas. Writing to the ROM and having a GUI to manage the instruments for each song sounds good.

But for right now ... I'm working with Her-Saki for a Metal Slader Glory translation. This is a side project that I coded in some spare time. Seeing a cool hack was a good motivator though, so I do have a desire to continue with it ... but progress will be slow.

Cool - I'll try and get some time to have a look over the NOI channel. As I said, I'm not a dev and don't really know C# at all, but I'll see what I can work out and update where I can

I'll also try my files at TXT into the tool to see if I get the same output that I have manually done in hex.

Thanks for sharing what you have done so far, it's really interesting to see how these things work in the background :)
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on March 30, 2019, 11:18:39 am
Cool - I'll try and get some time to have a look over the NOI channel. As I said, I'm not a dev and don't really know C# at all, but I'll see what I can work out and update where I can

I'll also try my files at TXT into the tool to see if I get the same output that I have manually done in hex.

Thanks for sharing what you have done so far, it's really interesting to see how these things work in the background :)

The conversion code is located in the "ConvertToSMB1.cs" file. The noise conversion code is located in the "ConvertNoteNoise" function at the way bottom... To date, the function is 40 lines of code.

To debug it, use breakpoints...
https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2017

If you want to test note conversion quickly, call the noise function at line 27.
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on April 01, 2019, 08:01:15 pm
The conversion code is located in the "ConvertToSMB1.cs" file. The noise conversion code is located in the "ConvertNoteNoise" function at the way bottom... To date, the function is 40 lines of code.

To debug it, use breakpoints...
https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2017

If you want to test note conversion quickly, call the noise function at line 27.

I got it working on the test file you sent, my file throws an error but I'm guessing it's probably my file rather than the tool. Trying to find my feet with it though. Cheers for the pointers, will and try to get into the code over the next week or so.  :)
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on April 01, 2019, 11:19:13 pm
I got it working on the test file you sent, my file throws an error but I'm guessing it's probably my file rather than the tool. Trying to find my feet with it though. Cheers for the pointers, will and try to get into the code over the next week or so.  :)

I updated the exceptions to include error messages...
https://bitbucket.org/FCandChill/smb1musicconverty/commits/a78a94a27c3dd78b11d6881ee6f7ea3a84b726a8

The console window writes what measure and line it's on. It will help determine what the issue is. Chances are, your song is using a note length that' not supported in the sound engine. So you'll have to adjust the song... If the program is throwing an exception that's not in my code, then there's a problem with my code.
Title: Re: My Neighbour Totoro (SMB1)
Post by: McDenDen on April 04, 2019, 07:57:29 am
The conversion code is located in the "ConvertToSMB1.cs" file. The noise conversion code is located in the "ConvertNoteNoise" function at the way bottom... To date, the function is 40 lines of code.

To debug it, use breakpoints...
https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2017

If you want to test note conversion quickly, call the noise function at line 27.

I'm not sure there is an issue with the NOI encoding . . .

I've looked at the output of your test file for channel 03 which was;

11 90 21 90 21 51 21 90 90 90

I think you are probably trying to match to the ROM at  address 7B2A which is;

31 90 31 90 31 71 31 90 90 90


Looking at your test file, and working back from the w7n guide, it seems like some of the kick notes were hats or snares which doesn't align to the original ROM. I have updated the test file to NOI and as far as I can see it now aligns to the ROM. And checking the expected error, these are correct to what they are respectively representing i.e. 8th note snare/ko is showing as 21 etc.

I've put an update to the FTM file SMB1-Update.ftm (http://den-mail.com/SMB1-Update.ftm)

So I think this is the input rather than your code but please review to see if you come to the same conclusion.

Edit - I've tested on another file, not sure if these help for reference, but the output from the converter for the NOI is what I would expect to see had I done this manually with the w7n guide.

FTM and output ZIP (http://den-mail.com/Somparo.zip)
Title: Re: My Neighbour Totoro (SMB1)
Post by: FCandChill on April 04, 2019, 06:59:13 pm
Thank you for investigating! The instruments were indeed transposed in the test file. It's all fixed now. Make sure to use my test file as a base because I did switch instruments.

The up-to-date code is here...
https://bitbucket.org/FCandChill/smb1musicconverty

I updated the noise code to be more explicit about which instrument is which.
Title: Re: My Neighbour Totoro (SMB1)
Post by: SuperStarFox on April 07, 2019, 09:19:21 pm
To Edit Totoro's Name From "Totor" to "Totoro"... I Found This That Can Help You!

Link: https://www.romhacking.net/utilities/690/

Link: https://www.romhacking.net/utilities/72/
Title: Re: My Neighbour Totoro (SMB1)
Post by: Eden.GT on April 08, 2019, 05:36:28 am
To Edit Totoro's Name From "Totor" to "Totoro"... I Found This That Can Help You!

Link: https://www.romhacking.net/utilities/690/

Link: https://www.romhacking.net/utilities/72/

Only except that these simple tools only replace text and not expand the character limit overall. No trace of code switching involved here.
Title: Re: My Neighbour Totoro (SMB1)
Post by: Googie on April 10, 2019, 03:17:12 pm
Glad to see this is still being worked on, can't wait for the final product. :thumbsup: