Merge tag 'v1.27.13'

This commit is contained in:
Andrea Odetti 2019-04-19 20:29:40 +01:00
commit 5a737e988b
12 changed files with 101 additions and 31 deletions

View file

@ -1285,6 +1285,10 @@
RelativePath=".\resource\TKClock.rom"
>
</File>
<File
RelativePath=".\resource\version.h"
>
</File>
<File
RelativePath=".\resource\winres.h"
>

View file

@ -8,10 +8,17 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth
1.27.13.0 - 8 Dec 2018
----------------------
. [Bug #599] Fix for Ultima V not loading in Authentic Speed mode (regression introduced at 1.27.9.0).
. [Change #205] Added support for Apple II/II+ custom 2K video ROMs.
- Extended command line switch: -videorom <file>
- If the ROM size is 2K, then it replaces the video ROM for the Apple II/II+.
1.27.12.0 - 17 Nov 2018
-----------------------
. [Change #574] Add support for PAL/European or custom 8K video ROMs:
. [Change #574] Added support for PAL/European or custom 8K video ROMs:
- Added new command line switch: -videorom <file>
- Replaces the video ROM for the Enhanced //e.
- Support video ROM sizes of 4K, 8K and 16K (top 8K only).

View file

@ -20,16 +20,16 @@
-h2 &lt;pathname&gt;<br>
Start with hard disk 2 plugged-in. NB. Hard disk controller card gets enabled.<br><br>
-s0 &lt;saturn|saturn64|saturn128&gt;<br>
Insert a Saturn 64K or Saturn 128K card into slot 0 in Apple II or Apple II+ machines (or similar clone).<br>
Insert a Saturn 64K or Saturn 128K card into slot 0 in the Apple II or II+ machines (or similar clone).<br>
Where -s0 saturn is an alias for -s0 saturn128.<br><br>
-s0 &lt;languagecard|lc&gt;<br>
Insert an Apple 16K Language Card into slot 0 in Apple II and use the F8 auto-start ROM.<br>
Insert an Apple 16K Language Card into slot 0 in the original Apple II and use the F8 auto-start ROM.<br>
NB. The Apple II+ already defaults to having a Language Card, so this switch is not required.<br><br>
-s7 empty<br>
Remove the hard disk controller card from slot 7.<br>
Useful to allow a floppy disk to boot from slot 6, drive 1. Use in combination with -d1.<br><br>
-r &lt;number of pages&gt;<br>
Emulate a RAMworks III card with 1 to 127 pages (each page is 64K, giving a max of 8MB) in the auxiliary slot in an Apple //e machine.<br><br>
Emulate a RamWorks III card with 1 to 127 pages (each page is 64K, giving a max of 8MB) in the auxiliary slot in an Apple //e machine.<br><br>
-load-state &lt;savestate&gt;<br>
Load a save-state file<br>
NB. This takes precedent over the -d1,d2,h1,h2,s0,s7 and -r switches.<br><br>
@ -42,10 +42,12 @@
<li>nnnn: select a specific resolution with height=nnnn pixels</li>
</ul>
NB. This changes the display resolution (and restores on exit).<br><br>
-f8rom &lt;rom-file&gt;<br>
Use custom 2K ROM at [$F800..$FFFF]. &lt;rom-file&gt; must be 2048 bytes long<br><br>
-f8rom &lt;file&gt;<br>
Use custom 2K ROM for any Apple II machine at [$F800..$FFFF]. &lt;file&gt; must be 2048 bytes long<br><br>
-videorom &lt;file&gt;<br>
Use an alternate European or custom 4K, 8K or 16K video ROM.<br><br>
Use an alternate custom 2K video ROM for Apple II or II+ machines (but not clones).<br>
Use an alternate European or custom 4K, 8K or 16K (top 8K only) video ROM for the Enhanced //e.<br>
NB. There's currently no support for using an alternate video ROM for the original Apple //e or clones.<br><br>
-printscreen<br>
Enable the dialog box to display the last file saved to<br><br>
-no-printscreen-key<br>

View file

@ -38,14 +38,14 @@
<li>0C: $C00C - Col40/80 (inverse indicates state of 80COL)
<li>0E: $C00E - ASC/MOUS (inverse indicates state of ALTCHARSET)
<li>80: $C080-C087: B2/M R/W (Language Card Bank2)
<li>88: $C088-C08F: B1/M rNN (Language Card Bank1 and RAMworks 64K bank number)
<li>88: $C088-C08F: B1/M rNN (Language Card Bank1 and RamWorks 64K bank number)
<ul>
<li>'B2' or 'B1' is inverse when that LC bank is enabled.
<li>If 'M' is inverse: ROM is active for reading.
<li>If 'M' is not inverse: LC2 or LC1 RAM is active.
<li>If 'W' is inverse: RAM is write enabled.
<li>If 'W' is not inverse: RAM is write protected.
<li>'rNN' will appear if a RAMworks 64K bank is active.
<li>'rNN' will appear if a RamWorks 64K bank is active.
<li>'sNN' will appear if a Saturn 16K bank is active.
</ul>
</ul>

View file

@ -37,6 +37,9 @@
<li>Uthernet card</li>
<li>SAM card</li>
<li>No-Slot clock (there's nothing to persist)</li>
<li>Using The Freeze's F8 ROM</li>
<li>Alternate F8 ROM</li>
<li>Alternate video ROM</li>
</ul>
<p>Note: Only the file names of the disk images are stored in the .yaml file (not the
full path). This allows you to move your disk image around or distribute them.

View file

@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "version.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@ -252,8 +253,8 @@ DISK_ICON ICON "DISK.ICO"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,27,12,0
PRODUCTVERSION 1,27,12,0
FILEVERSION APPLEWIN_VERSION
PRODUCTVERSION APPLEWIN_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -271,12 +272,12 @@ BEGIN
VALUE "Comments", "https://github.com/AppleWin"
VALUE "CompanyName", "AppleWin"
VALUE "FileDescription", "Apple //e Emulator for Windows"
VALUE "FileVersion", "1, 27, 12, 0"
VALUE "FileVersion", APPLEWIN_VERSION_STR
VALUE "InternalName", "APPLEWIN"
VALUE "LegalCopyright", " 1994-2018 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, 27, 12, 0"
VALUE "ProductVersion", APPLEWIN_VERSION_STR
END
END
BLOCK "VarFileInfo"

5
resource/version.h Normal file
View file

@ -0,0 +1,5 @@
#define APPLEWIN_VERSION 1,27,13,0
#define xstr(a) str(a)
#define str(a) #a
#define APPLEWIN_VERSION_STR xstr(APPLEWIN_VERSION)

View file

@ -1289,14 +1289,14 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
if ((g_hCustomRomF8 == INVALID_HANDLE_VALUE) || (GetFileSize(g_hCustomRomF8, NULL) != 0x800))
g_bCustomRomF8Failed = true;
}
else if (strcmp(lpCmdLine, "-videorom") == 0) // Use 4K,8K or 16K video ROM for Enhanced //e
else if (strcmp(lpCmdLine, "-videorom") == 0) // Use 2K (for II/II+). Use 4K,8K or 16K video ROM (for Enhanced //e)
{
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
if (!ReadVideoRomFile(lpCmdLine))
{
std::string msg = "Failed to load video rom (not found or not exactly 4/8/16KiB)";
std::string msg = "Failed to load video rom (not found or not exactly 2/4/8/16KiB)\n";
LogFileOutput("%s", msg.c_str());
MessageBox(g_hFrameWindow, msg.c_str(), TEXT("AppleWin Error"), MB_OK);
}
@ -1569,7 +1569,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
if (g_bCustomRomF8Failed)
{
std::string msg = "Failed to load custom F8 rom (not found or not exactly 2KiB)";
std::string msg = "Failed to load custom F8 rom (not found or not exactly 2KiB)\n";
LogFileOutput("%s", msg.c_str());
MessageBox(g_hFrameWindow, msg.c_str(), TEXT("AppleWin Error"), MB_OK);
bShutdown = true;

View file

@ -892,10 +892,14 @@ static void __stdcall DiskReadWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULO
}
}
// Should really test for drive off - after 1 second drive off delay (UTAIIe page 9-13)
// but Sherwood Forest sets shift mode and reads with the drive off, so don't check for now
if (!floppywritemode)
{
// Don't change latch if drive off after 1 second drive-off delay (UTAIIe page 9-13)
// "DRIVES OFF forces the data register to hold its present state." (UTAIIe page 9-12)
// Note: Sherwood Forest sets shift mode and reads with the drive off.
if (!pDrive->spinning) // GH#599
return;
const ULONG nReadCycleDiff = (ULONG) (g_nCumulativeCycles - g_uDiskLastReadLatchCycle);
// Support partial nibble read if disk reads are very close: (GH#582)
@ -954,10 +958,8 @@ static void __stdcall DiskReadWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULO
if (++pFloppy->byte >= pFloppy->nibbles)
pFloppy->byte = 0;
// Feature Request #201 Show track status
// https://github.com/AppleWin/AppleWin/issues/201
// NB. Prevent flooding of forcing UI to redraw!!!
if( ((pFloppy->byte) & 0xFF) == 0 )
// Show track status (GH#201) - NB. Prevent flooding of forcing UI to redraw!!!
if ((pFloppy->byte & 0xFF) == 0)
FrameDrawDiskStatus( (HDC)0 );
}
@ -1052,11 +1054,16 @@ bool DiskSelect(const int iDrive)
static void __stdcall DiskLoadWriteProtect(WORD, WORD, BYTE write, BYTE value, ULONG)
{
/* floppyloadmode = 1; */
// Don't change latch if drive off after 1 second drive-off delay (UTAIIe page 9-13)
// "DRIVES OFF forces the data register to hold its present state." (UTAIIe page 9-12)
// Note: Gemstone Warrior sets load mode with the drive off.
if (!g_aFloppyDrive[currdrive].spinning) // GH#599
return;
if (!write)
{
// Notes:
// . Should really test for drive off - after 1 second drive off delay (UTAIIe page 9-13)
// but Gemstone Warrior sets load mode with the drive off, so don't check for now
// . Phase 1 on also forces write protect in the Disk II drive (UTAIIe page 9-7) but we don't implement that
// . write mode doesn't prevent reading write protect (GH#537):
// "If for some reason the above write protect check were entered with the READ/WRITE switch in WRITE,

View file

@ -154,11 +154,11 @@ void userVideoRom4K(csbits_t csbits, const BYTE* pVideoRom)
}
}
void userVideoRom(void)
void userVideoRomForIIe(void)
{
const BYTE* pVideoRom;
UINT size = GetVideoRom(pVideoRom); // 4K or 8K
if (!size)
UINT size = GetVideoRom(pVideoRom); // 2K or 4K or 8K
if (size < kVideoRomSize4K)
return;
if (size == kVideoRomSize4K)
@ -173,6 +173,43 @@ void userVideoRom(void)
//-------------------------------------
void userVideoRom2K(csbits_t csbits, const BYTE* pVideoRom)
{
int RA = 0; // rom address
for (int i=0; i<256; i++, RA+=8)
{
for (int y=0; y<8; y++)
{
BYTE n = pVideoRom[RA+y];
// UTAII:8-30 "Bit 7 of your EPROM fonts will control flashing in the lower 1024 bytes of the EPROM"
// UTAII:8-31 "If you leave O7 (EPROM Output7) reset in these patterns, the resulting characters will be inversions..."
if (!(n & 0x80) && RA < 1024)
n = n ^ 0x7f;
// UTAII:8-30 "TEXT ROM pattern is ... reversed"
BYTE d = 0;
for (BYTE j=0; j<7; j++, n >>= 1) // Just bits [0..6]
d = (d << 1) | (n & 1);
csbits[0][i][y] = d;
}
}
}
void userVideoRomForIIPlus(void)
{
const BYTE* pVideoRom;
UINT size = GetVideoRom(pVideoRom); // 2K or 4K or 8K
if (size != kVideoRomSize2K)
return;
userVideoRom2K(&csbits_a2[0], pVideoRom);
}
//-------------------------------------
void make_csbits(void)
{
get_csbits(&csbits_enhanced2e[0], TEXT("CHARSET40"), 0); // Enhanced //e: Alt char set off
@ -188,7 +225,10 @@ void make_csbits(void)
memcpy(&csbits_2e[1][64], &csbits_2e[0][64], 32*8);
// Try to use any user-provided video ROM for Enhanced //e
userVideoRom();
userVideoRomForIIe();
// Try to use any user-provided video ROM for II/II+
userVideoRomForIIPlus();
}
csbits_t GetEnhanced2e_csbits(void)

View file

@ -1160,7 +1160,7 @@ bool ReadVideoRomFile(const char* pRomFile)
return false;
const ULONG size = GetFileSize(h, NULL);
if (size == kVideoRomSize4K || size == kVideoRomSize8K || size == kVideoRomSize16K)
if (size == kVideoRomSize2K || size == kVideoRomSize4K || size == kVideoRomSize8K || size == kVideoRomSize16K)
{
DWORD bytesRead;
if (ReadFile(h, g_videoRom, size, &bytesRead, NULL) && bytesRead == size)
@ -1197,7 +1197,7 @@ void SetVideoRomRockerSwitch(bool state)
bool IsVideoRom4K(void)
{
return g_videoRomSize == 0 || g_videoRomSize == kVideoRomSize4K;
return g_videoRomSize <= kVideoRomSize4K;
}
//===========================================================================

View file

@ -200,7 +200,8 @@ void Video_SetBitmapHeader( WinBmpHeader_t *pBmp, int nWidth, int nHeight, int n
BYTE VideoSetMode(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
const UINT kVideoRomSize4K = 4*1024;
const UINT kVideoRomSize2K = 1024*2;
const UINT kVideoRomSize4K = kVideoRomSize2K*2;
bool ReadVideoRomFile(const char* pRomFile);
UINT GetVideoRom(const BYTE*& pVideoRom);
bool GetVideoRomRockerSwitch(void);