main.CPUClock=3MHz
main.Caption="มส-0010.01"
main.ff.speed=10
main.ff.keymask[C]=1
main.scale.x=100%
main.scale.y=150%
main.globalsound=1
main.fullscreen=1280x1024x16
main.fullscreen.scale.x=2
main.fullscreen.scale.y=3

.radix 8

cpu : K1801wm1 {
  debug=cas
  mem=mm
  int[4]=kbd.halt
  int[60]=kbd.irq1
  int[274]=kbd.irq2
  reset=kbd
}

mem1 : Memory {
  size=100000
}

rom1 : Memory {
  rom="BK0010\monit10.rom"
}

rom2 : Memory {
  rom="BK0010\Basic10first.rom"
}

rom3 : Memory {
  rom="BK0010\Basic10second.rom"
}

rom4 : Memory {
  rom="BK0010\Basic10third.rom"
}

ppi : bk001x-register {
}

sel1 : bk001x-register {
  default=100000
  read[2]=sel1.wflag
  read[5]=cas.playback
  read[6]=kbd.pressed
  write[2]=sel1.wflag
  write[5]=cas.record
  write[6]=beep.input
}

r177700 : bk001x-register {
  default=177740
}

r177702 : bk001x-register {
  default=177777
}

r177704 : bk001x-register {
  default=177440
}

mm2 : MemMap2 {
  default=cpu.nodevint
  map[260-261]=kbd.state
  map[262-263].ro=kbd.code
  map[264-265]=vid.scroll
  map[300-301]=r177700
  map[302-303]=r177702
  map[304-305]=r177704
  map[306-307]=tim.init
  map[310-311]=tim.count
  map[312-313]=tim.csr
  map[314-315]=ppi
  map[316-317]=sel1
}

mm : MemMap {
  default=cpu.nodevint
  map[0][000000-077777]=mem1
  map[0][100000-117777]=rom1
  map[0][120000-137777]=rom2
  map[0][140000-157777]=rom3
  map[0][160000-177377]=rom4
  map[0][177400-177777]=mm2
}

kbd : bk0010-kbd {
  layout="BK0010\layout.kbd"
}

vid : bk0010-video {
  mem=mem1[040000]
}

tim : bk0010-timer {
}

beep : beep {
}

cas : tape-recorder {
  tproc[116404-116472]=bk
  boproc[116506-116616]=bk
  iproc[116640-116710]=bk
  tproc[116712-117060]=bk
  tproc[117264-117336]=bk
  biproc[117342-117366]=bk
  tproc[100656-100662]=bkm
  boproc[117474-117564]=bkm
  biproc[117566-117702]=bkm
  filter="BK-0010 files (*.bin;*.foc;*.cod)|*.bin;*.foc;*.cod"
}
