In fact, it's we have no 65536 I/O ports on MSX, and far from it, since the existing components/peripherals are only connected in 8 bits to the ports. It means that even if we connect a new one on 16 bits those which have the same 8 bits of weak point will react at the same time.
You're right. On the other hand if there's one free port available in the list of 256 (8 bit) ports, you could in theory use this as 256 different ports instead of a single port. (I'm not saying that it's a good idea, I'm only saying that it's possible).
BTW, not only the IN A,(C) and OUT (C),A instructions output a 16-bit port-address, but also the IN A,(n) and OUT (n),A instructions do. The latter two instructions output the value of the 'A' register as the 8 MSB bits (so that makes the instructions less useful in practice for 16-bit port numbers).
BTW2, 16-bit port numbers are emulated in openMSX, but as far as I remember the only device that actually uses them is "ADVram". And that device is very rarely used.
Is it supported by CMOs?
Oups, I wanted to ask: "Is it supported by OCMs?"
Ah, and also the 'OUTI' and 'INI' instructions (and all variations) output a 16-bit port address: the BC register. But that's also not very useful in practice.
If I check PPI port &HAB (which should be WO), on a real MSX, gives 0FFH, on OpenMSX the value 082H..
Is it only my real MSX or also other real MSX-es?
Whatever value I write to this port, real MSX always 0FFh (in my case)...OpenMSX always 082H...
I do not know if others, on real MSX, when checking port 0ABH, give 0FFH or other value.
Again, detection possibility?
Would be interested to see what this gives on different kinds of MSX machines: ?HEX$(INP(&HAB))
I get 0xF1 on my Philips NMS 8250 and 0xFF on my Panasonic FS-A1GT.
As Wouter wrote to me:
A8, A9, AA can be programmed to be either IN or OUT, so in the xml they must be IO. It's true that in MSX they only have one fixed direction (set early during the boot sequence, and then never changed again).
i'll still check port AB ...
... the PPI (82C55A) datasheet mentions that the control port (mapped on IO port 0xAB in MSX) CAN be read back. For MSX that isn't strictly needed, so maybe the integration in (some?) MSX-engines doesn't support this read-back functionality
So, it would be especially interesting to see what happens on MSX machines without MSX engine IC.
Mitsubishi ML-FX1 with S3527 also gave 0xF1
Canon V-20 (without any engine) gave 0xFA
FYI, made an issue for it. More samples would be most welcome: https://github.com/openMSX/openMSX/issues/1505
@Grauw... I do not agree..
For port port F4h and port 40h, it is first FFh, write value or correct value to it, it changes...
For S1985 write value of 254 to the port 40h and it changes. so, connected.
for port F4h (2+) as well, write any value and it will change to F7h
Port ABh is also connected, still giving FFh.
To say that all unconnected ports give FFh is not correct.