Cross-compiler of my dreams

Pagina 1/7
| 2 | 3 | 4 | 5 | 6

Door LeandroCorreia

Paladin (955)

afbeelding van LeandroCorreia

08-11-2004, 18:07

I dream of a cross-compiler that:

Is BASIC Compatible.
Is able to create MSX ROM and BIN files.
Doesn´t need to have many operators and commands, just:
- Sprite commands and definitions.
- Vpeek and Vpoke equivalents. Smart programmers could get really fast programs like that.
- Peek and Poke equivalents.
- Keyboard and joystick input.
- Sound commands.
- Some math operators, including trigonometric functions.
- timer support.
- memory allocation functions.

That would be enough to create many new cool games for the MSX... sigh...

Is it possible to be done? And does anyone dares to write it?

Aangemeld of registreer om reacties te plaatsen

Van BiFi

Enlighted (4348)

afbeelding van BiFi

08-11-2004, 18:23

I guess any assembler will do then... though you need to write all those extra routines yourself... or develop for MNBIOS. That'd really make flyguille happy.

Van anonymous

incognito ergo sum (116)

afbeelding van anonymous

08-11-2004, 20:36

I guess any assembler will do then... though you need to write all those extra routines yourself... or develop for MNBIOS. That'd really make flyguille happy.
Since when are assemblers BASIC compatible?

Van BiFi

Enlighted (4348)

afbeelding van BiFi

08-11-2004, 21:50

Well, you can use the compiled code in a BASIC environment, or even extend BASIC with it.

Van flyguille

Prophet (3028)

afbeelding van flyguille

08-11-2004, 22:39

I guess any assembler will do then... though you need to write all those extra routines yourself... or develop for MNBIOS. That'd really make flyguille happy.

yeah, sure... but if a guy thinks in a programming enviroment as a BASIC platform surely he doesn't knows about assembler.....

MNBIOS has all items and more.

But not a BASIC programming interface.

sorry

Van LeandroCorreia

Paladin (955)

afbeelding van LeandroCorreia

09-11-2004, 02:55

I think of...

1) Type a BASIC listing.
2) Press a "Generate ROM file" button.
3) Play the ROM in an emulator.

Van BiFi

Enlighted (4348)

afbeelding van BiFi

09-11-2004, 07:38

Ah, something like this? You can find another one that sticks to the MSX standard more closely in this archive. ;)

Van NYYRIKKI

Enlighted (5918)

afbeelding van NYYRIKKI

09-11-2004, 08:09

I don't see why anyone would like to have this kind of tool, but maybe this will help you:
www.msx.org/newspost1929.html

You still need to touch your MSX / MSX emulator as this requires tokenized BASIC program for input, but you can use for example Windows Notepad to write your BASIC program and then you need to do following in MSX-BASIC:

LOAD"A"
SAVE"B"

... to convert the text file (A) to tokenized format (B) before using the tool. AFAIK there is no tool to make process 100% MSX free, but if you have MSX emulator with "dir as disk" feature, you can execute the abowe mentioned commands directly in PC harddisk.

Van snout

Ascended (15187)

afbeelding van snout

09-11-2004, 10:03

I'd really love to see a NestorBASIC compatible BASIC2ROM (or BASIC2BIN?) convertor. It would certainly boost the activity of 'novice' MSX developers, which cannot be a bad thing at all, now can it? Smile

Van BiFi

Enlighted (4348)

afbeelding van BiFi

09-11-2004, 10:06

I guess it wouldn't be too hard to add.

Van flyguille

Prophet (3028)

afbeelding van flyguille

09-11-2004, 13:46

well to convert a basic listing in a ROM image not makes it faster..... the listing is not compiled in a assembler program.

The bigger problem to create a basic to assembler compiler is the following:

1) the parsing of maths expressions....
2) single/double pressision variables....
3) dynamic storage size of each alphanumeric variable....

there is three problems to solve.

Assembler is a lot different. YES, but not more complicated

Examples (for MNBIOS programming)

VPOKE 2 , 3
--------------------
ld hl, 2
ld e, 3
call WR_VRAM

POKE 2,3
------------
ld a, 3
ld (2) , a

SOUND 2, 3
---------------
ld a, 2
ld e, 3
CALL WR_PSG

DE = COS ( angle )
------------------------
ld hl, angle
CALL COSENO ; ( COSENO= spanish word for COSINE).

PUT SPRITE 1,(2,3)
------------------------
ld a, 1
ld d, 2
ld e, 3
CALL WR_YX_ASPR

PD: there is a assembler equivalente for each basic command... ( well, not for all, by example TAN() is not available).

You can see how MNBIOS does all easy.

PD2: you need to write ....

INCLUDE "EnKernel.asm"

.... at the beggining of your source. (download the file from http://www.mnbios.com.ar ).

Pagina 1/7
| 2 | 3 | 4 | 5 | 6