msx system source file project started!

Page 1/2
| 2

By zeilemaker54

Champion (315)

zeilemaker54's picture

28-11-2005, 11:42

In the following topics, I mentioned that I will soon make my collection of msx system source files public:

www.msx.org/forumtopic5536.html
www.msx.org/forumtopic5485.html

Well, I have finally done it! Currently only available via CVS, but you can view or download the files. The sources are disassembled using Z80DIS, and can be assembled using the Microsoft Macro Assembler (M80.COM and L80.COM). Some sources are documented quite at lot, some need more comment. This is one of the objectives of this project. Futhermore, sources could be used to produce newer or updated versions of the msx-system software.

The project is available on sourceforge:

sourceforge.net/projects/msxsyssrc

sources available:

base410:MSX Turbo-R bios,basic,sub and option rom
basechr:all kinds of MSX charactersets
basekey:all kinds of MSX keyboardhandlers
disk100:the orginal msx diskkernel 1.00 (diskbasic 1.0)
disk100upd:a modified msx diskkernel 1.00 (modified by myself, to boot from any drive)
disk231:the orginal msx diskkernel 2.31 (diskbasic 2.01)
disk231upd:a project to include FAT16 support in the diskkernel 2.31
diskdrvs:all kinds of diskdrives, needed to assemble a diskkernel
kanji:msx kanji
music410:msx music, used in the MSX Turbo-R
serial100:msx serial, old style hardware (without RAM)
serial200:msx serial, new style hardware (with RAM)

Hope you will enjoy it.

Arjen Zeilemaker.

Login or register to post comments

By HansO

Paladin (672)

HansO's picture

28-11-2005, 11:50

In the following topics, I mentioned that I will soon make my collection of msx system source files public:

www.msx.org/forumtopic5536.html
www.msx.org/forumtopic5485.html

Well, I have finally done it! Currently only available via CVS, but you can view or download the files. The sources are disassembled using Z80DIS, and can be assembled using the Microsoft Macro Assembler (M80.COM and L80.COM). Some sources are documented quite at lot, some need more comment. This is one of the objectives of this project. Futhermore, sources could be used to produce newer or updated versions of the msx-system software.

The project is available on sourceforge:

sourceforge.net/projects/msxsyssrc

Hope you will enjoy it.

Arjen Zeilemaker.

Thanks! At least it will help to understand better what happens underneath! And for emulators a treasure to experiment with roms.

By BiFi

Enlighted (4348)

BiFi's picture

28-11-2005, 13:19

Great project!

Can you also look into the bug in the MSX-MUSIC of the turboR GT? It crashes after you do a CALL MUSIC (0,0) while all the other MSX-MUSIC ROMs and FM-PAC work fine.

By zeilemaker54

Champion (315)

zeilemaker54's picture

28-11-2005, 15:07

Can you also look into the bug in the MSX-MUSIC of the turboR GT? It crashes after you do a CALL MUSIC (0,0) while all the other MSX-MUSIC ROMs and FM-PAC work fine.
I could take a look at that, but I have no real FS-A1GT at hand. In OpenMSX everything seems to work ok! What I do know is, the FS-A1GT has a different MSX-MUSIC rom because of the MSX-MIDI buildin.
In what kind of condition does this error occure ?

By BiFi

Enlighted (4348)

BiFi's picture

28-11-2005, 16:16

Any condition where you do that particular CALL... I also tested it in openMSX with the GT and even there I get it to crash in exactly the same way as the real thing...

I got it every time when I wanted to play my last year's xmas tune entry using that on the GT. I wanted to use the MSX-MUSIC PLAY #2 handler which is synced in both PAL and NTSC... The MSX-BASIC PLAY stuff halts shortly for the next PLAY to handle before it continues playing.

The adapted version which causes the crash can be found here.

By zeilemaker54

Champion (315)

zeilemaker54's picture

28-11-2005, 19:31

Any condition where you do that particular CALL... I also tested it in openMSX with the GT and even there I get it to crash in exactly the same way as the real thing...

