Pages: « 123456 »
Posted on 07-26-15, 05:25 pm in tutorial Adding custom bahp points (rev. 10 by  skawo on 09-24-16, 03:19 pm)


Karma: 19757
Posts: 179/1100
Since: 04-02-13
This is a fairly tricky thing to do, but can be done with a bit of patience. It's easiest if you're using Cakewalk Studio as your midi editor, but I will later explain how to make others work too.

A. With Cakewalk Studio

1. Duplicate the track with the BAHPs to the last track. Make it channel 16, set to the "Gunshot" (i.e last) instrument (it can be other things, but gonna use it for convenience of this tutorial). Mute it.

2. Change each BAHP note, so that it has a duration of '10', velocity of 110 and 'C 0' pitch.

3. Save the midi, convert it with midi2sseq

4. Open the resulting sseq in a hex editor, and replace every instance of "006E0480" with "B002010080" (they should all be at the end).

5. We've made the file slightly larger in Step 4, so it's time to fix that; check the size in bytes (CTRL+A in the hex editor will select everything and should display it somewhere). You should get two bytes in hex; reverse their order (e.g. 34 A7 -> A7 34) and put them at 0x08 in the sseq.

6. If any of the BAHP points are before the loop starting point, you will also need to relocate the loop point itself. Go to the final five bytes of the sseq; you should see something like

XX YY 00 00 FF

Add to "XX YY" the amount of bahps before the loop. (e.g if you have five bahps before the loop, and XX = 94, you should make it 99).
If the "XX YY" values appear multiple times near the end of the sseq, change them all.

7. Import, enjoy.


B. That doesn't work with my editor

Basically, the only problem with that tutorial is the fact that I created a specific note to find and replace; if your midi editor uses different measurements for the note duration, you'll have a bit of a problem. But, here's how to make it work:

1. Follow the above tutorial until point 4. Then, just have to make sure every single note on the last track has the same duration and pitch.

2. Save the resulting sseq somewhere. Now, change the track's instrument and pitch for every single note to something else, and convert with sseq2midi again, saving as different file.

3. Compare the two files using a hex editor. Find a pattern of four bytes that keeps changing in the file. Replace every instance of those four bytes with "B002010080". Continue on with Step 5 of tutorial above.
Posted on 01-03-16, 12:55 pm in newer super yoshi bros ds


Karma: 19757
Posts: 229/1100
Since: 04-02-13
I see the moderation's response time is staggeringly quick these days.
Posted on 07-02-16, 04:09 pm in Slide Cutscene (rev. 6 by  skawo on 05-18-17, 02:27 pm)


Karma: 19757
Posts: 407/1100
Since: 04-02-13

This is a piece of code that I've worked on for both Newer Super Mario Bros. DS and Super Mario: Endless Earth. It's an (and using this word very loosely here) engine for showing customized sequences of images, intended to serve as the opening cutscene, with provisions made for displaying dialogue, playing music, skipping the cutscene, etc. Think something like the staff credits in the original game.

The audio player portion is a version of Dirabio's WavPlayer code from the now-dead NSMBCR:
https://github.com/Dirbaio/NSMBCR/blob/master/source/wavplayer.cpp

1. Usage

1. Set up the ASM Hacks template using DevkitARM v41.
2. Copy the "IntroSlide.cpp", "nsmb.h" and "IntroSlide.h" files from /source in the downloaded RAR into the template's /source folder.
3. Put a ROM in the template folder and open it in NSMBe.
4. Insert the code into the ROM by pressing "Run make and insert" on the "Tools/Options" tab in NSMBe.

2. Making your own sound clip:
1. Open a sound file in Audacity
2. If the track is stereo, split it to Mono by opening a drop-down list next to individual track's delete button (top-left corner of the track listing).
3. From that same drop-down list, select "Set rate -> other" and put it at 32768.
4. Input the same rate at the bottom in "Project Rate" field.
5. Go to File->Export audio. Save as type "Other uncompressed types". Click "options" and select "RAW (headerless) as the header and "Signed 8bit PCM" as the encoding. Confirm. You're done.
6. Import this file over any trivial file in the game.

