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"); // wxLogVerbose("%s", "verbose");
// wxFile().Open("foobar.txt"); // 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 ID: " << this->GetID();
BOOST_LOG_TRIVIAL(info) << "Application version: " << this->GetVersion(); BOOST_LOG_TRIVIAL(info) << "Application version: " << this->GetVersion();

View File

@ -44,8 +44,7 @@ AnalogTV::AnalogTV(ScreenImage& image):
image(image), image(image),
on(false), on(false),
noise(false), noise(false),
type(TV_OLD_COLOR), type(TV_OLD_COLOR)
bleed_down(true)
{ {
hirescolor.push_back(colors.c()[A2ColorsObserved::HIRES_GREEN]); hirescolor.push_back(colors.c()[A2ColorsObserved::HIRES_GREEN]);
hirescolor.push_back(colors.c()[A2ColorsObserved::HIRES_ORANGE]); 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); 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; rgbv = 0xFFFFFF;
} }
this->image.setElem(ip,rgbv); 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;
} }
ip += D_IP; ip += D_IP;
@ -292,8 +283,7 @@ void AnalogTV::drawMonitorMonochrome(const unsigned int color)
const int is = row*AppleNTSC::H+col; const int is = row*AppleNTSC::H+col;
const unsigned int rgb = this->signal[is] > 50 ? color : 0; const unsigned int rgb = this->signal[is] > 50 ? color : 0;
this->image.setElem(ip,rgb); this->image.setElem(ip,rgb);
if (bleed_down) this->image.setElem(ip+D_IP,rgb);
this->image.setElem(ip+D_IP,rgb);
++ip; ++ip;
} }
ip += D_IP; ip += D_IP;
@ -314,8 +304,7 @@ void AnalogTV::drawTVOld()
{ {
const int rgb = yiq2rgb(yiq[col-348]); // shift display left 1 pixel const int rgb = yiq2rgb(yiq[col-348]); // shift display left 1 pixel
this->image.setElem(ip,rgb); this->image.setElem(ip,rgb);
if (bleed_down) this->image.setElem(ip+D_IP,rgb);
this->image.setElem(ip+D_IP,rgb);
++ip; ++ip;
} }
ip += D_IP; ip += D_IP;

View File

@ -46,7 +46,6 @@ private:
bool on; bool on;
bool noise; bool noise;
DisplayType type; DisplayType type;
bool bleed_down;
static int* rcb; static int* rcb;
@ -95,7 +94,6 @@ public:
} }
void powerOn(bool b); void powerOn(bool b);
void toggleBleedDown();
void restartSignal(); void restartSignal();
void setType(DisplayType type); void setType(DisplayType type);
void cycleType(); 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) { void E2Command::loadDisk(Slots& slts, int slot, int drive, const std::filesystem::path &media) {
Card* card = slts.get(slot); Card* card = slts.get(slot);
if (!card->hasMedia()) { if (!card->hasMedia()) {
// TODO if file doesn't exist, name still gets displayed, and there's no error message
// TODO error message // TODO error message
// std::cerr << "Slot " << slot << " doesn't have a disk controller card" << std::endl; // std::cerr << "Slot " << slot << " doesn't have a disk controller card" << std::endl;
return; return;

View File

@ -18,9 +18,12 @@
#ifndef CONFIGEP2_H #ifndef CONFIGEP2_H
#define CONFIGEP2_H #define CONFIGEP2_H
#include <wx/string.h> #include <wx/string.h>
#include <filesystem> #include <filesystem>
#include <string> #include <string>
class Memory; class Memory;
class MemoryRandomAccess; class MemoryRandomAccess;
class Slots; class Slots;
@ -30,9 +33,7 @@ class CassetteOut;
class Apple2; 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 { class E2Config {
private: private:
const std::filesystem::path file_path; 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); void parse(MemoryRandomAccess& ram, Memory& rom, Slots& slts, int& revision, ScreenImage& gui, CassetteIn& cassetteIn, CassetteOut& cassetteOut, Apple2* apple2);
}; };
#endif #endif

View File

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

View File

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