Language…
21 users online: crocodileman94, D1STYNCT, DanMario24YT, Domokun007, GamesInTweed, Green, GRIMMKIN, Heitor Porfirio,  idol, Knetog, LightAligns, Nayfal,  Noivern, Pink Gold Peach, ppp9q, RZRider, Silver_Revolver, test212,  Thomas, VSmario90, yoshiatom - Guests: 306 - Bots: 297
Users: 64,795 (2,374 active)
Latest user: mathew

Oh no! VWF Dialogues and SMB3 Status Bar aren't compatible?

Oh man, I'm in a really tough situation now. I want to have both the VWF Dialogues patch and the SMB3 Status Bar patch in my hack, but the game crashes before the title screen appears if they're both inserted. And they're pretty big and complex patches.

I think I know exactly what the problem is. The SMB3 Status Bar completely changes the Status Bar and related code. All Status Bar related code is completely different from the default Super Mario World. But VWF Dialogues does a little stuff to the Status Bar, such as hiding it during dialogue processing, and the patch assumes you're using the default Super Mario World Status Bar.

I thought it was a simple fix. I tried commenting out all of the Status Bar related code that I knew of in the VWF Dialogues patch. This, hopefully, would still make the game process the Status Bar while a message was on the screen, but the game still crashes before the title screen. It even still crashes on the title screen if I insert this modified VWF Dialogues patch and nothing else into a clean expanded ROM that's been saved in Lunar Magic once.

Do I need to change default Super Mario World jumps and pointers like $008DAC to point to the SMB3 Status Bar stuff and that's it? Will my setting for "Extra Setting" in the SMB3 Status Bar patch affect which changes I'll have to make to the VWF Dialogues patch?

Code
.skip

	lda !vwfmode
	asl
	tax
	lda .Routinetable,x
	sta $00
	inx
	lda .Routinetable,x
	sta $01
	phk
	pla
	sta $02

;	lda #$F0		; Hide Status Bar item
;	sta $02E1

	jml [$0000]

.End
	plp			; Return
	plb
	pla
	ply
	plx

;	lda !vwfmode		; Skip Status Bar in dialogues
;	bne .SkipStatusBar
;	lda $0D9B
;	lsr
;	bcs .SkipStatusBar
;	phk			; Display Status Bar
;	per $0006
;	pea $84CE
;	jml $008DAC|$800000

