main.CPUClock=1MHz
main.Caption="Àãàò-7"
main.scale.x=100%
main.scale.y=150%

CPU : mcs6502 {
  debug = cas
  mem = mm
  irq = vid.vrtc
  nmi = vid.timer
}

mem1 : Memory {
  size = 20000
}

bios : Memory {
  rom = "Agat\Agat7.rom"
}

boot140 : Memory {
  rom ="Agat\7\agatb140.bin"
}

boot800 : Memory {
  rom ="Agat\7\agatb800.bin"
}

regC060 : Register {
  read[7]=cas.playback
}

regC063 : Register {
  read[7]=kbd.ruslat
}

mapC0 : MemMap2 {
  map[00-0F]=kbd.code
  map[10-1F]=kbd.reset
  map[20-2F]=cas.touchflip
  map[30-3F]=beep.touchflip
  map[40-4F]=vid.irq.on
  map[50-5F]=vid.irq.off
  map[60-60]=regC060
  map[63-63]=regC063
  map[B0-BF]=fdd.ctl140
  map[D0-DF]=fdd.ctl800
}

mm : Agat-MemMap {
  mem=mem1[0]
  bios=bios[0]
  slot[0]=mapC0
  slot[2]=mm.extromctl
  slot[3]=boot140[0]
  slot[4]=mm.extramctl
  slot[5]=boot800[0]
  slot[7]=vid.mode
}

font : Memory {
  rom = "Agat\Agat.fnt"
}

vid : Agat-Video {
  mem=mem1
  font=font
}

kbd : Agat-Kbd {
  layout = "Agat\layout.kbd"
}

fdd : Agat-fdd {
  image[0].file="Agat\7\test800.img"
}

beep : beep {
}

cas : tape-recorder {
  filter="Agat files (*.b)|*.b"
  ext="b"
  tproc[FECE-FED3]=ag
  tproc[FECE-FED3].check="A94020C1"
  boproc[FEEE-FEF6]=ag
  boproc[FEEE-FEF6].check="A2100A20"
  iproc[FEFE-FF3B]=ag
  iproc[FEFE-FF3B].check="20F2FCA9"
}
