MSX Assembly Page

Página 6/11
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11

Por Grauw

Ascended (10820)

Imagen del Grauw

16-08-2015, 18:07

Thanks, interesting… Knew about the JIS1 bit but not the others…

Por sd_snatcher

Prophet (3675)

Imagen del sd_snatcher

18-08-2015, 03:05

Some variables to add to the MSX System Variables list:

ROMSLT (FFF7h, 1 byte): Contains the slot ID of the Main BIOS.
XSAVE (FAFEh, 1 byte): Light pen X coordinate read from the device (internal use only)
YSAVE (FB00h, 1 byte): Light pen Y coordinate read from the device (internal use only)
XOFFS (FAFFh, 1 byte): Light pen X calibration offset

  • b6~b0: X calibration offset
  • b7: A light pen interrupt occurred. This bit is used internally by the MSX-BIOS. User software mustn't set it.

YOFFS (FB01h, 1 byte): Light pen Y calibration offset

  • b6~b0: Y calibration offset
  • b7: reserved for future use. Do not set. Must be masked out from readings.

Por Grauw

Ascended (10820)

Imagen del Grauw

19-08-2015, 19:52

Thanks! Added.

sd_snatcher wrote:

ROMSLT (FFF7h, 1 byte): Contains the slot ID of the Main BIOS.

Am I right to think that one is MSX2 and up only? (And on MSX1 it’s FCC1H?)

Por sd_snatcher

Prophet (3675)

Imagen del sd_snatcher

20-08-2015, 01:45

In fact, the MSX1 doesn't support the expansion of the slot-0. Thus, ROMSLT will always contain zero on such machines.

Only from the MSX2 the slot-0 was allowed to be expanded.

The EXPTBL pointing to the MainBIOS slot seem to have been a workaround. But of course is preferable that software use the real variable for that.

Por zeilemaker54

Champion (355)

Imagen del zeilemaker54

20-08-2015, 07:07

sd_snatcher wrote:

In fact, the MSX1 doesn't support the expansion of the slot-0. Thus, ROMSLT will always contain zero on such machines.

Only from the MSX2 the slot-0 was allowed to be expanded.

That is a bold statement! What is the source of that statement ?
The only problem with expanding slot 0 on MSX1 is that the first version of the MSX1 BIOS does not handle this well. The later version of the MSX1 BIOS (for example in the Philips VG8020/20 and Yamaha CX5MII128) does fix this.
See http://msxsyssrc.cvs.sourceforge.net/viewvc/msxsyssrc/base100/bios.mac,look for SLOTFIX.

Por gdx

Enlighted (6429)

Imagen del gdx

20-08-2015, 09:54

The MSX Datapack says that the addresses 0FFF7h~0FFF9h are reserved.
The Technical handbook from Takeru says that the addresse 0FFF7h contains the Main-ROM slot number but use 0FCC1H only to know the Main-ROM slot number.

http://www.suruga-ya.jp/database/pics/game/123001451.jpg

I have not found other information about address FFF7h. (called MinROM or ROMSLT according documentation)

Moreover, the MSX1 supports extended slot on all primary slot!
The Slot 0 of MSX1 is normally not expanded because only it's not necessary. In general, only the MSX with internal softwares and various other Roms have the slot 0 extended.

About XSAVE and YSAVE I think we can refer to the following documentation. (page 110)

http://www.afwg.com.br/msx/livros/MSXTopSecret2Continuo.pdf

I do not know if the bit 15 of YSAVE is most or least significant bit of XSAVE.

Por Grauw

Ascended (10820)

Imagen del Grauw

20-08-2015, 11:02

Ok, I can only find reference to FFF7H in the MSX2 BIOS (subrom), so I’ll add a note that it’s MSX2 and up only.

*speculation follows* Smile

I recall now that I previously theorised that FFF7H was added as an alternative to FCC1H in MSX2 to support MSX1 to MSX2 upgrade cartridges which replace the BIOS. Needed because FCC1H only supports slot IDs 0 and 0-0 due its dual function as EXPTBL entry for slot 0.

Although if this is true, then in practice it’s failed that purpose and is not a usable solution, since probably a lot of MSX2 software uses FCC1H, including official documentation. I think it was doomed to fail, even if the docs had been clear about this, it’d still have been difficult to guarantee all MSX2 software would use the new address with so much existing MSX1 documentation pointing to FCC1H.

