Language…
25 users online:  AmperSam,  Anorakun, apache, B2De,  Blaagon, caioskii, Dennsen86, Ekimnoid, Fozymandias, GamesInTweed, GRIMMKIN, Heitor Porfirio,  idol, JudithPrietht, krizeth, LightAligns, mario90, Rykon-V73, SMW Magic,  Tahixham,  Teyla, The_Uber_Camper,  Thomas, VSmario90, Yuvi - Guests: 280 - Bots: 372
Users: 64,795 (2,374 active)
Latest user: mathew

ASM or C Programming?

Dunno which one's best for hacking.




YOU MAY ALSO FIND ME ON:
deviantArtdeviantArt

Major Hack In Progress - Click Here
-Work on warps and levels!

.






C is definitely more productive for large additions, but you'll need to know some ASM for applying edits (including a few edits to get your C code working). So for example, if I want to add entirely new enemies with complex behaviors I would use C, but if I just want to change the position of the HUD elements and change Mario's maximum hitpoints I would use ASM.

It's kind of a matter of opinion though. I think Kaze and Skelux have preferred using ASM for everything. Handwritten ASM code can be more efficient since you don't have to worry about the compiler inserting useless instructions, and you can opt to code your routines without stack frames since MIPS has so many registers. Also the tools for C are a little trickier to set up than the standalone assemblers we have for MIPS.
Having a lot of registers in MIPS is a good thing since you don't have to rely on the stack for loading and storing values as much. The efficiency boost you get from this is only a matter of a few clock cycles per instruction but it starts to make a difference in code that is used very frequently. SM64 and MK64 use this type of optimization for their MIO0 decoders. For most purposes, it isn't very important though.

With the configuration everyone is using right now, I believe there is 32Kb of free space following each decompressed MIO0 block and then many MB of free space following the data inserted by the importer patches at the end of the ROM (i.e. more than enough for everything).