remove hyper setting

This commit is contained in:
Christopher A. Mosher 2022-12-12 23:30:24 -05:00
parent a5c0fc047e
commit 027248a002
11 changed files with 8 additions and 117 deletions

View File

@ -89,7 +89,6 @@ filterchroma.cpp
filterluma.cpp filterluma.cpp
firmwarecard.cpp firmwarecard.cpp
gui.cpp gui.cpp
hypermode.cpp
keyboardbuffermode.cpp keyboardbuffermode.cpp
keyboard.cpp keyboard.cpp
languagecard.cpp languagecard.cpp

View File

@ -38,9 +38,9 @@
#include <istream> #include <istream>
#include <fstream> #include <fstream>
Apple2::Apple2(KeypressQueue& keypresses, PaddleButtonStates& paddleButtonStates, AnalogTV& tv, HyperMode& fhyper, KeyboardBufferMode& buffered, ScreenImage& gui) : Apple2::Apple2(KeypressQueue& keypresses, PaddleButtonStates& paddleButtonStates, AnalogTV& tv, KeyboardBufferMode& buffered, ScreenImage& gui) :
slts(gui), slts(gui),
kbd(keypresses, fhyper, buffered), kbd(keypresses, buffered),
rom(AddressBus::MOTHERBOARD_ROM_SIZ), rom(AddressBus::MOTHERBOARD_ROM_SIZ),
ram(revision), ram(revision),
cassetteIn(gui), cassetteIn(gui),

View File

@ -63,7 +63,7 @@ class Apple2 : public Timable
int revision; int revision;
public: public:
Apple2(KeypressQueue& keypresses, PaddleButtonStates& paddleButtonStates, AnalogTV& tv, HyperMode& fhyper, KeyboardBufferMode& buffered, ScreenImage& gui); Apple2(KeypressQueue& keypresses, PaddleButtonStates& paddleButtonStates, AnalogTV& tv, KeyboardBufferMode& buffered, ScreenImage& gui);
~Apple2(); ~Apple2();
void useEpple2Cpu(); void useEpple2Cpu();

View File

