mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
'type' is out, at least for the time being.
This commit is contained in:
parent
6a0b4e86c8
commit
82aa6d074a
@ -11,7 +11,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace Atari2600;
|
||||
static const char atari2600DataType[] = "Atari2600";
|
||||
static const int horizontalTimerReload = 227;
|
||||
|
||||
Machine::Machine()
|
||||
@ -225,9 +224,9 @@ void Machine::output_pixels(unsigned int count)
|
||||
{
|
||||
switch(_lastOutputState)
|
||||
{
|
||||
case OutputState::Blank: _crt->output_blank(_lastOutputStateDuration); break;
|
||||
case OutputState::Sync: _crt->output_sync(_lastOutputStateDuration); break;
|
||||
case OutputState::Pixel: _crt->output_data(_lastOutputStateDuration, atari2600DataType); break;
|
||||
case OutputState::Blank: _crt->output_blank(_lastOutputStateDuration); break;
|
||||
case OutputState::Sync: _crt->output_sync(_lastOutputStateDuration); break;
|
||||
case OutputState::Pixel: _crt->output_data(_lastOutputStateDuration); break;
|
||||
}
|
||||
_lastOutputStateDuration = 0;
|
||||
_lastOutputState = state;
|
||||
|
@ -168,7 +168,7 @@ CRT::SyncEvent CRT::get_next_horizontal_sync_event(bool hsync_is_requested, unsi
|
||||
return proposedEvent;
|
||||
}
|
||||
|
||||
void CRT::advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bool vsync_requested, const bool vsync_charging, const Type type, const char *data_type)
|
||||
void CRT::advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bool vsync_requested, const bool vsync_charging, const Type type)
|
||||
{
|
||||
number_of_cycles *= _time_multiplier;
|
||||
|
||||
@ -349,28 +349,28 @@ void CRT::output_sync(unsigned int number_of_cycles)
|
||||
{
|
||||
bool _hsync_requested = !_is_receiving_sync; // ensure this really is edge triggered; someone calling output_sync twice in succession shouldn't trigger it twice
|
||||
_is_receiving_sync = true;
|
||||
advance_cycles(number_of_cycles, _hsync_requested, false, true, Type::Sync, nullptr);
|
||||
advance_cycles(number_of_cycles, _hsync_requested, false, true, Type::Sync);
|
||||
}
|
||||
|
||||
void CRT::output_blank(unsigned int number_of_cycles)
|
||||
{
|
||||
bool _vsync_requested = _is_receiving_sync;
|
||||
_is_receiving_sync = false;
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Blank, nullptr);
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Blank);
|
||||
}
|
||||
|
||||
void CRT::output_level(unsigned int number_of_cycles, const char *type)
|
||||
void CRT::output_level(unsigned int number_of_cycles)
|
||||
{
|
||||
bool _vsync_requested = _is_receiving_sync;
|
||||
_is_receiving_sync = false;
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Level, type);
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Level);
|
||||
}
|
||||
|
||||
void CRT::output_data(unsigned int number_of_cycles, const char *type)
|
||||
void CRT::output_data(unsigned int number_of_cycles)
|
||||
{
|
||||
bool _vsync_requested = _is_receiving_sync;
|
||||
_is_receiving_sync = false;
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Data, type);
|
||||
advance_cycles(number_of_cycles, false, _vsync_requested, false, Type::Data);
|
||||
}
|
||||
|
||||
#pragma mark - Buffer supply
|
||||
|
@ -55,8 +55,8 @@ class CRT {
|
||||
|
||||
void output_sync(unsigned int number_of_cycles);
|
||||
void output_blank(unsigned int number_of_cycles);
|
||||
void output_level(unsigned int number_of_cycles, const char *type);
|
||||
void output_data(unsigned int number_of_cycles, const char *type);
|
||||
void output_level(unsigned int number_of_cycles);
|
||||
void output_data(unsigned int number_of_cycles);
|
||||
|
||||
class CRTDelegate {
|
||||
public:
|
||||
@ -110,7 +110,7 @@ class CRT {
|
||||
enum Type {
|
||||
Sync, Level, Data, Blank
|
||||
} type;
|
||||
void advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bool vsync_requested, bool vsync_charging, Type type, const char *data_type);
|
||||
void advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bool vsync_requested, bool vsync_charging, Type type);
|
||||
|
||||
// the inner entry point that determines whether and when the next sync event will occur within
|
||||
// the current output window
|
||||
|
Loading…
x
Reference in New Issue
Block a user