I got it every time when I wanted to play my last year's xmas tune entry using that on the GT. I wanted to use the MSX-MUSIC PLAY #2 handler which is synced in both PAL and NTSC... The MSX-BASIC PLAY stuff halts shortly for the next PLAY to handle before it continues playing.

The adapted version which causes the crash can be found here.

Yep, this does not work correctly. May it has something to with the CALL MUSIC, but may be the PLAY#2 is also possible, because the programs runs until a some play statement seems to hang the system. Very interesting stuff.

And only the GT has this problem, not the ST! So it must be the newer MSX-MUSIC rom!

By turbor

Champion (488)

turbor's picture

28-11-2005, 22:09

Can anybody shed a light on the legality of this?
I assume you started out of the original binary roms, disassembled them and then added your comments
There aren't any verbatim copies of original ASCII document sources there right ?
The original roms are still copyright protected and are not made public domain by their copyright holders, so that is a big no-no as far as sf.net goes for distribution.
If you assemble your commented code you end up again with the copyrighted code/roms, so in this case isn't the code you put on the sf.net site as illegal as simply encoding them in fi. uuencode or putting them in a zipfile? In both cases they produce the original copyrighted rom only the used way is different.

By turbor

Champion (488)

turbor's picture

28-11-2005, 22:22

Also the project states GPL, since the project owner isn't the original author of the code he is commenting, he can not decide the license for it. He simply hasn't got the copyright of the work.
It would be as bizar as me disassembling windows XP and all of its components and then state that if you build XP (by assembling the source I created this way) that it is now GPL'ed.

By zeilemaker54

Champion (315)

zeilemaker54's picture

29-11-2005, 08:05

@turbor: I am not sure about the legality of this either. But the goal of the project is not to distribute copyrighted material, but to show an inside in the workings of the msx system software.
May be it is beter to state that the code is copyrighted by ASCII/Microsoft.
On the other hand, I have some disassembled TRS-80 Basic sources from the internet. I suppose they are illegal too. And even MSX system source files are available on the internet elsewhere.
May be you have a suggestion for a legal way ?

By turbor

Champion (488)

turbor's picture

29-11-2005, 08:46

The only legal way I can think of is the following:

On the site
1) describe how people themselves should disassemble the source.
Be very descriptive here, so that you end up with a procedure that even a simple inexperienced user can follow.
Provide links to needed resources etc

2) distribute a diff/patch file that contain the comments against the file created in step 1
'diff' and 'patch' are a very common *nix tools and used in for example CVS and there are versions for almost every OS imaginable.
Again make a procedure so that everybody knows how to apply the patch file.

This way the original copyrighted code isn't on sf.net and the text that has your copyright (the actual comments) can be distributed any way you like (since you hold the copyright to those text parts)

To avoid that standard diff (which is line based) includes to much of the disassembled code it would be advisable to avoid comments after the mnemonics but have them on a separate line ofcourse. And use the options that diff provide to minimize (or completely skip) the context indicators, otherwise if there is really much text added you could end up with including the entire disassembled code in the patch file Smile

This is of course extra labour induced upon both you and the final user, but afaik it is probably the only "legal way"* to go for the moment.

But for the moment I think it is indeed a good idea to clearly state the the original code is copyrighted ASCII/Microsoft and that the sole intention of the project is to give an insight/understanding in the internal workings by providing comments upon the disassembled code.

* depending on the country you live in ofcourse. Since some countries do not recognise international copyright agreements your mileage may vary Wink

By zeilemaker54

Champion (315)

zeilemaker54's picture

01-12-2005, 08:16

Great project!

Can you also look into the bug in the MSX-MUSIC of the turboR GT? It crashes after you do a CALL MUSIC (0,0) while all the other MSX-MUSIC ROMs and FM-PAC work fine.

@BiFi: Indeed, it is a bug in the CALL MUSIC routine. First of all, since you are using 3 playvoices MSX-MUSIC, the correct CALL MUSIC initialization shoud be:

CALL MUSIC(0,0,1,1,1)

If you are using this, no crash occures.
It looks like something with the playvoices is not correctly checked....
More to come...

Page 1/2
| 2