@ -47,7 +47,7 @@ static bool isKeyDown(const SDL_Keycode sym, const SDL_Keymod mod) {
Emulator::Emulator() : Emulator::Emulator() :
display(screenImage), display(screenImage),
videoStatic(display), videoStatic(display),
apple2(keypresses, paddleButtonStates, display, fhyper, buffered, screenImage), apple2(keypresses, paddleButtonStates, display, buffered, screenImage),
timable(nullptr), // No ticked object (NULL pointer) timable(nullptr), // No ticked object (NULL pointer)
repeat(false), repeat(false),
keysDown(0), keysDown(0),

View File

@ -25,7 +25,6 @@
#include "screenimage.h" #include "screenimage.h"
#include "analogtv.h" #include "analogtv.h"
#include "keyboardbuffermode.h" #include "keyboardbuffermode.h"
#include "hypermode.h"
#include "clipboardhandler.h" #include "clipboardhandler.h"
#include <SDL.h> #include <SDL.h>
#include <wx/string.h> #include <wx/string.h>
@ -37,7 +36,6 @@ class Emulator {
PaddleButtonStates paddleButtonStates; PaddleButtonStates paddleButtonStates;
KeypressQueue keypresses; KeypressQueue keypresses;
HyperMode fhyper;
KeyboardBufferMode buffered; KeyboardBufferMode buffered;
ScreenImage screenImage; ScreenImage screenImage;
AnalogTV display; AnalogTV display;

View File

@ -1,18 +0,0 @@
/*
epple2
Copyright (C) 2008 by Christopher A. Mosher <cmosher01@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY, without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hypermode.h"

View File

@ -1,45 +0,0 @@
/*
epple2
Copyright (C) 2008 by Christopher A. Mosher <cmosher01@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY, without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HYPERMODE_H
#define HYPERMODE_H
class HyperMode
{
private:
bool fhyper;
public:
HyperMode(): fhyper(false) { }
~HyperMode() { }
bool isHyper()
{
return this->fhyper;
}
void setHyper(bool isHyper)
{
this->fhyper = isHyper;
}
void toggleHyper()
{
this->fhyper = !this->fhyper;
}
};
#endif

View File

@ -16,15 +16,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "keyboard.h" #include "keyboard.h"
#include "hypermode.h"
#include "keyboardbuffermode.h" #include "keyboardbuffermode.h"
#include <cstdlib> #include <cstdlib>
Keyboard::Keyboard(KeypressQueue& q, HyperMode& fhyper, KeyboardBufferMode& buffered) : Keyboard::Keyboard(KeypressQueue& q, KeyboardBufferMode& buffered) :
keys(q), keys(q),
fhyper(fhyper),
buffered(buffered), buffered(buffered),
latch(0), latch(0),
cGet(0) { cGet(0) {
@ -39,7 +37,6 @@ void Keyboard::clear() {
} }
unsigned char Keyboard::get() { unsigned char Keyboard::get() {
waitIfTooFast();
if (!this->buffered.isBuffered() || !(this->latch & 0x80)) { if (!this->buffered.isBuffered() || !(this->latch & 0x80)) {
if (!this->keys.empty()) { if (!this->keys.empty()) {
this->latch = this->keys.front() | 0x80; this->latch = this->keys.front() | 0x80;
@ -48,28 +45,3 @@ unsigned char Keyboard::get() {
} }
return this->latch; return this->latch;
} }
void Keyboard::waitIfTooFast() {
// TODO remove all hyper stuff; it doesn't do anything anymore,
// since the new architecture with wxTimer
// if (this->fhyper.isHyper()) {
// return;
// }
//
// ++this->cGet;
// if (!this->cGet) {
// if (SDL_GetTicks() - this->lastGet <= 1000) {
// /*
// * Check every 256 gets to see if they are
// * happening too fast (within one second).
// * If so, it means we are probably just
// * looping waiting for a keypress, so
// * wait a millisecond (or so) just to
// * prevent us from using 100% of CPU time.
// */
// SDL_Delay(1);
// }
// }
// this->lastGet = SDL_GetTicks();
}

View File

@ -23,22 +23,18 @@
typedef std::queue<unsigned char> KeypressQueue; typedef std::queue<unsigned char> KeypressQueue;
class HyperMode;
class KeyboardBufferMode; class KeyboardBufferMode;
class Keyboard { class Keyboard {
KeypressQueue& keys; KeypressQueue& keys;
HyperMode& fhyper;
KeyboardBufferMode& buffered; KeyboardBufferMode& buffered;
unsigned char latch; unsigned char latch;
unsigned char cGet; unsigned char cGet;
Uint32 lastGet; Uint32 lastGet;
void waitIfTooFast();
public: public:
Keyboard(KeypressQueue& q, HyperMode& fhyper, KeyboardBufferMode& buffered); Keyboard(KeypressQueue& q, KeyboardBufferMode& buffered);
void powerOn(); void powerOn();
void clear(); void clear();
unsigned char get(); unsigned char get();

View File

@ -56,7 +56,6 @@ class ScreenException {
ScreenImage::ScreenImage() : ScreenImage::ScreenImage() :
fullscreen(false), fullscreen(false),
hyper_a2_speed(false),
buffer(true), buffer(true),
fillLines(true), fillLines(true),
display(AnalogTV::TV_OLD_COLOR), display(AnalogTV::TV_OLD_COLOR),
@ -167,9 +166,9 @@ void ScreenImage::drawFnKeys() {
drawText( drawText(
" FULLSCRN SCAN-LINES KEYBOARD", r++, c); " FULLSCRN SCAN-LINES KEYBOARD", r++, c);
drawText( drawText(
" XXXXXXXXXXXXXX WINDOW FILL-LINES CMD RESET PASTE SAVE BMP QUIT! REPT HYPER BUFFER ", r++, c); " XXXXXXXXXXXXXX WINDOW FILL-LINES CMD RESET PASTE SAVE BMP QUIT! REPT BUFFER ", r++, c);
drawText( drawText(
" F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 ", r++, c); " F1 F2 F3 F4 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
@ -181,9 +180,6 @@ void ScreenImage::drawFnKeys() {
else else
invertText(76, 43, 55); // SCAN-LINES invertText(76, 43, 55); // SCAN-LINES
if (this->hyper_a2_speed)
invertText(77, 102, 109); // HYPER
if (this->buffer) if (this->buffer)
invertText(77, 110, 118); // BUFFER invertText(77, 110, 118); // BUFFER
@ -206,11 +202,6 @@ void ScreenImage::cycleDisplayLabel() {
drawDisplayLabel(); drawDisplayLabel();
} }
void ScreenImage::toggleHyperLabel() {
this->hyper_a2_speed = !this->hyper_a2_speed;
invertText(77, 102, 109); // HYPER
}
void ScreenImage::toggleKdbBufferLabel() { void ScreenImage::toggleKdbBufferLabel() {
this->buffer = !this->buffer; this->buffer = !this->buffer;
invertText(77, 110, 118); // BUFFER invertText(77, 110, 118); // BUFFER

View File

@ -36,7 +36,6 @@ private:
unsigned int* pixels; unsigned int* pixels;
int screen_pitch; int screen_pitch;
bool fullscreen; bool fullscreen;
bool hyper_a2_speed;
bool buffer; bool buffer;
bool fillLines; bool fillLines;
AnalogTV::DisplayType display; AnalogTV::DisplayType display;
@ -66,7 +65,6 @@ public:
void drawSlot(int slot, int r, int c); void drawSlot(int slot, int r, int c);
void drawCassette(); void drawCassette();
void drawFnKeys(); void drawFnKeys();
void toggleHyperLabel();
void toggleKdbBufferLabel(); void toggleKdbBufferLabel();
void cycleDisplayLabel(); void cycleDisplayLabel();
void displayHz(int hz); void displayHz(int hz);