PreDraw Issue

TheWizard

New member
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.4 KB · Views: 2,206

TheWizard

New member
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:
	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
 

jorotroid

Member
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.
 

TheWizard

New member
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.4 KB · Views: 2,172

chronosv2

New member
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.
 

nroflmao

New member
I just hit the same issue. I was able to get 3 additional sprites, but choked on the 4th. Guess I will run with 3/4 for now. Hopefully this gets better in 4.1.0!!!
 
Top Bottom