Romhacking.net

Romhacking => Programming => Topic started by: Madsiur on February 07, 2016, 03:18:48 pm

Title: A call for source code!
Post by: Madsiur on February 07, 2016, 03:18:48 pm
For learning, archival, curiosity purposes and to help me in my next programming project, I'd like SNES / GBA ROM hacking related source code suggestions / links.

General and game specific related utilities that pertain to all utilities categories on RHDN are relevant.

Anything that has to do with graphics, sound, assembly and compression, debugging, converters on SNES and GBA is welcome. DS utilities would also be relevant if they include GBA related features. Now I know there's ton of open-source emulators builds and my goal is not to collect them all, I'm just interested in the code of those that have unique feature or are the most complete.

I also know there's a lot of GBA homebrew C or assembly stuff classes/utilities sources or repositories (e.g. on GitHub), my goal is once again not to collect every existing ones but maybe having the most relevant ones. I pretty much checked everything that is on GitHub that had "SNES" or "GBA" in the repository name so please exclude those unless it is something hard to find. GBA homebrew games C code would also be relevant, I got a few of those as well but haven't found a central place where they are hosted. Specific libraries could also be relevant, depending what they do. All coding languages accepted!

Thanks to everyone who will suggest something!  :)


Already in possession of:

Emulators

Others


Title: Re: A call for source code!
Post by: SunGodPortal on February 07, 2016, 03:23:10 pm
Find the source code for Hyrule Magic and then plaster it all over the net.
Title: Re: A call for source code!
Post by: FAST6191 on February 07, 2016, 03:36:01 pm
http://problemkaputt.de/gbatek.htm
https://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#Graphics%20Hardware%20Overview
http://www.coranac.com/tonc/text/asm.htm
I suppose I can pimp some of my own stuff
http://www.romhacking.net/forum/index.php?topic=14708.0

It does not have source (though realistically the no$gba specs will do what you want) but for graphics then http://filetrip.net/nds-downloads/utilities/download-oam-calculator-1-0-f29054.html is worth having, though it is geared more towards the DS (very similar but with a few extras).

For SNES I do not have much and it sounds like you already have stuff like https://en.wikibooks.org/wiki/Super_NES_Programming
Title: Re: A call for source code!
Post by: Revenant on February 07, 2016, 04:07:13 pm
self-promotion time!

https://github.com/devinacker/bsnes-plus
https://github.com/devinacker/xkas-plus
https://github.com/devinacker/kdceditor
https://github.com/devinacker/exhal
Title: Re: A call for source code!
Post by: tvtoon on February 07, 2016, 05:06:52 pm
There is a devkit stuff called TOCA, with many examples of source code for GBA coding. I don't remember the site, but I do have it archived here, if you need. ;)

DS is really easy to find stuff over the net, including homebrew games on repositories like SourceForge.
Title: Re: A call for source code!
Post by: Madsiur on February 07, 2016, 06:34:34 pm
Find the source code for Hyrule Magic and then plaster it all over the net.

I just read that and now I understand: http://www.zeldix.net/t448-source-code-for-hyrule-magic

I won't judge people that decide their utilities to be freeware rather than open-source (with a GNU license or equivalent). Is there more drama behind that specific story?

@FAST6191: Yeah I got most of those and they can get me where I want. I'll admit in some case it would be partially for inspiration with proper credit (call me lazy if you want) but also a more general interest toward programming or as an example how in code transforming Image format X to GBA graphic binary. Same goes for compression stuff. I know I could do with moderate or hard work and with help of existing documentation do things for my project that some have already done. They say the best learning method is to solve the puzzle yourself though.

But this thread has a more general goal that has also to do with my OCD side of collecting stuff on my computer.

@Revenant: Thanks! I'll look at those projects later!

There is a devkit stuff called TOCA, with many examples of source code for GBA coding.

