# BMC64 multi-machine configuration file.
#
# This file lets any BMC* kernel v3.0 or higher switch
# between different machine types from the menu. Distributions
# for v3.0 include all kernels for every machine type and Pi
# model combo.
#
# Set both config.txt and cmdline.txt parameters inside each
# section. These choices will appear in the emulator's
# 'Switch Machine' menu.
#
# Format:
# machines.txt = MachineDescription*
#
# MachineDescription = ([SectionHeader]"\n")(OptionLine\n*)*
# SectionHeader = [Machine/TimingStandard/OutputType/ResolutionDesc]
# Machine = VIC20|C64|C128|Plus4|Plus4Emu|Pet
# TimingStandard = NTSC | PAL
# OutputVideo = HDMI | DPI | Composite
# ResolutionDesc = Any text (can be used to describe the video resolution)
# OptionLine = "key=value\n"
#
# NOTE: Plus4Emu is only available on Raspberry Pi 3 models.
#
# config.txt options available (See RPi documentation)
# ----------------------------------------------------
# disable_overscan
# sdtv_mode
# hdmi_group
# hdmi_mode
# hdmi_timing
# hdmi_cvt
#
# cmdline.txt options available (See README.md)
# ----------------------------------------------------
# machine_timing
# cycles_per_second
# audio_out
# scaling_params
# scaling_params2 (for 2nd display or 80 column display)

#
# NOTE: Always include a valid hdmi mode even for the composite
# configs. This ensures you can switch back to HDMI even while
# using a composite config.

#
# VIC20
#

