Views: 925,755,049
23 users online: Ahrion, AnisSaouliBH, armando3049,  Ayami,  Bench-kun, Black Goku, blueribbonhighlife, Boosius, DynastyLobster, Enan63, GRIMMKIN, Guhadeen_EB, HammerBrother, Hayashi Neru, Hwailaluta,  K.T.B.,  Maxodex, MiracleWater, Murphmario, NGB, TheJank, Vanessa,  xHF01x - Guests: 68 - Bots: 66 Users: 51,756 (2,055 active)
Latest: gellys
Tip: Use palettes that aren't difficult to look at. Clashing, overly-bright, or overly-dim colours may make your level difficult to play.
Not logged in.
Some program/library I started writing.
Forum Index - Sunken Ghost Ship - C3 Museum - Winter 2014 - Some program/library I started writing.
Pages: « 1 » Link
I would like to introduce/announce a small library I wrote during the last year. It started as a program which was capable of viewing Layer 1 and Layer 2 of each level of a (clean - it was only tested on those) SMW ROM. I am about to rewrite this program in a library and then write an application ontop of the library. Note that the library at this point does not do anything at all (does not compile) and the program does not do anything useful besides being a (open source) level viewer running natively under linux.

I am currently on a windows box, so here are screenshots from a windows build.

The project is on Github: (the master branch is the last working version of the program, the branch c_rewrite is the current branch under more or less active developement).
The tool is writen in horrible C++, the library is in C and uses a port of the 65816 emulation layer of byuu's bsnes/higan.

The library uses bsnes to run different parts of the ROM and reads the RAM afterwards. This makes life significantly easier as there is no need for hardcoding the layout of each object. This also means that ROM hackers could easily (within some limit of course) make changes to the level data format / routines which could be understood by the library/tool without any change to the code.

The tool is writen in Qt5 so it should be compilable on all platforms where you could reasonably hack SMW.

If you are interested in the code, take a look, but be warned, its ugly and unfinished. If you want to help, I am interested to know about the entrypoints of routines which write sprites in OAM, which would help me to render sprites. I think VitorViela did the necessary things with SpriteTip, with a similar aproach to mine (also using bsnes), but that is just guessing (I would be interested in the source code).

I am currently working on my university thesis and hope to resume work on this in a month.

Thank you for reading.

EDIT: I set up a build enviroment on a windows machine, so here you have a build:
Features: None, does crash randomly. To run you need a file named "smw.smc" containing a SMW ROM in the same directory. This file can be headered but this is not forced.

Your layout has been removed.
So, as a level viewer, what does this have that would make me want to use this over simply opening the rom in Lunar Magic? Are there any other features that you plan on adding in the future?
You can look into the source code and it runs natively on linux. These are both features not meant for a casual user but allows others/me to build other things with it. Note that still hard work is required.

For example:
- Level Editor (obvious)
- Online level viewer, by compiling the source with "emscripten" (google it, if you don't know this project, basically it compiles native c/c++ code into javascript)
- A random level generator. Has already be done, but only with the help of Lunar Magic
- Some kind of build system for SMW (e.g. a commandline tool for inserting levels into a ROM), this could help the process of collaboratly designing hacks.

If one wants to tackle these kinds of projects much research is needed. I looked at the code of many similar attempts to write an SMW level editor (, Newmoon These projects did not come very far, they stopped then reaching the point of loading map16, animated tiles and the actual rendering of objects. So my work is spiritually based on their work and solved to some degree these problems. I see it as a further step in the right direction (open source level editor/lunar magic).

TL;DR: There is no actual use, but maybe one time, someone will be interested in the code and use it as reference to make something useful.

Your layout has been removed.
Maybe someone could make an nghe level editor.
Originally posted by MercuryPenny
Maybe someone could make an nghe level editor.

Hell yes, that would be awesome.

This does seem useful as a reference for tools - an online level viewer sounds pretty interesting, for example, and I would like to see something being done with this.
Pages: « 1 » Link
Forum Index - Sunken Ghost Ship - C3 Museum - Winter 2014 - Some program/library I started writing.

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks