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

cpu : K1801wm1 {
  debug=cas
  mem=mm
  sel1=8000
  int[04]=kbd.halt
  int[30]=kbd.irq1
  int[BC]=kbd.irq2
  reset=kbd
}

mem1 : Memory {
  size=8000
}

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 {
}

sys : bk001x-register {
  default=8000
  read[5]=cas.playback
  read[6]=kbd.pressed
  write[5]=cas.record
  write[6]=beep.input
}

r177700 : bk001x-register {
  default=FFE0
}

r177702 : bk001x-register {
  default=FFFF
}

r177704 : bk001x-register {
  default=FF20
}

mm2 : MemMap2 {
  default=cpu.nodevint
  map[B0-B1]=kbd.state
  map[B2-B3].ro=kbd.code
  map[B4-B5]=vid.scroll
  map[C0-C1]=r177700
  map[C2-C3]=r177702
  map[C4-C5]=r177706
  map[C6-C7]=tim.init
  map[C8-C9]=tim.count
  map[CA-CB]=tim.csr
  map[CC-CD]=ppi
  map[CE-CF]=sys
}

mm : MemMap {
  default=cpu.nodevint
  map[0][0000-7FFF]=mem1[0000]
  map[0][8000-9FFF]=rom1[0000]
  map[0][A000-BFFF]=rom2[0000]
  map[0][C000-DFFF]=rom3[0000]
  map[0][E000-FEFF]=rom4[0000]
  map[0][FF00-FFFF]=mm2
}

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

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

tim : bk0010-timer {
}

beep : beep {
}

cas : tape-recorder {
  tproc[9D04-9D3A]=bk
  boproc[9D46-9D8E]=bk
  iproc[9DA0-9DC8]=bk
  tproc[9DCA-9E30]=bk
  tproc[9EB4-9EDE]=bk
  biproc[9EE2-9EF6]=bk
  tproc[81AE-81B2]=bkm
  boproc[9F3C-9F74]=bkm
  biproc[9F76-9FC2]=bkm
  filter="BK-0010 files (*.bin;*.foc;*.cod)|*.bin;*.foc;*.cod"
}
