Autor
| Is there any C cross compiler that generates ROM files?
|
LeandroCorreia msx addict Mensajes: 454 | Publicado: Marzo 22 2006, 20:04   |
Hello guys,
Is there any C cross compiler that uses the PC to generate MSX ROMs?
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Marzo 22 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.
|
|
LeandroCorreia msx addict Mensajes: 454 | Publicado: Marzo 22 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?
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Marzo 22 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.
|
|
wolf_
 msx legend Mensajes: 4780 | Publicado: Marzo 22 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..
|
|
snout
 msx legend Mensajes: 4992 | Publicado: Marzo 22 2006, 20:50   |
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Marzo 22 2006, 20:57   |
Great ! and it is for Hitech-C !
|
|
LeandroCorreia msx addict Mensajes: 454 | Publicado: Marzo 22 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;
|
|
snout
 msx legend Mensajes: 4992 | Publicado: Marzo 22 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!
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Marzo 22 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.
|
|
LeandroCorreia msx addict Mensajes: 454 | Publicado: Marzo 22 2006, 21:18   |
Thanks, I´ll check it out!  |
|
LeandroCorreia msx addict Mensajes: 454 | Publicado: Marzo 23 2006, 00:17   |
Uh... Where can I download Hitech C?
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Marzo 23 2006, 00:25   |
the CPM version is free from Hitech
the PC version (v.7.50) has a free demo version that is limited to code of few Kb: unlocking this demo version is illegal but possible (go google)
the last PC version (v.7.80) has NO free demo version, but you can ask Hitech people a trial version, fully working but limited to 30 days:
usually they are very kind and provide it to anyone willing to try the new C compiler.
In any case buying the PC version only for your speare time cold be very expensive, go to Hitech and do your evaluations.
|
|
MicroTech msx lover Mensajes: 122 | Publicado: Marzo 23 2006, 08:35   |
Quote:
| * almost no C compiler support MSX graphic, so it is up to you to do your code to access the VDP
|
Ascii MSX C does... but it isn't a cross compiler.
Afaik there exist the following "packages":
- MSX C compiler v1.10
- MSX C compiler v1.20
- MSX C library: this contains libraries (with full sources) to handle vdp, psg, call bios,
also 32bit integers math.
You should find it on the net (probably illegal) and on the CD in MSX Magazine #3, with an exhaustive japanese help file  |
|
pitpan msx master Mensajes: 1390 | Publicado: Marzo 23 2006, 11:29   |
IIRC Boukuchi released a C compiler for PC that generates MSX ROMs. Don't remember its name though, it was a port of a well known mini C compiler, LCC perhaps?
|
|
|
|
|