main.CPUClock=5MHz
main.Caption="Ëüâîâ ÏÊ-02"
main.scale.x=100%
main.scale.y=150%
main.fullscreen=1280x1024x16
main.fullscreen.scale.x=2
main.fullscreen.scale.y=3

CPU : z80 {
  debug=cas
  mem=mm
  int[FF]=vid.irq
  port[10]=port10
  port[C0-C3]=sys.data
  port[D0-D3]=sys2.data
  port[F0]=portF0
  portmask=F3
  pc=C000
}

port10 : MemMap2 {
  offset=cpu.port.msb
  map[80-BF].wo=AY.data
  map[C0-FF].ro=AY.data
  map[C0-FF].wo=AY.regno
}

mem1 : Memory {
  size=10000
}

mem2 : Memory {
  size=10000
  frame[0].size=4000
}

bios : Memory {
  rom="Lvov\rom01.bin"
}

sys : K580ww55 {
  portB=vid.palette
  portC[1]=mm.page[0]
}

sys2 : K580ww55 {
  portA=kbd.~mask
  portB=kbd.~data
  portC[0-3]=kbd.~mask2
  portC[4-7]=kbd.~data2
}

mm : MemMap {
  map[0][0000-3FFF]=mem1[0000]
  map[0][4000-7FFF]=vid.mem
  map[0][8000-BFFF]=mem1[8000]
  map[0][C000-FFFF].ro=bios[0000]
  map[1][0000-BFFF]=mem1[0000]
  map[1][C000-FFFF].ro=bios[0000]
  map[2][0000-3FFF]=mem1[0000]
  map[2][4000-7FFF]=vid.mem
  map[2][8000-BFFF]=mem1[8000]
  map[2][C000-FFFF]=mem2.frame[0]
  map[3][0000-BFFF]=mem1[0000]
  map[3][C000-FFFF]=mem2.frame[0]
}

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

portF0: Register {
  write[0-1]=mem2.frame[0].page
  write[2]=mm.page[1]
  write[3]=vid.hires
  write[4]=vid.blank
  write[5]=vid.irqenable
  default=0
}

vid : Lvov-Video {
}

AY : AY-3-8910 {
  freq=1773400
  input=sys.portC[0]
}

cas : tape-recorder {
  filehdr="LVOV/2.0/$"
  tapehdr="$$$$$$$$$$"
  filter="Lvov files (*.lvt;*.l??)|*.lvt;*.l??"
  ext="lvt"
  tproc[E2ED-E342]=sp
  biproc[E343-E341]=sp
  record=sys.portC[0]
  playback=sys.portC[4]
}
