Prop Tool issue with Mixed Cogexec and Hubexec
Rayman
Posts: 14,744
in Propeller 2
Trying to figure out why this 2-bit tiles graphics code works with FlexProp but not Prop Tool.
The assembly is too big for the cog, so a lot of it is in hub.
Just figured out that one change makes some of it work, but have no idea why:
When I replace this hubexec call with the code it's calling, it seems to work.
But, it should produce the exact same outcome, as I see it:
'call #setd2 'set dx,dy from arg0,arg1 'Call to setd2 doesn't work because affects hub version of vars and not cog version? mov dx,xorigin 'set dx,dy from arg0,arg1 add dx,arg0 mov dy,yorigin sub dy,arg1
This is from 1080p_TileDriver_8a.spin2
Comments
Same issue in PNut. Won't run at all in Spin Tools IDE and don't see why not...
It's possible that the DAT statements reset the orgh mode in PNut, whereas they don't in flexspin? I'm just guessing here, but you have a LOT of redundant DAT statements scattered through the assembly.
@ersmith That might have something to do with it... The Prop Tool seems to have an issue with me starting a new Assembly DAT section after the first one.
But the reason for all the DAT sections is so that I can use the "Summary" mode in Prop Tool and jump around in a large code...
I added this part in between the cogexec and hubexec sections with some effect:
May have to just drop this cogless graphics for use with Prop Tool. Can just use cogged version instead, that works.
I think something is broke in Prop Tool, but who knows, it's kind of complex...
On the bright side, I did figure out how to use "@@" in combination with "@", as described in the Spin2 docs in a way that works for both FlexProp and Prop Tool.
This lets me define forms like this with pointers to strings and sub-objects. The @@ must be relatively new because last time I tried to make this code work with Prop Tool, there was no way to do it...
Was finally able to get this Mixed Signal Scope app with 1080p 2-bit graphics working with Prop Tool.
But, had to switch away from using the cogless graphics.
Something is horribly wrong with the cogless graphics when used with Prop Tool .
Not sure if something with the use of an interrupt or jumping back and forth from cogexec to hubexec, but something is really wrong...
Using the cogged graphics is fine. The cogless was kind of nice for when don't have enough cogs and don't need much graphics.
Might take another look at it later...
The attached is more or less working with FlexProp and Prop Tool.
The play wav file button doesn't work at the moment, but that's nothing to do with the framework...
This is rigged for SimpleP2++ board or with P2 Eval board with VGA on basepin 8 and USB on basepin 16