# pce-mac-plus.cfg
#
# Example config file


# Add a directory to the end of the file search path.
#
# The search path is used if an input file is specified with
# a relative file name. In that case the file is searched for
# in all directories of the search path. The current directory
# is always implicitly added to the end of the search path.
#
# If the first character of the string is a "-", the directory
# is added to the beginning of the search path.
path = "rom"
path = "/usr/pkg/share/pce/macplus"
path = "-."


# Enable or disable the startup memory test.
memtest = 0


system {
	# The Macintosh model to emulate. Valid models are:
	# mac-plus:    A Macintosh 128K, 512K, 512Ke or Plus
	# mac-se:      A Macintosh SE or SE-FDHD
	# mac-classic: A Macintosh Classic
	model = "mac-plus"
}

cpu {
	# The CPU model. Valid models are "68000" and "68010".
	model = "68000"

	# The CPU speed multiplier. A value of 1 emulates a
	# 7.8336 MHz CPU. A higher value emulates a faster CPU
	# but also takes up more host CPU time. A value of 0
	# dynamically adjusts the CPU speed.
	speed = 0
}


# Multiple "ram" sections may be present.
ram {
	# The base address
	address = 0

	# The memory block size
	size = 4096K

	# The memory block is initialized with this value.
	default = 0x00
}


# Multiple "rom" sections may be present.
rom {
	# The file from which the rom code is loaded
	file = "mac-plus.rom"

	# The base address
	address = 0x400000

	# The rom size
	size = (system.model == "mac-classic") ? 512K : 256K

	# The memory block is initialized with this value.
	default = 0xff
}

rom {
	# This is the PCE extension ROM.

	address = 0xf80000
	size    = 256K
	file    = "macplus-pcex.rom"

	# The memory block is initialized with this value.
	default = 0xff
}


# Multiple "terminal" sections may be present. The first
# one will be used unless a terminal type is specified
# on the command line.
terminal {
	driver = "sdl"

	# The terminal escape key. The default is "ESC".
	#escape = "CtrlRight"
	#escape = "ESC"
	#escape = "F12"
	#escape = "Menu"

	# The terminal scale factor. Only integral values are
	# allowed.
	scale = 1

	# The terminal aspect ratio.
	aspect_x = 3
	aspect_y = 2

	# Add a border around the image
	border = 0

	# Start in fullscreen mode.
	fullscreen = 0

	# The mouse speed. The host mouse speed is multiplied by
	# (mouse_mul_x / mouse_div_x) and (mouse_mul_y / mouse_div_y)
	mouse_mul_x = 1
	mouse_div_x = 1
	mouse_mul_y = 1
	mouse_div_y = 1
}

terminal {
	driver = "x11"

	# The terminal escape key. The default is "ESC".
	#escape = "CtrlRight"
	#escape = "ESC"
	#escape = "F12"
	#escape = "Menu"

	scale  = 1

	# The terminal aspect ratio.
	aspect_x = 3
	aspect_y = 2

	# The mouse speed
	mouse_mul_x = 1
	mouse_div_x = 1
	mouse_mul_y = 1
	mouse_div_y = 1
}


sound {
	# Apply a low-pass filter with the specified cut-off
	# frequency in Herz. This is separate from the low-pass
	# filter in the sound driver. If the frequency is 0,
	# the filter is disabled.
	lowpass = 8000

	#driver = "null"
	#driver = "wav:wav=speaker.wav:lowpass=0:wavfilter=0"
	#driver = "oss:dev=/dev/dsp:wav=speaker.wav:lowpass=0:wavfilter=0"
	driver = "sdl:wav=speaker.wav:lowpass=0:wavfilter=0"
}


keyboard {
	# The model number and international flag are returned
	# by the keyboard but MacOS seems to ignore them.
	model = 0
	intl  = 0

	# If keypad_motion is set to 1, host keypad keys are mapped
	# to Macintosh motion keys.
	keypad_motion = 0
}


adb {
	# Enable the ADB mouse
	mouse = true

	# Enable the ADB extended keyboard
	keyboard = true

	# Map keypad keys to motion keys
	keypad_motion = false
}


