Original BETADISC interface (and all russian clones with tr-dos) use special feature. All FDC ports are invisible(not exist) if ZX rom are connect. If TR-DOS rom is connect then all FDC ports are enable.
Result: only tr-dos rom routines can access to FDC ports. You can replace all IN and OUT instructions for FDC ports with jump to your own routine with software emulation. Each IN/OUT instruction length is 2 bytes then you can for example replace only first byte with RST xx(= jump to FDC emulation) and emulator detect next byte after RST instruction for reconstruction of original IN/OUT instruction type. Emulator must detect also adress of port and writed value if possible. For each FDC command must be extra routine. Real FDD is replaced with TRD image on IDE device. Must be used internal buffer 512 bytes for load/save ide sector. If you need save more trdos sectors with standard size 256bytes then each 2 trdos sectors are writed to 512b buffer and saved to TRD image. Reading trdos sectors is similar - before read first trdos sector must be readed one full IDE sector 512b and emulator return readed trdos data only from buffer. Next trdos sector not need next reading from IDE because buffer always contain two trdos sectors.
Similar tr-dos FDC ports emulation is used in vTR-DOS (special tr-dos version for ATM TURBO 2+ computer), but this version use TRD image in 1MB ram (ramdisc) = need big ram. ESXDOS can work also on ZX48kB because DIVIDE interface use own ram and rom memory for system and all TRD images are on IDE device (or SD/MMC card)
Similar ramdisc based TR-DOS versions emulate only standard trdos services but is impossible load software with custom loaders using jumps to #3D2F (ret). ESXDOS emulate IN/OUT instructions, then run also software with custom loaders with enable IM2 interrupt, etc....
For more details contact author...