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
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?
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.
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
Thanks for the answer Grauw but how should I do?
can you give me an example please? thank you very much
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.)
Thanks a lot Grauw it works !!!!
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.
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
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
(also, btw, it runs fine on Linux/Mac with "wine" )