rtc {
	# On startup the parameter RAM is loaded from this file. On
	# shutdown it is written back.
	file = "pram-mac-plus.dat"

	# The start time of the real time clock. If this parameter is
	# not set, the real time clock is set to the current time.
	#start = "1984-01-24 00:00:00"

	# Set the startup disk to the ROM disk. This only works with
	# the Macintosh Classic ROM.
	romdisk = 0
}


sony {
	enable = 1

	# The floppy disk insertion delay. Set this to:
	# 0: never automatically insert the disk
	# 1: have the disk inserted immediately on startup.
	#    The System will then either boot from the disk or
	#    eject it.
	# x: delay insertion by x (emulated) seconds.
	insert_delay = 15

	# The insertion delay can be set for each floppy disk
	# drive individually.
	#insert_delay_1 = 1
	#insert_delay_2 = 15
	#insert_delay_3 = 15
}


iwm {
	# Up to three IWM drives can be defined:
	#   Drive 1: The internal drive
	#   Drive 2: The external drive
	#   Drive 3: The second (lower) internal drive in a Macintosh SE
	#
	# Each drive is associated with either a disk as defined in a
	# "disk" section below, or with a PBIT file.
	#
	# The IWM drives are only accessible if the replacement Sony driver
	# is disabled above.

	drive {
		# The IWM drive number.
		drive        = 1

		# The disk that is inserted into this drive. This
		# corresponds to a "disk" section below.
		disk         = 1

		# The file containing the disk's contents. If this is
		# a valid PBIT file, the disk contents are read from
		# and written back to it and the "disk" parameter above
		# is ignored.
		file         = "disk1.pbit"

		# Insert the disk before the emulation starts, in order
		# to boot from it.
		inserted     = 0

		# Force the drive to be single sided.
		single_sided = 0

		# The disk is locked.
		locked       = 0

		# Automatically align the individual tracks.
		auto_rotate  = 1
	}

	drive {
		drive        = 2
		disk         = 2
		file         = "disk2.pbit"
		inserted     = 0
		single_sided = 0
		locked       = 0
		auto_rotate  = 1
	}

	drive {
		drive        = 3
		disk         = 3
		file         = "disk3.pbit"
		inserted     = 0
		single_sided = 0
		locked       = 0
		auto_rotate  = 1
	}
}


scsi {
	device {
		# The SCSI ID
		id = 6

		# The drive number. This number is used to identify
		# a "disk" section. The number itself is meaningless.
		drive = 128

		# The vendor and product strings are returned by
		# the SCSI Inquiry command.
		#vendor = "PCE     "
		#product = "PCEDISK         "
	}

	device {
		id    = 4
		drive = 129
	}

	device {
		id    = 2
		drive = 130
	}
}


serial {
	# The port number. Use 0 for the modem port and 1 for
	# the printer port.
	port = 0

	# Up to multichar characters are sent or received
	# without any transmission delay. For a real serial port
	# this value is 1 but larger values can speed up
	# transmission.
	multichar = 1

	# Not all character drivers are supported on
	# all platforms.
	#driver = "null"
	#driver = "posix:file=ser_a.out"
	#driver = "pty:symlink=ser_a"
	driver = "stdio:file=ser_a.out:flush=1"
	#driver = "tios:file=/dev/ttyS0"
	#driver = "tcp:port=5555:telnet=1:telnetinit=1:usectl=1"
}

serial {
	port = 1
	driver = "stdio:file=ser_b.out"
}


video {
	#address = 0x0fa700

	# The background color
	color0 = 0x000000

	# The foreground color
	color1 = 0xffffff

	# Brightness in the range 0 - 1000.
	brightness = 1000
}


disk {
	drive    = 1
	type     = "auto"
	file     = "disk1.img"
	optional = 1
}

disk {
	drive    = 2
	type     = "auto"
	file     = "disk2.img"
	optional = 1
}

disk {
	drive    = 3
	type     = "auto"
	file     = "disk3.img"
	optional = 1
}

disk {
	drive    = 128
	type     = "auto"
	file     = "hd1.img"
	optional = 0
}

disk {
	drive    = 129
	type     = "auto"
	file     = "hd2.img"
	optional = 1
}

disk {
	drive    = 130
	type     = "auto"
	file     = "hd3.img"
	optional = 1
}
