C compiler??

Page 1/4
| 2 | 3 | 4

By MSi

Resident (62)

MSi's picture

24-01-2005, 12:49

Hi Everybody!

Does anybody know if there is a good C compiler on MSX? I used to code in ASM (in the early days of UMF/ROM... ), but since i left the MSX development, i continued on C language on PC (dos/windows).

Unfortunately my ASM knowledge has left my brain ;-)

If there is one, is it good(fast) enough to code demo's or games with, or does it have too much limitations?

thnx!
Roald

Login or register to post comments

By Manuel

Ascended (19300)

Manuel's picture

24-01-2005, 12:53

There are several, but they are not generating utlimately fast code of course. I'm not sure if they can be used to program any raster effects or interrupt driven stuff.

I myself have used the following combo: Hi-Tech C compiler for CP/M, run by a CP/M emulator under Linux. Editing done with VIM, preprocessing with gcc, testing in openMSX. If you want to know more, let me know.

There's also SDCC (free software), which can produce Z80 code and ASCII-C for MSX.
And probably even more.

By DarQ

Paragon (1038)

DarQ's picture

24-01-2005, 14:47

im curious, how many (and how good) libraries are there?

By MSi

Resident (62)

MSi's picture

24-01-2005, 15:04

im curious, how many (and how good) libraries are there?

i think that is the biggest problem... or not?? does anybody know what libraries are available?

By DarQ

Paragon (1038)

DarQ's picture

24-01-2005, 15:40

its not that cool to write every lib you need yourself for a demo...
or you must have a lot of spare time

By The_Engineer

Master (185)

The_Engineer's picture

24-01-2005, 15:46

I myself have used the following combo: Hi-Tech C compiler for CP/M, run by a CP/M emulator under Linux. Editing done with VIM, preprocessing with gcc, testing in openMSX. If you want to know more, let me know.

There's also SDCC (free software), which can produce Z80 code and ASCII-C for MSX.
And probably even more.

Manuel, I guess you made some MSX-DOS utilities with the gcc-setup described above? Without any difficult graphic stuff (because of a lack of libraries)?

I tried the SDCC package, but after disassembling my hllwrld.c, I decided not to continue with that assembler! The only two general purpose registers it knows are A and HL and all variables / calculations are done via the stack... You'll need to do a lot of work to have SDCC generate some usefull (fast and compact) code.

IIRC there is another tread about SDCC and someone is currently creating libraries for the MSX.

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

24-01-2005, 15:53

Willem: Your asm skills were pretty darn solid, if I remember correctly... Tongue Why bother with C at all? Nothing wrong with a little oldskool action! Wink

By The_Engineer

Master (185)

The_Engineer's picture

24-01-2005, 18:11

Willem: Your asm skills were pretty darn solid, if I remember correctly... Tongue Why bother with C at all? Nothing wrong with a little oldskool action! Wink
@Sonic_aka_T: (hi Toob) ASM is great if you are doing games and fast stuff, but if you want to create some parser of any kind, ASM is hell (or you need a good library of subroutines).

Furthermore, it would be nice if one could code the non-real time parts (like file IO, gfx setup e.d.) in C and the real-time stuff (like interrupt handlers and game code) in ASM. I remember that Jan van Valburg used to work like this (Gianna Sisters, Retaliator). He even put his main.c file on the Retaliator disk to show how he coded.

Jeroen Smael also told me he should have had parts of the FD maincode in C and other parts in ASM (inline). That would really help with reading/upgrading the code in the new millenium. Wink

On topic again: I think that Hitech C is the best way to go with the usage of inline assembly. Hitech does support this and the version on the MCCM CDs has an extensive manual on how to create libraries and stuff.

By MSi

Resident (62)

MSi's picture

24-01-2005, 21:44


On topic again: I think that Hitech C is the best way to go with the usage of inline assembly. Hitech does support this and the version on the MCCM CDs has an extensive manual on how to create libraries and stuff.

Thanx!
does anybody know where to download it?

By HansO

Paladin (672)

HansO's picture

24-01-2005, 21:54

The official homepage of Hitech C is http://www.htsoft.com/products/CPM.php

Its free! Compiler, docs, library sources.

See also the Uzix homepage, the page
http://uzix.sourceforge.net/uzix2.0/index.php?page=down&lang=us
contains many interesting versions of this compiler.
And ofcourse UZIX is a great example of using C on MSX.

By karloch

Prophet (2159)

karloch's picture

24-01-2005, 22:25

The version at Hisoft webpage is 3.09 for CP/M. There is a version patched somehow for MSX-DOS 1 (still with no folder support), the 3.10. Maybe that you can find that at Funet.

I like C so much, but what C is lacking in MSX is libs. Hitech-C only provides with the standard ones. Airam (a spanish user) developed a pair of basic graphics libs for V9938 and V9990 (GFX9000), but they only work in the MS-DOS version of Hitech-C.

Another C library available is the one that Néstor Soriano released a month ago: a lib to use InterNestor Lite and code Internet applications in C. Although it was developed for SDCC, it should work with Hitech-C.

I don't know any more libraries for C. Maybe that people thinking in C at MSX should try PASCAL as it plenty of libs to do anything, and there is a very good compiler.

Page 1/4
| 2 | 3 | 4