Language…
21 users online: Alex No,  AmperSam, Anas,  Anorakun, DanMario24YT, GiraffeKiller, Golden Yoshi, Green, Green Jerry, h.carrell, Hammerer, JikissGamer, MaffYuu, Maw, Metal-Yoshi94, playagmes169, Ray Hamilton, Rykon-V73,  StayAtHomeStegosaurus, Tulip Time Scholarship Games, Zatara - Guests: 299 - Bots: 483
Users: 64,795 (2,369 active)
Latest user: mathew

[Source Code] Super Mario World

Other

So wait... this C source code only compiles the game to an SNES ROM right now, right? It doesn't compile to a PC executable or something like that, right? At first I assumed it was the latter, but then I took a look at the code and noticed all the 65c816 ASM.

Nevertheless, this could certainly work as a base to get started on a port and it could also be helpful when looking for certain features (such as jump physics or whatever) you want to port to another game.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
It is largely unfinished so it compiles a SNES Rom still. Only a handful of functions were rewritten in C. In the current state, it is a hybrid C/ASM setup. The game uses assembly, but can call functions written in C by using the macro "CCALL". My idea was to convert a function to C, ensure it works properly then move onto the next. This makes the port identical and easier than trying to port the whole thing at once. WLA is the assembler, and the hacky TCC-65816 converts c code to WLA ASM. Here is an example of how the hybrid system works.

Code
Game.s -> palette loading routine
LoadPalette:
 LDA $00
 CCALL LoadLevelPal
 RET

Ccode.c -> c version of the ASM replaced
Void LoadLevelPal(void **pal)
 { ... Code ... }


As I mentioned, the hybrid setup shouldn't be looked at just as a proof of concept. If a bunch of people worked on this, each function could gradually be converted until the entire source is complete. However, many functions have to remain in ASM due to optimization problems. But even it it were kept on the SNES, this would allow people to write patches, sprites and other things in C whilst keeping the games core in ASM. This would bring many more people into coding, due to the wider knowledge of the language. Math is much easier. And the TCC includes a library for cos/sin and some other advanced math.
Super Mario World Source Code
well, If worried about slowdown, you might consider using a sa-1 rom version.
I had never considered SA-1, but that could very well be the answer. As well as a hacky fast emulator. Converting to SA-1 would be easy too, since the entire ram map is enumerated it would only take changing a few lines to remap it all.
Super Mario World Source Code
obviously you know more then I do about asm or c. I would say it's essential to have it (performance wise).
Yes also even for my minimal asm knowledge I find sa-1 conversion quite easy. I don't know if its handy, but some of newer patchs have a piece of code that converts addresses for you automatically. Not to mention the sa-1 patch comes with a ton of information. Also vitors bot can remap any address in question. ! .vb remap $**** will spit out an answer.
Is this still active?
Originally posted by zacmario
Is this still active?


Well, no. See the post further above.

Originally posted by galaxyhaxz
I however, will not be furthering any more in the world of SMW. So I've decided to make this final, but perhaps the next person will take the task into their own hands down the road.

Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I know, but we have spoke since then.. he was converting to use with sa-1. People come and go I guess
I no longer maintain this project. Haven't touched it for almost a year. The thought on SA1 was more speculation, should someone want to attempt it.

I found some files I thought were completely gone. The source code to my modded WLA. And the source of my modified bpp++, which adds in mode7 support for GFX27.bin and the like. There's a couple other things included regarding sources. If anyone wants to download it you can find it in my files or grab it here:
http://bin.smwcentral.net/u/26586/im_done_with_snes_stuff.7z

There's also a disassembly of the wind effect from SMB2J in asar format. Might be useful to put it in the sprites section.
Super Mario World Source Code
Oh, I misunderstood. The wind disassembley sounds neat, anything else like this that you have?
I had begun reversing the entire all stars as well. I disassembled a few sprites from SMB3 but can't find them anywhere. I had the roto disc, hammer Bros, sun, bosses, etc all finished. :(

The wind Sprite works best with levelasm, since you need to manually program the start and stop point of the wind. I had a level made like the snow slide from SM64, where the wind pushed you down an ice hill and the whole level you had to dodge objects. I really hate throwing all this work away. Oh well.
Super Mario World Source Code
Hm, yeah it is a shame really. Talent lost :( but if the interest isn't there, nothing you can do. The smb3 bosses would have come in handy, at some point I have permission and planned on porting smb3 a new journey to smw, but I'm still lacking some resources to do that.
I find this project a big game changer! For years Pokémon hackers were stuck with hex editors and hardcoded tools. Until the release of the Pokemon Red disassembly project:

https://github.com/huderlem/pokered

No DMCAs issued btw.

I know SMW has much better tools and support, but having the source gives so much more flexibility! I hope someone takes over this project. Gonna take a look at the code when I get more experience in SMW hacking.
I tried downloading this crap but I almost got a F**KING VIRUS!!!!! So screw this!
I'm never downloading ANYTHING from media fire again! So whatever you do, Do NOT go download this.
Originally posted by The Yak Smoker
I tried downloading this crap but I almost got a F**KING VIRUS!!!!! So screw this!
I'm never downloading ANYTHING from media fire again! So whatever you do, Do NOT go download this.


What are you getting on about? I know media fire isn't the best but it's pretty clear which button is the actual download.
Originally posted by Ninja Boy
Originally posted by The Yak Smoker
I tried downloading this crap but I almost got a F**KING VIRUS!!!!! So screw this!
I'm never downloading ANYTHING from media fire again! So whatever you do, Do NOT go download this.


What are you getting on about? I know media fire isn't the best but it's pretty clear which button is the actual download.

Sorry... I didn't even use Media Fire up until that point. So I didn't know what to do... Then I got scared when I might have clicked on the wrong thing. A pop up came in randomly.
I opened up task manager, that didn't work then I just turned of my computer ASAP. I thankfully didn't get any viruses or anything like that. So yeah... I'm not doing that again!
Originally posted by The Yak Smoker
So yeah... I'm not doing that again!

Try this. I uploaded it to my Mega folder.
HackPortsASM"Uploader"

probably a stupid question, but would it be possible to make a pc port of the game by compiling the game's source code into an EXE, kinda like how people did with Mario 64's source code?
That's not exactly how the SM64 port works. The code was converted in C or C++ I don't fully recall but then partially rewritten or code added to be allowed to work on PC along with being able to scale, mod and other things not originally doable.
This disassembly however, like the other main 3, are all written in Assembly which isn't easily converted into C or C++ and the download that's labeled C and not asar legacy is still using assembly it's the decoder and compilers which are written in C instead of using asar directly.
So the answer to this question is No, this can only end up making a snes game that would need to be run on an emulator or a Snes.
Originally posted by Ninja Boy
That's not exactly how the SM64 port works. The code was converted in C or C++ I don't fully recall but then partially rewritten or code added to be allowed to work on PC along with being able to scale, mod and other things not originally doable.
This disassembly however, like the other main 3, are all written in Assembly which isn't easily converted into C or C++ and the download that's labeled C and not asar legacy is still using assembly it's the decoder and compilers which are written in C instead of using asar directly.
So the answer to this question is No, this can only end up making a snes game that would need to be run on an emulator or a Snes.


ah, okay. thanks for clearing that up for me!

Other