Thank you all. You were right. Tested. Sorry for bothering... I hope someday I'll be the one who answer guys.
It seems that the MSX DOS crt's (both simple and advanced) do not initialize Global Variables, right?
Yes, i ran into that same problem. As a workaround i initialize these variables within the code.
I believe this should be documented, it would have saved me quite a few hours trying to understand why my code was failing, when a static table used for several functions wasn't being initialized and that was the reason.
It seems that the MSX DOS crt's (both simple and advanced) do not initialize Global Variables, right?
I don't understand what you are talking about. Can you explain ?
@ducasp
Ok ! Thank you.
Yes, Global variables can't be initialized at the same time as declaration.
I will add this information in the next edition of the Book/Manual
Hi ...
I'm sorry for bothering you againg but I'm working with fusion and It does some weird things...
I define two tiles in my code, setting the pattern and the colour. The problem is ... Why in the world the are painted if I don't write the code to paint them?
An example will say it more clearly ...
#include "fusion-c/header/msx_fusion.h" #include "fusion-c/header/vdp_graph1.h" void main(void) { Screen(2); SetColors(15,1,1); Cls(); Vpoke(4096,255); Vpoke(4097,255); Vpoke(4098,255); Vpoke(4099,255); Vpoke(4100,255); Vpoke(4101,255); Vpoke(4102,255); Vpoke(4103,255); Vpoke(4104,42); Vpoke(4105,85); Vpoke(4106,170); Vpoke(4107,85); Vpoke(4108,255); Vpoke(4109,255); Vpoke(4110,255); Vpoke(4111,255); Vpoke(12288,96); Vpoke(12289,96); Vpoke(12290,96); Vpoke(12291,96); Vpoke(12292,96); Vpoke(12293,96); Vpoke(12294,96); Vpoke(12295,96); Vpoke(12296,96); Vpoke(12297,96); Vpoke(12298,96); Vpoke(12299,96); Vpoke(12300,96); Vpoke(12301,96); Vpoke(12302,96); Vpoke(12303,96); // Vpoke(6784,1); // Vpoke(6816,0); for(;;){} }
If you try the code you'll see the tiles apearing but I don't want them to apear (I want them to apear in the position of the commented code). It makes no sense.
As always, thank you guys.
The Name Table is pre-filled with 0-255 3 times (768 bytes). You have to use a blank tile and fill all the Name Table with this tile. When you set your 2 tiles, they are already appearing in 2 places of the screen. Not necessarily the places you set in comment.
Help here: The MSX Red Book - Graphic Mode
Thanks... and I'm sorry for asking a concept question. For me It makes no sense... If It is like that I'll adapt. Sorry