Marakatti wrote:Great improvement! Any chance for a new demo to try out?
Sure ... here you go. 1 Meg only for now ... it does some very odd things on a 520ST. I think you mentioned that you have access to a real ST so let me know if it works for you.
(AtariZoll - Any observations you have on the odd way it runs on a 520 would be welcome as I'm a bit stumped - I think there should be enough memory to fit it all in!)
Looks and work fine - with 1MB or more RAM
Now the errors: I ran it through Steem Debugger , what you really should try, because I observed first error after 10 seconds - alternate screen is set to $80000 - what is above 512K RAM space, so normal that looks horrible on 512 ST
Second error is that SP is set too high, and you have pretty big unused RAM area, while RAM is tight on target 512KB machines.
SP should be set aprox. 1KB above last RAM address you use with game. And that last RAM address should be same as section bss end address (visible in TOS header) . Currently, if using TOS 1.04 UK, it is $AA56 (code start) + $17718 ( code len) + $3D840 (data len) + $18B8 ( bss len) = $61266 . Alernately, you can set SP to top of RAM, as after screen there is 768 bytes unused space. But that will fail on Falcon for instance, so not recommended.
After correcting SP you will have plenty of space for alt screen on 512K machines .
The solution: I already wrote here that you should set alt screen to address : regular screen base - $8000 , and not as fixed one. This will not only make it work well on 512K RAM, but will make it to work from hard disk. Because then whole executable may go higher in RAM, since there is plenty of space until 1MB (what is minimum for hard disk work).
Then in case of 1MB RAM screen will be at: $F8000 - normal screen base, what you "inherit", and $F0000 . In case of 512K: $78000 and $70000 .
Places for correction: when code start is at $AA56 (TOS 1.04) , at aprox. $219E2 is some calculation of address, after what comes setting of SP. All that code seems messy for me, and in any case the result is setting of SP too high. And that is not good, as will conflict with screen in case of 512K RAM. So, as said, set SP about 1KB above bss end.
Screen base setting: at $CE82 is XBIOS call to get screen base, then writing of it to variable for first scrren, and after that you should instead move.l #$80000, secondscreen ... to use sub.l #$8000,d0 ; move.l d0,secondscreen, and same address few lines lower, instead move.l #$80000,-(a7), so move.l d0,-(a7) ....
I did change of screen base and SP on fly, in Debugger, and after that it worked flawless in Steem set to 512KB RAM .
I'm not against GMO, I'm against that children play with fire.