As I can remember, I run this Tetris several months ago. Now I cannot. I have a serial terminal with text mode tetris working, but no VGA video and no audio. What has changed? or what I forgot? ....
Edit: something has changed in Flexprop. It is SimpleSound which doesn't work when compiled using new Flexprop. I found Flexprop 5.3.1 and compiled the SimpleSound: it works. It also works in Propeller Tool but this cannot compile C code.
So now I will try to compile all Tetris using 5.3.1 and check if it works.
No success at this moment. I managed to get audio out of this tetris, using 5.3.1 compiler, but video tells "unsupported" on both my monitors
Also, compiling with 5.9.3 gives no audio... 5.9.3 cannot compile SimpleSound
And I remember Tetris worked ...
Can you upload a full source zip?
Which version of Flexprop did you use to compile?
I wanted to show this to my friend, a new P2 user and... he has bad and good luck: bad was the HDMI accesory board had shorted HDMI pins (too much solder). Good: As I also received (earlier) a HDMI board with pins shorted, I know this may be a problem and after several minutes we repaired this and we could run the spiral demo (which caused instant wow effect)
Parallax: check the quality of these boards! 2 of 3 HDMI boards we bought (Mouser Poland) were bad - or do they sell fake boards instead of original?
Then, after this HDMI spiral wow effect, I wanted to show him Tetris... no luck. Maybe tomorrow
Simple Sound doesn't work with Flexprop 5.5.1 or higher even if compiled standalone, without any C code, pure spin, pasm and clkfreq in con section. The code is not so simple to find what construction/operator/etc is compiled differently. Maybe I will try to compile it using both versions anc compare the assembly output.
I did a comparison between 5.5.0 and 5.5.1 and much of the generated code is identical between them. There are 3 different objects in the simpleSound suite, but all generated differencies are found in the small top wrapper object (simpleSound.spin2). It seems like the pointer arithmetic goes "haywire" and the "objptr" pointer gets incremented/decremented completely different between the version. Very interesting that this only affects the top object and nothing else.
Btw, it still works perfectly in the latest version of Propeller Tool after making sure that no identifier is more than 30 characters in length.
@Ahle2 said:
I did a comparison between 5.5.0 and 5.5.1 and much of the generated code is identical between them. There are 3 different objects in the simpleSound suite, but all generated differencies are found in the small top wrapper object (simpleSound.spin2). It seems like the pointer arithmetic goes "haywire" and the "objptr" pointer gets incremented/decremented completely different between the version. Very interesting that this only affects the top object and nothing else.
Btw, it still works perfectly in the latest version of Propeller Tool after making sure that no identifier is more than 30 characters in length.
Well yeah, when the variable order changes the instructions modifying objptr will. IIRC the codegen emits sequences like
add objptr,#123
call #some_instance_method ' Or member variable R/W
sub objptr,#123
and then the optimizer folds away redundant instructions. Not sure how that could go so awry.
I'd look deeper into it but I'm currently busy procrastinating on other things >.<
Lol, I'm so off that I didn't even know that the real discussion was in the FlexProp thread!
As usual these days I don't have a clue whats going on here in Propeller-land and the world keeps spinning anyway. I feel like a little ant in a haystack.
I wish I could be as active and dedicated as before, because the P2 is fantastic. But I love seeing that things I made still gets appriciated; That really warms my heart!
@Ahle2 said:
As usual these days I don't have a clue whats going on here in Propeller-land and the world keeps spinning anyway. I feel like a little ant in a haystack.
Don't worry, my game still isn't done (currently it's the story writing again. Dang writing. Is hard.) :P which means you're still in the present and haven't slipped into far-future land yet.
Comments
Ok, I see...
A good piece of code
As I can remember, I run this Tetris several months ago. Now I cannot. I have a serial terminal with text mode tetris working, but no VGA video and no audio. What has changed? or what I forgot? ....
Edit: something has changed in Flexprop. It is SimpleSound which doesn't work when compiled using new Flexprop. I found Flexprop 5.3.1 and compiled the SimpleSound: it works. It also works in Propeller Tool but this cannot compile C code.
So now I will try to compile all Tetris using 5.3.1 and check if it works.
Looks like the clock is not being set right...
Staying at 160 MHz instead of going to 297 MHz...
This use to be how to set the clock (in platform.h):
enum { _clkfreq= 297000000};
Tried setting the clock a different way in the attached and seems to work...
No success at this moment. I managed to get audio out of this tetris, using 5.3.1 compiler, but video tells "unsupported" on both my monitors
Also, compiling with 5.9.3 gives no audio... 5.9.3 cannot compile SimpleSound
And I remember Tetris worked ...
Can you upload a full source zip?
Which version of Flexprop did you use to compile?
I wanted to show this to my friend, a new P2 user and... he has bad and good luck: bad was the HDMI accesory board had shorted HDMI pins (too much solder). Good: As I also received (earlier) a HDMI board with pins shorted, I know this may be a problem and after several minutes we repaired this and we could run the spiral demo (which caused instant wow effect)
Parallax: check the quality of these boards! 2 of 3 HDMI boards we bought (Mouser Poland) were bad - or do they sell fake boards instead of original?
Then, after this HDMI spiral wow effect, I wanted to show him Tetris... no luck. Maybe tomorrow
@pik33 Can you try this with the original version?
In platform.h, move the clkfreq enum up to before the heap enum, like this:
The terminal window should flash the clock frequency when it starts...
Yes, this solved the video problem and I have a picture now. But for audio to work I still had to use old Flexprop.
Now I have the game working.
Ok, maybe we need to do something like this:
enum { _clkfreq= 297000000, heapsize = 8000 };
Looks like only one line of enum works with new versions... I imagine this will be fixed in next FlexProp release.
Simple Sound doesn't work with Flexprop 5.5.1 or higher even if compiled standalone, without any C code, pure spin, pasm and clkfreq in con section. The code is not so simple to find what construction/operator/etc is compiled differently. Maybe I will try to compile it using both versions anc compare the assembly output.
I'm seeing this too... Works with 5.5.0 but not above...
I did a comparison between 5.5.0 and 5.5.1 and much of the generated code is identical between them. There are 3 different objects in the simpleSound suite, but all generated differencies are found in the small top wrapper object (simpleSound.spin2). It seems like the pointer arithmetic goes "haywire" and the "objptr" pointer gets incremented/decremented completely different between the version. Very interesting that this only affects the top object and nothing else.
Btw, it still works perfectly in the latest version of Propeller Tool after making sure that no identifier is more than 30 characters in length.
Well yeah, when the variable order changes the instructions modifying
objptr
will. IIRC the codegen emits sequences likeand then the optimizer folds away redundant instructions. Not sure how that could go so awry.
I'd look deeper into it but I'm currently busy procrastinating on other things >.<
Lol, I'm so off that I didn't even know that the real discussion was in the FlexProp thread!
As usual these days I don't have a clue whats going on here in Propeller-land and the world keeps spinning anyway. I feel like a little ant in a haystack.
I wish I could be as active and dedicated as before, because the P2 is fantastic. But I love seeing that things I made still gets appriciated; That really warms my heart!
Seems a new flexspin commit has landed that presumably fixes the variable order thing properly?
Don't worry, my game still isn't done (currently it's the story writing again. Dang writing. Is hard.) :P which means you're still in the present and haven't slipped into far-future land yet.