Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in makenexcfg.py at LoadSDBank with Variables #19

Open
Hans007a opened this issue Dec 8, 2021 · 2 comments
Open

Exception in makenexcfg.py at LoadSDBank with Variables #19

Hans007a opened this issue Dec 8, 2021 · 2 comments

Comments

@Hans007a
Copy link

Hans007a commented Dec 8, 2021

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

@ljg701
Copy link
Collaborator

ljg701 commented Dec 26, 2021

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.

@em00k
Copy link
Owner

em00k commented Dec 30, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants