I/O port mirroring: please help

Por Manuel

Ascended (18237)

Imagen del Manuel

16-05-2021, 23:18

Some people already noticed that some I/O port ranges are mirrored in several MSX machines, especially those with MSX-ENGINE chips S1985 and S3527. To improve openMSX accuracy, we'd like to get an idea/overview which ports are mirrored on which machines (independent of the used engine, but perhaps it will give us a clue whether it's engine specific or not).

See also discussion here: https://github.com/openMSX/openMSX/issues/1355 and here: https://github.com/openMSX/openMSX/issues/814

lintweaker wrote an initial test version of a tool to check for these I/O port mirrrors. Please try to run it on your MSX and post the result here. See: https://github.com/lintweaker/msxstuff/raw/master/tools/CHKE... for the MSX-DOS (1) binary.

Login sesión o register para postear comentarios

Por Caliostro

Expert (80)

Imagen del Caliostro

17-05-2021, 00:16

NMS8220
Print ports (90-91h) mirrored : yes
PSG ports (a0-a3h) mirrored : yes
PPI ports (a8-abh) mirrored : yes
VDP ports (98-9bh) mirrored : yes
RTC ports (b4-b5h) mirrored : no

Conclusion:
Engine detected : S3527

------------------------------------
FENNER SPC-800
Print ports (90-91h) mirrored : no
PSG ports (a0-a3h) mirrored : yes
PPI ports (a8-abh) mirrored : yes
VDP ports (98-9bh) mirrored : yes
RTC ports (b4-b5h) mirrored : no

Conclusion:
Unknown or no engine

(i deleted the pictures, it is cleaner)

Por Manuel

Ascended (18237)

Imagen del Manuel

17-05-2021, 00:14

Thanks for that! As we can see, there's more mirroring going on than just caused by the MSX Engine chips.... not surprisingly, as it is cheaper to make the hardware like that (saves decoding a few address lines).

Por sdsnatcher73

Prophet (2316)

Imagen del sdsnatcher73

17-05-2021, 05:16

I am trying to understand what the mirrors mean. What if an external cartridge uses the actual port that a mirrored internal port is also reacting on? Will it create conflicts? Will external ports take precedence? Is that part of the intended design and is that how e.g. Sharksym can do such apparently impossible stuff with his hardware (specifically paraMSX-R and SLT-Turbo)?

Por Grauw

Ascended (10145)

Imagen del Grauw

17-05-2021, 10:50

It will create bus contention; electrical conflicts where one device drives the bus high and another drives it low, iow a short circuit. The data readout will be unreliable and depend on which device drives the bus harder. Note that this is only an issue for reading (writing is ok).

Some machines block off the I/O request signal to external hardware for I/O that’s implemented internally, e.g. Panasonic MSX2+ machines. This block will be the case for the mirrors as well.

Not sure of the exact details of paraMSX-R or SLT-Turbo, but I don’t think it has to do with mirroring.

Por zeilemaker54

Champion (315)

Imagen del zeilemaker54

17-05-2021, 11:01

sdsnatcher73 wrote:

I am trying to understand what the mirrors mean. What if an external cartridge uses the actual port that a mirrored internal port is also reacting on? Will it create conflicts? Will external ports take precedence? Is that part of the intended design and is that how e.g. Sharksym can do such apparently impossible stuff with his hardware (specifically paraMSX-R and SLT-Turbo)?

Extension are not allowed to use an I/O port in the system area (080H-0FFH) in general, so this should not be a problem.

Por hit9918

Prophet (2911)

Imagen del hit9918

17-05-2021, 16:27

Quote:

Print ports (90-91h) mirrored : yes

but WHERE does it mirror? "mirroring : yes" is one bit of information, while the beancounters could ignore multiple address bits. so you better dont use this 1 bit scheme in the emulator.

Por hit9918

Prophet (2911)

Imagen del hit9918

18-05-2021, 19:19

I misunderstood, the openmsx xml does it very different to a yes/no bit.

Por lintweaker

Champion (416)

Imagen del lintweaker

21-05-2021, 12:38

I have updated the check tool. Binary and source on my github page mentioned in the first post.