Porting GW-BASIC for the MSX

Page 1/3
| 2 | 3

Par lpereira

Supporter (2)

Portrait de lpereira

30-05-2020, 22:18

Hey --

First post here.

Recently, Microsoft released the source code of GW-BASIC for MS-DOS under a permissive open source license. It's been mechanically translated from 8080/Z80 to 8086, so I'm working on a tool to mechanically convert it back to Z80 with the intention of making it run on the MSX.

So far, I've made good progress, but there's still a lot of work to do.

The source code is available here (https://github.com/lpereira/gw-basic). The ASM files are the original 8086 sources, but most of them can be passed through the conversion tool (conv.py) to generate Z80 source code. The code does not assemble yet, and some of it isn't even valid Z80 (this is my first foray into Z80 programming), but I'm fixing stuff slowly and steadly.

I'm here looking for help from other people that might be interested in having a open source Microsoft BASIC on the MSX. I know the C-BIOS people might be interested in this.

Cheers,
Leandro

!login ou Inscrivez-vous pour poster

Par Manuel

Ascended (19462)

Portrait de Manuel

31-05-2020, 00:27

Wow, interesting idea to use it as a base for a BASIC for C-BIOS. The problem with GW-BASIC is that it is not aware of any of the MSX hardware though... so I suppose you will have to add a lot of MSX specific stuff, also making use of the MSX-BIOS (or C-BIOS) routines.

Par zeilemaker54

Champion (347)

Portrait de zeilemaker54

31-05-2020, 00:46

The source code (recreated by disassmbly) of MSX basic is already available, see my msxsysrc project https://sourceforge.net/projects/msxsyssrc/
I did a quick compare on the important parts and they are pretty much the same. It is easy to see that the code is in fact a translation of the original i8080 code.

Par lpereira

Supporter (2)

Portrait de lpereira

31-05-2020, 01:04

Quote:

The problem with GW-BASIC is that it is not aware of any of the MSX hardware though...

Yes, it's just a starting point to have a BASIC that's somewhat compatible with the MSX BASIC and that is freely usable/distributable without copyright issues. It's going to take a while to support all the hardware, and even then, to achieve good compatibility with the current versions of MSX BASIC in terms of peripheral access.

The code is segregated into generic and platform-specific routines, so it should be possible to write drivers for things like VDP, PSG, and whatnot, and some things should "just work". Others will need some love; even the PSG will, as the PLAY command only supports one channel at the moment.

But one step at a time. I would be happy if I could get it to run a 10 ?"hello": goto 10 kind of program. Smile

Quote:

The source code (recreated by disassmbly) of MSX basic is already available

Also, the fact that the MSX BASIC disassembly is available doesn't mean you can freely use it. The code in msxsyssrc is in a grey area because it's not licensed under any open source license (it's disassembled proprietary code); it can't be used for C-BIOS, for instance.

Par Grauw

Ascended (10768)

Portrait de Grauw

31-05-2020, 01:29

Super cool project! And I didn’t know GW-BASIC was MIT licensed, that’s mighty nice of Microsoft.

Par Louthrax

Prophet (2465)

Portrait de Louthrax

31-05-2020, 09:53

Interesting indeed. Any different and interesting features in GW BASIC language that we do not have in MSX ?

Par Manuel

Ascended (19462)

Portrait de Manuel

31-05-2020, 10:00

Doesn't it have WHILE/WEND?

Par zeilemaker54

Champion (347)

Portrait de zeilemaker54

31-05-2020, 11:24

Quote:
Quote:

The source code (recreated by disassmbly) of MSX basic is already available

Also, the fact that the MSX BASIC disassembly is available doesn't mean you can freely use it. The code in msxsyssrc is in a grey area because it's not licensed under any open source license (it's disassembled proprietary code); it can't be used for C-BIOS, for instance.

I think now is the time to ask Microsoft to open source MSX basic. There is no point not to open source it, because it is created from the same source code as GW basic. The code of GW basic has even the i8080/z80 register named in comments. It is the same thing

Par lintweaker

Champion (464)

Portrait de lintweaker

31-05-2020, 12:14

zeilemaker54][quote wrote:

I think now is the time to ask Microsoft to open source MSX basic. There is no point not to open source it, because it is created from the same source code as GW basic. The code of GW basic has even the i8080/z80 register named in comments. It is the same thing

Will / can probably not happen, from the blog:

What about other ports?

Many have asked if we can also open-source implementations for processors other than the 808x. Alas, we’re unable to provide sources for these ports and/or customizations.

Par mars2000you

Enlighted (6480)

Portrait de mars2000you

31-05-2020, 12:33

Easier to read with quote tag:

Quote:

What about other ports?

Many have asked if we can also open-source implementations for processors other than the 808x. Alas, we’re unable to provide sources for these ports and/or customizations.

Page 1/3
| 2 | 3