mirror of
https://github.com/cmosher01/Epple-II.git
synced 2024-06-01 04:41:40 +00:00
extra conf search; default TV display
This commit is contained in:
parent
b54de32a5e
commit
5ecc59d37e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -12,7 +12,7 @@ Makefile.in
|
|||
/install-sh
|
||||
/missing
|
||||
/config.h.in*
|
||||
|
||||
/test-driver
|
||||
|
||||
|
||||
# need these for non-VPATH builds
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# epple2, The Emulated Apple ][
|
||||
|
||||
Copyright © 2008–2019, Christopher Alan Mosher, Shelton, Connecticut, USA, <cmosher01@gmail.com>. GPLv3.
|
||||
Copyright © 2008–2019, Christopher Alan Mosher, Shelton, Connecticut, USA, <cmosher01@gmail.com>. [GPLv3](https://www.gnu.org/licenses/gpl.md).
|
||||
|
||||
[![Website](https://img.shields.io/website/https/cmosher01.github.io/Epple-II.svg)](https://cmosher01.github.io/Epple-II)
|
||||
[![Latest Release](https://img.shields.io/github/release/cmosher01/Epple-II.svg)](https://github.com/cmosher01/Epple-II/releases/latest)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(epple2, v1.0.3)
|
||||
AC_INIT(epple2, v1.0.4)
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
AC_CONFIG_SRCDIR([src/apple2.cpp])
|
||||
|
|
|
@ -34,9 +34,9 @@ class AnalogTV
|
|||
public:
|
||||
enum DisplayType
|
||||
{
|
||||
TV_OLD_COLOR,
|
||||
MONITOR_COLOR,
|
||||
MONITOR_GREEN,
|
||||
TV_OLD_COLOR,
|
||||
|
||||
NUM_DISPLAY_TYPES
|
||||
};
|
||||
|
|
|
@ -143,8 +143,7 @@ void Config::parse(MemoryRandomAccess& ram, Memory& rom, Slots& slts, int& revis
|
|||
if (path.empty())
|
||||
{
|
||||
/*
|
||||
Last effort to find it (most likely will
|
||||
only work on Linux).
|
||||
Try a likely linux location
|
||||
*/
|
||||
path = "/etc/epple2/epple2.conf";
|
||||
pConfig = new std::ifstream(path.c_str());
|
||||
|
@ -152,11 +151,33 @@ void Config::parse(MemoryRandomAccess& ram, Memory& rom, Slots& slts, int& revis
|
|||
path.clear();
|
||||
}
|
||||
if (path.empty())
|
||||
{
|
||||
/*
|
||||
Try another likely linux location
|
||||
*/
|
||||
path = "/etc/epple2.conf";
|
||||
pConfig = new std::ifstream(path.c_str());
|
||||
if (!pConfig->is_open())
|
||||
path.clear();
|
||||
}
|
||||
if (path.empty())
|
||||
{
|
||||
/*
|
||||
Last effort to find it.
|
||||
*/
|
||||
path = "epple2.conf";
|
||||
pConfig = new std::ifstream(path.c_str());
|
||||
if (!pConfig->is_open())
|
||||
path.clear();
|
||||
}
|
||||
if (path.empty())
|
||||
{
|
||||
std::cerr << "Cannot open config file /etc/epple2/epple2.conf" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "Reading configuration from file: " << path << std::endl;
|
||||
|
||||
std::string line;
|
||||
std::getline(*pConfig,line);
|
||||
while (!pConfig->eof())
|
||||
|
|
|
@ -26,15 +26,13 @@ class ScreenImage;
|
|||
class CassetteIn;
|
||||
class CassetteOut;
|
||||
|
||||
class ConfigException
|
||||
{
|
||||
class ConfigException {
|
||||
public:
|
||||
const std::string msg;
|
||||
ConfigException(const std::string& msg) : msg(msg) {}
|
||||
};
|
||||
|
||||
class Config
|
||||
{
|
||||
class Config {
|
||||
private:
|
||||
const std::string& file_path;
|
||||
static unsigned char disk_mask;
|
||||
|
|
|
@ -78,7 +78,6 @@ void Emulator::config(Config& cfg) {
|
|||
|
||||
void Emulator::init() {
|
||||
powerOffComputer();
|
||||
this->display.setType(AnalogTV::MONITOR_COLOR);
|
||||
this->display.powerOn(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ fullscreen(false),
|
|||
hyper(false),
|
||||
buffer(true),
|
||||
fillLines(true),
|
||||
display(AnalogTV::MONITOR_COLOR),
|
||||
display(AnalogTV::TV_OLD_COLOR),
|
||||
slotnames(8),
|
||||
cassInName(32, ' '),
|
||||
cassOutName(32, ' ') {
|
||||
|
@ -155,9 +155,9 @@ void ScreenImage::drawCassette() {
|
|||
}
|
||||
|
||||
static const char* displays[] = {
|
||||
"TELEVISION ",
|
||||
"COLOR MONITOR ",
|
||||
"GREEN MONITOR ",
|
||||
"TELEVISION ",
|
||||
};
|
||||
|
||||
void ScreenImage::drawFnKeys() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user