I'll look into that. I found also a few homebrew GBA roms with their source C code but they are scattered on obscure personal blogs or pages. 
Title: Re: A call for source code!
Post by: chillyfeez on February 07, 2016, 06:46:40 pm
Pretty sure Pinkpuff made the source for FF4kster public.
I don't know (non-ASM) programming, though, so I didn't pay it much mind at the time.
Should be somewhere in the FF4kster thread over on the slick forum, I think.
Title: Re: A call for source code!
Post by: SunGodPortal on February 07, 2016, 07:36:15 pm
Quote
I won't judge people that decide their utilities to be freeware rather than open-source (with a GNU license or equivalent). Is there more drama behind that specific story?

I think most of us are just pissed off because it's the only editor for this game and despite it being unfinished and abandoned the author won't let anyone finish it. That means many bugs and a number of features that do little more than destroy your ROM or important parts of its functionality.
Title: Re: A call for source code!
Post by: Madsiur on February 07, 2016, 08:03:19 pm
Pretty sure Pinkpuff made the source for FF4kster public.

Now I remember having seeing that. Thanks!
Title: Re: A call for source code!
Post by: dougeff on February 08, 2016, 12:42:53 am
undisbeliever has a blog and github on programming homebrew games for SNES, lots of great source code...

https://github.com/undisbeliever
http://undisbeliever.net/blog/
Title: Re: A call for source code!
Post by: magicalpatcher on February 08, 2016, 01:01:30 pm
Probably the best ARM assembler for large ROM hacking projects: https://github.com/Kingcom/armips (https://github.com/Kingcom/armips)
Title: Re: A call for source code!
Post by: MisterJones on February 09, 2016, 01:03:54 pm
https://github.com/devinacker/kdceditor

I didnt even know there was a KDC editor. Thats incredibly awesome! Thanks aso much for this.
Title: Re: A call for source code!
Post by: phonymike on February 13, 2016, 04:02:11 am
Snes SRAM checksum fixer. Fixes 10 popular games' SRAM files' checksums. Use a hex editor to modify .srm files, then use this to fix the checksum so the game will recognize it. C source included.
http://phonymike.com/files/snessum.zip

NBA Jam TE portrait inserter beta + C source. Inserts an 8bit, 32 color BMP into the game. Not user friendly but you wanted source code so here is some. The beta will also dump portraits to .bmp except 31 portraits which are compressed.
http://phonymike.com/files/jam.zip

GBA intro inserter. Compresses then inserts your homebew code into another game. Just return from int main() from your code. Writes some ARM assembly opcodes, pretty cool. C source included.
http://phonymike.com/files/inserter.zip

Demon's Crest password generator beta. Made with Visual C# 2013, requires .net framework 3.5. Includes source code and uncommented memory values.
http://phonymike.com/files/DemonCrest.zip

The two below are up at Zophar's. They work on windows XP, written in Visual Basic 6 or some super old thing. Really cool but outdated, I can't get them to even run on windows 7. Ancient (2001) source code included. Good luck.
http://phonymike.com/saveram/metroid3_saveram_editor.zip
http://phonymike.com/saveram/zelda3_saveram_editor.zip
Title: Re: A call for source code!
Post by: SunGodPortal on February 13, 2016, 04:12:32 am
Quote
Demon's Crest password generator beta. Made with Visual C# 2013, requires .net framework 3.5. Includes source code and uncommented memory values.
http://phonymike.com/files/DemonCrest.zip

Just here to say that it's nice to see Demon's Crest get some love too. Very cool game.
Title: Re: A call for source code!
Post by: henke37 on February 13, 2016, 01:57:01 pm
My nitendo ds library (https://www.assembla.com/code/sdat4as/subversion/nodes/Nitro).
Title: Re: A call for source code!
Post by: Madsiur on February 13, 2016, 07:48:43 pm
Thanks @dougeff, @magicalpatcher, @phonymike and @henke37. I'll be examining those utilities/libraries soon enough.