mirror of
https://github.com/cmosher01/Epple-II.git
synced 2025-01-13 06:29:50 +00:00
remove hyper setting
This commit is contained in:
parent
a5c0fc047e
commit
027248a002
@ -89,7 +89,6 @@ filterchroma.cpp
|
||||
filterluma.cpp
|
||||
firmwarecard.cpp
|
||||
gui.cpp
|
||||
hypermode.cpp
|
||||
keyboardbuffermode.cpp
|
||||
keyboard.cpp
|
||||
languagecard.cpp
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include <istream>
|
||||
#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),
|
||||
kbd(keypresses, fhyper, buffered),
|
||||
kbd(keypresses, buffered),
|
||||
rom(AddressBus::MOTHERBOARD_ROM_SIZ),
|
||||
ram(revision),
|
||||
cassetteIn(gui),
|
||||
|
@ -63,7 +63,7 @@ class Apple2 : public Timable
|
||||
int revision;
|
||||
|
||||
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();
|
||||
|
||||
void useEpple2Cpu();
|
||||
|
@ -47,7 +47,7 @@ static bool isKeyDown(const SDL_Keycode sym, const SDL_Keymod mod) {
|
||||
Emulator::Emulator() :
|
||||
display(screenImage),
|
||||
videoStatic(display),
|
||||
apple2(keypresses, paddleButtonStates, display, fhyper, buffered, screenImage),
|
||||
apple2(keypresses, paddleButtonStates, display, buffered, screenImage),
|
||||
timable(nullptr), // No ticked object (NULL pointer)
|
||||
repeat(false),
|
||||
keysDown(0),
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "screenimage.h"
|
||||
#include "analogtv.h"
|
||||
#include "keyboardbuffermode.h"
|
||||
#include "hypermode.h"
|
||||
#include "clipboardhandler.h"
|
||||
#include <SDL.h>
|
||||
#include <wx/string.h>
|
||||
@ -37,7 +36,6 @@ class Emulator {
|
||||
PaddleButtonStates paddleButtonStates;
|
||||
KeypressQueue keypresses;
|
||||
|
||||
HyperMode fhyper;
|
||||
KeyboardBufferMode buffered;
|
||||
ScreenImage screenImage;
|
||||
AnalogTV display;
|
||||
|
@ -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"
|
@ -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
|
@ -16,15 +16,13 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "keyboard.h"
|
||||
#include "hypermode.h"
|
||||
#include "keyboardbuffermode.h"
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
|
||||
Keyboard::Keyboard(KeypressQueue& q, HyperMode& fhyper, KeyboardBufferMode& buffered) :
|
||||
Keyboard::Keyboard(KeypressQueue& q, KeyboardBufferMode& buffered) :
|
||||
keys(q),
|
||||
fhyper(fhyper),
|
||||
buffered(buffered),
|
||||
latch(0),
|
||||
cGet(0) {
|
||||
@ -39,7 +37,6 @@ void Keyboard::clear() {
|
||||
}
|
||||
|
||||
unsigned char Keyboard::get() {
|
||||
waitIfTooFast();
|
||||
if (!this->buffered.isBuffered() || !(this->latch & 0x80)) {
|
||||
if (!this->keys.empty()) {
|
||||
this->latch = this->keys.front() | 0x80;
|
||||
@ -48,28 +45,3 @@ unsigned char Keyboard::get() {
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
@ -23,22 +23,18 @@
|
||||
|
||||
typedef std::queue<unsigned char> KeypressQueue;
|
||||
|
||||
class HyperMode;
|
||||
class KeyboardBufferMode;
|
||||
|
||||
class Keyboard {
|
||||
KeypressQueue& keys;
|
||||
HyperMode& fhyper;
|
||||
KeyboardBufferMode& buffered;
|
||||
|
||||
unsigned char latch;
|
||||
unsigned char cGet;
|
||||
Uint32 lastGet;
|
||||
|
||||
void waitIfTooFast();
|
||||
|
||||
public:
|
||||
Keyboard(KeypressQueue& q, HyperMode& fhyper, KeyboardBufferMode& buffered);
|
||||
Keyboard(KeypressQueue& q, KeyboardBufferMode& buffered);
|
||||
void powerOn();
|
||||
void clear();
|
||||
unsigned char get();
|
||||
|
@ -56,7 +56,6 @@ class ScreenException {
|
||||
|
||||
ScreenImage::ScreenImage() :
|
||||
fullscreen(false),
|
||||
hyper_a2_speed(false),
|
||||
buffer(true),
|
||||
fillLines(true),
|
||||
display(AnalogTV::TV_OLD_COLOR),
|
||||
@ -167,9 +166,9 @@ void ScreenImage::drawFnKeys() {
|
||||
drawText(
|
||||
" FULLSCRN SCAN-LINES KEYBOARD", r++, c);
|
||||
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(
|
||||
" 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)
|
||||
invertText(76, 32, 42); // FULLSCRN
|
||||
@ -181,9 +180,6 @@ void ScreenImage::drawFnKeys() {
|
||||
else
|
||||
invertText(76, 43, 55); // SCAN-LINES
|
||||
|
||||
if (this->hyper_a2_speed)
|
||||
invertText(77, 102, 109); // HYPER
|
||||
|
||||
if (this->buffer)
|
||||
invertText(77, 110, 118); // BUFFER
|
||||
|
||||
@ -206,11 +202,6 @@ void ScreenImage::cycleDisplayLabel() {
|
||||
drawDisplayLabel();
|
||||
}
|
||||
|
||||
void ScreenImage::toggleHyperLabel() {
|
||||
this->hyper_a2_speed = !this->hyper_a2_speed;
|
||||
invertText(77, 102, 109); // HYPER
|
||||
}
|
||||
|
||||
void ScreenImage::toggleKdbBufferLabel() {
|
||||
this->buffer = !this->buffer;
|
||||
invertText(77, 110, 118); // BUFFER
|
||||
|
@ -36,7 +36,6 @@ private:
|
||||
unsigned int* pixels;
|
||||
int screen_pitch;
|
||||
bool fullscreen;
|
||||
bool hyper_a2_speed;
|
||||
bool buffer;
|
||||
bool fillLines;
|
||||
AnalogTV::DisplayType display;
|
||||
@ -66,7 +65,6 @@ public:
|
||||
void drawSlot(int slot, int r, int c);
|
||||
void drawCassette();
|
||||
void drawFnKeys();
|
||||
void toggleHyperLabel();
|
||||
void toggleKdbBufferLabel();
|
||||
void cycleDisplayLabel();
|
||||
void displayHz(int hz);
|
||||
|
Loading…
x
Reference in New Issue
Block a user