3. Making your own slides:
1. Slides are 256x256, but only the top 256x192 is visible. Essentially, the credits enpgs are precisely the format you should be shooting for. Open a credits enpg and import an image over it, save, export.
2. If you want to put some dialogue over your slides, all the slides you want to display without transitions will have to use the exact same palette.

4. Making the sequence:
There's an example sequence with ample comments in IntroSlide.cpp. Follow that and ask questions here if you get stuck. It is also explained there how to use this for the ending credits.

5. Download
https://www.dropbox.com/s/vx4la76p4ghz1us/IntroSlide.rar?dl=0


Posted on 07-31-16, 04:20 pm in Newer Super Mario Bros. DS


Karma: 19757
Posts: 538/1100
Since: 04-02-13
No. The game. Telling me I'm taking too long is not helping in the slightest and demanding I waste time putting together a demo afterwards is just insulting.
Posted on 01-26-16, 12:48 am in Newer Super Mario Bros. DS (rev. 1 by  skawo on 01-26-16, 12:50 am)


Karma: 19757
Posts: 241/1100
Since: 04-02-13
Progress update, I guess!
Um, some of the music was updated and I've also finally remodelled World 3.



I'm also en route to finishing the last levels of World 3 (only 2 are left).
Posted on 07-30-16, 05:53 pm in Misc. patches thread


