MSX FUSION-C, Talking about bugs, errors, mistakes

Страница 5/26
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9 | 10

By Francisco Gálvez

Resident (36)

Аватар пользователя Francisco Gálvez

05-03-2019, 19:47

Thank you all. You were right. Tested. Sorry for bothering... I hope someday I'll be the one who answer guys.

By ducasp

Paladin (712)

Аватар пользователя ducasp

22-03-2019, 18:04

It seems that the MSX DOS crt's (both simple and advanced) do not initialize Global Variables, right?

By ToriHino

Paladin (927)

Аватар пользователя ToriHino

22-03-2019, 18:55

Yes, i ran into that same problem. As a workaround i initialize these variables within the code.

By ducasp

Paladin (712)

Аватар пользователя ducasp

22-03-2019, 21:05

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.

By ericb59

Paragon (1126)

Аватар пользователя ericb59

23-03-2019, 09:14

ducasp wrote:

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 ?

By ducasp

Paladin (712)

Аватар пользователя ducasp

23-03-2019, 15:34

By ericb59

Paragon (1126)

Аватар пользователя ericb59

23-03-2019, 21:09

@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

By Francisco Gálvez

Resident (36)

Аватар пользователя Francisco Gálvez

23-03-2019, 22:32

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.

By Rogerup

Resident (39)

Аватар пользователя Rogerup

24-03-2019, 00:14

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

By Francisco Gálvez

Resident (36)

Аватар пользователя Francisco Gálvez

24-03-2019, 09:30

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 Tongue

Страница 5/26
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9 | 10