;.SkipStatusBar
;	jml $0081F7|$800000

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Both patches use a SNES feature called IRQ that, roughly, allows you to change lots of otherwise global screen parameters when the SNES begins to draw a definite scanline. For example, the unmodified game uses it to visually separate the status bar and layer 3 images (they're both on the same layer).

The SMB3 status bar patch affects IRQ to move it to the bottom of the screen, and make it so that the actual game is in the top part rather than the bottom one, which is already quite the heavy modification of the vanilla thing. It conflicts with the VWF dialogues patch because this latter needs to mess with IRQ too, to get the status bar to disappear and the text boxes to show up.

So, sorry, but in the current situation, these patches just cannot be compatible. IRQ in SMW is a very difficult thing to modify, and trying to use two patches that modify it ends up killing your ROM 99% of the time.
Actually, the reason for the crash has nothing to do with the IRQ. I'm using the VWF dialogues and an older version of the minimal status bar patch, which puts it on the bottom of the screen, and it hijacks the exact same part of the IRQ routine as the SMB3 patch, and my hack doesn't crash when loading the title screen. The real reason for the crash is because the VWF dialogues patch inserts a JML at $0081F2 and the SMB3 status bar hijacks $0081F4 to insert a branch, which overwrites part of the JML and will cause the CPU to jump somewhere it's not supposed to. All you have to do to fix it is just comment out these two lines in the SMB3 patch:

Code
;org $0081F4
;BRA $01 : NOP	;these are no longer needed



And then reapply the VWF dialogues. The VWF dialogues is already set to jump back to $0081F7, which is where that branch jumped to in the SMB3 status patch, so your hack shouldn't crash again, at least in that part of the code.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)

Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
So I commented out those lines of code and inserted the SMB3 Status Bar patch then a clean, unmodified VWF Dialogues patch into a clean 4 MB ROM with all of Lunar Magic's basic ASM edits and 4bpp graphics, and the game still crashes at the title screen. The Nintendo Presents shows then the title screen music plays, but no image appears.

The game crashes even if I insert only the SMB3 patch with those 2 lines commented and NOT the VWF Dialogues patch. Those 2 lines must be necessary for the SMB3 Status Bar patch to work.#fim{?_?}

Ugh, if I can't get this fixed, I may have to use Super Mario World's default status bar, which I REALLY don't want to, or even cancel my hack!#fim{DX}

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Sorry for the bump, but I figured out how to fix this incompatibility between the VWF Dialogues patch and the SMB3 Status Bar patch. I've already PM'ed DPBOX about this, but I'm posting this here so anyone else who has this issue will know how to fix it.

Here is what needs to be done:

- Comment out the hijack I mentioned in my previous post in this thread. You don't necessarily have to do it, but you won't be forced to reapply VWFdialogues.asm each time you apply SMB3_status.asm.

- Go into vwfdialogues.asm, scroll down to VBlank, then comment out the lines shown here:

Code
.End
	plp			; Return
	plb
	pla
	ply
	plx

	;lda !vwfmode		; Skip Status Bar in dialogues
	;bne .SkipStatusBar
	;lda $0D9B
	;lsr
	;bcs .SkipStatusBar
	;phk			; Display Status Bar
	;per $0006
	;pea $84CE
	;jml $008DAC|$800000

.SkipStatusBar
	jml $0081F7|$800000


This was causing the crash because $008DAC is called in the routine at $05BE8A instead of where it's normally called in SMW. This routine has a bank wrapper at the start of it, which meant that the new routine at $008DAC needed to put a PLB before returning. Because the VWF dialogues code was built with the original status bar in mind, which didn't have a bank wrapper, this PLB messes up the stack, causing the CPU to jump somewhere where it will crash.

- Go into VWFdialogues.asm, then scroll down to this routine:

Code
NMIHijack:
	phx
	lda !vwfmode
	tax
	lda.l .NMITable,x
	bne .SpecialNMI		; If NMITable = $00 load regular NMI
	sty $4209
	stz $420A
	stz $11
	lda #$A1
	sta $4200
	stz $2111
	stz $2111
	stz $2112
	stz $2112
	plx
	jml $0082A4
	;bra .End


Add the plx and the jml $0082A4 here. Normally, this routine JMLs to $0082B0 at the end, but that's an issue with the SMB3 Status Bar because that patch inserts a hijack at $0082A4. This fix allows PreStatusBar in SMB3_Status.asm to run like it's supposed to, but only when a VWF message isn't running.

- Go into PostStatusBar in SMB3_status.asm and add these 4 lines between the BNE - and the PHD:

Code
PostStatusBar:
BNE -
LDA $702000	; Set this to whatever !varram is set to in vwfdialogues.asm
BEQ +
JML $0083B2
+
PHD


This prevents the status bar tilemap from being updated while a VWF message is displaying. Otherwise, the VWF won't display correctly.

- If you've applied levelheight.asm, you'll need to go into levelheight.asm and change the value in !offset to $10. When the VWF message displays, the status bar will disappear temporarily, which means that you'll see a row of blank tiles if the camera is at its lowest point unless you change the value in !offset to something lower than the defualt $20.

And that's about it. Everything should be working fine:



However, if you're using ZSNES, Mario's graphics are glitched a little bit while the status bar is visible, and I don't know why. However, this doesn't happen in SNES9x, BSNES, or on a real SNES (tested with an SD2SNES flashcart), so fixing that isn't a priority unless you really care about keping your hack compatible with ZSNES.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)

Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Originally posted by yoshifanatic
However, if you're using ZSNES, Mario's graphics are glitched a little bit while the status bar is visible, and I don't know why. However, this doesn't happen in SNES9x, BSNES, or on a real SNES (tested with an SD2SNES flashcart), so fixing that isn't a priority unless you really care about keping your hack compatible with ZSNES.

original smb3 status bar patch does that, so dont worry
Originally posted by yoshifanatic
all that


Oh my god, you're an hero, I've been trying to make them compatible long time ago. Thanks!

Userbar by Green Jerry

Also a Fortaleza Reznor user. If you... digo, si hablas español, hackeas, buscas ayuda, o simplemente se te da conocer gente, únete, somos puerta abierta.