My guess is that this mythical MSX2 upgrade kit was mostly a sales pitch to hardware vendors and end users that they made a half-hearted attempt to support, but never put real effort into. Perhaps due to lack of vendor interest to develop or support such kits when they could also sell new computers, or because such a Frankenstein-upgrade simply wasn’t really possible in the then-current architecture while retaining an acceptable level of compatibility.

Por sd_snatcher

Prophet (3675)

Imagen del sd_snatcher

20-08-2015, 16:11

@zeilemaker54

That was a quick answer I wrote. Maybe I should have made myself more clear, sorry. In an long answer, what I meant is that no MSX1 model I knew would support the expansion of the slot-0 because the default MSX1 BIOS routines weren't coded in a way that allows that. But, of course there are so much diversity in the standard that no assumptions can be made. Since with your project you had contact with a lot more BIOSes, you knew some machines with a newer revision of the BIOS. Very interesting to know about those two machines. Thanks for the info!

BTW, it has been some time since I've seen you here in the forums. Welcome back! Smile

@gdx

The spec may have been planned to allow that, but the BIOS of the majority of the MSX1 models do not support the expansion of the slot-0.

This may explain why I haven't seen any MSX1 with a expanded slot-0. While there are quite some MSX>=2 with that feature.

Por zeilemaker54

Champion (355)

Imagen del zeilemaker54

20-08-2015, 20:07

Grauw wrote:

I recall now that I previously theorised that FFF7H was added as an alternative to FCC1H in MSX2 to support MSX1 to MSX2 upgrade cartridges which replace the BIOS. Needed because FCC1H only supports slot IDs 0 and 0-0 due its dual function as EXPTBL entry for slot 0.

Too bad. May be that was the plan.
But not workable because official documentation (also pre MSX2) states that the slotid of the mainrom was either slot 0 or if slot 0 was expanded, 0-0. In example code and in system software (disk,rs232) the slotid of the mainrom was always loaded from (EXPTBL+0). This because (EXPTBL+0) contains 0 if slot 0 was not expanded and 080H if slot 0 was expanded. And this matches exactly with the slotid of the mainrom in both cases (non expanded slot 0 and expanded slot 0).
Now comes the problem with the upgrade kits.... The normal system software must continue to work with the kit. But the kit needs to make sure the new mainrom is being used (instead of the orginal mainrom of the upgraded MSX). The only way to fix this, is by putting the slotid of the new mainrom at (EXPTBL+0). This is exactly how the NEOS MA-20 upgrade kit works. In fact the NEOS MA-20 even sets expanded slot bit, even when the NEOS MA-20 is in a normal primairy slot. This makes all the normal system software working with the new NEOS MA-20 mainrom, but the down site is that the expanded slot flag of primary slot 0 (which was on (EXPTBL+0) according to the MSX1 standard) is unreliable. MSX2 documentation is a bit unclear about this point.
About (0FFF7H), is always set to the content of (EXPTBL+0) on MSX2 and up. On MSX1 (0FFF7H) is not initialized, so you can not be sure about the value (could be anything, may be 0, may be 0FFH, you really can not tell). (0FFF7H) is not used in any system software, any coding example I know of and official documentation does not even mention it.

@sd_snatcher thanks for welcoming me back. I never did stop reading msx.org (anonymous) but login only to make comments when needed :-)

Por hit9918

Prophet (2932)

Imagen del hit9918

20-08-2015, 23:44

has there ever been any other retargeting than the way NEOS does it?
On the NEOS, FFF7 is the same hack value as FCC1!
Maybe because inconsistent slotIDs in the system could be worse than hack values?!

if the latter is the case, then the comment about FFF7 is: too little, too late. forget it.

my advice to app programmer is to not make an app MSX2-only for little bells and whistles like the FFF7.

	A = peek(&hfcc1)
	if version > MSX1 THEN A = peek(&hfff7)

if you insist on using FFF7, dont make an MSX2-only app out of it just for that reason.

The NEOS just always sets the expansion bit, even when both the bios and the cartridge are in unexpanded slot.
I think it is a bug, no deeper reason.
Vintage machines with 32k RAM in unexpanded slot 0, they get RAM mirroring in 4 subslots.

Página 6/11
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11