FUSION-C how to load SC5 image?

By wimpie3

Master (238)

wimpie3's picture

19-04-2019, 07:36

Anyone got a routine to load a screen 5 file to page 1 using FUSION-C?

Login or register to post comments

By ericb59

Paladin (828)

ericb59's picture

19-04-2019, 10:49

Hello,

Yes...
Take this example :
http://msx.ebsoft.fr/fusion-c/examples/loadScreen5Image.c

to load to page 1 juste change the second parameter of the FT_LoadSC5Image routine.

FT_LoadSc5Image("mona.sc5",0,LDbuffer) to FT_LoadSc5Image("mona.sc5",256,LDbuffer)

By wimpie3

Master (238)

wimpie3's picture

19-04-2019, 11:00

Thanks! BTW, what's the maximum size a program can take in FUSION-C? Do we have to take care of mapping etc... or does FUSION-C does that all for us?

By ericb59

Paladin (828)

ericb59's picture

19-04-2019, 11:43

As Fusion-c is working on MSX-DOS you have the full 64K of the MSX Dos RAM available ...
Well... In reality you do not have all 64K ...
Memory available is from address 0x0100 and the Top of the TPA address, most of the time around 0xD806
Thus 0xD806-0x0100 = around 55 KBytes for the code + Variables + Data + etc ...

If you 're programing for MSX DOS 2, you need a MSX with 128K of Ram.
In this case you can use FUSION-C 's Mapper functions to unlock the full Memory Size of a MSX2/2+/Turbo_R

By wimpie3

Master (238)

wimpie3's picture

19-04-2019, 11:52

So even on MSX DOS 2, mapping is not done automatically... makes things a bit more complex for beginners like me. :-)

By ericb59

Paladin (828)

ericb59's picture

19-04-2019, 15:17

wimpie3 wrote:

So even on MSX DOS 2, mapping is not done automatically... makes things a bit more complex for beginners like me. :-)

No. MSX-DOS and MSX-DOS2 are using the first 64Kbytes of Ram.
If you need the other KBytes of memory they are available By Switching 16K memory banks with the MSX-DOS2 mapper's functions.
Bank switching is explained on multiple website, and also in the "FUSION-C Complete Journey" Book.
Inside the Fusion-C/examples/ folder you also have the "ram-mapper.c" code example.

If you need help do not hesitate to post ;-)

What are you coding ?

By wimpie3

Master (238)

wimpie3's picture

19-04-2019, 16:12

Nothing for the moment, I'm just exploring the software. I've created my previous entry for the MSXDev competition (the Linez game) using ccZ80++. I could create a ROM out-of-the box using that software. Development was super fast. Compile, create ROM and bam, the game was launched in the emulator. Now I'm exploring Fusion-c a bit, but I'm not sure it's my cup of tea. You have to use dsk2rom to create a ROM file, which takes time, and those ROM sizes are huge, way beyond 32 or 48K.

By ericb59

Paladin (828)

ericb59's picture

19-04-2019, 17:29

wimpie3 wrote:

You have to use dsk2rom to create a ROM file, which takes time, and those ROM sizes are huge, way beyond 32 or 48K.

It's easy with a tuned script
Compiling C program-> copying executable in DSK folder -> Creating the DSK Format -> Convert to Rom
It take only few seconds...
All tools are included in Fusion-C Package.

But you're right, ROMs cannot be 32 K Wink

By wimpie3

Master (238)

wimpie3's picture

19-04-2019, 20:37

When creating a ROM file, you clearly see the MSX DOS loading screen ... for me, that's a deal breaker. Is there a way to hide that? And are you allowed to distribute MSX DOS in your own cartridge??

By ericb59

Paladin (828)

ericb59's picture

19-04-2019, 21:29

Yes I think there is a way... I saw games without seeing MSX-DOS text...

Yes, MSX-DOS can be freely distributed.

My MSX profile