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

Страница 23/24
16 | 17 | 18 | 19 | 20 | 21 | 22 | | 24

By Bengalack

Champion (384)

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

10-02-2021, 16:38

Thanks @aoineko.

Yes, that worked in my own code, but I could not get it to work in the printf-code that comes in the lib provided by Fusion-C. Not sure what I did wrong, so that's why I passed this on to the provider(s) of Fusion-C to come up with something that works for everybody.

By ericb59

Paragon (1046)

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

10-02-2021, 19:41

What you can do (doesn’t work for me)
1- go to fusion-c/lib/
Save the actual library file (fusion.lib)

2- Go to fusion-c/sources/lib/
Edit the printf.c file, and replace old function names by the new names by a search and replace inside the text.

3- Open a dos prompt, CD to the same folder as previously
And call the library compilation script _build_lib.bat

When I tried, the library was badly recompiled and unusable. But perhaps it is a problem from my side.

Let me know...

By Algorythms

Champion (287)

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

10-02-2021, 22:02

Sorry that this is a bit off topic.
I just started learning C with Fusion. I'm aiming to make a game for the GFX9000, just for my own amusement.
Could anyone help me with these two questions:
1 - How can I disable key click within the code?
2 - How do I make a pause? I.e. in milliseconds or something, just so I can adjust the speed of the program.

P.S. Thanks Eric for the great work you've put into this.

By ericb59

Paragon (1046)

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

11-02-2021, 07:24

for the keyclick
use the KeySound() function

here an example of waiting routine

By aoineko

Master (146)

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

11-02-2021, 09:45

Algorythms wrote:

2 - How do I make a pause? I.e. in milliseconds or something, just so I can adjust the speed of the program.

The "right" way to do that is to wait for screen synchronisation (so your game loop will be at a constant frequency of 50/60 images per seconde).

By ericb59

Paragon (1046)

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

11-02-2021, 10:22

here an example of waiting routine (Brut)

http://msx.ebsoft.fr/fusion-c/examples/ft_wait.c

By Bengalack

Champion (384)

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

11-02-2021, 12:21

ericb59 wrote:

When I tried, the library was badly recompiled and unusable. But perhaps it is a problem from my side.
Let me know...

I tried that as well, didn't work for me either :-(

By aoineko

Master (146)

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

11-02-2021, 16:09

Until a clean solution is found, you may be able to create a clone of the missing functions on your own.

void __itoa(int value, char * str, unsigned char base) { _itoa(value, str, base); }

I don't know the exact _itoa() function prototype, but I hope you get the idea.

By Algorythms

Champion (287)

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

11-02-2021, 20:01

Thanks for your replies, aoineko and ericb59 Smile

For some reason I get compilation errors using Vsynch(), but I got it to work replacing it with HALT() or G9WaitVsync().

By ericb59

Paragon (1046)

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

12-02-2021, 10:38

@bengalack
OK... It seems there was a bug in my Library compilation script for Windows.
Please edit the _build_lib.bat script and replace by this one :

http://msx.ebsoft.fr/fusion-c/_build_lib.bat

Let me know if it works now ...

Страница 23/24
16 | 17 | 18 | 19 | 20 | 21 | 22 | | 24