[VIC20/NTSC/HDMI/VICE 720p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-hdmi
scaling_params=414,228,1242,684

[VIC20/NTSC/Composite/VICE 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite
scaling_params=422,228,720,456

[VIC20/PAL/HDMI/VICE 720p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-hdmi
scaling_params=414,240,1242,720

[VIC20/PAL/Composite/VICE 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite
scaling_params=422,240,668,480

# This matches the timing of a real NTSC machine but may
# not work on all monitors.
[VIC20/NTSC/HDMI/VICE 768x525@60.285Hz]
sdtv_mode=16
hdmi_group=2
hdmi_mode=87
hdmi_timings=768 0 24 72 96 525 1 3 10 9 0 0 0 60 0 31656857 1
machine_timing=ntsc-custom
# VICE cycles_per_second is 1022727, custom is 0.000782% faster
cycles_per_second=1022735
scaling_params=384,246,768,492

# This matches the timing of a real PAL machine but may
# not work on all monitors.
[VIC20/PAL/HDMI/VICE 768x545@50.037Hz]
sdtv_mode=18
hdmi_group=2
hdmi_mode=87
# Fudging intended 544 lines to 545 by reducing back porch
# to make shader scanlines visible
hdmi_timings=768 0 24 72 96 545 1 3 2 13 0 0 0 50 0 27043926 1
machine_timing=pal-custom
# VICE cycles_per_second is 1108405, custom is 0.000632% faster
cycles_per_second=1108412
scaling_params=384,272,768,544

#
# C64
#

[C64/NTSC/HDMI/VICE 720p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-hdmi
scaling_params=384,240,1152,720

[C64/NTSC/Composite/VICE 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite
scaling_params=364,240,600,480

[C64/PAL/HDMI/VICE 720p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-hdmi
scaling_params=384,240,1152,720

[C64/PAL/Composite/VICE 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite
scaling_params=384,272,648,544

# This matches the timing of a real NTSC machine but may
# not work on all monitors.
[C64/NTSC/HDMI/VICE 768x525@59.827Hz]
sdtv_mode=16
hdmi_group=2
hdmi_mode=87
hdmi_timings=768 0 24 72 96 525 1 3 10 9 0 0 0 60 0 31416828 1
machine_timing=ntsc-custom
# VICE cycles_per_second is 1022730, custom is 0.000587% faster
cycles_per_second=1022736
scaling_params=384,246,768,492

# This matches the timing of a real PAL machine but may
# not work on all monitors.
[C64/PAL/HDMI/VICE 768x545@50.125Hz]
sdtv_mode=18
hdmi_group=2
hdmi_mode=87
# Fudging intended 544 lines to 545 by reducing back porch
# to make shader scanlines visible
hdmi_timings=768 0 24 72 96 545 1 3 2 13 0 0 0 50 0 27091697 1
machine_timing=pal-custom
# VICE cycles_per_second is 985248, custom is 0.000913% faster
cycles_per_second=985257
scaling_params=384,272,768,544

#
# C128
#

[C128/NTSC/HDMI/VICE 720p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-hdmi
scaling_params=384,240,1152,720
scaling_params2=864,228,1280,684

[C128/NTSC/Composite/VICE 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite
scaling_params=364,240,640,480

[C128/PAL/HDMI/VICE 720p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-hdmi
scaling_params=384,240,1152,720
scaling_params2=864,240,1280,684

[C128/PAL/Composite/VICE 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite
scaling_params=384,272,648,544

# This matches the timing of a real NTSC machine but may
# not work on all monitors.
[C128/NTSC/HDMI/VICE 768x525@59.827Hz]
sdtv_mode=16
hdmi_group=2
hdmi_mode=87
hdmi_timings=768 0 24 72 96 525 1 3 10 9 0 0 0 60 0 31416828 1
machine_timing=ntsc-custom
# VICE cycles_per_second is 1022730, custom is 0.000587% faster
cycles_per_second=1022736
scaling_params=384,246,768,492
scaling_params2=674,228,674,456

# This matches the timing of a real PAL machine but may
# not work on all monitors.
[C128/PAL/HDMI/VICE 768x545@50.125Hz]
sdtv_mode=18
hdmi_group=2
hdmi_mode=87
# Fudging intended 544 lines to 545 by reducing back porch
# to make shader scanlines visible
hdmi_timings=768 0 24 72 96 545 1 3 2 13 0 0 0 50 0 27091697 1
machine_timing=pal-custom
# VICE cycles_per_second is 985248, custom is 0.000913% faster
cycles_per_second=985257
scaling_params=384,272,768,544
scaling_params2=674,272,674,544

#
# PLUS/4 & C16
#

[PLUS4/NTSC/HDMI/VICE 720p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-hdmi
scaling_params=384,232,1152,696

[PLUS4/NTSC/Composite/VICE 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite
scaling_params=360,232,640,464

[PLUS4/PAL/HDMI/VICE 720p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-hdmi
scaling_params=384,240,1152,720

[PLUS4/PAL/Composite/VICE 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite
scaling_params=364,280,640,560

# This matches the timing of a real NTSC machine but may
# not work on all monitors.
[PLUS4/NTSC/HDMI/VICE 768x525@59.923Hz]
sdtv_mode=16
hdmi_group=2
hdmi_mode=87
hdmi_timings=768 0 24 72 96 525 1 3 10 9 0 0 0 60 0 31467501 1
machine_timing=ntsc-custom
# VICE cycles_per_second is 1789772, custom is 0.001006% faster
cycles_per_second=1789790
scaling_params=384,246,768,492

# This matches the timing of a real PAL machine but may
# not work on all monitors.
[PLUS4/PAL/HDMI/VICE 768x545@49.860Hz]
sdtv_mode=18
hdmi_group=2
hdmi_mode=87
# Fudging intended 544 lines to 545 by reducing back porch
# to make shader scanlines visible
hdmi_timings=768 0 24 72 96 545 1 3 2 13 0 0 0 50 0 26948856 1
machine_timing=pal-custom
# VICE cycles_per_second is 1773447, custom is 0.001522% slower
cycles_per_second=1773420
scaling_params=384,272,768,544

# PLUS4EMU Is only available for Pi3. It is a more
# accurate Plus/4 emulator but requires more CPU.
# These options will not show up on any other Pi model.

[PLUS4EMU/NTSC/HDMI/Plus4Emu 720p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-hdmi
scaling_params=384,240,1152,720

[PLUS4EMU/NTSC/Composite/Plus4Emu 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite
scaling_params=364,240,640,480

[PLUS4EMU/PAL/HDMI/Plus4Emu 720p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-hdmi
scaling_params=384,240,1152,720

[PLUS4EMU/PAL/Composite/Plus4Emu 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite
scaling_params=364,272,640,544

#
# PET
#

[PET/NTSC/HDMI/VICE 1080p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=16
machine_timing=ntsc-hdmi
scaling_params=376,270,1504,1080
scaling_params2=696,270,1392,1080

[PET/NTSC/Composite/VICE 480p@60Hz]
disable_overscan=1
sdtv_mode=16
hdmi_group=1
hdmi_mode=4
machine_timing=ntsc-composite

[PET/PAL/HDMI/VICE 1080p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=31
machine_timing=pal-hdmi
scaling_params=376,270,1504,1080
scaling_params2=696,270,1392,1080

[PET/PAL/Composite/VICE 576p@50Hz]
disable_overscan=1
sdtv_mode=18
hdmi_group=1
hdmi_mode=19
machine_timing=pal-composite

# This matches the timing of a real NTSC machine but may
# not work on all monitors.
# Remember to manually specify a 60Hz editor ROM in vice.ini!
[PET/NTSC/HDMI/VICE 768x525@60.060Hz]
sdtv_mode=16
hdmi_group=2
hdmi_mode=87
# Timing set for exactly 16650 cycles/frame, Circle cycles/second is
# ignored on PET for actual pixel rate!
hdmi_timings=768 0 24 72 96 525 1 3 10 9 0 0 0 60 0 31538738 1
machine_timing=ntsc-custom
# PET is fixed at 1000000 cycles/sec, setting only to make BMPET happy
cycles_per_second=1014773
scaling_params=384,246,768,492
scaling_params2=674,228,674,456

# This matches the timing of a real PAL machine but may
# not work on all monitors.
# Remember to manually specify a 50Hz editor ROM in vice.ini!
[PET/PAL/HDMI/VICE 768x545@49.875Hz]
sdtv_mode=18
hdmi_group=2
hdmi_mode=87
# Timing set for exactly 20050 cycles/frame, Circle cycles/second is
# ignored on PET for actual pixel rate!
# Fudging intended 544 lines to 545 by reducing back porch
# to make shader scanlines visible
hdmi_timings=768 0 24 72 96 545 1 3 2 13 0 0 0 50 0 26956913 1
machine_timing=pal-custom
# PET is fixed at 1000000 cycles/sec, setting only to make BMPET happy
cycles_per_second=999096
scaling_params=384,272,768,544
scaling_params2=674,272,674,544
