main.CPUClock=1777777Hz
main.Caption="Радио-86РК 4K"

CPU : K580wm80a {
  debug=cas
  mem=mm
  pc=F000
  port.maptomem=1
}

mem1 : Memory {
  size=8000
}

font : Memory {
  rom="symgen.bin"
}

bios : Memory {
  rom="Radio\bios4k.rom"
}

sys : K580ww55 {
  portA=kbd.~mask
  portB=kbd.~data
  portC[0]=cas.record
  portC[4]=cas.playback
  portC[5-7]=kbd.~data2
}

app : K580ww55 {
}

crt : K580wg75 {
  mode=3
  dma=dma[2]
  font=font[0C00]
  hilight=crt.ggh
}

dma : K580wt57 {
  mem=mem1
}

mm : MemMap {
  map[0][0000-7FFF]=mem1[0000]
  map[0][8000-9FFF]=sys.data
  map[0][A000-BFFF]=app.data
  map[0][C000-DFFF]=crt.data
  map[0][E000-FFFF].wo=dma.data
  map[0][F000-FFFF].ro=bios[0000]
}

kbd : Keyboard {
  layout="Radio\layout.kbd"
}

beep : beep {
  input=cpu.int
}

cas : tape-recorder {
  biproc[FB98-FCA4]=rk
  boproc[FC46-FCA4]=rk
}
