main.CPUClock=2MHz
main.Caption="Calc"

CPU : K580wm80a {
  mem=mm
  port[00]=mm.page
  port[02-03]=ww79.data
  rst[7]=ww79.irq
}

bios : Memory {
  rom="Calc\calc.rom"
}

kbd : Keyboard {
  layout="Calc\calc.kbd"
}

mem1 : Memory {
  size=1000
}

mm : MemMap {
  map[0][000-7FF]=bios
  map[0][800-FFF]=mem1[800]
  map[1][000-FFF]=mem1[000]
}

dspmux : MemMap2 {
  map[00-FF]=vid.pins
}

kbdreg : Register {
  write[0-2]=kbd.mask
}

ww79 : K580ww79 {
  scan=dspmux.offset
  scan=kbdreg
  ret=kbd.~idata
  display=dspmux
}

vid : Indicator {
  maskbitmap="Calc\calc.bmp"
  background[0]="Calc\calc.gif"
  background[1]="Calc\calc.bmp"
  pin[0-38].point=18,9,23,0,8
  pin[1-39].point=24,18,23,0,8
  pin[2-3A].point=24,32,23,0,8
  pin[3-3B].point=18,40,23,0,8
  pin[4-3C].point=11,32,23,0,8
  pin[5-3D].point=11,18,23,0,8
  pin[6-3E].point=18,24,23,0,8
  pin[7-3F].point=29,40,23,0,8
}
