How to make a tile ignore paths?

Hey! Ive been a bit absent from nesmaker and nes dev as a whole for a few months, and I was wondering if a way to make tiles be ignored by paths was implemented (Or if a user found a way to do it).
Alternatively, if anybody knows where the code that loads in the paths, I might be able to put together something.
Thanks!
 

AllDarnDavey

Active member
Check out this thread on making paths work with scrolling. You can kinda hack reusing that tilespace. Mugi mentioned managing to patch out the code for path generation, might want to send 'em a message.
http://nesmakers.com/viewtopic.php?f=35&t=2174
 

Mugi

Member
the code that initializes the procedural pathing is in handlescreenloads.asm
there's a part down it that defines the initilization offset tiles in the CHR. they're #$80 #$90 #$A0 and #$B0.
since we're dealing with a 16x16 metatile system here, switching these to, say 81 91 a1 and b1 will completely disable the autopathing because it never finds those tile indexes from the top left of a metatile.

of course, cleaning up and removing the whole pathing code would be more efficient, but it's quite a mess and allover the code, so for a quick fix, the above will do.

it was brienfly discussed here: http://nesmakers.com/viewtopic.php?f=35&t=2174
 
Mugi said:
the code that initializes the procedural pathing is in handlescreenloads.asm
there's a part down it that defines the initilization offset tiles in the CHR. they're #$80 #$90 #$A0 and #$B0.
Hey, so I looked pretty hard through the handlescreenloads.asm file and only found where it imports the pathing tiles into the PPU, not how it handles auto tiling. Perhaps there's been a change between 4.1.0 and 4.1.5?
 

Mugi

Member
ah you're right.
i was pretty sure it was in handlescreenloads.asm but actually it's in LoadMetaNametableWithPaths.asm

look for notBlankTile:
 

Mugi

Member
if you come up with a cleaner solution, do let me know. i dont really like the idea of having all that code sit there and eat space :p
just not enough time to clean it up atm. but yeah, if you intend to use the 16x16 metatiles from that area, simply changing 80 to 81 and A0 to A1 will do, those are the top left corners of metatiles you use from that area,
so disabling them effectively shuts down the procedural drawing for good.
 
Does anybody know what data is stored in temp while the metatiles are loading in loadmetatilewithpaths.asm? It looks like its putting temp16 in the Y register? Im not the best at ASM lmao.
Heres the code im referring to:
Code:
doMetaTileLoop:
	;;; 
	
	LDA updateNT_pointer+1
	STA $2006
	LDA updateNT_pointer
	STA $2006


	LDA (temp16),y
	STA temp
	;;;; now temp is loaded with the prospective tile.

	JSR GetSingleMetaTileValues
	JSR DrawSingleMetatile
 
Top Bottom