RicBent |
Posted on 03-21-19, 02:59 pm in romfs2sdmc - Redirect the romfs to the sd card
|
Mariomaster
Karma: 8583 Posts: 1460/1681 Since: 06-09-12 |
This code mod allows loading all romfs files from the sd card. It basically recreates layeredfs functionality. That means it also works on cita! Copy your extracted romfs to a folder named "nsmb2" inside the emulated SD card of citra (that folder is usually AppData/citra/sdmc) and open CoinKiller from there. If you now save your levels and reload the level in citra it will load the newly saved one. No more need to repack your romfs and cxi all the time!
This mod was created for US Gold Edition of the game. Copy into "source/romfs2sdmc.s" @ @ New Super Mario Bros. 2 - romfs2sdmc @ @ by RicBent @ heavily based on SaltySD by shinyquagsire @ @ Functions in NSMB2 @ - 0013FC70 fsTryOpenFile @ - 001109E4 fsMountArchive @ - 00117DAC fsRegisterArchive @ - 001416E0 fsMountSd (calls fsMountArchive and fsRegisterArchive) .text .align 4 @ Helper Functions @ MemCopy(void* dest, void* src, uint num) MemCopy: ldrb r3, [r1], #1 strb r3, [r0], #1 subs r2, r2, #1 bge MemCopy bx lr .global TryOpenFile_Payload TryOpenFile_Payload: mov r6, r0 @ file ptr cmp r4, #0xBA @ magic check beq exit push {r0-r12, lr} sub sp, sp, #0x20 mov r7, r1 @ input file path mov r8, r2 @ mode ldrh r3, [r7, #0x0] cmp r3, #0x64 @ Filter out "data:/" beq abort @ Mount SD if necessary bl check_mount_sd @ Modify path so that it points to our sdmc path ldr r0, =path_buf ldr r1, =sdmount_wchar mov r2, #(sdmount_wchar_end-sdmount_wchar-2) bl MemCopy ldr r0, =path_buf add r0, #(sdmount_wchar_end-sdmount_wchar-2) mov r1, r7 ldrh r3, [r7, #0x6] cmp r3, #0x3A @ if path[3] == ':' addeq r1, #0x8 addne r1, #0xA mov r3, #(sdmount_wchar_end-sdmount_wchar-2) mov r2, #0x400 sub r2, r2, r3 bl MemCopy @ Try to load file from sdmc mov r0, r6 @ file ptr ldr r1, =path_buf @ modified path mov r2, r8 @ mode mov r4, #0xBA @ magic check bl 0x0013FC70 @ TryOpenFile(filePtr, modifiedPath, mode, magicCheck) @ If we get a 0 result, we have a good file handle @ and can return cmp r0, #0x0 beq success abort: add sp, sp, #0x20 pop {r0-r12, lr} exit: b (0x0013FC70+8) success: add sp, sp, #0x20 pop {r0-r12, lr} b (0x0013FC70+0x8C) check_mount_sd: push {r0-r4, lr} ldr r0, =sdmounted ldrb r0, [r0] cmp r0, #0x0 bne skip_mount ldr r0, =sdmount mov r1, #0xF0000001 bl 0x001416E0 @ fsMountSdmc ldr r0, =sdmounted mov r1, #0x1 strb r1, [r0] skip_mount: pop {r0-r4, pc} .data .align 4 sdmount: .ascii "sd_:" .byte 0 sdmounted: .byte 0 sdmount_wchar: @ sd_:/nsmb2/ .2byte 0x0073, 0x0064, 0x005f, 0x003a, 0x002f, 0x006e, 0x0073, 0x006d, 0x0062, 0x0032, 0x002f sdmount_wchar_end: .align 4 path_buf: .space 0x400, 0x00 Copy into "source/romfs2sdmc.hks" or "hooks/romfs2sdmc.hks" romfs2sdmc:
type: branch
link: false
addr: 0x0013FC74
func: TryOpenFile_Payload
_________________________ GitHub - Kuribo64 - YouTube |
RicBent |
Posted on 10-19-19, 08:23 pm in OP7's Custom MvsL Levels!
|
Mariomaster
Karma: 8583 Posts: 1493/1681 Since: 06-09-12 |
RicBent |
Posted on 12-29-19, 10:28 pm in How do PM notifications look like? (rev. 1 by RicBent on 12-29-19, 10:28 pm)
|
Mariomaster
Karma: 8583 Posts: 1519/1681 Since: 06-09-12 |
RicBent |
Posted on 05-28-20, 04:03 pm in Sprite database
|
Mariomaster
Karma: 8583 Posts: 1547/1681 Since: 06-09-12 |
With the latest CK release (v0.12) the sprite database was moved to http://smbnext.net/spritedb/.
Changes from legacy spritedb: - Nybbles are now indexed starting with 0 instead of 1 - Order of bytes 2-5 and 6-9 is now reversed to reflect endianness and allow proper multi nybble fields - Added bitfield support You can request an account to edit the DB via private message. Note that because there is no version control system yet, edit access will only be granted to trusted members for now. _________________________ GitHub - Kuribo64 - YouTube |
RicBent |
Posted on 07-22-20, 09:52 pm in is there a way To (Look at the thread)
|
Mariomaster
Karma: 8583 Posts: 1570/1681 Since: 06-09-12 |
Free hosts are pretty much never worth it for anything. Running a computer costs money. Nobody is gonna give you stuff for free (at least without having other intentions like grabbing all your data or whatever).
Also I am gonna be honest with you. Whatever you are trying to do there has no real chance to survive at least at this point. You need to build up a reputation before anybody is willing to spend time on a board that might die any second. Tbh you don't seem too competent at those topics you want to cover. Aka the survival chance of your idea is basically 0 right now. _________________________ GitHub - Kuribo64 - YouTube |
RicBent |
Posted on 06-03-21, 12:57 pm in moved - Graphics made by me (rev. 1 by RicBent on 06-03-21, 12:58 pm)
|
Mariomaster
Karma: 8583 Posts: 1630/1681 Since: 06-09-12 |
I'm really not a fan of people erasing stuff from old threads by editing posts.
Forums are an archive for stuff. Just keep stuff as it is and let it slowly go down in the thread list ![]() A link to the other thread at the top without removing everything would've been enough. _________________________ GitHub - Kuribo64 - YouTube |
RicBent |
Posted on 10-16-22, 09:17 am in logos Logo Shop Deluxe - Custom NSMB Logos for Your Hacks!
|
Mariomaster
Karma: 8583 Posts: 1673/1681 Since: 06-09-12 |
RicBent |
Posted on 11-10-12, 08:48 pm in The (new) "show your desktop" thread
|
Mariomaster
Karma: 8583 Posts: 142/1681 Since: 06-09-12 |
RicBent |
Posted on 12-09-12, 02:03 pm in List of Bitmaps wich are using the jyotyu palette (rev. 1 by RicBent on 12-09-12, 02:03 pm)
|
Mariomaster
Karma: 8583 Posts: 188/1681 Since: 06-09-12 |
RicBent |
Posted on 12-29-12, 04:04 pm in New Super Mario Land
|
Mariomaster
Karma: 8583 Posts: 205/1681 Since: 06-09-12 |
RicBent |
Posted on 01-05-13, 11:26 am in 1-Letter Swap Game!
|
Mariomaster
Karma: 8583 Posts: 210/1681 Since: 06-09-12 |
RicBent |
Posted on 04-23-13, 02:14 pm in suggestion Move tiles up and down in the list
|
Mariomaster
Karma: 8583 Posts: 235/1681 Since: 06-09-12 |
RicBent |
Posted on 05-21-13, 09:35 pm in ASMB - Adventure Super Mario Bros.
|
Mariomaster
Karma: 8583 Posts: 242/1681 Since: 06-09-12 |
RicBent |
Posted on 06-08-13, 07:39 am in NSMB Level Design Contest - Discussion Thread (rev. 3 by RicBent on 06-08-13, 07:57 am)
|
Mariomaster
Karma: 8583 Posts: 281/1681 Since: 06-09-12 |
RicBent |
Posted on 06-11-13, 06:29 am in v1.0.1 New Super Mario Bros. 5: Clone Tag Team 2 (rev. 1 by RicBent on 06-11-13, 06:30 am)
|
Mariomaster
Karma: 8583 Posts: 290/1681 Since: 06-09-12 |
RicBent |
Posted on 06-11-13, 05:00 pm in New Super Mario Bros. Level Design Contest
|
Mariomaster
Karma: 8583 Posts: 291/1681 Since: 06-09-12 |
RicBent |
Posted on 09-03-13, 07:16 am in v3.1 Super Mario Bros. - The New Worlds
|
Mariomaster
Karma: 8583 Posts: 324/1681 Since: 06-09-12 |
RicBent |
Posted on 10-03-13, 08:00 am in v1.0.1 New Super Mario Bros. 5: Clone Tag Team 2
|
Mariomaster
Karma: 8583 Posts: 343/1681 Since: 06-09-12 |
RicBent |
Posted on 10-27-13, 09:05 pm in No freezing during power-up/-down animation hack
|
Mariomaster
Karma: 8583 Posts: 365/1681 Since: 06-09-12 |
RicBent |
Posted on 11-02-13, 10:07 am in Online Users Page Suggestion.
|
Mariomaster
Karma: 8583 Posts: 367/1681 Since: 06-09-12 |
Posted by MarioFanatic64 If we want to know who's online, we can just check the top of any page anyway. If you are on "Mobile view" you can't see who's online. Maybe just the links should be removed. _________________________ GitHub - Kuribo64 - YouTube |