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

Page 19/20
12 | 13 | 14 | 15 | 16 | 17 | 18 | | 20

By ericb59

Paladin (996)

ericb59's picture

30-09-2020, 19:10

That would be great to have it!!
Ar you also considering a new version of the book? for version 1.3?

Absolutly.
I 'm trying to make a better book, with more infirmations.
Also I rewrote the compilation script for something more strong.

I Hope to finish all that work soon ! II no longer indicate a date... It's too much stress Wink

By yustmenl

Rookie (21)

yustmenl's picture

02-10-2020, 13:01

That would be great, gues that means i have to order one Tongue
hopefully it wil be here soon, but no stress it's still a hobby project!!

By raymond

Champion (456)

raymond's picture

06-10-2020, 15:40

In Turbo Pascal you can use chain to "glue" various parts together. Is there a similar function available in Fusion-C? As I used the chain method a lot in TP.

By ducasp

Champion (371)

ducasp's picture

06-10-2020, 18:33

After reading about it, I don't think SDCC has such similar feature, you would have to generate fully featured programs and find a way (command line parameters? file on disk?) to exchange data between the parts. Perhaps the work that some people did to support rom mappers on SDCC could achieve a similar effect somehow if changing the mapper switching routines to routines to load from disk... But then there would be a lot of work to be done to adapt the idea. Seems like a really cool feature, wish someone come here and says that is somehow supported Cool

By ericb59

Paladin (996)

ericb59's picture

07-10-2020, 09:02

It seems there is no "chain" method in C.
But indeed, it would be a great feature to add to Fusion-C !

By raymond

Champion (456)

raymond's picture

08-10-2020, 06:20

ericb59 wrote:

It seems there is no "chain" method in C.
But indeed, it would be a great feature to add to Fusion-C !

Something for Fusion-C 1.4?

By ericb59

Paladin (996)

ericb59's picture

08-10-2020, 09:39

@raymond
I'm afraid I'm not smart enough to add this feature on my own. Question

By raymond

Champion (456)

raymond's picture

10-10-2020, 13:35

ericb59 wrote:

@raymond
I'm afraid I'm not smart enough to add this feature on my own. Question

No problem, you are doing a wonderful job with Fusion-C already! Maybe there are some people here on the forum that can help the Fusion-C community with extending it with this feature Smile

By raymond

Champion (456)

raymond's picture

14-10-2020, 20:36

Reading a plain text file is partially working. I am trying to read certain data in an array. However the data gets lost somewhere. A small code snippet for putting the data in an array:

A default declaration is made:


const char * Lvl[169] = {
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00",
"Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00","Z00"};

Then I am trying to change the default values by reading from disk and looping through the filedata:


]for (i=0;i<169;++i)
{
memcpy(Lvl[i],&FileData[i*3+charsb4array],3);
}

By ducasp

Champion (371)

ducasp's picture

14-10-2020, 21:50

A const char array is not supposed to have its members changed, have you tried to use just a char * ? SDCC might be using a different convention than the one you are used to, there are command switches to choose from different behaviors / set of rules, but it might be easier to just not complicate it and use a mutable pointer with mutable elements (no const anywhere)

Page 19/20
12 | 13 | 14 | 15 | 16 | 17 | 18 | | 20