Is there any C cross compiler that generates ROM files?

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

By LeandroCorreia

Paladin (684)

LeandroCorreia's picture

22-03-2006, 20:04

Hello guys,

Is there any C cross compiler that uses the PC to generate MSX ROMs?
Login or register to post comments

By ARTRAG

Prophet (3033)

ARTRAG's picture

22-03-2006, 20:14

Hitech C does ROMS also!!

Try v7.50 or v.7.80, you can configure almost any aspect of the program allocation (in
ROM, in RAM or what else). You can even do page swap using MSX memory pageswapping,
provided that you write by yourself the jump/return code.

The C compiler produce PTSEC asm directives (process pagetable section) to collect code
that goes in each ROM/RAM areas.



By LeandroCorreia

Paladin (684)

LeandroCorreia's picture

22-03-2006, 20:22

In a less technical aspect...

I am a Blitz Basic programmer. I used to knew C a few years ago, so I´ll have to remember it... What I want to do:

MSX 1 games. Does Hitech C allows me to create fast scrolling games?

By ARTRAG

Prophet (3033)

ARTRAG's picture

22-03-2006, 20:41

Sorry, wrong question :-)

The rigth questions are:
Q: Is C faster than basic?
A: Yes

Q: Is Hitech C better and faster than other C compilers?
A: Yes, at least in many cases (it has better math support for example)

Q: Can I do MSX1 fast scrolling games ?
A: This does not depend on the choice of the C compiler but on your programming skills,

* almost any C compiler does code fast enougth to update the screen (768 bytes in scr2) in less than 1/50 sec
* almost no C compiler support MSX graphic, so it is up to you to do your code to access the VDP
* Hitech C allows you to map z80 I/O ports on static variabiles, so you can do I/O to the video (but also to the PSG) using simple code like A = 10; nevertheless you MUST know how the VDP works in order to do working programs. I mean a very beep and low level knolwdge of the VDP, equal to the knoledge required to work in assembly.

Definitely, the scrolling and the graphic you'll get depends on you.






By wolf_

Ambassador (5677)

wolf_'s picture

22-03-2006, 20:47

There's scrolling and scrolling. Circus Charlie and Pippols have smooth scrolling, but it's all tricks. So if you can live with that trick, fine. Otherwise: the TMS doesn't have scroll registers. So you'll be stuck with char-scrolling, instead of pixel-scrolling..

By snout

Ambassador (5382)

snout's picture

22-03-2006, 20:50

this library might be of help Wink

By ARTRAG

Prophet (3033)

ARTRAG's picture

22-03-2006, 20:57

Great ! and it is for Hitech-C !

By LeandroCorreia

Paladin (684)

LeandroCorreia's picture

22-03-2006, 21:00

When I say scroll, I mean an 8 pixels jump scroll (Zanac, Golvellius and Kaleidoscope). In a PC, to create this kind of scroll I´d just need to copy blocks of video memory to other video memory address. And about the MSX? And about sprites?

Anyway to create MSX games I need:

- Basic keyboard and joystick input (stick function or similar).
- Access to timer functions. I intend to create an auto-adjusting game, just like PC games.
- Video: graphic blocks blitting, sprites and possibly basic graphics primitives (although I know these last ones would be slow).
- Sound functions. Just a basic sound library to create a music tracker (PSG sound) and some sound FX;

By snout

Ambassador (5382)

snout's picture

22-03-2006, 21:07

Leandro: afaik the library I linked above contains many of the features you're looking for. It looks like a great starting point!

By ARTRAG

Prophet (3033)

ARTRAG's picture

22-03-2006, 21:08

The library linked by wolf has a good support of the main graphic and PSG functions.

Actually the major problem in that library is that some functions (like sprite management
and PSG access) are done by directly calling to the corresponding msxbasic function in the
msxbasic ROM, so, sometime, the code you get isn't very fast.

On the other side, the functions in the library work in a very similar way to the msxbasic commands, so you already know what to expect.


By LeandroCorreia

Paladin (684)

LeandroCorreia's picture

22-03-2006, 21:18

Thanks, I´ll check it out! Smile
Page 1/18
| 2 | 3 | 4 | 5 | 6 | 7
My MSX profile