MSX Programming Languages Showdown

Page 5/6
1 | 2 | 3 | 4 | | 6

By PingPong

Prophet (3885)

PingPong's picture

19-09-2013, 14:02

Marq wrote:

These performance tests are useful for, say, game or demo programmers who need to get some power out of the poor old processor. The beauty or ease of a language is a totally different thing.

It does matter instead. Could you imagine writing some complex demo entirely in asm? No one can. That's the reason higher level languages are here. Complexity. Of course, you need to pay something. So you loose performances.
in a real word, when you code a demo, you choose between factors. That means choose between languages. But the way C does arrays or strings are simply uncomparable to the way ancient BASIC do.

Comparing BASIC with C in terms of performance is a non-sense, obviously. It is instead, more smart to compare Hitech C with SDCC or Turbo Pascal.

By Marq

Champion (387)

Marq's picture

19-09-2013, 14:27

PingPong wrote:

It does matter instead. Could you imagine writing some complex demo entirely in asm? No one can.

I used to do that, but don't want to anymore Smile All the Bandwagon demos are 100% asm too.

By ARTRAG

Enlighted (6828)

ARTRAG's picture

20-09-2013, 07:27

My only concern is that porting to basic more than few lines of c code is a lot of work ( not impossible but time consuming).

I think to functions and to automatic variables where in basic everything is global, not only to structs and pointers.

Probably restricting the number of c constructs one can do a pascal porting one to one, but basic is another thing.
Unless you do not want to compare snippets of 2 or 3 lines not longer than the nested loops of the initial test.

By ARTRAG

Enlighted (6828)

ARTRAG's picture

25-09-2013, 08:54

This demo works both on widows (compiled with gcc + codeblocks) and msxdos (compiled by Hitech C v7.8pl2)

https://sites.google.com/site/testmsx/Home/c-compiler-test-s...

Run test6.exe on PC or DND.COM on msxdos

The level generation (on z80) takes 138 ticks at 60Hz
Use 8,6,2,4 to move the "@" in the dungeon, Esc to exit

Feell free to compile it with other C compilers and compare the time for level generation.

NB: I included a custom implemetation for rand() in order to get the same results across diffent compilers

By bore

Master (135)

bore's picture

25-09-2013, 21:44

Marq wrote:
PingPong wrote:

It does matter instead. Could you imagine writing some complex demo entirely in asm? No one can.

I used to do that, but don't want to anymore Smile All the Bandwagon demos are 100% asm too.

Same for the Traktor demos. I didn't think anyone coded MSX demos in anything else. To me it makes most sense to make the effects in asm and glue them together with C but we haven't bothered to set up any compiler yet.

Speaking of which, does anyone know if the code output from z88dk is comparable to other C-compilers?

By Manuel

Ascended (18700)

Manuel's picture

25-09-2013, 21:46

The first MSX demos in the NL were mostly in BASIC, later more and more machine language routines were added and at some point it became popular to brag about having it coded fully in assembler Smile

By ARTRAG

Enlighted (6828)

ARTRAG's picture

25-09-2013, 21:58

bore wrote:
Marq wrote:
PingPong wrote:

It does matter instead. Could you imagine writing some complex demo entirely in asm? No one can.

I used to do that, but don't want to anymore Smile All the Bandwagon demos are 100% asm too.

Same for the Traktor demos. I didn't think anyone coded MSX demos in anything else. To me it makes most sense to make the effects in asm and glue them together with C but we haven't bothered to set up any compiler yet.

Speaking of which, does anyone know if the code output from z88dk is comparable to other C-compilers?

If you are interested, I could add the ASM listings form Hitech C for the the rogue-like demo I've posted before and you can compare them with the ASM output from z88dk (or you can compile the whole demo with z88dk and tell how many vdp interrupts it takes to generate the dungeon map ;-)

By bore

Master (135)

bore's picture

25-09-2013, 22:18

ARTRAG wrote:
bore wrote:

Speaking of which, does anyone know if the code output from z88dk is comparable to other C-compilers?

If you are interested, I could add the ASM listings form Hitech C for the the rogue-like demo I've posted before and you can compare them with the ASM output from z88dk (or you can compile the whole demo with z88dk and tell how many vdp interrupts it takes to generate the dungeon map ;-)

Nah, doesn't matter. I was more fishing for information if it is worth checking out or if I would be wasting my time.
It would be nice to have a cross-compiler that works on the Amiga.
I might check back to this thread and post some results if I ever get to testing it.

By Marq

Champion (387)

Marq's picture

25-09-2013, 23:21

Based on the initial simple test z88dk is far from there. Was kinda interested in it, but not anymore. On top of that the compilation process is a big kludge.

By ARTRAG

Enlighted (6828)

ARTRAG's picture

26-09-2013, 11:09

Anyone willing to compile my game demo on other c compilers for msx?
Actually I was thinking that a full rogue like game could be developed in standard c using only portable solutions in order to have a full game virtually identical on msx an on pc.
Rendering everything in ram and using only ascii art would avoid problems with terminal compatibility and i/o libraries ...

Page 5/6
1 | 2 | 3 | 4 | | 6