Pages: 1
MeroMero |
Posted on 07-01-16, 03:34 pm (rev. 5 by MeroMero on 11-30-16, 01:29 pm)
|
Death by cuteness
Karma: 6564 Posts: 442/598 Since: 05-01-13 |
Have you ever wondered if it was possible to make a title logo with 256 colors?
Well I sure did, and here it is: Title logo with 256 colors: nsub_0200A4D4:
B 0x200A4D8 @Disable titlescreen cutscene by Skawo
repl_020CDD94_ov_09:
STMFD SP!, {LR}
BL 0x20099C8 @Load Title Logo on extended palette mode
LDR R0, =0x20DB9F4 @Factory for changing the OAM properties of the title logos
MOV R1, #0
SUB R1, R1, #1
MOV R2, #0
STR R1, [R0], #4
ADD R2, R2, #1
CMP R2, #0x16
ADDEQ R0, R0, #0x44
ADDEQ R2, R2, #0x11
CMP R2, #0x29
ADDEQ R0, R0, #0x40
ADDEQ R2, R2, #0x10
CMP R2, #0x3D
SUBCC PC, PC, #0x2C
LDR R0, =0x20DB9F4
ADD R0, R0, #0xA4
MOV R2, #0
MOV R1, #0x2000
CMP R2, #4
ADDGE R1, R1, #0x40
CMP R2, #8
SUBGE R1, R1, #0x28
ADD R1, R1, #0xB8
STR R1, [R0], #8
ADD R2, R2, #1
CMP R2, #8
SUBEQ R0, R0, #0x68
CMP R2, #0xC
SUBCC PC, PC, #0x34
LDR R0, =0x20DB9F4
ADD R0, R0, #0xA6
MOV R1, #0x100
ADD R1, R1, #0x71
MOV R2, #0
CMP R2, #4
ADDEQ R1, R1, #0x100
MOV R1, R1, LSL #0x17
MOV R1, R1, LSR #0x17
ORR R1, R1, #0xC000
STRH R1, [R0], #8
ADD R1, R1, #0x40
ADD R2, R2, #1
CMP R2, #8
SUBCC PC, PC, #0x2C
LDR R0, =0x20DB9F4
ADD R0, R0, #0x7E
MOV R1, #0x100
ADD R1, R1, #0x88
MOV R2, #0
MOV R1, R1, LSL #0x17
MOV R1, R1, LSR #0x17
ORR R1, R1, #0xC000
STRH R1, [R0], #8
ADD R1, R1, #0x40
ADD R2, R2, #1
CMP R2, #4
SUBCC PC, PC, #0x24
LDMFD SP!, {PC}
repl_020CDD88_ov_09:
LDR R0, =0x20DB9F4
ADD R0, R0, #0xA8
MOV R1, #0
LDR R2, =0x2087710
LDR R2, [R2]
MOV R2, R2, LSR #7
STR R2, [R0], #8
ADD R2, R2, #0x20
ADD R1, R1, #1
CMP R1, #8
SUBEQ R0, R0, #0x68
CMP R1, #0xC
SUBCC PC, PC, #0x20
LDR R0, =0x778
BX LR This is best used when the the titlescreen cutscene is disabled. I could have changed the OAM properties of the other logo but it's much simpler that way. As always this thread is really useful for those who can't get the ASM-Template working. Normally I should have covered all the possible bugs, but in the event that a sneaky one managed to get under my radar, here is an alternate solution: _IF the title screen appears scrambled, delete the 3rd function in the ASM patch (repl_020CDD88_ov_09: and below) and save again the .s file; _Decompress overlay 9 if not already decompressed and at offset 0xF790 paste the following: D02088C100010000 D020C8C120010000 D02008C040010000 D02048C060010000 FFFFFFFFFFFFFFFF B82071C100000000 B820B1C120000000 B820F1C140000000 B82031C060000000 F82071C180000000 F820B1C1A0000000 F820F1C1C0000000 F82031C0E0000000 The second solution is bug free, but I'll have it as the main - and only - solution only if the first one happens to be glitchy (which I hope not). Images: The new OAM properties make the code read the title logo picture as chunks of 64×64 pixels, and there are 16 of them. This means that only pictures with 65536 pixels are allowed. I could have used a 256×192 pixels large image but to stay on the safe side I wanted to use an image that would give a total area that can be written as a power of 2: _which is the case of 65536 (216) _which is NOT the case of 49152 (or 256×192) For example let's say you want to use the Beta title logo: First delimit the 16 parts: You won't need squares 13 to 16. Open your image in Photoshop or GIMP. If you want the logo to appear in the screen exactly as in the original image, follow this advice: _no matter what the output image must be in a 64×1024 format (64 pixels long and 1024 pixels high). _realistically only 64×768 will be needed since 64×768 is the same as 256×192, which is the number of pixels of a NDS screen. This is where you would place each of the 16 parts in this new format: Remember, each chunk is a 64×64 square. Save the image and exit you Picture Editing software. In NSMB Editor: _go to ROM File Browser > FILESYSTEM > root > ARCHIVE > mg_entry.narc > FILESYSTEM > root > mg_entry and extract d_2d_mgvs_bg_title_ncg.bin. _this image meets the 2 necessary requirements, it is a 8bpp image AND is 256×256 in size. _then go to ROM File Browser > FILESYSTEM > root > ARCHIVE > menu_title.narc > FILESYSTEM > root > menu > title and extract UE_title_ncl.bin. _now go to ROM File Browser > FILESYSTEM > root > uiStudio and import d_2d_mgvs_bg_title_ncg.bin into UI_O_menu_title_logo_o_u_ncg.bin and UE_title_ncl.bin into d_2d_UI_O_menu_title_logo_o_u_ncl.bin respectively. Now you can open both d_2d_UI_O_menu_title_logo_o_u_ncl.bin and UI_O_menu_title_logo_o_u_ncg.bin located in the uiStudio folder. Before importing your image in the new format, make sure View in 4bpp format is NOT ticked since you actually want to import the image in 8bpp. Now change Tile Width from 32 to 8, and only then you can import by clicking Import all bitmaps with all palettes and finally Save all. In-game: The video comes from an older version of the mod. Enjoy! |
RicBent |
Posted on 07-01-16, 03:40 pm
|
Mariomaster
Karma: 8528 Posts: 582/1681 Since: 06-09-12 |
skawo |
Posted on 07-01-16, 04:22 pm
|
Karma: 19757 Posts: 403/1100 Since: 04-02-13 |
This is rather neat. Too bad it removes the copyright, though :l
|
KTRMAmbiance |
Posted on 07-01-16, 04:47 pm (rev. 2 by KTRMAmbiance on 07-01-16, 04:55 pm)
|
Buzzy Beetle
Karma: 929 Posts: 84/394 Since: 11-20-15 |
Posted by skawo This is rather neat. Too bad it removes the copyright, though :l The workaround would be adding the copyright text near the logo in the NCG file, before this gets solved. _________________________ |
MeroMero |
Posted on 07-01-16, 05:22 pm (rev. 4 by MeroMero on 07-01-16, 07:54 pm)
|
Death by cuteness
Karma: 6564 Posts: 443/598 Since: 05-01-13 |
Posted by skawo This is rather neat. Too bad it removes the copyright, though :l Code updated. Now you have enough tiles to cover the whole screen! |
skawo |
Posted on 07-01-16, 09:41 pm (rev. 2 by skawo on 07-29-16, 08:39 am)
|
Karma: 19757 Posts: 404/1100 Since: 04-02-13 |
Excellenté, excellánté
|
MarioFanatic64 |
Posted on 07-01-16, 10:09 pm
|
Roy Koopa
The guy who does things. Karma: 12694 Posts: 2110/2796 Since: 07-01-11 |
I definitely need to take advantage of this. The Endless Earth title screen just doesn't cut it in its current form.
New Super Mario Bros.: Clone Tag Team 1+2 / New Super Mario Advance + Take 2 / Super Mario: Endless Earth My two greatest assets have been mental stability and being, like, really smart. |
TruelyJohn64 |
Posted on 07-01-16, 11:49 pm
|
(Words)
Karma: 730 Posts: 52/265 Since: 01-03-16 |
Posted by MeroMero Code updated. Now you have enough tiles to cover the whole screen! This is fantastic, this could make for some really dynamic title screens! I'm going to try this out sometime. _________________________ "I strikingly thought you would know how but it clearly seems you have no knowledge of hacking" - MiiU 2017 |
MarioFanatic64 |
Posted on 07-29-16, 06:33 am (rev. 1 by MarioFanatic64 on 07-29-16, 06:33 am)
|
Roy Koopa
The guy who does things. Karma: 12694 Posts: 2132/2796 Since: 07-01-11 |
There seems to be an issue. I followed the tutorial step-by-step, and it works in the way that I can use the whole screen for my logo, but I'm still limited to 16 colours. Is there another file we need to import over d_2d_UI_O_menu_title_logo_o_u_ncl.bin? You seem to be using UE_title_ncl.bin in the tutorial, but that file just crashes my ROM if I use it... New Super Mario Bros.: Clone Tag Team 1+2 / New Super Mario Advance + Take 2 / Super Mario: Endless Earth My two greatest assets have been mental stability and being, like, really smart. |
MeroMero |
Posted on 07-29-16, 06:46 am
|
Death by cuteness
Karma: 6564 Posts: 495/598 Since: 05-01-13 |
Weird.
Well the image is from UE_title.ncl, true, however the file used is still UI_O_menu_title_logo_o_u_ncg.bin. What you can do is download the archive on this post: https://nsmbhd.net/post/49237/ Then patch on a ROM than you can sacrifice(either patch will do), that way you can extract both d_2d_UI_O_menu_title_logo_o_u_ncl.bin and UI_O_menu_title_logo_o_u_ncg.bin and import them in Endless Earth to see if the problem persists. |
MarioFanatic64 |
Posted on 07-29-16, 07:16 am
|
Roy Koopa
The guy who does things. Karma: 12694 Posts: 2133/2796 Since: 07-01-11 |
Same thing with a clean ROM. Tried with the pre-made one in the pack and the one I made earlier. I insert the ASM hack, replace UI_O_menu_title_logo_o_u_ncg.bin with d_2d_mgvs_bg_title_ncg.bin, then I open UI_O_menu_title_logo_o_u_ncg.bin and add the palette from d_2d_UI_O_menu_title_logo_o_u_ncl.bin, but I can still only import at 16 colours. If I try to replace d_2d_UI_O_menu_title_logo_o_u_ncl.bin with a file with 256 colours, the game hangs after the Nintendo logo. New Super Mario Bros.: Clone Tag Team 1+2 / New Super Mario Advance + Take 2 / Super Mario: Endless Earth My two greatest assets have been mental stability and being, like, really smart. |
MeroMero |
Posted on 07-29-16, 07:40 am
|
Death by cuteness
Karma: 6564 Posts: 496/598 Since: 05-01-13 |
I assume that you still have all your ASM hacks in the source folder right?
You can try this: _copy the source folder elsewhere so as to keep all the files _delete all the ASM Hacks but the title logo one _Do a Run 'Make clean' and then a Run 'Make and insert' _If this time it works, then I think the reason the Title logo wasn't functioning was because an ASM clash was happening between the Title logo hack and one of your other ASM hacks. An ASM clash happens if somehow different codes were hooked at the same offset on the same overlay. Sadly NSMBe doesn't detect this, all the codes that happen to be hooked at the same address will be successfully implemented, but only the last one will be taken into account. |
skawo |
Posted on 07-29-16, 10:07 am (rev. 1 by skawo on 07-29-16, 10:31 am)
|
Karma: 19757 Posts: 526/1100 Since: 04-02-13 |
I don't think any other hacks use any of those hooks. I hooked slide cutscene to 0200A4DC, which is close, but 'ts it. Unless one of yours does somewhere?
|
MarioFanatic64 |
Posted on 07-29-16, 09:50 pm
|
Roy Koopa
The guy who does things. Karma: 12694 Posts: 2134/2796 Since: 07-01-11 |
Never mind, I've got it working for me now. Don't know why it wasn't working before.
New Super Mario Bros.: Clone Tag Team 1+2 / New Super Mario Advance + Take 2 / Super Mario: Endless Earth My two greatest assets have been mental stability and being, like, really smart. |
skawo |
Posted on 08-06-16, 10:59 am (rev. 1 by skawo on 08-06-16, 11:40 am)
|
Karma: 19757 Posts: 553/1100 Since: 04-02-13 |
...And now I'm having the same problem. Very weird.
EDIT: There's something specific about the NCL you used that you can't reproduce in NSMBe. Which one did you use for your image? |
MeroMero |
Posted on 08-06-16, 04:50 pm (rev. 1 by MeroMero on 08-06-16, 05:01 pm)
|
Death by cuteness
Karma: 6564 Posts: 522/598 Since: 05-01-13 |
This is the file I used to replace d_2d_UI_O_menu_title_logo_o_u_ncl.bin with:
FILESYSTEM > root > ARCHIVE > menu_title.narc > FILESYSTEM > root > menu > title > UE_title_ncl.bin Also once you have imported the palette, LZ Compress it. It sounded so obvious in my head yet I actually forgot that step in my opening post. |
skawo |
Posted on 08-06-16, 06:55 pm
|
Karma: 19757 Posts: 556/1100 Since: 04-02-13 |
Aaaaaaaaaaaaaaah.
Of course. |
Shavo |
Posted on 08-06-16, 07:50 pm
|
Micro-Goomba
Karma: -3 Posts: 10/11 Since: 08-04-16 |
Okay, if there are no big glitches anymore, then I add it to my hack!
_________________________ Thank you ~Shavo |
Pages: 1