MSX Compilator

Page 1/4
| 2 | 3 | 4

By bosh77

Supporter (14)

bosh77's picture

03-01-2015, 20:27

Hello everyone !, I'm a big fan of MSX.
I do not know if it already exists, but I have a project in mind.
The project that I'd really like to accomplish is a compiler that works on modern computers on Windows, Mac OS X or Linux.
You write the program in a language very similar to BASIC MSX plus some new features that I would like to add to better sounds, graphics and sprites ...
You can immediately test the program with an emulator, then when our project is ready, the compiler transforms our machine language program z80 and generates a file of your choice between DSK and ROM that can then be copied to a floppy disk and test on a real MSX, while I do not know if you can do the same thing with the cartridges.
In this way, the compilation is fast and you can use the entire memory of our MSX.
If anyone is interested I can say his opinion.

Login or register to post comments

By Manuel

Ascended (15289)

Manuel's picture

03-01-2015, 23:36

It would be cool if someone would make this. FINALLY. Tongue

(Oh, and Symbasic is kind of on the way, but what you want is a very optimizing basic compiler, like MSX-BASIC Kun, but then implemented on modern hardware, taking care of all the calculation power you have there!)

By jltursan

Prophet (2123)

jltursan's picture

04-01-2015, 00:25

¡Welcome aboard bosh77!

Something very close to what you're describing already exists even for MSX. Check the following:

ccz80 language (Spanish only)
A cross compiled language very close to C with support of multiple platform by means of specialized libraries (the extra features you pointed out). Sadly the MSX part is not so mature as the Spectrum or CPC ones...

ccz80++ language (in English)
A more advanced version with OOP. Very nice project.

The results are generally speaking very good looking, fast and highly portables between machines (this heavily depends on the libraries used and machine architectures of course). Some recent games programmed with ccz80 (for Spectrum) are "Teodoro no sabe volar" or "Gommy Medieval Defender".

Of course, if you're planning a Windows-based MSX-BASIC compiler it's a completely different thing...

By bosh77

Supporter (14)

bosh77's picture

04-01-2015, 02:00

Hi Manuel, Hi jltursan, thank you very much!
Yes, my idea is just to use the MSX Basic language that creates an "executable" machine language Z80. It will not be easy.
Very interesting link to ccz80 ++, thanks, I will study. In fact I will need much information as possible on the machine language and the like. I could use the source code of a good emulator MSX2 / MSX2 + least, to include it in the project and to test our application directly!
Any help will be appreciated.
See you soon!

By bosh77

Supporter (14)

bosh77's picture

05-01-2015, 22:52

This is a schematic example of the project:

By bosh77

Supporter (14)

bosh77's picture

21-01-2015, 21:20

Who can help me? I need the source code of a good emulator msx to embed in my project. Can I use openmsx? Which compiler should I use? thanks

By st1mpy

Champion (489)

st1mpy's picture

21-01-2015, 21:45

Source code to most of the emulators are downloadable, but I don't see the need for it in your project, as once you have a dsk or rom file made, you just need to run it with the emulator...

By bosh77

Supporter (14)

bosh77's picture

21-01-2015, 21:50

I want to add in my project so that pressing F5 for example, you can immediately test, to save time.

By Manuel

Ascended (15289)

Manuel's picture

21-01-2015, 22:57

For that you don't need to include the emulator. You can simply start it up with the right command line parameters, for instance.

If you still want to embed: you can use openMSX if your project is released under the terms of the GPLv2. But I would definitely recommend to use the emulator externally. This way the emulator can also improve/upgrade without you having to do anything.

By bosh77

Supporter (14)

bosh77's picture

23-07-2015, 21:23

This is a preview of my project, it is yet to be complete...
I hope will be of interest to someone!

Then I add the editor colored...

Also it will be available for Mac OS X and Linux.

By PingPong

Prophet (3233)

PingPong's picture

23-07-2015, 22:58

bosh77 wrote:

This is a preview of my project, it is yet to be complete...
I hope will be of interest to someone!

Then I add the editor colored...

Also it will be available for Mac OS X and Linux.

Hey, what is the status of the compiler? I mean, have you defined the grammar, the parser and various steps like code generation? would be nice if you can avoid to generate directly the machine code and stop at the assembly level, next you could invoke one of the cross assemblers already done and available.

it help a lot to find places where to apply optimizations if basic code is too slow.
what about the implementation of string management?
in which language is the compiler written?

Page 1/4
| 2 | 3 | 4
My MSX profile