Karma: 19757
Posts: 533/1100
Since: 04-02-13
Podoboo graphics flip on way down:
repl_02148214_ov_30: LDRB R0,[R4,#0xD6] CMP R0,#0xFF MOVEQ R2,#0x2 MOVNE R2,#0x0 MOV R0,R4 BX LR

Allows you do insert in a real podoboo, complete with the flipping effect:
Posted on 12-25-17, 10:48 am in Newer Super Mario Bros. DS


Karma: 19757
Posts: 1036/1100
Since: 04-02-13
Game is out!
Posted on 12-14-20, 01:15 am in Newer Super Mario Bros. DS


Karma: 19757
Posts: 1091/1100
Since: 04-02-13
Posted on 08-30-14, 01:02 pm in 3D Koopas are NOT unused (rev. 1 by  skawo on 08-30-14, 01:03 pm)


Karma: 19757
Posts: 59/1100
Since: 04-02-13
Posted by Thierry
(...) model is a different model than the 3D koopa's model. They used this model instead of a 2D koopa shell because they couldn't use the 2D koopa shell for that, for technical reasons and because player'd have noticed the 2D, because every other model in the intro is in 3D.



That last part is complete nonsense.



for technical reasons


Nice for you to list those.

player'd have noticed the 2D, because every other model in the intro is in 3D


Anyone with half a brain can notice the Koopas are 2D at any time.
Posted on 04-16-16, 04:35 pm in Item on select (rev. 2 by  skawo on 10-31-16, 10:14 am)


Karma: 19757
Posts: 315/1100
Since: 04-02-13
A really simple patch which lets you activate the touchscreen item with a press of the SELECT button. Just like Super Mario World.

hook_0211F844_ov_0A: STMFD SP!, {R0, R1, LR} LDR R0, =0x04000130 LDRB R0, [R0] LSR R0, #2 ANDS R0, #1 LDMNEFD SP!, {R0, R1, PC} LDR R0, =0x0208B698 LDR R1, =0x009500DA STR R1, [R0] LDR R1, =0x09600D40 STR R1, [R0, #0x8] LDR R1, =0x1 STR R1, [R0, #0x4] STR R1, [R0, #0xC] LDMFD SP!, {R0, R1, PC}

Posted on 05-28-16, 05:03 pm in Newer Super Mario Bros. DS


Karma: 19757
Posts: 347/1100
Since: 04-02-13
...Huh.
Posted on 08-19-16, 03:31 pm in Actor Spawning Block (rev. 15 by ImageBot on 11-21-16, 03:23 am)


Karma: 19757
Posts: 582/1100
Since: 04-02-13
Actor Spawning Block:
repl_0209C1B8_ov_00: STR R3, [SP,#4] CMP R0, #0x29 BXNE LR LDR R0, =0x0208B19C LDR R0, [R0] STMFD SP!, {R1-R5,LR} MOV R3, #0x1000 MOV R5, #0 LDR R4, [R2,#0x4] LDRB R1, [R0,#0x12] CMP R1, #0x0 BEQ .YOffs CMP R1, #0x7F BLLS .positive LDRB R1, [R0,#0x12] CMP R1, #0x7F BLHI .negative STR R4, [R2,#0x4] .YOffs: LDRB R1, [R0,#0x13] CMP R1, #0x0 ITTT NE LDRB R1, [R0,#0x1B] CMP R1, #0x0 BEQ .return BL getPtrToPlayerActor LDRB R5, [R0, #0x76C] CMP R5, #0x15 MOVEQ R5, #1 CMP R5, #0x10 MOVEQ R5, #1 LDR R0, =0x0208B19C LDR R0, [R0] LDR R4, [R2,#0x8] CMP R5, #1 LDREQB R1, [R0,#0x1B] CMPEQ R1, #0x0 BEQ .return CMP R5, #1 SUBNE R4, R4, #0x12000 ADDEQ R4, R4, #0x12000 CMP R5, #1 BEQ .down .up: LDRB R1, [R0,#0x13] CMP R1, #0x7F BLLS .positive LDRB R1, [R0,#0x13] CMP R1, #0x7F BLHI .negative STR R4, [R2,#0x8] B .return .down: LDRB R1, [R0,#0x1B] CMP R1, #0x7F BLLS .positive LDRB R1, [R0,#0x1B] CMP R1, #0x7F BLHI .negative STR R4, [R2,#0x8] .return: LDMFD SP!, {R1-R5,LR} LDR R1, [R0,#0x14] LDRH R0, [R0,#0x10] BX LR .positive: MUL R1, R3, R1 ADD R4, R4, R1 BX LR .negative: MVN R1, R1 LSL R1, #0x18 LSR R1, #0x18 SUB R1, #1 MUL R1, R3, R1 SUB R4, R4, R1 BX LR repl_020D0468_ov_0A: LDR R0, =0x0208B19C LDR R0, [R0] LDRH R0, [R0,#0x1C] BX LR repl_020D0420_ov_0A: STR R2, [SP,#0x18] LDR R0, =0x0208B19C LDR R0, [R0] LDRH R0, [R0, #0x18] CMP R0, #0x76 BEQ 0x020D0424 BNE 0x020D043C


This is an addition to the wonderful Actor Spawner Sprite by Mariomaster. Essentially, what this will do, is make the Boo Spawning Question Block spawn the enemy with Settings ID = 0, complete with spritedata, sound effect and particle. The X/Y offset fields are also supported: The "X offset" field applies to both when Mario hits the block from underneath and if he groundpounds it. However, the "Y Offset" field applies only when Mario pounds the block upward. If it's groundpounded, the actor will be offset by the "Y Particle Offset" field instead; this allows you to perfectly place the actor.

What this means is; you can spawn any sprite out of the block, be it a Star Coin, Goomba or Spiny.

The sprite you're spawning needs to appear in the level in order to actually load the model/sprite it's using. Easiest way to ensure this is to place one right below Mario's starting point, just slightly out of zone. And, obviously, sprite sets need to have this enemy enabled.

Note that every time you used the block in the game previously will need to have Settings ID = 0 set to this:


...in order to work like it used to.

Short video demonstration:

Posted on 09-03-16, 09:57 am in Newer Super Mario Bros. DS


Karma: 19757
Posts: 645/1100
Since: 04-02-13
Patience.
Posted on 09-19-16, 01:52 pm in Misc. patches thread (rev. 10 by  skawo on 09-21-16, 03:50 pm)


Karma: 19757
Posts: 690/1100
Since: 04-02-13
Select your own Jyotyu Palette:
#include "nsmb.h" void hook_020A3480_ov_00() { int JyotyuPal = MygetUnk3ForView(((*(getPtrToPlayerActor()+0xAF)>>16)&0xFF)); if (JyotyuPal > 3) JyotyuPal = 3; u8* ptr = (u8*) allocFromGameHeap(1066); switch (JyotyuPal) { case 0: //Normal { loadFileByExtId_LZ_Dest(408-0x83, ptr); break; } case 1: //Underground { loadFileByExtId_LZ_Dest(406-0x83, ptr); break; } case 2: //Lava { loadFileByExtId_LZ_Dest(409-0x83, ptr); break; } case 3: //Snow/Ghost { loadFileByExtId_LZ_Dest(410-0x83, ptr); break; } default: { break; } //You can add more if you want } DC_FlushRangeOrAll(ptr, 0x400); GX_BeginLoadOBJExtPltt(); GX_LoadOBJExtPltt(ptr, 0x0, 0x400); GX_EndLoadOBJExtPltt(); DC_FlushRangeOrAll(ptr, 0x400); GX_BeginLoadBGExtPltt(); GX_LoadBGExtPltt(ptr, 0x4000, 0x400); GX_EndLoadBGExtPltt(); freeToGameHeap(ptr); return; }

Disable broken Unk Setting Functionality:
nsub_0201F0F4_main: nsub_0201F118_main: nsub_0201F13C_main: MOV R0, #0 BX LR .globl MygetUnk1ForView MygetUnk1ForView: STMFD SP!, {LR} SUB SP, SP, #4 MOV R1, #0 BL getPtrToViewById CMP R0, #0 LDRNEB R0, [R0,#0xB] MOVEQ R0, #0 ADD SP, SP, #4 LDMFD SP!, {PC} .globl MygetUnk2ForView MygetUnk2ForView: STMFD SP!, {LR} SUB SP, SP, #4 MOV R1, #0 BL getPtrToViewById CMP R0, #0 LDRNEB R0, [R0,#0xC] MOVEQ R0, #0 ADD SP, SP, #4 LDMFD SP!, {PC} .globl MygetUnk3ForView MygetUnk3ForView: STMFD SP!, {LR} SUB SP, SP, #4 MOV R1, #0 BL getPtrToViewById CMP R0, #0 LDRNEB R0, [R0,#0xD] MOVEQ R0, #0 ADD SP, SP, #4 LDMFD SP!, {PC}

First goes into a .cpp file, the second into an .s file. You will also need to add this to nsmb.h:

void GX_BeginLoadBGExtPltt(void); void GX_LoadBGExtPltt(const void *pSrc, u32 destSlotAddr, u32 szByte); void GX_EndLoadBGExtPltt(void); void GX_BeginLoadOBJExtPltt(void); void GX_LoadOBJExtPltt(const void *pSrc, u32 destSlotAddr, u32 szByte); void GX_EndLoadOBJExtPltt(void); void DC_FlushRangeOrAll(const void *startAddr, u32 nBytes); void MIi_CpuCopy16(const void *srcp, void *destp, u32 size); u32* getPtrToPlayerActor(); //Replace void* getPtrToPlayerActor(); with this. u8 MygetUnk1ForView(u32 viewID); u8 MygetUnk2ForView(u32 viewID); u8 MygetUnk3ForView(u32 viewID);


This hackily lets you choose the Jyotyu palette per view by shamelessly overwriting it directly in VRAM. Simply change the Unk3(B) value in the View settings. 0 = normal, 1 = underground, 2 = lava, 3 = snow/ghost.

EDIT: Minor fix

Posted on 10-16-16, 09:51 pm in Misc. patches thread (rev. 4 by  skawo on 11-12-16, 06:31 pm)


Karma: 19757
Posts: 751/1100
Since: 04-02-13
Spike:
repl_0218CFD8_ov_79: LDR R0, [R4,#8] LSR R0, R0, #0x14 ANDS R0, R0, #0xF LDREQ R0, =Vec3_vtable BEQ 0x0218CFDC ADD SP, SP, #0x28 LDRB R1, [R4,#0x2BD] EOR R1, #1 STRB R1, [R4,#0x2BD] MOV R0, #0 STR R0, [SP] LDRB R3, [R4,#0x2BD] MOV R0, R4 LDR R12, [R0] MOV R2, #0x300 LDR R1, =0x20C4ED4 MOV R3, R3,LSL#1 LDRSH R1, [R1,R3] LDR R12, [R12,#0xF8] RSB R3, R2, #0 MOV R2, #0x3000 BLX R12 ADD SP, SP, #8 LDMFD SP!, {R4,PC} repl_0217B0E8_ov_52: LDR R0, =0xMODEL ID - 0x83 here MOV R1, #0 BL loadFileByExtId_3dModel MOV R0, #1 BX LR repl_0217B038_ov_52: LDR R0, [R5, #8] ANDS R0, R0, #0xF LDREQ R0, =0x506 LDRNE R0, =MODEL ID - 0x83 here BX LR repl_0217B23C_ov_52: LDR R0, [R4, #8] AND R0, R0, #0xF CMP R0, #0 LDREQ R0, =0x9C LDREQ R1, [R4, #8] ANDEQ R1, R1, #0x10 MOVEQ R1, R1, lsr#4 CMP R0, #1 LDREQ R0, =0x67 LDREQ R1, =0x00100001 BL 0x20A0B64 LDR R3, [R4, #8] AND R3, R3, #0xF CMP R3, #1 BNE 0x0217B240 LDR R3, =0xA3 ADD R1, R0, R3 LDRB R2, [R4, R3] CMP R2, #0xC0 ADDEQ R2, #0x20 SUBNE R2, #0x20 STRB R2, [R1] B 0x0217B240 repl_0217B078_ov_52: LDR R0, [R5, #8] ANDS R0, R0, #0xF LDREQ R0, =0x55C LDRNE R0, =0x55D BX LR repl_0217B630_ov_52: LDR R0, [R4, #8] ANDS R0, R0, #0xF LDREQ R0, =0x400 LDRNE R0, =0xE20 BX LR repl_0217B63C_ov_52: LDR R0, [R4, #8] ANDS R0, R0, #0xF LDREQ R0, =0x400 LDRNE R0, =0x0 STR R0, [R4,#0x588] BX LR repl_0217B458_ov_52: LDR R0, [R4, #8] ANDS R0, R0, #0xF LDR R0, [R4,#0x548] SUBEQ R0, R0, #0x9000 BX LR repl_0217B3E4_ov_52: LDR R1, [R4, #8] ANDS R1, R1, #0xF LDR R1, [R4,#0x544] SUBNE R1, R1, #0x2000 BX LR repl_0217B450_ov_52: LDR R0, [R4, #8] ANDS R0, R0, #0xF LDR R0, [R4,#0x544] SUBNE R0, R0, #0x2000 BX LR

A spikeball must be loaded in the level. Set Nybble 12 to 1 to spawn.
Also makes spikeball's nybble 7 make it die upon tile contact.

Posted on 11-15-16, 12:58 pm in Newer Super Mario Bros. DS


Karma: 19757
Posts: 815/1100
Since: 04-02-13
Stuff;

Posted on 11-16-16, 01:29 pm in Roast me


Karma: 19757
Posts: 821/1100
Since: 04-02-13
You're a dried shroom
Posted on 11-16-16, 10:13 pm in Roast me


Karma: 19757
Posts: 824/1100
Since: 04-02-13
Your responses are so bad that they're enough to roast you by themselves
Posted on 08-18-17, 12:36 am in Newer Super Mario Bros. DS


Karma: 19757
Posts: 1018/1100
Since: 04-02-13
0/10 then


Karma: 19757
Posts: 30/1100
Since: 04-02-13
Posted by Tierage
Posted by ray
You are not supposed to do it like this
After you decompressed it, just open the WHOLE ROM in a HEX Editor and change it. After that you are done. You can just continue editing/playing/whatever.

Alright, I'm going to try that.

...

alright so i did it aND IT ACTUALLY WORKED AAAAAAAAA This happened WOOOOOOOOOOOOOO all hail ray! RAY IS CHAMPION


Congratulations. You were unable to read these exact instructions several pages back.
Pages: « 123456 »