1.25.0.3: Restore MIP_FF_FF_00_00 as memory init default (see GH Bug#225)

This commit is contained in:
tomcw 2014-09-08 22:25:29 +01:00
parent 95a2c855f4
commit d1dddbe813
5 changed files with 15 additions and 18 deletions

View File

@ -9,7 +9,7 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth
1.25.0.2 - 7 Sep 2014
1.25.0.3 - 8 Sep 2014
---------------------
Note: This is the last planned version to support Win98/ME.
. The next release of AppleWin will be built with VS2008 Express, so will only work under Windows 2000 and later.
@ -28,14 +28,14 @@ Changes:
is shown only for the last drive accessed.
Note: DOS3.3 Track/Sector status should be accurate.
ProDOS support is preliminary -- the track/sector may show zero after an operation.
. Memory initialization defaults to defaults to even pages FF, odd pages 00 (memclear 3).
. Memory initialization defaults to a pattern of FF FF 00 00 (memclear 2).
. Added command line switch to specify the type of memory initialization pattern.
-memclear #
Where # ranges from 0 to 7.
i.e.
-memclear 0 Initialize memory to zero
-memclear 1 Initialize memory to random values
-memclear 2 Initialize memory to 4 byte pattern: FF FF 00 00
-memclear 2 Initialize memory to 4 byte pattern: FF FF 00 00 (default, same as v1.24.0)
-memclear 3 Initialize memory to even pages FF, odd pages 00
-memclear 4 Initialize memory to first half page 00, last half page FF
-memclear 5 Initialize memory to first half page FF, last half page 00

View File

@ -251,8 +251,8 @@ DISK_ICON ICON "DISK.ICO"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,25,0,2
PRODUCTVERSION 1,25,0,2
FILEVERSION 1,25,0,3
PRODUCTVERSION 1,25,0,3
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -270,12 +270,12 @@ BEGIN
VALUE "Comments", "https://github.com/AppleWin"
VALUE "CompanyName", "AppleWin"
VALUE "FileDescription", "Apple //e Emulator for Windows"
VALUE "FileVersion", "1, 25, 0, 2"
VALUE "FileVersion", "1, 25, 0, 3"
VALUE "InternalName", "APPLEWIN"
VALUE "LegalCopyright", " 1994-2014 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
VALUE "OriginalFilename", "APPLEWIN.EXE"
VALUE "ProductName", "Apple //e Emulator"
VALUE "ProductVersion", "1, 25, 0, 2"
VALUE "ProductVersion", "1, 25, 0, 3"
END
END
BLOCK "VarFileInfo"

View File

@ -4,7 +4,7 @@ AppleWin : An Apple //e emulator for Windows
Copyright (C) 1994-1996, Michael O'Brien
Copyright (C) 1999-2001, Oliver Schmidt
Copyright (C) 2002-2005, Tom Charlesworth
Copyright (C) 2006-2009, Tom Charlesworth, Michael Pohoreski
Copyright (C) 2006-2014, Tom Charlesworth, Michael Pohoreski
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -96,7 +96,7 @@ FILE* g_fh = NULL;
bool g_bDisableDirectInput = false;
bool g_bDisableDirectSound = false;
bool g_bDisableDirectSoundMockingboard = false;
int g_nMemoryClearType = MIP_FF_00_FULL_PAGE; // Note: -1 = random in Memory.cpp MemReset()
int g_nMemoryClearType = MIP_FF_FF_00_00; // Note: -1 = random MIP in Memory.cpp MemReset()
IPropertySheet& sg_PropertySheet = * new CPropertySheet;
CSuperSerialCard sg_SSC;

View File

@ -193,7 +193,6 @@ static LPBYTE pCxRomPeripheral = NULL;
static DWORD memmode = MF_BANK2 | MF_SLOTCXROM | MF_WRITERAM;
static BOOL modechanging = 0; // An Optimisation: means delay calling UpdatePaging() for 1 instruction
static BOOL Pravets8charmode = 0;
MemoryInitPattern_e g_eMemoryInitPattern = MIP_FF_FF_00_00;
static CNoSlotClock g_NoSlotClock;
@ -1407,21 +1406,20 @@ void MemReset ()
// OR
// F2, Ctrl-F2, F7, HGR
DWORD clock = getRandomTime();
MemoryInitPattern_e eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
if (g_nMemoryClearType >= 0)
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
else // random
if (g_nMemoryClearType < 0) // random
{
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
// Don't use unless manually specified as a
// few badly written programs will not work correctly
// due to buffer overflows or not initializig memory before using.
if( g_eMemoryInitPattern == MIP_PAGE_ADDRESS_LOW )
g_eMemoryInitPattern = MIP_FF_FF_00_00;
if( eMemoryInitPattern == MIP_PAGE_ADDRESS_LOW )
eMemoryInitPattern = MIP_FF_FF_00_00;
}
switch( g_eMemoryInitPattern )
switch( eMemoryInitPattern )
{
case MIP_FF_FF_00_00:
for( iByte = 0x0000; iByte < 0xC000; iByte += 4 ) // NB. ODD 16-bit words are zero'd above...

View File

@ -24,7 +24,6 @@ enum MemoryInitPattern_e
, MIP_PAGE_ADDRESS_HIGH
, NUM_MIP
};
extern MemoryInitPattern_e g_eMemoryInitPattern;
extern iofunction IORead[256];
extern iofunction IOWrite[256];