Fusion C: making MSX-DEV20 entry ROMs

Por MattyT

Rookie (26)

Imagen del MattyT

23-11-2019, 09:12

I am sure this has been asked many times before, but I can't work it out. How to turn a COM file to ROM file.

Currently using the Fusion-C compil.bat file I am producing COM files. I am having fun coding games for the first time in years and I am tempted to enter MSX-DEV20.

So this is the requirement from the competition rules:
"any size will be accepted as long as it does not require a ROM mapper. In other words, the acceptable ROM file sizes are 8 KB, 16 KB, 24 KB, 32 KB, 40 KB and 48 KB"

Trawling the threads I got this advice ".com files are just programs loaded at 0x100h, so you need to include the whole program in your ROM, and write a small program to relocate it to 100 h in RAM at runtime, do a JP 0100h and that's it."
I note that the .ihx file produced out of sdcc is at 0106h, but I couldn't work out a way to follow that advice. Any tools do it?

In the compil.bat script hex2bin makes a .com file out of the .ihx file
Is there some other tool or method that can turn it straight into a ROM file?

The other method "Put your com file on formatted MSX DSK image, add MSXDOS files and autoexec.bat that will run your com, and convert this DSK to ROM using DSK2ROM utility. " I was able to follow but the ROM image is much larger than any of those allowed ROM sizes.

I also tried bin2rom, but that told me my bin file was in the wrong format. It seems to be for BASIC.

Any advice appreciated.

Login sesión o register para postear comentarios

Por gdx

Enlighted (6208)

Imagen del gdx

23-11-2019, 09:27

Fusion C is not adapted to make ROM file of sizes 8 KB to 48 KB. Fusion C is designed to make megarom from disk image.

https://www.msx.org/wiki/Develop_a_program_in_cartridge_ROM

Por wimpie3

Champion (435)

Imagen del wimpie3

23-11-2019, 11:46

I've used CZ80++ for my MSXdev development. Compiles to roms without any issue.

I'm currently building a whole eco system around this compiler for usage on a PC, combined with an extensive usage manual. Not sure when it will be finished though.

Por ericb59

Paragon (1102)

Imagen del ericb59

23-11-2019, 16:46

Hi,
Perhaps you can wait some time before submit your game to the MSX DEVS ?
I planned to adapt FUSION-C for the creation of ROMs within a few months.
It is necessary to rewrite some ASM routines. I think it's relatively easy. I just need some time.

Por MattyT

Rookie (26)

Imagen del MattyT

24-11-2019, 08:49

Great Eric. I'll code away and await future enhancements.
And thanks for the other replies too. The CZ80++ thing sounds intriguing Wimpie.

Por Timmy

Master (200)

Imagen del Timmy

24-11-2019, 11:46

I've used z88dk to build roms for my MSXDev entries. Works very well.

Por wimpie3

Champion (435)

Imagen del wimpie3

24-04-2020, 14:25

Pulling this one up to check if Fusion-C can already create ROM files?

Por santiontanon

Paragon (1805)

Imagen del santiontanon

27-04-2020, 08:59

Fyi, the rules do not specify any ROM size limitation: https://www.msxdev.org/2019/11/22/msxdev20-a-new-era/

Por ducasp

Paladin (680)

Imagen del ducasp

27-04-2020, 13:44

MattyT wrote:

I am sure this has been asked many times before, but I can't work it out. How to turn a COM file to ROM file.

Currently using the Fusion-C compil.bat file I am producing COM files. I am having fun coding games for the first time in years and I am tempted to enter MSX-DEV20.

So this is the requirement from the competition rules:
"any size will be accepted as long as it does not require a ROM mapper. In other words, the acceptable ROM file sizes are 8 KB, 16 KB, 24 KB, 32 KB, 40 KB and 48 KB"

Trawling the threads I got this advice ".com files are just programs loaded at 0x100h, so you need to include the whole program in your ROM, and write a small program to relocate it to 100 h in RAM at runtime, do a JP 0100h and that's it."
I note that the .ihx file produced out of sdcc is at 0106h, but I couldn't work out a way to follow that advice. Any tools do it?

In the compil.bat script hex2bin makes a .com file out of the .ihx file
Is there some other tool or method that can turn it straight into a ROM file?

The other method "Put your com file on formatted MSX DSK image, add MSXDOS files and autoexec.bat that will run your com, and convert this DSK to ROM using DSK2ROM utility. " I was able to follow but the ROM image is much larger than any of those allowed ROM sizes.

I also tried bin2rom, but that told me my bin file was in the wrong format. It seems to be for BASIC.

Any advice appreciated.

Unfortunately it is not that easy, as a cartridge won't necessarily encounter a DOS and DOS routines that some fusion-c functions rely on... But quite a lot of functions use bios and those should work fine, there is a good project to use visual studio to build msx code along with sdcc and it supports roms, https://www.msx.org/forum/msx-talk/development/msx-applicati... , as long as you don't use fusion-c functions that are using dos calls, it should be fine :)

Por wimpie3

Champion (435)

Imagen del wimpie3

27-04-2020, 18:10

I just asked because you wrote you'd be working on making ROMs possible.

Por ducasp

Paladin (680)

Imagen del ducasp

27-04-2020, 22:11

wimpie3 wrote:

I just asked because you wrote you'd be working on making ROMs possible.

I think you're confusing me with Eric... I'm just telling you how you can do it today, using the visual studio profiles and sdcc and fusion-c library (as long the functions you use are bios based, not dos based) Wink