@anata : Did I miss to include a file in the example folder ?
Which sample code are you talking about ?
In Fusion-c/examples/ there is SUPERGIR.SC8
You must copy/paste it in the Working Folder/DSK/
if you want the program load it.
.SC8 are image file.
This type of image can be done by converting JPG/PNG file with a Image tool converter.
I'm using the online Jannone tool, available here : http://msx.jannone.org/conv/
I couldn't use Getche() or getche.... (quick manual says getch () , msx_fusion.h specifies Getche, using both won't compile, first case ( Getche() ) will return the following compile warning:
?ASlink-Warning-Undefined Global '_Getche' referenced by module....
And, likewise, using getche():
?ASlink-Warning-Undefined Global '_getche' referenced by module....
Plus some additional warnings about implicit declaration...
Code won't work and will crash upon calling it.
By the way, any examples creating your interrupt hook?
Could not get it working following the example in __interrupt.h
Thanks a lot. I was sad... nobody answered .
I'm confused about why not to do a circle function for MSX1 but It's your work and is an awesome work, I swear.
I'll try the solution that you propose. Thanks again.
@ducasp : You are right, Getche was not correctly included in the library
Please download this new file (fusion.lib) : https://drive.google.com/open?id=1m4Qb_6R9OZfM1eZmSwCcByw62w...
and copy it in Working Folder/fusion-c/lib/
(replace the original one)
Getche must now works.
I will publish an updated version of the library in while, with some debugs and new functions.
By the way, any examples creating your interrupt hook?
Could not get it working following the example in __interrupt.h
It looks like the implementation of install_isr and uninstall isr is missing. For me i now use something like this:
install_isr(void(*isr)void)) { unsinged int address = (unsigned int)handler; byte* mem = (byte *)0x38; mem[0] = 0xC3; //JP mem[1] = (byte)(address & 0x00ff); mem[2] = (byte)((address & 0xff00) >> 8); }
But that is taking over the complete interrupt handler on adress 0x38 (and i left out here saving the original handler).
Another way is to just hook into 0xFD9A (KEYI) or 0xFD9F (TIMI), for example by using this wrapper library from Emily82.
this needs disabled interrupts or will make the random crashes
There is no interupt functions actually implemented in Fusion-c.
"__interrupt.h" is a first attempt, but is not documented.
I'm really not a specialist, if someone would like help me and the community by adding ISR to FUSION-C with (documentation) It would be really great.
Someone ?
I'll see what i can do with the current ISR implementation i use in the RoboSOP player and separate it into a more generic usable implementation.
I'll see what i can do with the current ISR implementation i use in the RoboSOP player and separate it into a more generic usable implementation.
it sounds nice
CharToUpper and CharToLower are not declared in msx_fusion.h, they are declared as StrToUpper and StrToLower... Fixing the header file code compiles and links fine.