remove ability to show screen as 'scan lines' (i.e., always fill, aka bleed down)

This commit is contained in:
Christopher A. Mosher 2022-12-12 23:57:16 -05:00
parent 027248a002
commit 7bab1ac971
7 changed files with 19 additions and 37 deletions

View File

@ -151,6 +151,10 @@ bool E2wxApp::OnInit() {
// wxLogVerbose("%s", "verbose");
// wxFile().Open("foobar.txt");
// TODO wx log file window?
// TODO remove all logging from stdout/err to log file
// TODO define components to turn on/off for trace level logging (disk, cassette, woz, keyboard, ram, lss, audio, etc.)
BOOST_LOG_TRIVIAL(info) << "Application ID: " << this->GetID();
BOOST_LOG_TRIVIAL(info) << "Application version: " << this->GetVersion();

View File

@ -44,8 +44,7 @@ AnalogTV::AnalogTV(ScreenImage& image):
image(image),
on(false),
noise(false),
type(TV_OLD_COLOR),
bleed_down(true)
type(TV_OLD_COLOR)
{
hirescolor.push_back(colors.c()[A2ColorsObserved::HIRES_GREEN]);
hirescolor.push_back(colors.c()[A2ColorsObserved::HIRES_ORANGE]);
@ -84,13 +83,6 @@ void AnalogTV::cycleType()
this->type = (DisplayType)((((int)this->type)+1)%NUM_DISPLAY_TYPES);
}
void AnalogTV::toggleBleedDown()
{
this->bleed_down = !this->bleed_down;
this->image.blank();
this->image.notifyObservers();
}
@ -268,8 +260,7 @@ void AnalogTV::drawMonitorColor()
rgbv = 0xFFFFFF;
}
this->image.setElem(ip,rgbv);
if (bleed_down)
this->image.setElem(ip+D_IP,rgbv); // display same pixel on next row
this->image.setElem(ip+D_IP,rgbv); // display same pixel on next row
++ip;
}
ip += D_IP;
@ -292,8 +283,7 @@ void AnalogTV::drawMonitorMonochrome(const unsigned int color)
const int is = row*AppleNTSC::H+col;
const unsigned int rgb = this->signal[is] > 50 ? color : 0;
this->image.setElem(ip,rgb);
if (bleed_down)
this->image.setElem(ip+D_IP,rgb);
this->image.setElem(ip+D_IP,rgb);
++ip;
}
ip += D_IP;
@ -314,8 +304,7 @@ void AnalogTV::drawTVOld()
{
const int rgb = yiq2rgb(yiq[col-348]); // shift display left 1 pixel
this->image.setElem(ip,rgb);
if (bleed_down)
this->image.setElem(ip+D_IP,rgb);
this->image.setElem(ip+D_IP,rgb);
++ip;
}
ip += D_IP;

View File

@ -46,7 +46,6 @@ private:
bool on;
bool noise;
DisplayType type;
bool bleed_down;
static int* rcb;
@ -95,7 +94,6 @@ public:
}
void powerOn(bool b);
void toggleBleedDown();
void restartSignal();
void setType(DisplayType type);
void cycleType();

View File

@ -326,7 +326,6 @@ void E2Command::tryParseLine(const std::string& line, MemoryRandomAccess& ram, M
void E2Command::loadDisk(Slots& slts, int slot, int drive, const std::filesystem::path &media) {
Card* card = slts.get(slot);
if (!card->hasMedia()) {
// TODO if file doesn't exist, name still gets displayed, and there's no error message
// TODO error message
// std::cerr << "Slot " << slot << " doesn't have a disk controller card" << std::endl;
return;

View File

@ -18,9 +18,12 @@
#ifndef CONFIGEP2_H
#define CONFIGEP2_H
#include <wx/string.h>
#include <filesystem>
#include <string>
class Memory;
class MemoryRandomAccess;
class Slots;
@ -30,9 +33,7 @@ class CassetteOut;
class Apple2;
// TODO split out all static things into their own class (and don't make them static)
// Remember that, besides config, also command line entry calls parseLine
// This will also help with adding menu items in place of commands
class E2Config {
private:
const std::filesystem::path file_path;
@ -50,4 +51,6 @@ public:
void parse(MemoryRandomAccess& ram, Memory& rom, Slots& slts, int& revision, ScreenImage& gui, CassetteIn& cassetteIn, CassetteOut& cassetteOut, Apple2* apple2);
};
#endif

View File

@ -28,6 +28,8 @@
#include <cstdio>
#include <cstring>
// TODO For screen image in general, remove items from this SDL window to the wx frame as appropriate
static const char* power =
" @@@@ @@@ @ @ @ @@@@@ @@@@ "
" @ @ @ @ @ @ @ @ @ @ @"
@ -57,7 +59,6 @@ class ScreenException {
ScreenImage::ScreenImage() :
fullscreen(false),
buffer(true),
fillLines(true),
display(AnalogTV::TV_OLD_COLOR),
slotnames(8),
cassInName(32, ' '),
@ -164,34 +165,23 @@ void ScreenImage::drawFnKeys() {
int r(76);
int c(1);
drawText(
" FULLSCRN SCAN-LINES KEYBOARD", r++, c);
" FULLSCRN KEYBOARD", r++, c);
drawText(
" XXXXXXXXXXXXXX WINDOW FILL-LINES CMD RESET PASTE SAVE BMP QUIT! REPT BUFFER ", r++, c);
" XXXXXXXXXXXXXX WINDOW CMD RESET PASTE SAVE BMP QUIT! REPT BUFFER ", r++, c);
drawText(
" F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F12 ", r++, c);
" F1 F2 F3 F5 F6 F7 F8 F9 F10 F12 ", r++, c);
if (this->fullscreen)
invertText(76, 32, 42); // FULLSCRN
else
invertText(77, 32, 40); // WINDOW
if (this->fillLines)
invertText(77, 43, 55); // FILL-LINES
else
invertText(76, 43, 55); // SCAN-LINES
if (this->buffer)
invertText(77, 110, 118); // BUFFER
drawDisplayLabel();
}
void ScreenImage::toggleFillLinesLabel() {
this->fillLines = !this->fillLines;
invertText(76, 43, 55); // SCAN-LINES
invertText(77, 43, 55); // FILL-LINES
}
void ScreenImage::drawDisplayLabel() {
const char* label = displays[(int) (this->display)];
drawText(label, 77, 17);

View File

@ -37,7 +37,6 @@ private:
int screen_pitch;
bool fullscreen;
bool buffer;
bool fillLines;
AnalogTV::DisplayType display;
unsigned int cmdpos;
void createScreen();