Textboxes Warping the Background in NoScroll Core

Rustocrat

New member
So I've gotten to the point in my game where I decided to integrate a bit of story. So, naturally, I had to get my text boxes sorted out. I got them working by following the tutorial... but whenever they disappear, they always skew the background tiles one space to the right. The collision data doesn't change, just the image. I'm using the NoScroll core BTW. I don't know how well this works in the basic core.

The first image shows the my first box of expository text and the second shows what happens once it is cleared away. Notice how the staircase is shifted 16 pixels to the right?

game-000.png


game-001.png
 

dale_coop

Moderator
Staff member
Yes, I have the exact same issue. This bug is specify to the Basic_NoScroll core (you should add this in the title ;)).
 

Rustocrat

New member
Is it possible for us to patch this one out? And by us I mean members of the forum with a greater understanding of ASM than I? Because unless Joe releases a patch, none of the NoScroll games will be able to use text boxes properly in time for the contest deadline. I hate to sound needy here, but I imagine that I'm not the only one who could use this, and I'd hate to leave the story out of my game for the sake of entering it on time.
 

dale_coop

Moderator
Staff member
Yes of course, we could do that... just need to figure out when is the mistake (should be a wrong initialization of a variable or misread,...)
--> jorotroid could be our savior on that.
 

Rustocrat

New member
I just posted about it on the NESMaker Facebook page. Hopefully we can attract the attention of somebody with the know-how to fix it.
 

jorotroid

Member
I can look into it. It sounds like a simple mistake. Give me a few minutes to start a NoScroll project. Anything I should know about how to recreate the bug?
 

dale_coop

Moderator
Staff member
Thanks jorotroid :)
I think it’s just a mistake somewhere in the code when Joe removed the scrolling related part.
To reproduce, use the basic_noscroll simplescreen moduke, then it’s quite easy just make an npc textbox displaying over some background graphics... when the textbox disappears, the original background tiles are not back to the correct spot (shifted to the right). Always.
 

jorotroid

Member
Ok, give this a try.

Open up HandleBoxes.asm (located in \Routines\Basic_NoScroll\System)
Go do to the section called GetNametableDataToRestore starting on line 49.
A little further downs starting line 65, comment or delete this code:
Code:
	CLC
	ADC tileX
	SEC
	SBC temp2

And put this code in its place:
Code:
	STA temp
	LDA #BOX_1_ORIGIN_X
	ADC updateNT_H_offset
	STA tileX
	ORA temp


I think that should do it. I didn't get extensively test it, so let me know if it creates new problems. I don't think the problem is related to getting rid of the scrolling, but I haven't messed around with text and scrolling yet, so I don't know. I'm not completely sure where the mistake was made, but here seemed like the best spot to fix it while also not causing other problems.
 

dale_coop

Moderator
Staff member
Awesome! Thanks jorotroid, I will check that :)

Edit: Yeah, works way better now!! Thank you again jorotroid <3 I can reintroduce some textbox in my game.
 

jorotroid

Member
dale_coop said:
Awesome! Thanks jorotroid, I will check that :)

Edit: Yeah, works way better now!! Thank you again jorotroid <3 I can reintroduce some textbox in my game.
Rustocrat said:
Thank you so much Jorotroid! Consider yourself added to my credits!
dale_coop said:
Of course, you was already in my credits, jorotroid ;)


Haha. Thanks guys. Glad it worked out.
 

PortableAnswers

New member
jorotroid said:
Ok, give this a try.

Open up HandleBoxes.asm (located in \Routines\Basic_NoScroll\System)
Go do to the section called GetNametableDataToRestore starting on line 49.
A little further downs starting line 65, comment or delete this code:
Code:
	CLC
	ADC tileX
	SEC
	SBC temp2

And put this code in its place:
Code:
	STA temp
	LDA #BOX_1_ORIGIN_X
	ADC updateNT_H_offset
	STA tileX
	ORA temp


I think that should do it. I didn't get extensively test it, so let me know if it creates new problems. I don't think the problem is related to getting rid of the scrolling, but I haven't messed around with text and scrolling yet, so I don't know. I'm not completely sure where the mistake was made, but here seemed like the best spot to fix it while also not causing other problems.

Hey, this works on my Day screen but how do I get it to also work on my Day-Triggered screen? Thanks!
 

jorotroid

Member
PortableAnswers said:
Hey, this works on my Day screen but how do I get it to also work on my Day-Triggered screen? Thanks!

I'm at a loss. I really have no idea why it wouldn't work with a triggered screen. If I figure anything out, I'll let you know. Sorry.
 
Top Bottom