First part of merge of new CardManager code.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
9ef028fac6
commit
0191652565
12 changed files with 112 additions and 76 deletions
|
@ -23,6 +23,8 @@ add_library(appleii SHARED
|
|||
RGBMonitor.cpp
|
||||
NTSC.cpp
|
||||
NTSC_CharSet.cpp
|
||||
CardManager.cpp
|
||||
Disk2CardManager.cpp
|
||||
|
||||
linux/windows/memory.cpp
|
||||
linux/windows/handles.cpp
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "AppleWin.h"
|
||||
#include "Applewin.h"
|
||||
#include "CardManager.h"
|
||||
|
||||
#include "Disk.h"
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "AppleWin.h"
|
||||
#include "Applewin.h"
|
||||
#include "CardManager.h"
|
||||
#include "Disk.h"
|
||||
#include "Disk2CardManager.h"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "SaveState_Structs_common.h"
|
||||
#include "Card.h"
|
||||
|
||||
// Memory Flag
|
||||
#define MF_80STORE 0x00000001
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "Applewin.h"
|
||||
#include "Disk.h"
|
||||
#include "Harddisk.h"
|
||||
|
@ -155,7 +156,7 @@ namespace
|
|||
const DWORD uActualCyclesExecuted = CpuExecute(uCyclesToExecute, bVideoUpdate);
|
||||
g_dwCyclesThisFrame += uActualCyclesExecuted;
|
||||
|
||||
sg_Disk2Card.UpdateDriveState(uActualCyclesExecuted);
|
||||
g_CardMgr.GetDisk2CardMgr().UpdateDriveState(uActualCyclesExecuted);
|
||||
|
||||
const int key = ProcessKeyboard();
|
||||
|
||||
|
@ -203,7 +204,7 @@ namespace
|
|||
|
||||
g_relativeSpeed = g_relativeSpeed * coeff + double(us) / double(nExecutionPeriodUsec) * (1.0 - coeff);
|
||||
|
||||
if (!sg_Disk2Card.IsConditionForFullSpeed())
|
||||
if (!g_CardMgr.GetDisk2CardMgr().IsConditionForFullSpeed())
|
||||
{
|
||||
if (us < nExecutionPeriodUsec)
|
||||
{
|
||||
|
@ -223,7 +224,7 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
bool DoDiskInsert(const int nDrive, const std::string & fileName, const bool createMissingDisk)
|
||||
bool DoDiskInsert(const UINT slot, const int nDrive, const std::string & fileName, const bool createMissingDisk)
|
||||
{
|
||||
std::string strPathName;
|
||||
|
||||
|
@ -249,7 +250,8 @@ namespace
|
|||
strPathName.append(fileName);
|
||||
}
|
||||
|
||||
ImageError_e Error = sg_Disk2Card.InsertDisk(nDrive, strPathName.c_str(), IMAGE_USE_FILES_WRITE_PROTECT_STATUS, createMissingDisk);
|
||||
Disk2InterfaceCard* pDisk2Card = dynamic_cast<Disk2InterfaceCard*> (g_CardMgr.GetObj(slot));
|
||||
ImageError_e Error = pDisk2Card->InsertDisk(nDrive, strPathName.c_str(), IMAGE_USE_FILES_WRITE_PROTECT_STATUS, createMissingDisk);
|
||||
return Error == eIMAGE_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
@ -278,14 +280,14 @@ namespace
|
|||
bool disksOk = true;
|
||||
if (!options.disk1.empty())
|
||||
{
|
||||
const bool ok = DoDiskInsert(DRIVE_1, options.disk1, options.createMissingDisks);
|
||||
const bool ok = DoDiskInsert(SLOT6, DRIVE_1, options.disk1, options.createMissingDisks);
|
||||
disksOk = disksOk && ok;
|
||||
LogFileOutput("Init: DoDiskInsert(D1), res=%d\n", ok);
|
||||
}
|
||||
|
||||
if (!options.disk2.empty())
|
||||
{
|
||||
const bool ok = DoDiskInsert(DRIVE_2, options.disk2, options.createMissingDisks);
|
||||
const bool ok = DoDiskInsert(SLOT6, DRIVE_2, options.disk2, options.createMissingDisks);
|
||||
disksOk = disksOk && ok;
|
||||
LogFileOutput("Init: DoDiskInsert(D2), res=%d\n", ok);
|
||||
}
|
||||
|
@ -303,7 +305,7 @@ namespace
|
|||
|
||||
MemInitialize();
|
||||
NVideoInitialize();
|
||||
sg_Disk2Card.Reset();
|
||||
g_CardMgr.GetDisk2CardMgr().Reset();
|
||||
HD_Reset();
|
||||
|
||||
if (!options.snapshot.empty())
|
||||
|
@ -320,8 +322,11 @@ namespace
|
|||
{
|
||||
EnterMessageLoop(options);
|
||||
}
|
||||
sg_Mouse.Uninitialize();
|
||||
sg_Mouse.Reset();
|
||||
CMouseInterface* pMouseCard = g_CardMgr.GetMouseCard();
|
||||
if (pMouseCard)
|
||||
{
|
||||
pMouseCard->Reset();
|
||||
}
|
||||
MemDestroy();
|
||||
}
|
||||
while (g_bRestart);
|
||||
|
@ -337,7 +342,7 @@ namespace
|
|||
PrintDestroy();
|
||||
CpuDestroy();
|
||||
|
||||
sg_Disk2Card.Destroy();
|
||||
g_CardMgr.GetDisk2CardMgr().Destroy();
|
||||
ImageDestroy();
|
||||
|
||||
fclose(g_fh);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "Disk.h"
|
||||
#include "Video.h"
|
||||
#include "CPU.h"
|
||||
|
@ -274,7 +275,9 @@ void FrameRefresh()
|
|||
|
||||
void FrameDrawDiskLEDS(HDC x)
|
||||
{
|
||||
sg_Disk2Card.GetLightStatus(&g_eStatusDrive1, &g_eStatusDrive2);
|
||||
if (g_CardMgr.QuerySlot(SLOT6) == CT_Disk2)
|
||||
dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6))->GetLightStatus(&g_eStatusDrive1, &g_eStatusDrive2);
|
||||
|
||||
FrameRefresh();
|
||||
}
|
||||
|
||||
|
@ -283,16 +286,19 @@ void FrameDrawDiskStatus(HDC x)
|
|||
if (mem == NULL)
|
||||
return;
|
||||
|
||||
Disk2InterfaceCard* pDisk2Card = dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6));
|
||||
|
||||
// We use the actual drive since probing from memory doesn't tell us anything we don't already know.
|
||||
// DOS3.3 ProDOS
|
||||
// Drive $B7EA $BE3D
|
||||
// Track $B7EC LC1 $D356
|
||||
// Sector $B7ED LC1 $D357
|
||||
// RWTS LC1 $D300
|
||||
int nActiveFloppy = sg_Disk2Card.GetCurrentDrive();
|
||||
|
||||
int nDisk1Track = sg_Disk2Card.GetTrack(0);
|
||||
int nDisk2Track = sg_Disk2Card.GetTrack(1);
|
||||
int nActiveFloppy = pDisk2Card->GetCurrentDrive();
|
||||
|
||||
int nDisk1Track = pDisk2Card->GetTrack(0);
|
||||
int nDisk2Track = pDisk2Card->GetTrack(1);
|
||||
|
||||
// Probe known OS's for Track/Sector
|
||||
int isProDOS = mem[ 0xBF00 ] == 0x4C;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "StdAfx.h"
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "Applewin.h"
|
||||
#include "Disk.h"
|
||||
#include "Harddisk.h"
|
||||
|
@ -31,14 +32,18 @@ namespace
|
|||
|
||||
void insertDisk(const QString & filename, const int disk)
|
||||
{
|
||||
if (g_CardMgr.QuerySlot(SLOT6) != CT_Disk2)
|
||||
return;
|
||||
|
||||
Disk2InterfaceCard* pDisk2Card = dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6));
|
||||
if (filename.isEmpty())
|
||||
{
|
||||
sg_Disk2Card.EjectDisk(disk);
|
||||
pDisk2Card->EjectDisk(disk);
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool createMissingDisk = true;
|
||||
const ImageError_e result = sg_Disk2Card.InsertDisk(disk, filename.toStdString().c_str(), IMAGE_USE_FILES_WRITE_PROTECT_STATUS, createMissingDisk);
|
||||
const ImageError_e result = pDisk2Card->InsertDisk(disk, filename.toStdString().c_str(), IMAGE_USE_FILES_WRITE_PROTECT_STATUS, createMissingDisk);
|
||||
if (result != eIMAGE_ERROR_NONE)
|
||||
{
|
||||
const QString message = QString("Error [%1] inserting '%2'").arg(QString::number(result), filename);
|
||||
|
@ -63,16 +68,32 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
void setSlot4(const SS_CARDTYPE newCardType)
|
||||
void SetSlot(UINT slot, SS_CARDTYPE newCardType)
|
||||
{
|
||||
g_Slot[4] = newCardType;
|
||||
REGSAVE(TEXT(REGVALUE_SLOT4), (DWORD)g_Slot[4]);
|
||||
}
|
||||
_ASSERT(slot < NUM_SLOTS);
|
||||
if (slot >= NUM_SLOTS)
|
||||
return;
|
||||
|
||||
void setSlot5(const SS_CARDTYPE newCardType)
|
||||
{
|
||||
g_Slot[5] = newCardType;
|
||||
REGSAVE(TEXT(REGVALUE_SLOT5), (DWORD)g_Slot[5]);
|
||||
// Two paths:
|
||||
// 1) Via Config dialog: card not inserted yet
|
||||
// 2) Snapshot_LoadState_v2(): card already inserted
|
||||
if (g_CardMgr.QuerySlot(slot) != newCardType)
|
||||
g_CardMgr.Insert(slot, newCardType);
|
||||
|
||||
std::string slotText;
|
||||
switch (slot)
|
||||
{
|
||||
case 0: slotText = REGVALUE_SLOT0; break;
|
||||
case 1: slotText = REGVALUE_SLOT1; break;
|
||||
case 2: slotText = REGVALUE_SLOT2; break;
|
||||
case 3: slotText = REGVALUE_SLOT3; break;
|
||||
case 4: slotText = REGVALUE_SLOT4; break;
|
||||
case 5: slotText = REGVALUE_SLOT5; break;
|
||||
case 6: slotText = REGVALUE_SLOT6; break;
|
||||
case 7: slotText = REGVALUE_SLOT7; break;
|
||||
}
|
||||
|
||||
REGSAVE(slotText.c_str(), (DWORD)newCardType);
|
||||
}
|
||||
|
||||
const std::vector<eApple2Type> computerTypes = {A2TYPE_APPLE2, A2TYPE_APPLE2PLUS, A2TYPE_APPLE2E, A2TYPE_APPLE2EENHANCED,
|
||||
|
@ -177,10 +198,12 @@ void GlobalOptions::setData(const GlobalOptions & data)
|
|||
|
||||
void getAppleWinPreferences(PreferenceData & data)
|
||||
{
|
||||
Disk2InterfaceCard* pDisk2Card = dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6));
|
||||
|
||||
data.disks.resize(diskIDs.size());
|
||||
for (size_t i = 0; i < diskIDs.size(); ++i)
|
||||
{
|
||||
const std::string & diskName = sg_Disk2Card.GetFullName(diskIDs[i]);
|
||||
const std::string & diskName = pDisk2Card->GetFullName(diskIDs[i]);
|
||||
if (!diskName.empty())
|
||||
{
|
||||
data.disks[i] = QString::fromStdString(diskName);
|
||||
|
@ -197,9 +220,9 @@ void getAppleWinPreferences(PreferenceData & data)
|
|||
}
|
||||
}
|
||||
|
||||
data.enhancedSpeed = sg_Disk2Card.GetEnhanceDisk();
|
||||
data.mouseInSlot4 = g_Slot[4] == CT_MouseInterface;
|
||||
data.cpmInSlot5 = g_Slot[5] == CT_Z80;
|
||||
data.enhancedSpeed = pDisk2Card->GetEnhanceDisk();
|
||||
data.mouseInSlot4 = g_CardMgr.QuerySlot(SLOT4) == CT_MouseInterface;
|
||||
data.cpmInSlot5 = g_CardMgr.QuerySlot(SLOT5) == CT_Z80;
|
||||
data.hdInSlot7 = HD_CardIsEnabled();
|
||||
|
||||
data.apple2Type = getApple2ComputerType();
|
||||
|
@ -219,6 +242,8 @@ void getAppleWinPreferences(PreferenceData & data)
|
|||
|
||||
void setAppleWinPreferences(const PreferenceData & currentData, const PreferenceData & newData)
|
||||
{
|
||||
Disk2InterfaceCard* pDisk2Card = dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6));
|
||||
|
||||
if (currentData.apple2Type != newData.apple2Type)
|
||||
{
|
||||
const eApple2Type type = computerTypes[newData.apple2Type];
|
||||
|
@ -231,12 +256,12 @@ void setAppleWinPreferences(const PreferenceData & currentData, const Preference
|
|||
if (currentData.mouseInSlot4 != newData.mouseInSlot4)
|
||||
{
|
||||
const SS_CARDTYPE card = newData.mouseInSlot4 ? CT_MouseInterface : CT_Empty;
|
||||
setSlot4(card);
|
||||
SetSlot(SLOT4, card);
|
||||
}
|
||||
if (currentData.cpmInSlot5 != newData.cpmInSlot5)
|
||||
{
|
||||
const SS_CARDTYPE card = newData.cpmInSlot5 ? CT_Z80 : CT_Empty;
|
||||
setSlot5(card);
|
||||
SetSlot(SLOT5, card);
|
||||
}
|
||||
if (currentData.hdInSlot7 != newData.hdInSlot7)
|
||||
{
|
||||
|
@ -247,7 +272,7 @@ void setAppleWinPreferences(const PreferenceData & currentData, const Preference
|
|||
if (currentData.enhancedSpeed != newData.enhancedSpeed)
|
||||
{
|
||||
REGSAVE(TEXT(REGVALUE_ENHANCE_DISK_SPEED), newData.enhancedSpeed ? 1 : 0);
|
||||
sg_Disk2Card.SetEnhanceDisk(newData.enhancedSpeed);
|
||||
pDisk2Card->SetEnhanceDisk(newData.enhancedSpeed);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < diskIDs.size(); ++i)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "StdAfx.h"
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "Applewin.h"
|
||||
#include "Disk.h"
|
||||
#include "Harddisk.h"
|
||||
|
@ -98,14 +99,17 @@ namespace
|
|||
|
||||
emulator->displayLogo();
|
||||
|
||||
sg_Disk2Card.Reset();
|
||||
g_CardMgr.GetDisk2CardMgr().Reset();
|
||||
HD_Reset();
|
||||
}
|
||||
|
||||
void stopEmulator()
|
||||
{
|
||||
sg_Mouse.Uninitialize();
|
||||
sg_Mouse.Reset();
|
||||
CMouseInterface* pMouseCard = g_CardMgr.GetMouseCard();
|
||||
if (pMouseCard)
|
||||
{
|
||||
pMouseCard->Reset();
|
||||
}
|
||||
MemDestroy();
|
||||
}
|
||||
|
||||
|
@ -115,7 +119,7 @@ namespace
|
|||
PrintDestroy();
|
||||
CpuDestroy();
|
||||
|
||||
sg_Disk2Card.Destroy();
|
||||
g_CardMgr.GetDisk2CardMgr().Destroy();
|
||||
ImageDestroy();
|
||||
fclose(g_fh);
|
||||
g_fh = nullptr;
|
||||
|
@ -305,12 +309,12 @@ void QApple::on_timer()
|
|||
{
|
||||
const DWORD uActualCyclesExecuted = CpuExecute(uCyclesToExecute, bVideoUpdate);
|
||||
g_dwCyclesThisFrame += uActualCyclesExecuted;
|
||||
sg_Disk2Card.UpdateDriveState(uActualCyclesExecuted);
|
||||
g_CardMgr.GetDisk2CardMgr().UpdateDriveState(uActualCyclesExecuted);
|
||||
// in case we run more than 1 frame
|
||||
g_dwCyclesThisFrame = g_dwCyclesThisFrame % dwClksPerFrame;
|
||||
++count;
|
||||
}
|
||||
while (sg_Disk2Card.IsConditionForFullSpeed() && (myElapsedTimer.elapsed() < target + myOptions.msFullSpeed));
|
||||
while (g_CardMgr.GetDisk2CardMgr().IsConditionForFullSpeed() && (myElapsedTimer.elapsed() < target + myOptions.msFullSpeed));
|
||||
|
||||
// just repaint each time, to make it simpler
|
||||
// we run @ 60 fps anyway
|
||||
|
@ -513,9 +517,10 @@ void QApple::on_actionScreenshot_triggered()
|
|||
void QApple::on_actionSwap_disks_triggered()
|
||||
{
|
||||
PauseEmulator pause(this);
|
||||
|
||||
// this might open a file dialog
|
||||
sg_Disk2Card.DriveSwap();
|
||||
if (g_CardMgr.QuerySlot(SLOT6) == CT_Disk2)
|
||||
{
|
||||
dynamic_cast<Disk2InterfaceCard*>(g_CardMgr.GetObj(SLOT6))->DriveSwap();
|
||||
}
|
||||
}
|
||||
|
||||
void QApple::on_actionLoad_state_from_triggered()
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
#include "StdAfx.h"
|
||||
#include "linux/data.h"
|
||||
#include "linux/keyboard.h"
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "MouseInterface.h"
|
||||
#include "Applewin.h"
|
||||
|
||||
Video::Video(QWidget *parent) : VIDEO_BASECLASS(parent)
|
||||
{
|
||||
|
@ -128,11 +131,11 @@ void Video::keyPressEvent(QKeyEvent *event)
|
|||
|
||||
void Video::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if (sg_Mouse.IsActiveAndEnabled())
|
||||
if (g_CardMgr.IsMouseCardInstalled() && g_CardMgr.GetMouseCard()->IsActiveAndEnabled())
|
||||
{
|
||||
int iX, iMinX, iMaxX;
|
||||
int iY, iMinY, iMaxY;
|
||||
sg_Mouse.GetXY(iX, iMinX, iMaxX, iY, iMinY, iMaxY);
|
||||
g_CardMgr.GetMouseCard()->GetXY(iX, iMinX, iMaxX, iY, iMinY, iMaxY);
|
||||
|
||||
const QPointF p = event->localPos();
|
||||
const QSize s = size();
|
||||
|
@ -145,7 +148,7 @@ void Video::mouseMoveEvent(QMouseEvent *event)
|
|||
|
||||
int outOfBoundsX;
|
||||
int outOfBoundsY;
|
||||
sg_Mouse.SetPositionRel(dx, dy, &outOfBoundsX, &outOfBoundsY);
|
||||
g_CardMgr.GetMouseCard()->SetPositionRel(dx, dy, &outOfBoundsX, &outOfBoundsY);
|
||||
|
||||
event->accept();
|
||||
}
|
||||
|
@ -153,16 +156,16 @@ void Video::mouseMoveEvent(QMouseEvent *event)
|
|||
|
||||
void Video::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (sg_Mouse.IsActiveAndEnabled())
|
||||
if (g_CardMgr.IsMouseCardInstalled() && g_CardMgr.GetMouseCard()->IsActiveAndEnabled())
|
||||
{
|
||||
Qt::MouseButton button = event->button();
|
||||
switch (button)
|
||||
{
|
||||
case Qt::LeftButton:
|
||||
sg_Mouse.SetButton(BUTTON0, BUTTON_DOWN);
|
||||
g_CardMgr.GetMouseCard()->SetButton(BUTTON0, BUTTON_DOWN);
|
||||
break;
|
||||
case Qt::RightButton:
|
||||
sg_Mouse.SetButton(BUTTON1, BUTTON_DOWN);
|
||||
g_CardMgr.GetMouseCard()->SetButton(BUTTON1, BUTTON_DOWN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -173,16 +176,16 @@ void Video::mousePressEvent(QMouseEvent *event)
|
|||
|
||||
void Video::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (sg_Mouse.IsActiveAndEnabled())
|
||||
if (g_CardMgr.IsMouseCardInstalled() && g_CardMgr.GetMouseCard()->IsActiveAndEnabled())
|
||||
{
|
||||
Qt::MouseButton button = event->button();
|
||||
switch (button)
|
||||
{
|
||||
case Qt::LeftButton:
|
||||
sg_Mouse.SetButton(BUTTON0, BUTTON_UP);
|
||||
g_CardMgr.GetMouseCard()->SetButton(BUTTON0, BUTTON_UP);
|
||||
break;
|
||||
case Qt::RightButton:
|
||||
sg_Mouse.SetButton(BUTTON1, BUTTON_UP);
|
||||
g_CardMgr.GetMouseCard()->SetButton(BUTTON1, BUTTON_UP);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "StdAfx.h"
|
||||
|
||||
#include "Video.h"
|
||||
#include "Common.h"
|
||||
#include "CardManager.h"
|
||||
#include "Applewin.h"
|
||||
#include "Memory.h"
|
||||
#include "Common.h"
|
||||
|
@ -130,7 +132,7 @@ void VideoBenchmark(std::function<void()> redraw, std::function<void()> refresh)
|
|||
const DWORD executedcycles = CpuExecute(cyclesPerMs, true);
|
||||
cyclesThisFrame += executedcycles;
|
||||
// every ms disk and joystick are updated
|
||||
sg_Disk2Card.UpdateDriveState(executedcycles);
|
||||
g_CardMgr.GetDisk2CardMgr().UpdateDriveState(executedcycles);
|
||||
#if 0
|
||||
JoyUpdateButtonLatch(executedcycles);
|
||||
#endif
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "Memory.h"
|
||||
#include "SerialComms.h"
|
||||
#include "CardManager.h"
|
||||
#include "MouseInterface.h"
|
||||
#include "Speaker.h"
|
||||
#include "Video.h"
|
||||
|
@ -30,25 +31,12 @@ DWORD g_dwCyclesThisFrame = 0;
|
|||
// but it is not at the moment
|
||||
bool g_bFullSpeed = true;
|
||||
|
||||
SS_CARDTYPE g_Slot[8] = {
|
||||
/*0*/ CT_LanguageCard, // Just for Apple II or II+ or similar clones
|
||||
/*1*/ CT_GenericPrinter,
|
||||
/*2*/ CT_SSC,
|
||||
/*3*/ CT_Uthernet,
|
||||
/*4*/ CT_Empty,
|
||||
/*5*/ CT_Empty,
|
||||
/*6*/ CT_Disk2,
|
||||
/*7*/ CT_Empty };
|
||||
SS_CARDTYPE g_SlotAux = CT_Extended80Col;
|
||||
|
||||
HANDLE g_hCustomRomF8 = INVALID_HANDLE_VALUE; // Cmd-line specified custom ROM at $F800..$FFFF
|
||||
std::string g_sProgramDir; // Directory of where AppleWin executable resides
|
||||
std::string g_sCurrentDir; // Also Starting Dir. Debugger uses this when load/save
|
||||
std::string g_pAppTitle = TITLE_APPLE_2E_ENHANCED;
|
||||
bool g_bRestart = false;
|
||||
CSuperSerialCard sg_SSC;
|
||||
CMouseInterface sg_Mouse;
|
||||
Disk2InterfaceCard sg_Disk2Card;
|
||||
CardManager g_CardMgr;
|
||||
const short SPKR_DATA_INIT = (short)0x8000;
|
||||
|
||||
short g_nSpeakerData = SPKR_DATA_INIT;
|
||||
|
@ -222,10 +210,8 @@ void LoadConfiguration(void)
|
|||
REGLOAD(TEXT(REGVALUE_EMULATION_SPEED) ,&g_dwSpeed);
|
||||
|
||||
DWORD dwEnhanceDisk;
|
||||
if (REGLOAD(TEXT(REGVALUE_ENHANCE_DISK_SPEED), &dwEnhanceDisk))
|
||||
{
|
||||
sg_Disk2Card.SetEnhanceDisk(dwEnhanceDisk ? true : false);
|
||||
}
|
||||
REGLOAD_DEFAULT(TEXT(REGVALUE_ENHANCE_DISK_SPEED), &dwEnhanceDisk, 1);
|
||||
g_CardMgr.GetDisk2CardMgr().SetEnhanceDisk(dwEnhanceDisk ? true : false);
|
||||
|
||||
Config_Load_Video();
|
||||
#if 0
|
||||
|
@ -289,12 +275,10 @@ void LoadConfiguration(void)
|
|||
sg_PropertySheet.SetMouseRestrictToWindow(dwTmp);
|
||||
#endif
|
||||
|
||||
if(REGLOAD(TEXT(REGVALUE_SLOT0), &dwTmp))
|
||||
g_Slot[0] = (SS_CARDTYPE) dwTmp;
|
||||
if(REGLOAD(TEXT(REGVALUE_SLOT4), &dwTmp))
|
||||
g_Slot[4] = (SS_CARDTYPE) dwTmp;
|
||||
g_CardMgr.Insert(4, (SS_CARDTYPE)dwTmp);
|
||||
if(REGLOAD(TEXT(REGVALUE_SLOT5), &dwTmp))
|
||||
g_Slot[5] = (SS_CARDTYPE) dwTmp;
|
||||
g_CardMgr.Insert(5, (SS_CARDTYPE)dwTmp);
|
||||
|
||||
//
|
||||
|
||||
|
@ -316,8 +300,7 @@ void LoadConfiguration(void)
|
|||
GetCurrentDirectory(sizeof(szFilename), szFilename);
|
||||
SetCurrentImageDir(szFilename);
|
||||
|
||||
sg_Disk2Card.LoadLastDiskImage(DRIVE_1);
|
||||
sg_Disk2Card.LoadLastDiskImage(DRIVE_2);
|
||||
g_CardMgr.GetDisk2CardMgr().LoadLastDiskImage();
|
||||
|
||||
//
|
||||
|
||||
|
|
|
@ -13,3 +13,7 @@ void MB_UpdateCycles(ULONG uExecutedCycles)
|
|||
void MB_StartOfCpuExecute()
|
||||
{
|
||||
}
|
||||
|
||||
void MB_SetCumulativeCycles()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue