Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,499,469
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-29-24 05:21 AM
Guest: Register | Login

Main - Posts by DanielFA


DanielFA
Posted on 01-13-19 10:57 PM, in General SMB3 Hacking Thread (rev. 2 of 01-13-19 11:50 PM) Link | Quote | ID: 166841

Newcomer
Level: 6

Posts: 1/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
Hi everybody!

I'm really new on ROM hacking and have a problem with the tile arrangement:



As you see, I've replaced the wood-like floor tiles with the SMB1 cracked terrain ones but the result is awful (only one block is not wrong). I understand that the tiles used on each TSA or object can be changed using an hex editor but can't manage to make it. This is the object I want to edit:



SMB3 Workshop says it's 'Flat Ground' (Bank 0 Types 192 and 193). This is the original version for reference:



Could someone help me to correct this? I've tried searching in FCEUX for the tile numbers but found nothing. I've also tried with SMB3 TSA Editor but couldn't really understand how must it be used:



That's the awful result...

DanielFA
Posted on 01-14-19 12:43 PM, in General SMB3 Hacking Thread Link | Quote | ID: 166854

Newcomer
Level: 6

Posts: 2/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
Posted by AlanJacobs
Several solutions to this.


1) You can use the TSA Block editor. I know you mentioned you tried using it, but keep in mind you can cycle through the blocks using the arrows on your keyboard and change the graphics with your left clicker. To my knowledge, you can only edit the upper left tile. Cycle through the different blocks under the 'Plains' Object Set and change the Tile ID's to all 6 blocks (53, 54, 55, 56, 57 & 58) and you should have it.


2) Use hex editor. Since you already have one block in the correct position (55), you can change the rest of the blocks to 55 since you only need one block. Go to address 0x01D308 and change the block ID's from there.

"55 53 57 F6 F4 F8 56 54 58" and change to "55 55 55 F6 F4 F8 55 55 55"


3) Change the graphic tile ID's using hex editor. Basically doing what you would've done with TSA Editor only through hex. The Tile IDs are located around the 0x01E200 area, but this would take some time, so I recommend the above two.

As for your last pic, my guess is that you used TSA Editor and accidently edited the ending tiles. Like I mentioned, you can only use the upper left tile to edit. Avoid editing the other three because they are at the standard '00' block, which are the ending tiles. Change them back to the black tiles

Thank you Alan!

After asking, I've tried again and again with TSAE and managed to change the metatiles, this is the result:



But, again, the ending was messed up:



Thanks to your explanation now I know how to not do it! Also, even when making it using the editor is the easier way, I'll try to make it changing the hex values for practice purposes... Now another issue:



On the left is what I got from tile editing, on the right is what I wanted to get (SMB1 two differente blocks -with or without the upper line- depending on position). Is there a way to change that using TSA/HEX editors or is it only possible dissasembling the ROM, changing the code and reassembling it again? In the latter case, I'll let it for the future if I manage to grasp the ASM language... One more thing:



I keep changing the palettes...

DanielFA
Posted on 04-21-19 05:56 PM, in General SMB1/SMB2J Hacking Thread (rev. 10 of 04-22-19 01:39 AM) Link | Quote | ID: 166977

Newcomer
Level: 6

Posts: 3/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
Hi again!

As I got stuck with my SMB3 graphics hack since it needed advanced ASM knowledge, I decided to start with some tutorials and the available SMB1/SMB2J disassemblies from doppelganger. Well, I love the SMB2J gameplay but find the graphics awful, specially the ground tiles, so decided to copy the tiles from SMB1. But a problem arose in worlds 8-2 and 8-3 where there are platforms made by the 'cloud ledge' tiles:



Editing the graphics gives this:



OK, changing the palette assigned for the now 'mushroom ledge' tiles I can get this:



But in SMB1 they have a stem and they should look like this (edited image):



This obviously is a ASM task, so I took smb2jdis, made free space following ShaneM's explanation and got a new fully functional ROM with room for the desired code. Both SMB1 and SMB2J have a similar ledge object subroutine:

MushroomLedge:                       ;[SMB1]
jsr ChkLrgObjLength ;get shroom dimensions
sty $06 ;store length here for now
bcc EndMushL
lda AreaObjectLength,x ;divide length by 2 and store elsewhere
lsr
sta MushroomLedgeHalfLen,x
lda #$19 ;render start of mushroom
jmp NoUnder

EndMushL: lda #$1b ;if at the end, render end of mushroom
ldy AreaObjectLength,x
beq NoUnder
lda MushroomLedgeHalfLen,x ;get divided length and store where length
sta $06 ;was stored originally
ldx $07
lda #$1a
sta MetatileBuffer,x ;render middle of mushroom
cpy $06 ;are we smack dab in the center?
bne MushLExit ;if not, branch to leave
inx
lda #$4f
sta MetatileBuffer,x ;render stem top of mushroom underneath the middle
lda #$50

AllUnder: inx
ldy #$0f ;set $0f to render all way down
jmp RenderUnderPart ;now render the stem of mushroom

NoUnder: ldx $07 ;load row of ledge
ldy #$00 ;set 0 for no bottom on this part
jmp RenderUnderPart

MushLExit: rts ;and leave

And:

CloudLedge:                          ;[SMB2J]
jsr ChkLrgObjLength ;get cloud dimensions
sty $06 ;store length here for now ($06 = $0006 → Internal RAM)
bcc EndCloud
lda AreaObjectLength,x ;divide length by 2 and store elsewhere (AreaObjectLength = $0730 → Internal RAM)
lsr
sta MushroomLedgeHalfLen,x ;(MushroomLedgeHalfLen = $0736 → Internal RAM)
lda #$8a ;render start of cloud (#$8a = 138 → Numerical Value)
jmp NoUnder

EndCloud: lda #$8c ;if at the end, render end of cloud (#$8c = 140 → Numerical Value)
ldy AreaObjectLength,x
beq NoUnder
lda MushroomLedgeHalfLen,x ;get divided length and store where length
sta $06 ;was stored originally ($06 = $0006 → Internal RAM)
ldx $07 ;($07 = $0007 → Internal RAM)
lda #$8b ;(#$8b = 139 → Numerical Value)
sta MetatileBuffer,x ;render middle of cloud (MetatileBuffer = $06a1 → Internal RAM)
rts

AllUnder: inx
ldy #$0f ;set $0f to render all way down (#$0f = 15 → Numerical Value)
jmp RenderUnderPart ;now render the support of the tree ledge

NoUnder: ldx $07 ;load row of ledge ($07 = $0007 → Internal RAM)
ldy #$00 ;set 0 for no bottom on this part (#$00 = 0 → Numerical Value)
jmp RenderUnderPart

The other subroutines they call are the same in both games so I added the stem drawing part from one game to the other, assembled the code and got a valid ROM. I started it on FCEUX and played until 4-4 without any problem but when the FDS tried to open 5-1, it got stuck 'forever'...

What do you think?

Have I made something wrong adding the code and the BIOS can't read the level data? I had the same loading problem in the original ROM when using the 'unlimited time' and 'max lives' cheats. Oh, the game gets stuck when loading worlds A/D too... Just FYI, I managed to add new code on SMB1 but on the NES version, the FDS specific format confuses me a lot!

Here is a patch for the original ROM: SMB2_4.ips
Posted by teeporage777
but these underwater levels are killing me. everythings fine besides the fact that blocks under water no matter if they are coins a mushroom they wont activate

Looking at the famous disassembly I found a nice cheat for the original SMB1 ROM that makes underwater blocks hittable and they'll give you coins or power-ups. Here is where the exception for underwater levels is made:

0DCDA AC 4E 07       ldy AreaType
0DCDD F0 13 beq NYSpd

As Quick Curly told you:
Posted by Quick Curly
$074E is defined as "AreaType". If you manually set $074E in RAM to 00, the active level will be considered a water level

Therefore, the BEQ will always branch to another place when the level has AreaType=$00 preventing the block hitting. But you can fool the process redirecting it to another address where you put the value $01 (overground level). You can make this without editing the disassembly and reassembling it simply by using cheat codes on your emulator or altering the ROM on a hex editor. You only need to find a free address, for example in the original ROM $E432=$FF is not used, so make it $01 and change $DCDA-$DCDC to $AC $32 $E4. Here you have a cheat file for FCEUX: Underwater Hitting. Here a quick test on an altered world 1-1 (with a cheat code that forces $074E=$00):



If you want to implement this circumvention on another ROM, it should have this code somewhere:

0DCD5 20 8F DF       jsr CheckForSolidMTiles
0DCD8 B0 10 bcs SolidOrClimb
0DCDA AC 4E 07 ldy AreaType
0DCDD F0 13 beq NYSpd
0DCDF AC 84 07 ldy BlockBounceTimer
0DCE2 D0 0E bne NYSpd

So, how to find it on the ROM/RAM with a hex editor if it isn't located on those addresses?

Well, you must search for the string "20 8F DF B0 10 AC 4E 07 F0 13 AC 84 07 D0 0E" or parts of it then you change "4E 07" to whatever address you found empty or unused, change the $00/$FF on that address to $01 and presto!
Posted by Quick Curly
I feel like hitting "?" blocks underwater would have been a pursuit in Super Mario Bros. hacking at some point in time, but I couldn't seem to find anything from searching

I was thinking about it some years ago when I came across the SMB1 256W hack but at the time ASM was unknown by me. Thanks to doppelganger's effort it was now really easy for me to find it!

DanielFA
Posted on 11-06-19 03:06 PM, in SMB2J for SMB1 - GreatED Experiment (rev. 2 of 11-06-19 03:06 PM) Link | Quote | ID: 167154

Newcomer
Level: 6

Posts: 4/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
Posted by Insectduel
I've been using the GreatED SMB1 editor

Thank you for mentioning it, I didn't know about that editor!

DanielFA
Posted on 12-04-19 06:41 PM, in SMB2J for SMB1 - GreatED Experiment (rev. 3 of 12-04-19 06:42 PM) Link | Quote | ID: 167179

Newcomer
Level: 6

Posts: 5/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
It'd be nice to have an editable SMB2J MMC3 version... I've found your stuff for SMB2J level editing and the ISD SMB Utility. Really useful, thank you very much for sharing it!

DanielFA
Posted on 12-04-19 06:48 PM, in Is this possible to do in SMB1? Link | Quote | ID: 167180

Newcomer
Level: 6

Posts: 6/6
EXP: 646
Next: 261

Since: 01-13-19
From: Argentina

Last post: 1607 days
Last view: 1607 days
Why so much hatred?

Main - Posts by DanielFA

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.327 seconds. (337KB of memory used)
MySQL - queries: 59, rows: 77/77, time: 0.320 seconds.