Dirbaio |
Posted on 10-05-14, 06:44 pm in Actor Table
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4245/4458 Since: 06-08-11 |
Dirbaio |
Posted on 10-15-14, 12:52 pm in No$gba debugger is now freeware!
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4248/4458 Since: 06-08-11 |
Guys please STOP the no$gba vs desmume flamewars, it's completely stupid.
|
Dirbaio |
Posted on 11-17-14, 06:04 pm in List of Ask Threads (on NSMBHD)
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4259/4458 Since: 06-08-11 |
Posted by Tierage But if we work together, we can stop this disease once and for all. Stop it? A disease? NEVER. Hey, I'm going to answer all super-old questions on my Ask Thread. |
Dirbaio |
Posted on 04-15-15, 04:49 am in Is the NSMB Hacking Domain dying?
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4274/4458 Since: 06-08-11 |
hahaha <3
I'll try to be more alive for sure! |
Dirbaio | |
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4276/4458 Since: 06-08-11 |
What the...??
I think it's a race condition when saving. There were two rows in the table with the same revision number. Fixed! |
Dirbaio |
Posted on 07-04-15, 02:23 pm in How to properly load files from fs?
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4284/4458 Since: 06-08-11 |
Okay, let me write down what I remember on how this works (it's been a long time...)
NSMB internally loads files referenced by something I called the "Extended ID" or "ExtId" for short. Info on ExtIDs here: http://nsmbhd.net/thread/1095-no-more-sprite-set-limitation-in-mvsl/#16464 By default the game loads files into its own RAM storage that gets deleted when you exit the level. The "Dest" variations of the function allow you to provide your own pointer to where to load the data. The "LZ" variations LZ-uncompress the file when loading it. Example on how to load a file here: https://github.com/Dirbaio/NSMBCR/blob/master/source/animations.cpp#L187 The "allocFromCacheTable" function is like a malloc that gets automatically freed when you exit the level. I *think* it's the same function used by the non-Dest functions, so doing loadFileByExtId is the same as doing allocFromCacheTable+loadFileByExtId_Dest This is all I have, if you want more details you'll have to look at the IDA DB. |
Dirbaio |
Posted on 08-02-15, 07:02 pm in Will this site become the foundation of nsmbwii hacking?
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4289/4458 Since: 06-08-11 |
Stop creating useless threads please.
|
Dirbaio |
Posted on 08-05-15, 04:49 pm in Help/Question Asking Thread
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4295/4458 Since: 06-08-11 |
Posted by WhatTheHack Does anyone know of a way to export and save a tileset's palette(s) on their own for application to another tileset? That is to say, a way to save only the palette itself as a file? You can do that by exporting the ncl file (ncl files are the palettes) from the tileset and importing it on top of another tileset's ncl. Every tileset has one ncl file in the rom Posted by WhatTheHack would there any way to utilize the duplicate tileset slots and "Empty" background slots displayed in tgeir respective listings? As in, use them as extra slots for importing custom tilesets & backgrounds? It can kind of be done by hex editing some tables in Overlay 0. I won't explain the process in detail but here's how it works on the surface: There are some tables on Overlay 0 that associate tileset or background IDs with file IDs. https://github.com/Dirbaio/NSMB-Editor/blob/master/NSMBe4/ROM.cs#L223 FG_NCL, FG_NCG, FG_NSC - top backgorund palette, graphics, tilemap respectively. BG_NCL, BG_NCG, BG_NSC - bottom backgorund palette, graphics, tilemap respectively. TS_NCL, TS_NCG - tileset palette + graphics TS_PNL - Tileset Map16 TS_UNT, TS_UNT_HD - Tileset object, object index files TS_CHK - Tile behaviors TS_ANIM_NCG - I have no idea what this one is for The file I linked has all the offsets in overlay0 for all the regions and all tables. The thing is: these tables specify what file IDs one tileset uses. For example, duplicated tilesets are different tileset IDs, but these tables point to the same tileset files in the ROM, that's why they're duplicated. You can hex edit and change these tables to point to different files. Since there's not a lot of space Entries in the table are 16-byte File IDs. Actually they're ExtIDs, so they can also point to files in MvsL NARCs but you don't need to worry about that. They're the File ID minus the overlay count, so you will have to take that into account when editing it. |
Dirbaio |
Posted on 08-19-15, 10:00 am in new super mario random hack
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4300/4458 Since: 06-08-11 |
Hola,
Veo que eres nuevo aqui, te recomiendo que te leas las reglas del foro (en ingles) aqui: http://nsmbhd.net/faq/ No se permiten cuentas duplicadas: he baneado Aaron777. No pasa nada, puedes seguir usando aaron_777. No se permiten crear threads duplicados, he borrado los otros. No se permiten postear links a ROMs (archivos .nds). Debes postear un archivo 'patch', mas info aqui: How to import and export patches! Has posteado el thread en el foro que no toca. El bueno es New hacks. En breve lo movere, quiero asegurarme de que veas esto. El lenguaje oficial del foro es ingles, este es el ultimo post que te voy a hacer en spanish, y por favor haz tus posts en ingles. Gracias y bienvenido! ---- Hello, I see you're new here. I recommend you read the forum rules here: http://nsmbhd.net/faq/ Duplicate accounts are not allowed, I've banned Aaron777. No problem, just keep using aaron_777. Duplicate threads are not allowed, I've deleted the other ones ROM links are not allowed, you need to post a patch file, more info here: How to import and export patches! You posted this in the wrong forum. The correct one is New hacks. I'll move it later, I want to make sure you're seeing this. The forum's official language is english, this is the last post I write to you in spanish. Please post in english only form now on. Thanks and welcome! |
Dirbaio |
Posted on 10-28-15, 11:10 am in What do you like about other NSMBHD users?
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4309/4458 Since: 06-08-11 |
I <3 you guys too
|
Dirbaio |
Posted on 01-06-16, 06:53 pm in Coop experiment: Getting 1-1 into multiplayer
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4315/4458 Since: 06-08-11 |
That's a crash
This would normally be a "freeze", and then you can see the crash screen by pressing a secret key combination. The ASM hack template forces the crash screen to show without the key combination, and adds a RAM viewer. You can toggle between the crash dump and the ram viewer by using Start/Select. The crash screen gives more info about why the crash screen happened. You can see the registers when the crash happened on the right of the top screen, this can give you info of what function crashed if you look at the PC (Program counter) register, if you look it up on IDA it can give you clues. Bottom screen contains the stack, from it you can kind of see the chain of function calls that led to the crash. Good luck |
Dirbaio |
Posted on 01-29-16, 06:50 pm in Editing "Functions"? (rev. 1 by Dirbaio on 01-29-16, 06:56 pm)
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4316/4458 Since: 06-08-11 |
Posted by Shadey21 How do I tell the compiler that there is a function called get1up? You need to do two things: 1- Define the function in a header file. This lets the compiler know the "signature" of the function (what parameters does it take and what does it return). 2- Add its address to symbols.x. This lets the compiler know where the function is in RAM. (You actually need to do 1 only if you call the function from a c/c++ file. Not from a .s file) If you do either thing wrong, the hack probably won't compile. So if it compiled you did it right I guess. (The ASM patch template already has get1up in symbols.x) So... I'm not sure why is it not working. Can you post the disassembly around 020203EC including the addresses? (from the text view in IDA Pro) Maybe there's something wrong with the hook addr EDIT: To debug it you can try this: - A nice trick to see if your code is being called is printing something to the console. Try something like this: repl_020203EC:
print "HELLOOO"
BL get1up 'print' is not an ASM instruction, it's a macro defined here: https://github.com/Dirbaio/ASMPatchTemplate/blob/master/source/print.s#L52 You'll probably have to copypaste it in your .s file if it doesn't find it (macros from one .s file are not usable in other .s files). - If it prints nothing, your code is not being executed. You need to check the address you're hooking (020203EC) is correct. - If it prints HELLOOO, then your code is executing but doesn't do what you want. Check it's correct For example, I see on the tutorial get1up is supposed to take 2 arguments. First one is 8, second one is the player number (0 in singleplayer always.) You're not setting the parameters, so get1up will take as parameters whatever was on r0 and r1 before, which is probably not what you want. You can set the parameters like this: repl_020203EC:
mov r0, #8
mov r1, #0
BL get1up |
Dirbaio |
Posted on 02-28-16, 03:33 pm in tutorial How ASM hacks are setup (rev. 1 by Dirbaio on 02-28-16, 03:35 pm)
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4318/4458 Since: 06-08-11 |
Oh... __irq_vector and __irq_flags are defined in devkitPro's linker script, which you can see here: https://github.com/devkitPro/buildscripts/blob/master/dkarm-eabi/crtls/ds_arm9.ld#L12
Adding this to the ASM patch template linker script *would* make it compile, but it probably won't work, because libnds's use of the IRQs and timers will most likely conflict with NSMB's. So yeah, there are functions from libnds you can't use as-is in an asm hack The Nintendo SDK has many functions that abstract timing and threads from the programmers, and these expect to have complete control over the hardware (timers and IRQs), if you change stuff manually you may break the game. So you have to either find and use Nintendo's functions, or be very careful. If you want to do stuff based on a timer, you have several options: - If you want to run every frame or a multiple of it, simplest thing is to hook somewhere that runs every frame. - Use timers. I'm sure there is some function from the SDK that lets you schedule a function based on a timer, it's maybe on the IDA db. It's unlikely you need that precision though. For example, the sound hack creates a thread that's woken up every vblank here: https://github.com/Dirbaio/NSMBCR/blob/master/source/soundThread.cpp#L28 It then uses timers 2 and 3 manually (I checked NSMB doesn't use them), but it doesn't use them to fire an IRQ and run code, it just uses them to measure time. So, every vblank it wakes up, calculates how much time has elapsed since last vblank and reads the required amount of samples from ROM. https://github.com/Dirbaio/NSMBCR/blob/master/source/wavplayer.cpp#L58 Not sure why the OAM stuff depends on IRQs, it probably doesn't depend on them directly and you can use it. You'll also have problems if use libnds's oam stuff instead of Nintendo's though. |
Dirbaio |
Posted on 05-22-16, 08:41 pm in This is NSMBHD in a nutshell.
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4324/4458 Since: 06-08-11 |
Just fixed the build bot, new build 379 is out. Sorry for letting it broken for so long guys
|
Dirbaio |
Posted on 11-22-16, 09:32 pm in Roast Me!
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4354/4458 Since: 06-08-11 |
Posted by StapleButter you're fucking unoriginal. also your hair is too long, and you're fat. You call me unoriginal, but the best you can come up with is just this? Also I'm not fat |
Dirbaio |
Posted on 11-22-16, 09:34 pm in Roast me
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4355/4458 Since: 06-08-11 |
you were the cause the board was down all sunday
HOW DARE YOU |
Dirbaio |
Posted on 11-22-16, 09:39 pm in Roast Me!
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4356/4458 Since: 06-08-11 |
Posted by StapleButter and you broke the online users flags. you're a major derp and a terrible coder. I FIXED the flags SO FAST. See? I'm a better and faster coder than you |
Dirbaio | |
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4357/4458 Since: 06-08-11 |
I restored itttttttttttttttt.... <3
I had clicked edit instead of quote, and wrote my reply in your post, hehe |
Dirbaio |
Posted on 11-23-16, 09:30 pm in MY ROM IS HAUNTED
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4363/4458 Since: 06-08-11 |
|
Dirbaio |
Posted on 01-08-17, 12:15 am in fixed Website Bug
|
Super Mario
( ͡° ͜ʖ ͡°) Karma: 10081 Posts: 4373/4458 Since: 06-08-11 |
Yep, this was bad utf8 in the CSS. Fixed by using an html entity a while ago.
|