@NAME = "Кроха"

# Файл справки
@HELP_FILE = "krokha/krokha.html"

# Основное ПЗУ
@ROM = "krokha/krokha.rom"

# Знакогенератор
@FONT = "krokha/font.bin"

# Файл настроек
@OPT_FILE = "krokha/krokha.opt"



######## Window ########

EmuWindow window
window.caption = @NAME

# Default window size for window.windowStyle = fixed (default = 800, 600)
#window.defaultWindowSize = 768, 512
window.defaultWindowSize = 800, 600

# Window style: autosize, resizable, fixed, fullscreen (default = autosise)
window.windowStyle = autosize
#window.windowStyle = resizable

# Window scaling option: 1x, 2x, 3x, 4x, 5x, fit, bestFit (default = bestFit)
window.frameScale = 2x
#window.frameScale = bestFit

# Window fields mixing: none, mix, average, interlace, scanline (default = none)
#window.fieldsMixing = mix

# Image smoothing / post-processing: nearest, bilinear, sharp, custom (default = sharp)
window.smoothing = sharp

# Custom image shader: "shader name" or none (default = none)
#window.shader = crt-hyllian

# Convert image to grayscale
#window.desaturate = yes

# Aspect correction (default = no)
window.aspectCorrection = no
#window.aspectCorrection = yes

# Wide screen (16:9): yes, no, custom (default = no)
window.wideScreen = no

# Gray window background (default: no)
#window.grayBackground = yes

# Screen format for window.wideScreen = custom
window.customScreenFormat = 1.111



######## Platform ########

platform.helpFile = @HELP_FILE

Ram ram = 0x200
Ram videoRam = 0x600
Rom rom = @ROM, 0x2000

KrokhaJoystick joy
Register joyReg
joyReg.defaultInput = 0xFF
connect joy.keys -> joyReg.input

KbdLayout kbdLayout

Register sndReg
GeneralSoundSource beepSoundSource
connect sndReg.output[1] -> beepSoundSource.input

AddrSpace addrSpace
addrSpace.range = &rom,         0x0000, 0xDFFF
addrSpace.range = &ram,         0xE000, 0xE1FF
addrSpace.range = &videoRam,    0xE200, 0xE7FF
addrSpace.range = &ram,         0xE800, 0xE9FF
addrSpace.range = &videoRam,    0xEA00, 0xEFFF
addrSpace.readRange = &joyReg,  0xF000, 0xF7FF
addrSpace.writeRange = &sndReg, 0xF000, 0xF7FF

KrokhaRenderer crtRenderer
crtRenderer.font = @FONT
crtRenderer.screenMemory = &videoRam

KrokhaCore core
core.window = &window
core.crtRenderer = &crtRenderer

Cpu8080 cpu

cpu.frequency = 2000000
cpu.addrSpace = &addrSpace
cpu.core = &core


ifdef WX
  include "krokha/krokha_wx.inc"
endif
