MSX Compilator

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

Van bosh77

Resident (37)

afbeelding van bosh77

21-01-2022, 20:41

Thanks cel, thanks ARTRAG!
The program translates the basic into asm code, and then into binary code. It is possible to use the 'asmline' instruction to directly include assembly language. Examples: asmline "halt" or asmline "ld a, 100".
The readme.txt file contains the list of available instructions, but I intend to add more.
For now the project is stopped, but I plan to resume it to fix several bugs and improve the IF ... THEN ... ELSE statement

Van bosh77

Resident (37)

afbeelding van bosh77

09-02-2022, 13:54

I am working on the compiler but i have a problem.
When I set the emulator to run a cartridge program (.ROM) I see that the MSX DISK system is not initialized.
How can I access the disk while running a cartridge program?

Van Grauw

Ascended (10638)

afbeelding van Grauw

09-02-2022, 14:11

In the ROM’s INIT procedure, hook H.STKE and return. Then, once H.STKE is called (after the beep and all slots have initialised), execute the ROM proper.

Make sure you use a ROM larger than 16K, or ROM mirroring can cause issues calling INIT twice.

Note that due the disk system using a chunk of the system RAM, less will be available to your program.

Van ducasp

Hero (612)

afbeelding van ducasp

09-02-2022, 15:36

Grauw wrote:

In the ROM’s INIT procedure, hook H.STKE and return. Then, once H.STKE is called (after the beep and all slots have initialised), execute the ROM proper.

Make sure you use a ROM larger than 16K, or ROM mirroring can cause issues calling INIT twice.

Note that due the disk system using a chunk of the system RAM, less will be available to your program.

One weird thing I've found is that ESE SCSI doesn't like if any device hooks to H.STKE and it will not work at all. At least the version simulated in Blue MSX, can't vouch if the real thing does that, but since it is using the ROM/BIOS from the original ESE SCSI and that check is done by the BIOS, there you go... I wouldn't avoid using H.STKE approach due to that, but just a warning that there are interfaces (or at least ESE SCSI) that don't like anyone messing with it. :P

Van bosh77

Resident (37)

afbeelding van bosh77

09-02-2022, 15:41

Thanks for the answer Grauw but how should I do?
can you give me an example please? thank you very much

Van Grauw

Ascended (10638)

afbeelding van Grauw

09-02-2022, 15:48

Hey bosh77, I don’t really have an example of my own, but I found this on the wiki:

Create a ROM with disks support

(Though I frown upon getting the slot ID from the c register, it is undocumented, better to use a GetSlot routine for that.)

Van bosh77

Resident (37)

afbeelding van bosh77

09-02-2022, 16:03

Thanks a lot Grauw it works !!!!

Van bosh77

Resident (37)

afbeelding van bosh77

17-02-2022, 19:41

The next version will support paged roms! It will be possible to have a binary code up to 128kb, both disk and cartridge. The memory for the variables will always be 16kb.
Hope to release the next version soon.

Van bosh77

Resident (37)

afbeelding van bosh77

24-02-2022, 22:13

This is the version 2.0 of my compiler. Version 1.0 was called MSXbasictoz80 but I wanted to change the name.
I have added several instructions and many more code examples.
In example7 and example18 there are two simple games in screen 5 and screen 8.

The news of this version is the possibility to exploit up to 128kb of binary code!
Works on windows

MSXcompilerV2

Van santiontanon

Paragon (1698)

afbeelding van santiontanon

25-02-2022, 03:10

Quite interesting project, btw, why build it with a GUI? why not just a command-line tool that takes in a text file and produces the ROM/dsk? in that way people can integrate it into their favorite editors, which is much more convenient Smile

(also, btw, it runs fine on Linux/Mac with "wine" Smile )

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