main.CPUClock=2458KHz
main.Caption="Roborton 1715"
main.scale.x=100%
main.scale.y=150%

cpu : z80 {
  mem=mm
  port[00-03]=fdd.pio1
  port[04-07]=fdd.pio2
  port[0C-0F]=sio1.data
  port[18-19]=crt.data
  port[20]=fdd.select
  port[28]=mm.page
  port[34]=reg1.data
}

mem : Memory {
  size=10000
  frame[0].size=400
}

bios : Memory {
  rom="Robotron\s502.bin"
}

font : Memory {
  rom="Robotron\s643.bin"
}

font2 : Memory {
  rom="Robotron\s619.bin"
}

fntmap : MemMap {
  map[0][000-7FF]=font
  map[1][000-7FF]=font2
  map[2][000-7FF]=font2
  map[3][000-7FF]=font
}

reg1 : Register {
  write[0-5]=mem.frame[0].page
  write[6]=fntmap.page[0]
}

mm : MemMap {
  map[0][0000-07FF].ro=bios
  map[0][0000-07FF].wo=mem
  map[0][0800-FFFF]=mem[800]
  map[1][0000-FFFF]=mem[0]
}

kbd : Keyboard {
  layout="Robotron\layout.kbd"
  keynum.xlat="0000FF088D9E9B20D1D2D3D4CFA0A1A2A383C1C0C2CD8ECE878B89888C869D8A827FB0B1B2B3B4B5B6B7B8B9ACD0"
}

sio1 : Z8440 {
  portA.rx=kbd.serial
}

crt : K580wg75 {
  dma=mem.frame[0]
  font=fntmap
  fontwidth=8
  fontheight=12
  fontmode=128
  defcolors="000212"
  mode=3
}

reg2 : Register {
  data=crt.ggh
  write[0]=crt.hilight
  write[1]=fntmap.page[1]
}

fdd : floppy1715 {
  iei=cpu.int
  image[0].file="Robotron\r1715.cpm"
  drive[0].tooltip="A:"
  drive[1].tooltip="B:"
}
