Karoshi MSX Community

Desarrollo MSX => Development (English/Ingles) => Mensaje iniciado por: nrgo en 04 de Octubre de 2008, 10:56:43 am



Título: MSX-Pad Turbo Pascal and BINs
Publicado por: nrgo en 04 de Octubre de 2008, 10:56:43 am
Hi to all, I need a help:

does exist a utility to convert COMs -> BINs?
Is it possible to obtain a BIN using MSX-Pad?
Does the Turbo Pascal allow to this compilation and how?

I ask this because there are many people developing software with Turbo Pascal (or MSX-Pad), also videogames, and we'd like to put this software into carts.

Thankyou in advance for you help.


Título: Re: MSX-Pad Turbo Pascal and BINs
Publicado por: Jon_Cortazar en 04 de Octubre de 2008, 06:17:18 pm
I am really NOT familiar at all with .COM files, but it should be as simple as genereate a different header, isn't it? afaik, the .COM files always starts at 0100h (.org 0100h), and the .BIN can be located at any BLOADable zone in MSX-BASIC... (< I can be totally wrong here)

I've just taken a look at SLotman's tutorial here (http://www.icongames.com.br/msxfiles/utils/ManualMSXPad.pdf), and it seems the MSX-Pad enviroment does not allow the user to generate .BIN files, as the header of the file and some other things are hidden to the user in that application. Note that is an MSX-development-made-easy app, and because of that lots of things are done automatically ;)

Perhaps other people here can answer to you about that but... won't it be that simple than changing the starting adress of the program to 8000h (or more) and just renaming the .COM to .BIN? or am I just talking nonsense?

Any clue? ???


Título: Re: MSX-Pad Turbo Pascal and BINs
Publicado por: jltursan en 05 de Octubre de 2008, 12:19:11 pm
Well, as the MSX-Pad approach is very close to the SDCC inner workings, I can see several problems here...

If I've understood right, you can specify a code starting address as well an ending one, using this I guess you can use $4010-BFFF as such addresses; then, once compiled, you would need to add a ROM header (16 bytes) as it's a raw executable (if it's a real COM executable of course); but then problems arises...
Just guessing; but the Pascal compiler (as its C counterpart) generates code ready to run in a full 64KB RAM environment; but now we want to run the code compiled on ROM; so it probably won't work. SDCC can be pointed where the RAM data goes, if HiSoft Pascal has a similar feature would be possible to generate a ROM executable on pages 1 and 2 while having data at page 3 ($C000).

Anyway, one advantage of the MSX-Pad is, as is designed to work with COM, the compiled executables are BIOS free; so you've some more freedom regarding where you uses page 0 or not, also it's very handy at choosing alternate routines, not the slow BIOS ones.

I'm sure that I'm missing a lot of things, I really think that the only man able to answer your question is SLotman. Maybe it's possible to turn MSX-Pad into a ROM development platform, that would be great as I think it's a great tool if you like PASCAL :)

 


Título: Re: MSX-Pad Turbo Pascal and BINs
Publicado por: nrgo en 09 de Octubre de 2008, 07:35:47 pm
Thankyou very much for your help!
I realize that it's very difficult to create BINs in Turbo Pascal...  :(

So the only one, fast solution to have a ROM is to make a DSK containing MSX-DOS, COMs and all other files and use the DSK -> ROM utility.
Not so professional, but better than nothing...  ;)

Is it possible to manage a ROM in the same way of a RAMDISK?