Language…
6 users online: HaruMKT, krizeth, monkey03297,  Nanako, playagmes169, qantuum - Guests: 256 - Bots: 328
Users: 64,795 (2,376 active)
Latest user: mathew

Help with MarioFanGamer's HDMA patch

I almost completed world 1. I wanted to insert MarioFanGamer's HDMA patch again. It's the one from this link. Yes, I added ScrollHDMA.asm into UberASM Tool's library folder. However, I tried something different. I followed Thomas' suggestion, by merging 2 .asm files into 1. The first one is called GenHDMADay.asm and it's also in the library folder and the other one is named NoDieVerticalScroll.asm or NDVS.asm in my case and it's again in the library folder.
I made another .asm file called MergeCode.asm. It's in the level folder and it has the code below:
Code
init:
	JSL GenHDMADay_init
	RTL

main:
	JSL GenHDMADay_main
	JSL NDVS_main
	RTL

There was no need for 'JSL NDVS_init', sice the NDVS file has only the main code.
I added MergeCode.asm into the list.txt like so:
Code
105 		MergeCode.asm

After I ran UberASMTool.exe, it told me that JSL ScrollHDMA_DecompressGradient wasn't found. Any help with this?
I believe the C3 version misses an important file. Try the version in the waiting uberASM section, which includes everything, and it should work fine.
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!

Aside from ScrollHDMA.asm being different, I get the same error.
That's one of the cases where you can't use the library method since Scrollable HDMA already using a library file (ScrollHDMA.asm) and UberASM can't call library codes inside libraries (yes, the current solution to merge files is hacky). You can keep NDVS.asm in "library" but you have to move GenHDMADay.asm into "level" and modify it so that it calls NDSV_main before running its own main code (the order is, well, kind of optional but putting the call afterwards is more difficult than calling it before). Preferably, don't execute NDVS's main code during the init code which can be easily done with a BRA $03 at the end of init or a BRA Label where Label is after JSL NDVS_main.

In other words (excluding defines and gradients):
Code
; The defines you have set in GenHDMADay.asm

init:
	REP #$10
	LDX.w #Gradient
	STX $00
	LDA.b #Gradient>>16
	STA $02

	LDA.b #!FreeRAM_GradBank
	LDX.w #!FreeRAM_RedGreen
	LDY.w #!FreeRAM_Blue

	JSL ScrollHDMA_init
	BRA main_gradient

main:
	JSL NDVS_main

.gradient
	REP #$20

	LDA #!FreeRAM_RedGreen
	STA $00
	LDA #!FreeRAM_Blue
	STA $02

	LDA $1C+((!Layer-1)<<2)
	SEC : SBC.w #!Offset
	LSR #!ScrollFactor
	JML ScrollHDMA_main

; The gradient in GenHDMADay.asm
I thank you for your idea, but I found a workaround and works okay.