lfantoniosi / WonderTANG

TangNano 20K cartridge for MSX computers
BSD 2-Clause "Simplified" License
39 stars 16 forks source link

fpga: improve signal mux #15

Closed herraa1 closed 4 months ago

herraa1 commented 4 months ago

The WonderTANG uses a multiplexing scheme to read 24 signals using just 8 pins through three 74LVC245 ICs.

The multiplexing scheme is driven by a ~108MHz clock (~9.25ns period) using the following schedule based on a 8 cycle plan:

This multiplexing scheme seems to work fine for most MSX machines, except for the Omega Home Computer which experiences signal inconsistencies during the multiplexing phase. The root cause of these inconsistencies is not confirmed.

The modification presented here implements a different multiplexing scheme that has been tested successfully both on the Omega Home Computer and other MSX machines.

The same ~108MHz clock is used, but the schedule is changed slightly using a 7 cycle plan:

lfantoniosi commented 4 months ago

Your change makes pinfilter move faster and thus filtering more noise, which seems the quantity needed for a stable omega operation. Good catch.