02-15-2022, 03:38 AM
Quote:In attempting to change TREG0 to some other interval, I discovered I need it set to 1 for udmadac, which uses timer 0 and timer 2.
You have to set it to 4 only for the hblank interrupt of course, not for others (or did I misunderstand? maybe it's not treg0 in your code)
And sometimes, changing the condition order can help if it reduces the number of tests/memory load/...
Code:
else if(y==60) {if (screenSplit) SCR2_X=split1; }
else if(y==100) { if (screenSplit) SCR2_X=split2; }
here, screenSplit value is only tested for y = 60 and 100 (y is already loaded from mem), in your previous code it's always loaded and tested