State of the art in C programming for the MSX?

ページ 1/6
| 2 | 3 | 4 | 5 | 6

By asiga

Rookie (21)

asiga さんの画像

21-03-2014, 12:21

Hi,

I've been searching for available options for C development on MSX. I'm interested in accessing "advanced" MSX stuff from C (by "advanced" I mean V9938, V9958, V9990 graphics, as well as the memory mapper, and being able to generate "megarom" cartridges with more than 32KB, accessing FM and SCC sound, etc…)

Yes, I assume nobody has written C code for doing such stuff, so I guess I'd have to write it myself (please correct me if I'm wrong).

Also please, take a look at the compilers I found, and make any recommendations or comments that you consider helpful:

1- SDCC: Looks good. There're sites discussing how to use it for MSX. Perhaps the worst points are that you cannot use its floating point libs due to not being able to control the physical address of such libs (at least according to the info about building 32KB ROM cartridges found here), and also another "bad" point is that the most useful info about SDCC (covering V9990 and other cool stuff) is in Japanese, and I don't understand…

2- z88dk: No idea about how it compares to SDCC. Didn't find much MSX-related info about z88dk.

3- MSX-C: IIRC, it's a ported CP/M compiler, so it won't generate Z80 code, but 8080, which works fine on the MSX but perhaps not as optimized as SDCC or z88dk, which generate full Z80 code. The good point is that its builtin C library seems to be useful, but it doesn't look perfect either: I don't see functions for controlling the memory mapper, nor for MSX2+ graphics, nor for V9990… so it's not a great advantage over SDCC because I'd have to code such functions anyway.

4- BDS-C: It seems to be very similar to MSX-C, but without the MSX C library: it's also 8080 CP/M.

5- Hi-Tech Cross Compiler: Considering that all the previous compilers are freely available, and also taking into account that this compiler doesn't ship with any MSX library at all, I don't see any point in paying for it, honestly.

I don't know if I forgot any compiler, or if you've any additional suggestion to do.

Please feel free to comment. Thanks a lot!

ログイン/登録して投稿

By msxegor

Master (183)

msxegor さんの画像

21-03-2014, 14:57

Hi! There is also Solid C that was developed by me a while ago.
It is mostly MSX-C compatible, but knows of Z80: uses 16-bit subtraction, index registers and bit commands.
Standard library was written in assembly and highly optimal; supports DOS-1 and DOS-2 from the box.
Compiler was used by some of my friends here in russia to code game engines, so some graphics is there in libraries.
Do not have it currently with me (I'm in the office now) but will look for something for you to play with later on weekend.

By asiga

Rookie (21)

asiga さんの画像

21-03-2014, 15:12

Ok, great, thanks a lot! Please keep me informed on how to get your compiler and library.

By Manuel

Ascended (19683)

Manuel さんの画像

21-03-2014, 18:00

I guess that compilers and libraries are fairly independent, right? "Old" compilers never came with gfx libraries. But several people wrote libs.

By PingPong

Enlighted (4156)

PingPong さんの画像

21-03-2014, 20:21

Hitech C 7.8 is not free, but is very efficient in code generation for speed, and kick the ass of all others C compilers you mentioned. A lot.

By ARTRAG

Enlighted (6977)

ARTRAG さんの画像

21-03-2014, 20:33

I wouldn't be so definitive in the comparison (after all its development stopped in 2001) but definitely it is worth a try.
I use Hitech C v7.8pl2 with a demo code, and I think you cannot buy that compiler anymore as Hitech as totally dismissed sells and support of such a line of compilers long time ago.

By konamiman

Paragon (1211)

konamiman さんの画像

21-03-2014, 23:32

My 2x0,01€: my most recent networking utilities (such as MSX trivial dropbox and the SMB and FTP servers) and the Nextor's built-in FDISK tool are made in C, using SDCC. All of this is available for download in my web site (www.konamiman.com) in case you want to take a look.

By Timmy

Master (200)

Timmy さんの画像

21-03-2014, 23:33

I'm using z88dk to make MSX stuff now. It's easy for me to work with it because I already use it to make spectrum games. So porting stuff is a lot easier. Smile (well, except for all those machine specific stuff, and that is still lots of work.)

Z88dk currently still has one problem, and it's that it doesn't think in sections. That means that to make ROMs I have to hardwire variables to their respective memory locations. Hope that gets fixed in a future version. As it stands, I can use it, so it's good enough for me.

By msxegor

Master (183)

msxegor さんの画像

23-03-2014, 15:37

Hi! Here is compiler,libraries and some tools
I'm still waiting for friends to search their archives
https://cloud.mail.ru/public/d0ee520c54c9/solidc.zip

By k0ga

Expert (77)

k0ga さんの画像

24-03-2014, 21:19

You can find a port of msx C library for Solid C made by a japanese guy in http://www.vector.co.jp/soft/other/msx/se148477.html. You can see he talks about SOLID-C version 1.01, and the version you posted here and the version of http://www.wolfa.net/novatec/warez/develop/index.htm is 1.00. I did some programming with this version, long, lon time ago, and I had some problems with code generated for if cases in some sonditions. Do you remember something about this? Was there some version with some bugs fixed or something like this?. I liked a lot your compiler because code generated with it was incredible, but due to this problem I had to get rid off it.

It is also very interesting the comments about SOLID-C you can find in this page: http://homepage3.nifty.com/Tatsu_syo/TMR/SOLIDC.html (japanese page, but it is readable with the help of google translator).

By msxegor

Master (183)

msxegor さんの画像

25-03-2014, 09:35

I do remember some problems with char-to-int translation in early versions of SOLID C and I definitely fixed them. Unfortunately I do not know if this version is fixed Sad I lost almost everything when my MSX (state of the art - desktop Yamaha YIS-805 with 11.5 MHz CPU, 1 meg of RAM, harddisk and modem) was stolen in 1999. I tried to restore compiler from bits of sources and disassembled executives in 2004 or so, and I have SOLID C version 2.00 somewhere in archives on my PC. Did a bit of optimization there too.

ページ 1/6
| 2 | 3 | 4 | 5 | 6