main.CPUClock=3072KHz
main.Caption="Galaxy Plus"
main.scale.x=200%
main.scale.y=200%

CPU : Z80 {
  debug=cas
  mem=mm
  int[FF]=vid.irq
}

rom1 : Memory {
  rom="Galaxy\ROM1_minus_and_Rom2_patch.BIN"
}

rom2 : Memory {
  rom="Galaxy\rom2.bin"
}

rom3 : Memory {
  rom="Galaxy\GAL_PLUS.BIN"
}

rom4 : Memory {
  rom="Galaxy\rom4.bin"
}

mem1 : Memory {
  size=9800
}

mem2 : Memory {
  size=800
}

mm2 : MemMap2 {
  map[00]=sdcard.data8
  map[01]=40
}

mm : MemMap {
  map[0][0000-0FFF]=rom1
  map[0][1000-1FFF]=rom2
  map[0][2000-20FF]=kmap
  map[0][2100-21FF]=kmap
  map[0][2200-22FF]=kmap
  map[0][2300-23FF]=kmap
  map[0][2400-24FF]=kmap
  map[0][2500-25FF]=kmap
  map[0][2600-26FF]=kmap
  map[0][2700-27FF]=kmap
  map[0][2800-BFFF]=mem1
  map[0][C000-C7FF]=mm2
  map[0][C800-CFFF]=mem2
  map[0][E000-EFFF]=rom3
  map[0][F000-FFFF]=rom4
}

kmap : MemMap2 {
  map[00-37]=kbd.~key[0]
  map[38-3F]=vid.latch
  map[40-77]=kbd.~key[0]
  map[78-7F]=vid.latch
  map[80-B7]=kbd.~key[0]
  map[B8-BF]=vid.latch
  map[C0-F7]=kbd.~key[0]
  map[F8-FF]=vid.latch
}

kbd : Keyboard {
  layout="Galaxy\layout.kbd"
}

vid : Galaxy-Video {
  mem=mm
  refresh=cpu.refresh
  font="Galaxy\chrgen.bin"
}

sdcard : sd-mmc {
  image="Galaxy\SD4.mmc"
}

cas : tape-recorder {
  biproc[EDD-EEE]=sp
  biproc[EDD-EEE].reg=c
  filter="Galaxy type files (*.gtp)|*.gtp"
  ext="gtp"
}
