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

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

mem1 : Memory {
  size=8000
}

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

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

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

tim : K580wi53 {
  clock[0].rate=1/1
  clock[1].rate=1/1
  clock[2]=tim.out[1]
  ~gate[0]=tim.out[2]
  gate[1].value=1
  gate[2].value=1
}

crt : K580wg75 {
  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]=tim.data
  map[0][C000-DFFF]=crt.data
  map[0][E000-FFFF].wo=dma.data
  map[0][F000-F7FF].ro=bios[0000]
  map[0][F800-FFFF].ro=bios[0000]
}

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

beep : beep {
  input=cpu.int
  input2=sys.portC[0]
  input[0]=tim.out[0]
}

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