mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-11 21:29:43 +00:00
Merge branch 'master' of https://github.com/AppleWin/AppleWin
This commit is contained in:
commit
29b7fa15b8
@ -9,6 +9,17 @@ https://github.com/AppleWin/AppleWin/issues/new
|
|||||||
Tom Charlesworth
|
Tom Charlesworth
|
||||||
|
|
||||||
|
|
||||||
|
1.26.1.1 - 17 Feb 2017
|
||||||
|
----------------------
|
||||||
|
Fixes:
|
||||||
|
. [Bug #371] Flickery video when using GR from CP/M. (A regression at 1.26.0.x)
|
||||||
|
. [Bug #363] Debugger: Screen not updating when running in single-stepping debugger mode. (A regression at 1.26.0.x)
|
||||||
|
. Save-state: Fix for loading state when TEXT40 changes to TEXT80 or vice versa
|
||||||
|
|
||||||
|
Fixes since 1.26.1.0 (11 Feb 2017):
|
||||||
|
. [Bug #382] Reset not resetting the 40/80-col text mode for mixed-mode NTSC rendering
|
||||||
|
|
||||||
|
|
||||||
1.26.0.6 - 16 Oct 2016
|
1.26.0.6 - 16 Oct 2016
|
||||||
----------------------
|
----------------------
|
||||||
Changes:
|
Changes:
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<p>The complete<sub style="FONT-WEIGHT: bold">1</sub> Apple //e state can be saved
|
<p>The complete<sub style="FONT-WEIGHT: bold">1</sub> Apple //e state can be saved
|
||||||
to a PC file at any time. This can be useful for continuity across AppleWin
|
to a PC file at any time. This can be useful for continuity across AppleWin
|
||||||
sessions or to help with games that don't have a save option.</p>
|
sessions or to help with games that don't have a save option.</p>
|
||||||
<p>This is controlled by the AppleWin Configuration tab labelled <em>Save State</em>.</p>
|
<p>This is controlled by the AppleWin Configuration tab labelled <em>Advanced</em>.</p>
|
||||||
<p style="FONT-WEIGHT: bold">Details:</p>
|
<p style="FONT-WEIGHT: bold">Details:</p>
|
||||||
<p>The entire Apple //e state is saved to a human-readable (.yaml) file.</p>
|
<p>The entire Apple //e state is saved to a human-readable (.yaml) file.</p>
|
||||||
<p><span style="FONT-WEIGHT: bold">1</span>
|
<p><span style="FONT-WEIGHT: bold">1</span>
|
||||||
|
@ -251,8 +251,8 @@ DISK_ICON ICON "DISK.ICO"
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,26,0,6
|
FILEVERSION 1,26,1,1
|
||||||
PRODUCTVERSION 1,26,0,6
|
PRODUCTVERSION 1,26,1,1
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -270,12 +270,12 @@ BEGIN
|
|||||||
VALUE "Comments", "https://github.com/AppleWin"
|
VALUE "Comments", "https://github.com/AppleWin"
|
||||||
VALUE "CompanyName", "AppleWin"
|
VALUE "CompanyName", "AppleWin"
|
||||||
VALUE "FileDescription", "Apple //e Emulator for Windows"
|
VALUE "FileDescription", "Apple //e Emulator for Windows"
|
||||||
VALUE "FileVersion", "1, 26, 0, 6"
|
VALUE "FileVersion", "1, 26, 1, 1"
|
||||||
VALUE "InternalName", "APPLEWIN"
|
VALUE "InternalName", "APPLEWIN"
|
||||||
VALUE "LegalCopyright", " 1994-2016 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
|
VALUE "LegalCopyright", " 1994-2017 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
|
||||||
VALUE "OriginalFilename", "APPLEWIN.EXE"
|
VALUE "OriginalFilename", "APPLEWIN.EXE"
|
||||||
VALUE "ProductName", "Apple //e Emulator"
|
VALUE "ProductName", "Apple //e Emulator"
|
||||||
VALUE "ProductVersion", "1, 26, 0, 6"
|
VALUE "ProductVersion", "1, 26, 1, 1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -6755,9 +6755,9 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
|
|||||||
{
|
{
|
||||||
switch( iPage )
|
switch( iPage )
|
||||||
{
|
{
|
||||||
case VIEW_PAGE_X: bVideoModeFlags |= _Video_SetupBanks( VideoGetSWPAGE2() ); break; // Page Current
|
case VIEW_PAGE_X: bVideoModeFlags |= !VideoGetSWPAGE2() ? 0 : VF_PAGE2; break; // Page Current
|
||||||
case VIEW_PAGE_1: bVideoModeFlags |= _Video_SetupBanks( false ); break; // Page 1
|
case VIEW_PAGE_1: bVideoModeFlags |= 0; break; // Page 1
|
||||||
case VIEW_PAGE_2: bVideoModeFlags |= _Video_SetupBanks( true ); break; // Page 2 !
|
case VIEW_PAGE_2: bVideoModeFlags |= VF_PAGE2; break; // Page 2
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2078,13 +2078,13 @@ void ResetMachineState ()
|
|||||||
void CtrlReset()
|
void CtrlReset()
|
||||||
{
|
{
|
||||||
// Ctrl+Reset - TODO: This is a terrible place for this code!
|
// Ctrl+Reset - TODO: This is a terrible place for this code!
|
||||||
if (!IS_APPLE2)
|
if (!IS_APPLE2) // TODO: Why not for A][ & A][+ too?
|
||||||
MemResetPaging();
|
MemResetPaging();
|
||||||
|
|
||||||
PravetsReset();
|
PravetsReset();
|
||||||
DiskReset();
|
DiskReset();
|
||||||
KeybReset();
|
KeybReset();
|
||||||
if (!IS_APPLE2)
|
if (!IS_APPLE2) // TODO: Why not for A][ & A][+ too?
|
||||||
VideoResetState(); // Switch Alternate char set off
|
VideoResetState(); // Switch Alternate char set off
|
||||||
sg_SSC.CommReset();
|
sg_SSC.CommReset();
|
||||||
MB_Reset();
|
MB_Reset();
|
||||||
|
103
source/Video.cpp
103
source/Video.cpp
@ -236,8 +236,6 @@ static HDC g_hDeviceDC;
|
|||||||
static LPBITMAPINFO g_pFramebufferinfo = NULL;
|
static LPBITMAPINFO g_pFramebufferinfo = NULL;
|
||||||
|
|
||||||
static LPBYTE g_aFrameBufferOffset[FRAMEBUFFER_H]; // array of pointers to start of each scanline
|
static LPBYTE g_aFrameBufferOffset[FRAMEBUFFER_H]; // array of pointers to start of each scanline
|
||||||
static LPBYTE g_pHiresBank1;
|
|
||||||
static LPBYTE g_pHiresBank0;
|
|
||||||
HBITMAP g_hLogoBitmap;
|
HBITMAP g_hLogoBitmap;
|
||||||
static HPALETTE g_hPalette;
|
static HPALETTE g_hPalette;
|
||||||
|
|
||||||
@ -245,11 +243,6 @@ static HBITMAP g_hSourceBitmap;
|
|||||||
static LPBYTE g_pSourcePixels;
|
static LPBYTE g_pSourcePixels;
|
||||||
const int MAX_SOURCE_Y = 512;
|
const int MAX_SOURCE_Y = 512;
|
||||||
static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
|
static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
|
||||||
static LPBYTE g_pTextBank1; // Aux
|
|
||||||
static LPBYTE g_pTextBank0; // Main
|
|
||||||
|
|
||||||
// TC (25/8/2016): TODO: Need to investigate the use of this global flag for 1.27
|
|
||||||
static /*bool*/ UINT g_VideoForceFullRedraw = 1;
|
|
||||||
|
|
||||||
static LPBYTE framebufferaddr = (LPBYTE)0;
|
static LPBYTE framebufferaddr = (LPBYTE)0;
|
||||||
static LONG g_nFrameBufferPitch = 0;
|
static LONG g_nFrameBufferPitch = 0;
|
||||||
@ -584,64 +577,10 @@ static void CreateLookup_TextCommon(HDC hDstDC, DWORD rop)
|
|||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
static inline int GetOriginal2EOffset(BYTE ch)
|
|
||||||
{
|
|
||||||
// No mousetext for original IIe
|
|
||||||
return !IsOriginal2E() || !g_nAltCharSetOffset || (ch<0x40) || (ch>0x5F) ? 0 : -g_nAltCharSetOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ----- ALL GLOBALLY ACCESSIBLE FUNCTIONS ARE BELOW THIS LINE -----
|
// ----- ALL GLOBALLY ACCESSIBLE FUNCTIONS ARE BELOW THIS LINE -----
|
||||||
//
|
//
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
BOOL VideoApparentlyDirty ()
|
|
||||||
{
|
|
||||||
if (SW_MIXED || g_VideoForceFullRedraw)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
DWORD address = (SW_HIRES && !SW_TEXT)
|
|
||||||
? (0x20 << (SW_PAGE2 ? 1 : 0))
|
|
||||||
: (0x04 << (SW_PAGE2 ? 1 : 0));
|
|
||||||
DWORD length = (SW_HIRES && !SW_TEXT) ? 0x20 : 0x4;
|
|
||||||
while (length--)
|
|
||||||
if (*(memdirty+(address++)) & 2)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
// Scan visible text page for any flashing chars
|
|
||||||
if((SW_TEXT || SW_MIXED) && (g_nAltCharSetOffset == 0))
|
|
||||||
{
|
|
||||||
BYTE* pTextBank0 = MemGetMainPtr(0x400 << (SW_PAGE2 ? 1 : 0));
|
|
||||||
BYTE* pTextBank1 = MemGetAuxPtr (0x400 << (SW_PAGE2 ? 1 : 0));
|
|
||||||
const bool b80Col = SW_80COL;
|
|
||||||
|
|
||||||
// Scan 8 long-lines of 120 chars (at 128 char offsets):
|
|
||||||
// . Skip 8-char holes in TEXT
|
|
||||||
for(UINT y=0; y<8; y++)
|
|
||||||
{
|
|
||||||
for(UINT x=0; x<40*3; x++)
|
|
||||||
{
|
|
||||||
BYTE ch = pTextBank0[y*128+x];
|
|
||||||
if((ch >= 0x40) && (ch <= 0x7F))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (b80Col)
|
|
||||||
{
|
|
||||||
ch = pTextBank1[y*128+x];
|
|
||||||
if((ch >= 0x40) && (ch <= 0x7F))
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
void VideoBenchmark () {
|
void VideoBenchmark () {
|
||||||
Sleep(500);
|
Sleep(500);
|
||||||
@ -1130,17 +1069,6 @@ void VideoRedrawScreen (void)
|
|||||||
VideoRefreshScreen( g_uVideoMode, true );
|
VideoRefreshScreen( g_uVideoMode, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
int _Video_SetupBanks( bool bBank2 )
|
|
||||||
{
|
|
||||||
g_pHiresBank1 = MemGetAuxPtr (0x2000 << (int)bBank2);
|
|
||||||
g_pHiresBank0 = MemGetMainPtr(0x2000 << (int)bBank2);
|
|
||||||
g_pTextBank1 = MemGetAuxPtr (0x400 << (int)bBank2);
|
|
||||||
g_pTextBank0 = MemGetMainPtr(0x400 << (int)bBank2);
|
|
||||||
|
|
||||||
return bBank2 ? VF_PAGE2 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
// NB. Can get "big" 1000+ms times: these occur during disk loading when the emulator is at full-speed.
|
// NB. Can get "big" 1000+ms times: these occur during disk loading when the emulator is at full-speed.
|
||||||
@ -1258,8 +1186,6 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe
|
|||||||
GdiFlush();
|
GdiFlush();
|
||||||
|
|
||||||
FrameReleaseVideoDC();
|
FrameReleaseVideoDC();
|
||||||
|
|
||||||
g_VideoForceFullRedraw = 0;
|
|
||||||
// NTSC_END
|
// NTSC_END
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1278,7 +1204,9 @@ void VideoResetState ()
|
|||||||
{
|
{
|
||||||
g_nAltCharSetOffset = 0;
|
g_nAltCharSetOffset = 0;
|
||||||
g_uVideoMode = VF_TEXT;
|
g_uVideoMode = VF_TEXT;
|
||||||
g_VideoForceFullRedraw = 1;
|
|
||||||
|
NTSC_SetVideoTextMode( 40 );
|
||||||
|
NTSC_SetVideoMode( g_uVideoMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1288,9 +1216,6 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||||||
{
|
{
|
||||||
address &= 0xFF;
|
address &= 0xFF;
|
||||||
|
|
||||||
// DWORD oldpage2 = SW_PAGE2;
|
|
||||||
// int oldvalue = g_nAltCharSetOffset+(int)(g_uVideoMode & ~(VF_80STORE | VF_PAGE2));
|
|
||||||
|
|
||||||
switch (address)
|
switch (address)
|
||||||
{
|
{
|
||||||
case 0x00: g_uVideoMode &= ~VF_80STORE; break;
|
case 0x00: g_uVideoMode &= ~VF_80STORE; break;
|
||||||
@ -1320,28 +1245,6 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||||||
NTSC_SetVideoMode( g_uVideoMode );
|
NTSC_SetVideoMode( g_uVideoMode );
|
||||||
// NTSC_END
|
// NTSC_END
|
||||||
|
|
||||||
#if 0 // NTSC_CLEANUP: Is this still needed??
|
|
||||||
|
|
||||||
if (oldvalue != g_nAltCharSetOffset+(int)(g_uVideoMode & ~(VF_80STORE | VF_PAGE2)))
|
|
||||||
g_VideoForceFullRedraw = 1; // Defer video redraw until VideoEndOfVideoFrame()
|
|
||||||
|
|
||||||
if (oldpage2 != SW_PAGE2)
|
|
||||||
{
|
|
||||||
// /g_bVideoUpdatedThisFrame/ is used to limit the video update to once per 60Hz frame (CPU clk=1MHz):
|
|
||||||
// . this easily supports the common double-buffered "flip-immediate" case (eg. Airheart flips at a max of ~15Hz, Skyfox/Boulderdash at a max of ~11Hz)
|
|
||||||
// . crucially this prevents tight-loop page flipping (GH#129,GH#204) from max'ing out an x86 CPU core (and not providing realtime emulation)
|
|
||||||
// NB. Deferring the update by just setting /g_VideoForceFullRedraw/ is not an option, since this doesn't provide "flip-immediate"
|
|
||||||
//
|
|
||||||
// Ultimately this isn't the correct solution, and proper cycle-accurate video rendering should be done, but this is a much bigger job!
|
|
||||||
// TODO-Michael: Is MemReadFloatingBus() still accurate now that we have proper per cycle video rendering??
|
|
||||||
|
|
||||||
if (!g_bVideoUpdatedThisFrame)
|
|
||||||
{
|
|
||||||
VideoRedrawScreen(); // VideoRefreshScreen();
|
|
||||||
g_bVideoUpdatedThisFrame = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // NTSC_CLEANUP
|
|
||||||
return MemReadFloatingBus(uExecutedCycles);
|
return MemReadFloatingBus(uExecutedCycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,6 @@ typedef bool (*VideoUpdateFuncPtr_t)(int,int,int,int,int);
|
|||||||
|
|
||||||
// Prototypes _______________________________________________________
|
// Prototypes _______________________________________________________
|
||||||
|
|
||||||
BOOL VideoApparentlyDirty ();
|
|
||||||
void VideoBenchmark ();
|
void VideoBenchmark ();
|
||||||
void VideoChooseMonochromeColor (); // FIXME: Should be moved to PageConfig and call VideoSetMonochromeColor()
|
void VideoChooseMonochromeColor (); // FIXME: Should be moved to PageConfig and call VideoSetMonochromeColor()
|
||||||
void VideoDestroy ();
|
void VideoDestroy ();
|
||||||
@ -191,7 +190,6 @@ void VideoSetSnapshot_v1(const UINT AltCharSet, const UINT VideoMode);
|
|||||||
void VideoSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
|
void VideoSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
|
||||||
void VideoLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
|
void VideoLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
|
||||||
|
|
||||||
int _Video_SetupBanks( bool bBank2 );
|
|
||||||
bool Update40ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
bool Update40ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
||||||
bool Update80ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
bool Update80ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
||||||
bool UpdateLoResCell (int x, int y, int xpixel, int ypixel, int offset);
|
bool UpdateLoResCell (int x, int y, int xpixel, int ypixel, int offset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user