NextBuild icon indicating copy to clipboard operation
NextBuild copied to clipboard

Exception in makenexcfg.py at LoadSDBank with Variables

Open Hans007a opened this issue 4 years ago • 2 comments

Hello,

I will use LoadSDBank with variables for long data files and got an error 9009. Here my code (maybe not perfect, but I can't test it):

LoadBigSDBank("xxx.nxt", 95488, 40)


sub LoadBigSDBank(byval name as string, byval length as ulong, byval bank as ubyte)

	dim chunk as ulong
	dim i, part as ubyte
	
	part = cast(ubyte,length/8192)
	chunk = cast(ubyte,length mod 16384)
	for i = 0 to part - 1 step 2
		LoadSDBank(name,0,16384,cast(ulong,i)*16384,bank+i)
	next i
	if chunk > 0 then LoadSDBank(name,0,chunk,part*16384,bank+part) : end if
	
end sub

I have looked at the python script and it requires a direct variables in the procedure call. Can this be changed or I have to self use switch banks and LoadSD?

Regards

Hans

Hans007a avatar Dec 08 '21 09:12 Hans007a

Hans, you will have to use LoadSD if you want a .NEX generated i think as the LoadSDBank lines Do not evaluate to constants inside python.

ljg701 avatar Dec 26 '21 10:12 ljg701

The intention was to allow LoadSDBank to work as a normal command if required after insertion to a NEX file (without using #DEFINE NEX) but it seems to have stopped working. As lig701 states for now if LoadSD is a suitable alternative until I have chance to take a look what has happened. Also sorry for the delay!

em00k avatar Dec 30 '21 23:12 em00k