PreDraw Issue

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
Post Reply
User avatar
TheWizard
Posts: 5
Joined: Wed Oct 10, 2018 2:56 am

PreDraw Issue

Post by TheWizard » Wed Oct 10, 2018 3:05 am

I only seem to be able to draw two additional sprites in the HUD.
When I try to draw any additional sprites (+2) I get a series of errors.
Anybody have any thoughts as to what I am doing wrong?

See attached image.
Attachments
Drawsprite.jpg
Drawsprite.jpg (72.37 KiB) Viewed 318 times
User avatar
jorotroid
Posts: 152
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: PreDraw Issue

Post by jorotroid » Wed Oct 10, 2018 8:16 am

What are the errors you are getting?
User avatar
TheWizard
Posts: 5
Joined: Wed Oct 10, 2018 2:56 am

Re: PreDraw Issue

Post by TheWizard » Thu Oct 11, 2018 1:43 am

It changes, but the following error occur when I with adding 1 additional sprite:

Vectors.asm<1>: Value out of Range.
OR
a_create_projectile.asm<54>: Value out of range.

When I try to draw 2 sprites i get a ton of out of range value errors
Here is the code:

Code: Select all

	
	DrawSprite #$30, #$18, #$6E, #%00000001, spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset

	DrawSprite #$38, #$18, #$6F, #%00000001, spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
	
	DrawSprite #$30, #$1E, #$7E, #%00000001, spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset

	DrawSprite #$38, #$1E, #$7F, #%00000001, spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
	inc spriteOffset
User avatar
jorotroid
Posts: 152
Joined: Wed Aug 08, 2018 7:48 pm
Location: California
Contact:

Re: PreDraw Issue

Post by jorotroid » Thu Oct 11, 2018 1:54 am

So the Vectors.asm<1>: Value out of Range error is usually the error that happens when you've added too much stuff to the static bank. You can use this tool to see if one or more of your banks are filled up.
https://www.romhacking.net/utilities/1169/

Just open the tool, then open your game.nes file in it to check. If one of the banks is green all the way to the bottom, then you have probably added too much stuff somehow. I'm not seeing anything obviously wrong with your code.
User avatar
TheWizard
Posts: 5
Joined: Wed Oct 10, 2018 2:56 am

Re: PreDraw Issue

Post by TheWizard » Thu Oct 11, 2018 2:47 am

When I comment the PreDraw code out I am getting these same results.
I am not sure what else it could be... What is the best way for me to trouble shoot this?
Attachments
report.jpg
report.jpg (606.39 KiB) Viewed 285 times
Last edited by TheWizard on Thu Oct 11, 2018 2:52 am, edited 1 time in total.
User avatar
chronosv2
Posts: 218
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: PreDraw Issue

Post by chronosv2 » Thu Oct 11, 2018 2:49 am

4.1.0 is supposed to be more space efficient for the static bank.
Waiting might be a valid option, unless you have to get it done now.

Otherwise, disabling features and removing functionality is the other option.
ASM/C# Coder -- Computer + Coffee = Code
ASM Tutorial Series
User avatar
TheWizard
Posts: 5
Joined: Wed Oct 10, 2018 2:56 am

Re: PreDraw Issue

Post by TheWizard » Thu Oct 11, 2018 2:54 am

Thanks!
I might just remove the Item pickups for now. :)
Post Reply