mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-23 00:30:17 +00:00
Manual merge from cm630 to trunk (ie. I didn't use svn to merge)
This commit is contained in:
parent
3004a339f0
commit
7c006f2c03
@ -1,50 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<title>Advanced Settings</title>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body style="background-color: rgb(255, 255, 255); font-family: verdana;" alink="#008000" link="#008000" vlink="#008000">
|
||||
|
||||
<h2 style="color: rgb(0, 128, 0);">Advanced Settings</h2>
|
||||
|
||||
<hr size="4"><img style="width: 344px; height: 460px; float: right;" src="img/advanced.png" alt="Advanced settings" hspace="5" vspace="5">
|
||||
<p><strong>Save State File Name:</strong><br>
|
||||
|
||||
This is the file name to use for save-state files. The default
|
||||
directory is the same as where your AppleWin.exe program is stored.</p>
|
||||
|
||||
<p><strong>Save State on Exit:</strong><br>
|
||||
|
||||
Checking this box will automatically save the current state of the
|
||||
emulator upon exit. The state will be saved to the file
|
||||
specified above (SaveState.aws by default).</p>
|
||||
|
||||
<p><strong>Save State:</strong><br>
|
||||
|
||||
Press this button to save the current state of the emulator to the file
|
||||
specified. You can also save the system state during
|
||||
emulation by pressing the F11 key.</p>
|
||||
|
||||
<p><strong>Load State:</strong><br>
|
||||
|
||||
Press this button to load the specified state file into
|
||||
the emulator. You can also load the system state during
|
||||
emulation by pressing the F12 key.</p>
|
||||
|
||||
<p><strong>Clone:</strong><br>
|
||||
|
||||
If you have specified Computer as 'Clone' on the main Configuration page, then this drop-down menu can be used to specify the clone type.<br>
|
||||
NB. Pravets 82 and 8A are Bulgarian Apple II clones.<br>
|
||||
|
||||
<p><strong>The Freeze's non-autostart F8 rom:</strong><br>
|
||||
If you have specified Computer as 'Apple ][' or 'Apple ][+' on the main Configuration page, then you will be able to enable this setting.
|
||||
The Freeze F8 rom is a hacker's rom that replaces the normal 2K rom at $F800. <a href="cfg-advanced-freeze-rom.html">Here's the original release note</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Advanced Settings</title></head>
|
||||
<body style="background-color: rgb(255, 255, 255); font-family: verdana;" alink="#008000" link="#008000" vlink="#008000">
|
||||
<h2 style="color: rgb(0, 128, 0);">Advanced Settings</h2>
|
||||
<hr size="4"><img style="width: 344px; height: 460px; float: right;" src="img/advanced.png" alt="Advanced settings" hspace="5" vspace="5">
|
||||
<p><strong>Save State File Name:</strong><br>
|
||||
This is the file name to use for save-state files. The default
|
||||
directory is the same as where your AppleWin.exe program is stored.</p>
|
||||
<p><strong>Save State on Exit:</strong><br>
|
||||
Checking this box will automatically save the current state of the
|
||||
emulator upon exit. The state will be saved to the file
|
||||
specified above (SaveState.aws by default).</p>
|
||||
<p><strong>Save State:</strong><br>
|
||||
Press this button to save the current state of the emulator to the file
|
||||
specified. You can also save the system state during
|
||||
emulation by pressing the F11 key.</p>
|
||||
<p><strong>Load State:</strong><br>
|
||||
Press this button to load the specified state file into
|
||||
the emulator. You can also load the system state during
|
||||
emulation by pressing the F12 key.</p>
|
||||
<p><strong>Clone:</strong><br>
|
||||
If you have specified Computer as 'Clone' on the main Configuration
|
||||
page, then this drop-down menu can be used to specify the clone type.<br>
|
||||
NB. Pravets 82 and 8A are Bulgarian Apple II clones.<br>
|
||||
</p>
|
||||
<p><strong>Printer settings </strong>(Printer is
|
||||
emulated at slot 1)</p>
|
||||
<p style="margin-left: 40px;"><strong>Printer dump filename:<br>
|
||||
</strong>Data sent to the printer is stored in a text file. Use
|
||||
this setting to select its location.<br>
|
||||
</p>
|
||||
<p style="margin-left: 40px;"><strong>Dump to printer:<br>
|
||||
</strong><span style="font-weight: bold; font-style: italic;">Use
|
||||
with caution!</span> Enables dumping to a real printer. If
|
||||
disabled, the
|
||||
printout is stored only in printer.txt file in the AppleWin folder.
|
||||
This probably works properly (not tested) when using a printer
|
||||
compatible with the printer selected in the Apple II applications. In
|
||||
modern printers trying to print images will result in printing tens of
|
||||
pages with nonsense.<br>
|
||||
</p>
|
||||
<p style="margin-left: 40px;"><strong>Encoding conversion for clones:<br>
|
||||
</strong>Characters are encoded from the character set used in
|
||||
the real hardware to ASCII. For Pravets 8 this converts MIK to ASCII.
|
||||
Enabling this could cause problems when printing images.</p>
|
||||
<p style="margin-left: 40px;"><strong>Filter unprintable characters:<br>
|
||||
</strong>Some characters represent commands for the printer and
|
||||
shall not be printed. When saving them to the printer dump file they
|
||||
may appear as some strange symbols. I may want to disable filtering
|
||||
when dumping to printer.</p><p style="margin-left: 40px;"><strong>Append to printfile:<br>
|
||||
</strong>When disabled previous print file is replaced (unless it has a
|
||||
different name) by the newly created print file. Otherwise newly
|
||||
printed data is added to the existing print file. I should better
|
||||
disable appending
|
||||
when dumping to printer.</p><p style="margin-left: 40px;"><strong>Terminate printing after idle:<br>
|
||||
</strong>Whan printing is started a printer file is created and it is
|
||||
closed either after the selected by this widget time expires, or when
|
||||
the emulator is reset. This setting is emulation speed dependend.
|
||||
</p>
|
||||
<p><strong>The Freeze's non-autostart F8 rom:</strong><br>
|
||||
If you have specified Computer as 'Apple ][' or 'Apple ][+' on the main
|
||||
Configuration page, then you will be able to enable this setting.
|
||||
The Freeze F8 rom is a hacker's rom that replaces the normal 2K rom at
|
||||
$F800. <a href="cfg-advanced-freeze-rom.html">Here's the
|
||||
original release note</a>
|
||||
</p>
|
||||
</body></html>
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 15 KiB |
@ -60,18 +60,22 @@ DRIVE1_BUTTON BITMAP "DRIVE1.BMP"
|
||||
DRIVE2_BUTTON BITMAP "DRIVE2.BMP"
|
||||
SETUP_BUTTON BITMAP "SETUP.BMP"
|
||||
CHARSET40 BITMAP "CHARSET4.BMP"
|
||||
CHARSET8C BITMAP "CHARSET8C.BMP"
|
||||
CHARSET82 BITMAP "CHARSET82.BMP"
|
||||
DISKOFF_BITMAP BITMAP "DISKOFF.BMP"
|
||||
DISKREAD_BITMAP BITMAP "DISKREAD.BMP"
|
||||
DISKWRITE_BITMAP BITMAP "DISKWRIT.BMP"
|
||||
DISKPROT_BITMAP BITMAP "DISKPROT.BMP"
|
||||
CAPSOFF_BITMAP BITMAP "CAPSOFF.BMP"
|
||||
CAPSON_BITMAP BITMAP "CAPSON.BMP"
|
||||
//Pravets8 appendices
|
||||
LATOFF_BITMAP BITMAP "LATOFF.BMP"
|
||||
LATON_BITMAP BITMAP "LATON.BMP"
|
||||
CAPSOFF_P8_BITMAP BITMAP "CAPSOFF_P8.BMP"
|
||||
CAPSON_P8_BITMAP BITMAP "CAPSON_P8.BMP"
|
||||
CHARSET82 BITMAP "CHARSET82.BMP"
|
||||
//CHARSET8M BITMAP "CHARSET8M.BMP" //Still the exact charset of Pravets 8M is unknown
|
||||
CHARSET8M BITMAP "CHARSET8C.BMP"
|
||||
CHARSET8C BITMAP "CHARSET8C.BMP"
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
HELP_BUTTON BITMAP "HELP.BMP"
|
||||
DRIVESWAP_BUTTON BITMAP "DRIVESWAP.BMP"
|
||||
IDB_APPLEWIN BITMAP "Applewin.bmp"
|
||||
@ -198,19 +202,32 @@ STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Advanced"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "&Clone:",IDC_STATIC,5,165,40,8
|
||||
COMBOBOX IDC_CLONETYPE,45,163,100,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
|
||||
LTEXT "Save State file name:",IDC_STATIC,5,2,74,8
|
||||
GROUPBOX "Save State Control",IDC_STATIC,5,27,200,63
|
||||
CONTROL "Save State on exit",IDC_SAVESTATE_ON_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,38,74,10
|
||||
PUSHBUTTON "Save State",IDC_SAVESTATE,16,50,85,15
|
||||
PUSHBUTTON "Load State",IDC_LOADSTATE,16,67,85,15
|
||||
EDITTEXT IDC_SAVESTATE_FILENAME,5,23,143,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "(F11 during emulation)",IDC_STATIC,110,53,90,8
|
||||
LTEXT "(F12 during emulation)",IDC_STATIC,110,70,90,8
|
||||
PUSHBUTTON "Browse...",IDC_SAVESTATE_BROWSE,154,12,50,14
|
||||
LTEXT "Printer dump filename:",IDC_STATIC,5,98,74,8
|
||||
PUSHBUTTON "Browse...",IDC_DUMP_FILENAME_BROWSE,154,107,50,14
|
||||
EDITTEXT IDC_DUMP_FILENAME,5,108,143,12,ES_AUTOHSCROLL
|
||||
CONTROL "Dump to printer (use with caution)",IDC_DUMPTOPRINTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,123,180,10
|
||||
CONTROL "Encoding conversion for clones",IDC_PRINTER_CONVERT_ENCODING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,133,180,10
|
||||
CONTROL "Filter unprintable characters",IDC_PRINTER_FILTER_UNPRINTABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,143,180,10
|
||||
CONTROL "Append to print file",IDC_PRINTER_APPEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,153,180,10
|
||||
|
||||
LTEXT "Teminate printing after idle (in seconds):",IDC_STATIC,3,167,160,8
|
||||
CTEXT "10",IDC_STATIC,155,160,24,20,SS_CENTERIMAGE
|
||||
CONTROL "Spin1",IDC_SPIN_PRINTER_IDLE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNLEFT | UDS_AUTOBUDDY,161,164,10,14
|
||||
|
||||
LTEXT "&Clone:",IDC_STATIC,5,185,40,8
|
||||
COMBOBOX IDC_CLONETYPE,45,185,100,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "The Freeze's non-autostart F8 rom (Apple ][ or ][+ only)",IDC_THE_FREEZES_F8_ROM_FW,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,206,182,10
|
||||
LTEXT "Save State file name:",IDC_STATIC,5,12,74,8
|
||||
GROUPBOX "Save State Control",IDC_STATIC,5,57,200,73
|
||||
CONTROL "Save State on exit",IDC_SAVESTATE_ON_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,68,74,10
|
||||
PUSHBUTTON "Save State",IDC_SAVESTATE,16,85,85,15
|
||||
PUSHBUTTON "Load State",IDC_LOADSTATE,16,107,85,15
|
||||
EDITTEXT IDC_SAVESTATE_FILENAME,5,23,143,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "(F11 during emulation)",IDC_STATIC,110,88,74,8
|
||||
LTEXT "(F12 during emulation)",IDC_STATIC,110,110,90,8
|
||||
PUSHBUTTON "Browse...",IDC_SAVESTATE_BROWSE,154,22,50,14
|
||||
END
|
||||
|
||||
|
||||
@ -251,7 +268,7 @@ BEGIN
|
||||
VALUE "FileDescription", "Apple //e Emulator for Windows"
|
||||
VALUE "FileVersion", "1, 15, 0, 4"
|
||||
VALUE "InternalName", "APPLEWIN"
|
||||
VALUE "LegalCopyright", "© 1994-2008 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
|
||||
VALUE "LegalCopyright", " 1994-2008 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, 15, 0, 4"
|
||||
@ -294,13 +311,14 @@ IDR_THUNDERCLOCKPLUS_FW FIRMWARE "ThunderClockPlus.rom"
|
||||
// ROM
|
||||
//
|
||||
|
||||
IDR_APPLE2_ROM ROM "Apple2.rom"
|
||||
IDR_APPLE2_PLUS_ROM ROM "Apple2_Plus.rom"
|
||||
IDR_APPLE2E_ROM ROM "Apple2e.rom"
|
||||
IDR_APPLE2E_ENHANCED_ROM ROM "Apple2e_Enhanced.rom"
|
||||
IDR_PRAVETS_82_ROM ROM "Pravets82.rom"
|
||||
IDR_PRAVETS_8C_ROM ROM "Pravets8C.rom"
|
||||
IDR_FREEZES_F8_ROM ROM "FREEZES_NON-AUTOSTART_F8_ROM.rom"
|
||||
IDR_APPLE2_ROM ROM "Apple2.rom"
|
||||
IDR_APPLE2_PLUS_ROM ROM "Apple2_Plus.rom"
|
||||
IDR_APPLE2E_ROM ROM "Apple2e.rom"
|
||||
IDR_APPLE2E_ENHANCED_ROM ROM "Apple2e_Enhanced.rom"
|
||||
IDR_PRAVETS_82_ROM ROM "Pravets82.rom"
|
||||
IDR_PRAVETS_8M_ROM ROM "Pravets8M.rom"
|
||||
IDR_PRAVETS_8C_ROM ROM "Pravets8C.rom"
|
||||
IDR_FREEZES_F8_ROM ROM "FREEZES_NON-AUTOSTART_F8_ROM.rom"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 10 KiB |
BIN
AppleWin/resource/CHARSET8M.bmp
Normal file
BIN
AppleWin/resource/CHARSET8M.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
AppleWin/resource/PRAVETS8M.ROM
Normal file
BIN
AppleWin/resource/PRAVETS8M.ROM
Normal file
Binary file not shown.
@ -42,7 +42,8 @@
|
||||
#define IDR_THUNDERCLOCKPLUS_FW 137
|
||||
#define IDR_FREEZES_F8_ROM 138
|
||||
#define IDR_PRAVETS_82_ROM 139
|
||||
#define IDR_PRAVETS_8C_ROM 140
|
||||
#define IDR_PRAVETS_8M_ROM 140
|
||||
#define IDR_PRAVETS_8C_ROM 142
|
||||
#define IDC_KEYB_BUFFER_ENABLE 1005
|
||||
#define IDC_SAVESTATE 1006
|
||||
#define IDC_SAVESTATE_ON_EXIT 1007
|
||||
@ -86,13 +87,21 @@
|
||||
#define IDC_CIDERPRESS_BROWSE 1049
|
||||
#define IDC_CIDERPRESS_FILENAME 1050
|
||||
#define IDC_Z80_IN_SLOT5 1051
|
||||
#define IDC_DUMPTOPRINTER 1052
|
||||
#define IDC_DUMP_FILENAME 1053
|
||||
#define IDC_DUMP_FILENAME_BROWSE 1054
|
||||
#define IDC_PRINTER_CONVERT_ENCODING 1055
|
||||
#define IDC_PRINTER_FILTER_UNPRINTABLE 1056
|
||||
#define IDC_PRINTER_APPEND 1057
|
||||
#define IDC_SPIN_PRINTER_IDLE 1058
|
||||
|
||||
#define IDM_EXIT 40001
|
||||
#define IDM_HELP 40002
|
||||
#define IDM_ABOUT 40003
|
||||
#define ID_DISKMENU_EJECT 40004
|
||||
#define ID_DISKMENU_WRITEPROTECTION_ON 40005
|
||||
#define ID_DISKMENU_WRITEPROTECTION_OFF 40006
|
||||
#define ID_DISKMENU_SENDTO_CIDERPRESS 40007
|
||||
#define ID_DISKMENU_SENDTO_CIDERPRESS 40007
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
@ -387,7 +387,8 @@ void LoadConfiguration ()
|
||||
switch (g_uCloneType)
|
||||
{
|
||||
case 0: g_Apple2Type = A2TYPE_PRAVETS82; break;
|
||||
case 1: g_Apple2Type = A2TYPE_PRAVETS8A; break;
|
||||
case 1: g_Apple2Type = A2TYPE_PRAVETS8M; break;
|
||||
case 2: g_Apple2Type = A2TYPE_PRAVETS8A; break;
|
||||
default: g_Apple2Type = A2TYPE_APPLE2EEHANCED; break;
|
||||
}
|
||||
}
|
||||
@ -417,6 +418,7 @@ void LoadConfiguration ()
|
||||
case A2TYPE_APPLE2EEHANCED: g_nCharsetType = 0; break;
|
||||
case A2TYPE_PRAVETS82: g_nCharsetType = 1; break;
|
||||
case A2TYPE_PRAVETS8A: g_nCharsetType = 2; break;
|
||||
case A2TYPE_PRAVETS8M: g_nCharsetType = 3; break; //This charset has a very small difference with the PRAVETS82 one an probably has some misplaced characters. Still the Pravets82 charset is used, because settiong charset to 3 results in some problems.
|
||||
}
|
||||
|
||||
|
||||
@ -455,6 +457,20 @@ void LoadConfiguration ()
|
||||
if(LOAD(TEXT(REGVALUE_SAVE_STATE_ON_EXIT), &dwTmp))
|
||||
g_bSaveStateOnExit = dwTmp ? true : false;
|
||||
|
||||
|
||||
if(LOAD(TEXT(REGVALUE_DUMP_TO_PRINTER), &dwTmp))
|
||||
g_bDumpToPrinter = dwTmp ? true : false;
|
||||
|
||||
if(LOAD(TEXT(REGVALUE_CONVERT_ENCODING), &dwTmp))
|
||||
g_bConvertEncoding = dwTmp ? true : false;
|
||||
|
||||
if(LOAD(TEXT(REGVALUE_FILTER_UNPRINTABLE), &dwTmp))
|
||||
g_bFilterUnprintable = dwTmp ? true : false;
|
||||
|
||||
if(LOAD(TEXT(REGVALUE_PRINTER_APPEND), &dwTmp))
|
||||
g_bPrinterAppend = dwTmp ? true : false;
|
||||
|
||||
|
||||
if(LOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
||||
HD_SetEnabled(dwTmp ? true : false);
|
||||
|
||||
@ -496,10 +512,13 @@ void LoadConfiguration ()
|
||||
//
|
||||
|
||||
char szFilename[MAX_PATH] = {0};
|
||||
|
||||
RegLoadString(TEXT(REG_CONFIG),TEXT(REGVALUE_SAVESTATE_FILENAME),1,szFilename,sizeof(szFilename));
|
||||
Snapshot_SetFilename(szFilename); // If not in Registry than default will be used
|
||||
|
||||
szFilename[0] = 0;
|
||||
RegLoadString(TEXT(REG_CONFIG),TEXT(REGVALUE_PRINTER_FILENAME),1,szFilename,sizeof(szFilename));
|
||||
Printer_SetFilename(szFilename); // If not in Registry than default will be used
|
||||
|
||||
// Current/Starting Dir is the "root" of where the user keeps his disk images
|
||||
RegLoadString(TEXT(REG_PREFS),TEXT(REGVALUE_PREF_START_DIR),1,g_sCurrentDir,MAX_PATH);
|
||||
SetCurrentImageDir();
|
||||
@ -507,6 +526,10 @@ void LoadConfiguration ()
|
||||
Disk_LoadLastDiskImage(0);
|
||||
Disk_LoadLastDiskImage(1);
|
||||
|
||||
dwTmp = 10;
|
||||
LOAD(TEXT(REGVALUE_PRINTER_IDLE_LIMIT), &dwTmp);
|
||||
Printer_SetIdleLimit(dwTmp);
|
||||
|
||||
char szUthernetInt[MAX_PATH] = {0};
|
||||
RegLoadString(TEXT(REG_CONFIG),TEXT("Uthernet Interface"),1,szUthernetInt,MAX_PATH);
|
||||
update_tfe_interface(szUthernetInt,NULL);
|
||||
|
@ -60,6 +60,7 @@ enum AppMode_e
|
||||
#define TITLE_APPLE_2E TEXT("Apple //e Emulator")
|
||||
#define TITLE_APPLE_2E_ENHANCED TEXT("Enhanced Apple //e Emulator")
|
||||
#define TITLE_PRAVETS_82 TEXT("Pravets 82 Emulator")
|
||||
#define TITLE_PRAVETS_8M TEXT("Pravets 8M Emulator")
|
||||
#define TITLE_PRAVETS_8A TEXT("Pravets 8A Emulator")
|
||||
|
||||
#define TITLE_PAUSED TEXT(" Paused ")
|
||||
@ -89,6 +90,12 @@ enum AppMode_e
|
||||
#define REGVALUE_CLONETYPE "Clone Type"
|
||||
#define REGVALUE_CIDERPRESSLOC "CiderPress Location"
|
||||
#define REGVALUE_Z80_IN_SLOT5 "Z80 in slot 5"
|
||||
#define REGVALUE_DUMP_TO_PRINTER "Dump to printer"
|
||||
#define REGVALUE_CONVERT_ENCODING "Convert printer encoding for clones"
|
||||
#define REGVALUE_FILTER_UNPRINTABLE "Filter unprintable characters"
|
||||
#define REGVALUE_PRINTER_FILENAME "Printer Filename"
|
||||
#define REGVALUE_PRINTER_APPEND "Append to printer file"
|
||||
#define REGVALUE_PRINTER_IDLE_LIMIT "Printer idle limit"
|
||||
|
||||
// Preferences
|
||||
#define REG_PREFS "Preferences"
|
||||
@ -134,6 +141,7 @@ enum eApple2Type {
|
||||
// Clones start here:
|
||||
A2TYPE_CLONE=APPLECLONE_MASK,
|
||||
A2TYPE_PRAVETS82=APPLECLONE_MASK|APPLE2E_MASK,
|
||||
A2TYPE_PRAVETS8M,
|
||||
A2TYPE_PRAVETS8A,
|
||||
A2TYPE_MAX
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ static HBITMAP capsbitmap[2];
|
||||
//Pravets8 only
|
||||
static HBITMAP capsbitmapP8[2];
|
||||
static HBITMAP latbitmap[2];
|
||||
static HBITMAP charsetbitmap [3];
|
||||
//static HBITMAP charsetbitmap [4]; //The idea was to add a charset indicator on the front panel, but it was given up. All charsetbitmap occurences must be REMOVED!
|
||||
//===========================
|
||||
static HBITMAP diskbitmap[ NUM_DISK_STATUS ];
|
||||
|
||||
@ -176,6 +176,7 @@ switch (g_Apple2Type)
|
||||
case A2TYPE_APPLE2E: buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_APPLE2EEHANCED: buttonbitmap[BTN_RUN ] =(HBITMAP)LOADBUTTONBITMAP(TEXT("RUN_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS82: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS8M: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
case A2TYPE_PRAVETS8A: buttonbitmap[BTN_RUN ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("RUNP_BUTTON")); break;
|
||||
}
|
||||
|
||||
@ -193,9 +194,11 @@ switch (g_Apple2Type)
|
||||
capsbitmapP8[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CAPSON_P8_BITMAP"));
|
||||
latbitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LATOFF_BITMAP"));
|
||||
latbitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("LATON_BITMAP"));
|
||||
charsetbitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_APPLE_BITMAP"));
|
||||
/*charsetbitmap[0] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_APPLE_BITMAP"));
|
||||
charsetbitmap[1] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_82_BITMAP"));
|
||||
charsetbitmap[2] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8A_BITMAP"));
|
||||
charsetbitmap[3] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8M_BITMAP"));
|
||||
*/
|
||||
//===========================
|
||||
diskbitmap[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKOFF_BITMAP"));
|
||||
diskbitmap[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKREAD_BITMAP"));
|
||||
@ -486,6 +489,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
||||
case A2TYPE_APPLE2E: DrawBitmapRect(dc,x+7,y+19,&rect,capsbitmap[bCaps != 0]); break;
|
||||
case A2TYPE_APPLE2EEHANCED: DrawBitmapRect(dc,x+7,y+19,&rect,capsbitmap[bCaps != 0]); break;
|
||||
case A2TYPE_PRAVETS82: DrawBitmapRect(dc,x+15,y+19,&rect,latbitmap[bCaps != 0]); break;
|
||||
case A2TYPE_PRAVETS8M: DrawBitmapRect(dc,x+15,y+19,&rect,latbitmap[bCaps != 0]); break;
|
||||
case A2TYPE_PRAVETS8A: DrawBitmapRect(dc,x+2,y+19,&rect,latbitmap[bCaps != 0]); break;
|
||||
}
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8A) //Toggles Pravets 8A/C Caps lock LED
|
||||
@ -513,6 +517,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
||||
case A2TYPE_APPLE2E: _tcscpy(title, TITLE_APPLE_2E); break;
|
||||
case A2TYPE_APPLE2EEHANCED: _tcscpy(title, TITLE_APPLE_2E_ENHANCED); break;
|
||||
case A2TYPE_PRAVETS82: _tcscpy(title, TITLE_PRAVETS_82); break;
|
||||
case A2TYPE_PRAVETS8M: _tcscpy(title, TITLE_PRAVETS_8M); break;
|
||||
case A2TYPE_PRAVETS8A: _tcscpy(title, TITLE_PRAVETS_8A); break;
|
||||
}
|
||||
|
||||
@ -739,7 +744,7 @@ LRESULT CALLBACK FrameWndProc (
|
||||
}
|
||||
else if (wparam == VK_F9)
|
||||
{
|
||||
if (GetKeyState(VK_CONTROL) < 0)
|
||||
if (GetKeyState(VK_CONTROL) < 0) //CTRL+F9
|
||||
{
|
||||
g_nCharsetType++; // Cycle through available charsets (Ctrl + F9)
|
||||
if (g_nCharsetType >= 3)
|
||||
@ -1537,6 +1542,7 @@ void FrameCreateWindow ()
|
||||
case A2TYPE_APPLE2E: g_pAppTitle = TITLE_APPLE_2E; break;
|
||||
case A2TYPE_APPLE2EEHANCED: g_pAppTitle = TITLE_APPLE_2E_ENHANCED; break;
|
||||
case A2TYPE_PRAVETS82: g_pAppTitle = TITLE_PRAVETS_82; break;
|
||||
case A2TYPE_PRAVETS8M: g_pAppTitle = TITLE_PRAVETS_8M; break;
|
||||
case A2TYPE_PRAVETS8A: g_pAppTitle = TITLE_PRAVETS_8A; break;
|
||||
}
|
||||
|
||||
|
@ -209,19 +209,34 @@ void KeybQueueKeypress (int key, BOOL bASCII)
|
||||
if (key == '^')
|
||||
keycode = '~';
|
||||
|
||||
if (g_bCapsLock == false) //i.e. cyrillic letters
|
||||
if (g_bCapsLock == false) //cyrillic letters
|
||||
{
|
||||
if (key == '`') keycode = '^';
|
||||
if (key == 92) keycode = '@'; // \ to @
|
||||
if (key == 124) keycode = 92;
|
||||
}
|
||||
else //(g_bCapsLock == true) //i.e. latin letters
|
||||
else //(g_bCapsLock == true) //latin letters
|
||||
{
|
||||
if (key == 91) keycode = 123;
|
||||
if (key == 93) keycode = 125;
|
||||
if (key == 124) keycode = 92;
|
||||
}
|
||||
}
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8M) //Pravets 8M charset is still uncertain
|
||||
{
|
||||
if (g_bCapsLock == false) //cyrillic letters
|
||||
{
|
||||
if (key == '[') keycode = '{';
|
||||
if (key == ']') keycode = '}';
|
||||
if (key == '`') keycode = '~'; //96= key `~
|
||||
if (key == 92) keycode = 96;
|
||||
}
|
||||
else //latin letters
|
||||
{
|
||||
if (key == '`')
|
||||
keycode = '^'; //96= key `~
|
||||
}
|
||||
}
|
||||
//Remap some keys for Pravets8A/C, which has a different charset for Pravtes82/M, whose keys MUST NOT be remapped.
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8A) //&& (g_bCapsLock == false))
|
||||
{
|
||||
|
@ -963,6 +963,7 @@ void MemInitialize()
|
||||
case A2TYPE_APPLE2E: hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_APPLE2E_ROM), "ROM"); ROM_SIZE = Apple2eRomSize; break;
|
||||
case A2TYPE_APPLE2EEHANCED: hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_APPLE2E_ENHANCED_ROM), "ROM"); ROM_SIZE = Apple2eRomSize; break;
|
||||
case A2TYPE_PRAVETS82: hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_PRAVETS_82_ROM), "ROM"); ROM_SIZE = Apple2RomSize; break;
|
||||
case A2TYPE_PRAVETS8M: hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_PRAVETS_8M_ROM), "ROM"); ROM_SIZE = Apple2RomSize; break;
|
||||
case A2TYPE_PRAVETS8A: hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_PRAVETS_8C_ROM), "ROM"); ROM_SIZE = Apple2eRomSize; break;
|
||||
}
|
||||
|
||||
@ -975,7 +976,8 @@ void MemInitialize()
|
||||
case A2TYPE_APPLE2PLUS: _tcscpy(sRomFileName, TEXT("APPLE2_PLUS.ROM")); break;
|
||||
case A2TYPE_APPLE2E: _tcscpy(sRomFileName, TEXT("APPLE2E.ROM")); break;
|
||||
case A2TYPE_APPLE2EEHANCED: _tcscpy(sRomFileName, TEXT("APPLE2E_ENHANCED.ROM")); break;
|
||||
case A2TYPE_PRAVETS82: _tcscpy(sRomFileName, TEXT("PRAVETS82.ROM")); break; //Rom to be changed. Currently an Apple 2E Rom is used, because of the lack of a genuine Pravets82 one.
|
||||
case A2TYPE_PRAVETS82: _tcscpy(sRomFileName, TEXT("PRAVETS82.ROM")); break;
|
||||
case A2TYPE_PRAVETS8M: _tcscpy(sRomFileName, TEXT("PRAVETS8M.ROM")); break;
|
||||
case A2TYPE_PRAVETS8A: _tcscpy(sRomFileName, TEXT("PRAVETS8C.ROM")); break;
|
||||
}
|
||||
|
||||
|
@ -29,16 +29,28 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "StdAfx.h"
|
||||
#pragma hdrstop
|
||||
#include "..\resource\resource.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static DWORD inactivity = 0;
|
||||
static FILE* file = NULL;
|
||||
DWORD const PRINTDRVR_SIZE = APPLE_SLOT_SIZE;
|
||||
TCHAR filepath[MAX_PATH * 2];
|
||||
#define DEFAULT_PRINT_FILENAME "Printer.txt"
|
||||
static char g_szPrintFilename[MAX_PATH] = {0};
|
||||
bool g_bDumpToPrinter = false;
|
||||
bool g_bConvertEncoding = true;
|
||||
bool g_bFilterUnprintable = true;
|
||||
bool g_bPrinterAppend = false;
|
||||
int g_iPrinterIdleLimit = 10;
|
||||
|
||||
//===========================================================================
|
||||
|
||||
static BYTE __stdcall PrintStatus(WORD, WORD, BYTE, BYTE, ULONG);
|
||||
static BYTE __stdcall PrintTransmit(WORD, WORD, BYTE, BYTE value, ULONG);
|
||||
|
||||
|
||||
|
||||
|
||||
VOID PrintLoadRom(LPBYTE pCxRomPeripheral, const UINT uSlot)
|
||||
{
|
||||
HRSRC hResInfo = FindResource(NULL, MAKEINTRESOURCE(IDR_PRINTDRVR_FW), "FIRMWARE");
|
||||
@ -70,10 +82,14 @@ static BOOL CheckPrint()
|
||||
inactivity = 0;
|
||||
if (file == NULL)
|
||||
{
|
||||
TCHAR filepath[MAX_PATH * 2];
|
||||
_tcsncpy(filepath, g_sProgramDir, MAX_PATH);
|
||||
_tcsncat(filepath, _T("Printer.txt"), MAX_PATH);
|
||||
file = fopen(filepath, "wb");
|
||||
//TCHAR filepath[MAX_PATH * 2];
|
||||
//_tcsncpy(filepath, g_sProgramDir, MAX_PATH);
|
||||
//_tcsncat(filepath, _T("Printer.txt"), MAX_PATH);
|
||||
//file = fopen(filepath, "wb");
|
||||
if (g_bPrinterAppend )
|
||||
file = fopen(Printer_GetFilename(), "ab");
|
||||
else
|
||||
file = fopen(Printer_GetFilename(), "wb");
|
||||
}
|
||||
return (file != NULL);
|
||||
}
|
||||
@ -85,6 +101,13 @@ static void ClosePrint()
|
||||
{
|
||||
fclose(file);
|
||||
file = NULL;
|
||||
string ExtendedFileName = "copy \"";
|
||||
ExtendedFileName.append (Printer_GetFilename());
|
||||
ExtendedFileName.append ("\" prn");
|
||||
//if (g_bDumpToPrinter) ShellExecute(NULL, "print", Printer_GetFilename(), NULL, NULL, 0); //Print through Notepad
|
||||
if (g_bDumpToPrinter)
|
||||
system (ExtendedFileName.c_str ()); //Print through console. This is supposed to be the better way, because it shall print images (with older printers only).
|
||||
|
||||
}
|
||||
inactivity = 0;
|
||||
}
|
||||
@ -102,9 +125,10 @@ void PrintUpdate(DWORD totalcycles)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ((inactivity += totalcycles) > (10 * 1000 * 1000)) // around 10 seconds
|
||||
// if ((inactivity += totalcycles) > (Printer_GetIdleLimit () * 1000 * 1000)) //This line seems to give a very big deviation
|
||||
if ((inactivity += totalcycles) > (Printer_GetIdleLimit () * 710000))
|
||||
{
|
||||
// inactive, so close the file (next print will overwrite it)
|
||||
// inactive, so close the file (next print will overwrite or append to it, according to the settings made)
|
||||
ClosePrint();
|
||||
}
|
||||
}
|
||||
@ -125,13 +149,99 @@ static BYTE __stdcall PrintStatus(WORD, WORD, BYTE, BYTE, ULONG)
|
||||
//===========================================================================
|
||||
static BYTE __stdcall PrintTransmit(WORD, WORD, BYTE, BYTE value, ULONG)
|
||||
{
|
||||
char Lat8A[]= "abwgdevzijklmnoprstufhc~{}yx`q|]";
|
||||
char Lat82[]= "abwgdevzijklmnoprstufhc^[]yx@q{}~`";
|
||||
char Kir82[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÜÞß[]^@";
|
||||
char Kir8ACapital[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÜÞßÝ";
|
||||
char Kir8ALowerCase[]= "àáâãäåæçèéêëìíîïðñòóôõö÷øùúüþÿý";
|
||||
bool Pres = false;
|
||||
if (!CheckPrint())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
char c = value & 0x7F;
|
||||
|
||||
char c = NULL;
|
||||
if ((g_Apple2Type == A2TYPE_PRAVETS8A) && g_bConvertEncoding) //This is print conversion for Pravets 8A/C. Print conversion for Pravets82/M is still to be done.
|
||||
{
|
||||
if ((value > 90) && (value < 128)) //This range shall be set more precisely
|
||||
{
|
||||
c = value;
|
||||
int loop = 0;
|
||||
while (loop < 31)
|
||||
{
|
||||
if (c== Lat8A[loop])
|
||||
c= 0 + Kir8ALowerCase [loop] ;
|
||||
loop++;
|
||||
} //End loop
|
||||
}//End if (value < 128)
|
||||
else if ((value >64) && (value <91))
|
||||
{
|
||||
c = value + 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
c = value & 0x7F;
|
||||
int loop = 0;
|
||||
while (loop < 31)
|
||||
{
|
||||
if (c== Lat8A[loop]) c= 0 + Kir8ACapital [loop];
|
||||
loop++;
|
||||
}
|
||||
}
|
||||
} //End if (g_Apple2Type == A2TYPE_PRAVETS8A)
|
||||
else if (((g_Apple2Type == A2TYPE_PRAVETS82) || (g_Apple2Type == A2TYPE_PRAVETS8M)) && g_bConvertEncoding)
|
||||
{
|
||||
c = value & 0x7F;
|
||||
int loop = 0;
|
||||
while (loop < 34)
|
||||
{
|
||||
if (c == Lat82[loop])
|
||||
c= Kir82 [loop];
|
||||
loop++;
|
||||
} //end while
|
||||
}
|
||||
else //Apple II
|
||||
{
|
||||
c = value & 0x7F;
|
||||
}
|
||||
if ((g_bFilterUnprintable == false) || (c>31) || (c==13) || (c==10) || (c<0)) //c<0 is needed for cyrillic characters
|
||||
fwrite(&c, 1, 1, file); //break;
|
||||
|
||||
|
||||
/*else
|
||||
{
|
||||
char c = value & 0x7F;
|
||||
fwrite(&c, 1, 1, file);
|
||||
return 0;
|
||||
}*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
char* Printer_GetFilename()
|
||||
{
|
||||
return g_szPrintFilename;
|
||||
}
|
||||
|
||||
void Printer_SetFilename(char* prtFilename)
|
||||
{
|
||||
if(*prtFilename)
|
||||
strcpy(g_szPrintFilename, (const char *) prtFilename);
|
||||
else //No registry entry is available
|
||||
{
|
||||
_tcsncpy(g_szPrintFilename, g_sProgramDir, MAX_PATH);
|
||||
_tcsncat(g_szPrintFilename, _T(DEFAULT_PRINT_FILENAME), MAX_PATH);
|
||||
RegSaveString(TEXT("Configuration"),REGVALUE_PRINTER_FILENAME,1,g_szPrintFilename);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Printer_GetIdleLimit()
|
||||
{
|
||||
return g_iPrinterIdleLimit;
|
||||
}
|
||||
|
||||
//unsigned int
|
||||
void Printer_SetIdleLimit(unsigned int Duration)
|
||||
{
|
||||
g_iPrinterIdleLimit = Duration;
|
||||
}
|
||||
|
@ -1,6 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
void PrintDestroy();
|
||||
void PrintLoadRom(LPBYTE pCxRomPeripheral, UINT uSlot);
|
||||
void PrintReset();
|
||||
void PrintUpdate(DWORD);
|
||||
void PrintDestroy();
|
||||
void PrintLoadRom(LPBYTE pCxRomPeripheral, UINT uSlot);
|
||||
void PrintReset();
|
||||
void PrintUpdate(DWORD);
|
||||
void Printer_SetFilename(char* pszFilename);
|
||||
char* Printer_GetFilename();
|
||||
void Printer_SetIdleLimit(unsigned int Duration);
|
||||
unsigned int Printer_GetIdleLimit();
|
||||
extern bool g_bDumpToPrinter;
|
||||
extern bool g_bConvertEncoding;
|
||||
extern bool g_bFilterUnprintable;
|
||||
extern bool g_bPrinterAppend;
|
||||
extern int g_iPrinterIdleLimit;
|
||||
extern bool g_bFilterUnprintable;
|
||||
extern bool g_bPrinterAppend;
|
||||
|
||||
|
@ -125,12 +125,14 @@ static UINT g_bEnableFreezeDlgButton = UNDEFINED;
|
||||
|
||||
enum {
|
||||
CLONETYPE_PRAVETS82=0,
|
||||
CLONETYPE_PRAVETS8M,
|
||||
CLONETYPE_PRAVETS8A,
|
||||
CLONETYPE_NUM
|
||||
};
|
||||
DWORD g_uCloneType = CLONETYPE_PRAVETS82 ;
|
||||
|
||||
static TCHAR g_CloneChoices[] = TEXT("Pravets 82\0") // Bulgarian
|
||||
TEXT("Pravets 8M\0") // Bulgarian
|
||||
TEXT("Pravets 8A\0"); // Bulgarian
|
||||
|
||||
|
||||
@ -247,7 +249,8 @@ static eApple2Type GetApple2Type(DWORD NewCompType, DWORD NewCloneType)
|
||||
switch (NewCloneType)
|
||||
{
|
||||
case 0: return A2TYPE_PRAVETS82; break;
|
||||
case 1: return A2TYPE_PRAVETS8A; break;
|
||||
case 1: return A2TYPE_PRAVETS8M; break;
|
||||
case 2: return A2TYPE_PRAVETS8A; break;
|
||||
}
|
||||
default: return A2TYPE_APPLE2EEHANCED;
|
||||
}
|
||||
@ -303,7 +306,7 @@ static void ConfigDlg_OK(HWND window, UINT afterclose)
|
||||
if (NewApple2Type > A2TYPE_CLONE)
|
||||
NewCloneType = NewApple2Type - A2TYPE_CLONE;
|
||||
|
||||
if ((NewApple2Type == A2TYPE_PRAVETS82) || (NewApple2Type == A2TYPE_PRAVETS8A))
|
||||
if ((NewApple2Type == A2TYPE_PRAVETS82) || (NewApple2Type == A2TYPE_PRAVETS8A) || (NewApple2Type == A2TYPE_PRAVETS8M))
|
||||
SAVE(TEXT(REGVALUE_APPLE2_TYPE),A2TYPE_CLONE );
|
||||
else
|
||||
SAVE(TEXT(REGVALUE_APPLE2_TYPE),NewApple2Type );
|
||||
@ -414,7 +417,7 @@ static BOOL CALLBACK ConfigDlgProc (HWND window,
|
||||
CheckRadioButton(window, IDC_AUTHENTIC_SPEED, IDC_CUSTOM_SPEED, IDC_CUSTOM_SPEED); // FirstButton, LastButton, CheckButton
|
||||
break;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
case WM_INITDIALOG: //Init general settings dialog
|
||||
{
|
||||
g_nLastPage = PG_CONFIG;
|
||||
|
||||
@ -426,10 +429,11 @@ static BOOL CALLBACK ConfigDlgProc (HWND window,
|
||||
case A2TYPE_APPLE2E: iApple2String = 2; break;
|
||||
case A2TYPE_APPLE2EEHANCED: iApple2String = 3; break;
|
||||
case A2TYPE_PRAVETS82: iApple2String = 4; break;
|
||||
case A2TYPE_PRAVETS8A: iApple2String = 5; break;
|
||||
case A2TYPE_PRAVETS8M: iApple2String = 5; break;
|
||||
case A2TYPE_PRAVETS8A: iApple2String = 6; break;
|
||||
}
|
||||
|
||||
if ((iApple2String == 4) || (iApple2String == 5))
|
||||
if (iApple2String > 3)
|
||||
FillComboBox(window,IDC_COMPUTER,computerchoices,4);
|
||||
else
|
||||
FillComboBox(window,IDC_COMPUTER,computerchoices,iApple2String);
|
||||
@ -675,7 +679,7 @@ static BOOL CALLBACK InputDlgProc (HWND window,
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
case WM_INITDIALOG: //Init input settings dialog
|
||||
{
|
||||
g_nLastPage = PG_INPUT;
|
||||
|
||||
@ -959,7 +963,7 @@ static BOOL CALLBACK DiskDlgProc (HWND window,
|
||||
|
||||
case IDC_CIDERPRESS_BROWSE:
|
||||
{
|
||||
string CiderPressLoc = BrowseToCiderPress(window, TEXT("Select path to CiderPress"));
|
||||
string CiderPressLoc = BrowseToFile(window, TEXT("Select path to CiderPress"), REGVALUE_CIDERPRESSLOC, TEXT("Applications (*.exe)\0*.exe\0") TEXT("All Files\0*.*\0") );
|
||||
RegSaveString(TEXT("Configuration"),REGVALUE_CIDERPRESSLOC,1,CiderPressLoc.c_str());
|
||||
SendDlgItemMessage(window, IDC_CIDERPRESS_FILENAME, WM_SETTEXT, 0, (LPARAM) CiderPressLoc.c_str());
|
||||
}
|
||||
@ -967,7 +971,7 @@ static BOOL CALLBACK DiskDlgProc (HWND window,
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
case WM_INITDIALOG: //Init disk settings dialog
|
||||
{
|
||||
g_nLastPage = PG_DISK;
|
||||
|
||||
@ -1002,6 +1006,7 @@ static BOOL CALLBACK DiskDlgProc (HWND window,
|
||||
//===========================================================================
|
||||
|
||||
static bool g_bSSNewFilename = false;
|
||||
static char g_szNewFilename[MAX_PATH];
|
||||
static char g_szSSNewDirectory[MAX_PATH];
|
||||
static char g_szSSNewFilename[MAX_PATH];
|
||||
|
||||
@ -1014,7 +1019,7 @@ static void SaveStateUpdate()
|
||||
RegSaveString(TEXT(REG_CONFIG),REGVALUE_SAVESTATE_FILENAME,1,Snapshot_GetFilename());
|
||||
|
||||
if(g_szSSNewDirectory[0])
|
||||
RegSaveString(TEXT(REG_PREFS),REGVALUE_PREF_START_DIR,1,g_szSSNewDirectory);
|
||||
RegSaveString(TEXT("Preferences"),REGVALUE_PREF_START_DIR,1,g_szSSNewDirectory); RegSaveString(TEXT("Preferences"),REGVALUE_PREF_START_DIR,1,g_szSSNewDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1106,17 +1111,31 @@ static void AdvancedDlg_OK(HWND window, UINT afterclose)
|
||||
szFilename[nLineLength] = 0x00;
|
||||
|
||||
SaveStateUpdate();
|
||||
RegSaveString(TEXT("Configuration"),REGVALUE_PRINTER_FILENAME,1,Printer_GetFilename());
|
||||
// PrinterStateUpdate();
|
||||
|
||||
g_bSaveStateOnExit = IsDlgButtonChecked(window, IDC_SAVESTATE_ON_EXIT) ? true : false;
|
||||
|
||||
SAVE(TEXT(REGVALUE_SAVE_STATE_ON_EXIT), g_bSaveStateOnExit ? 1 : 0);
|
||||
g_bDumpToPrinter = IsDlgButtonChecked(window, IDC_DUMPTOPRINTER ) ? true : false;
|
||||
SAVE(TEXT(REGVALUE_DUMP_TO_PRINTER), g_bDumpToPrinter ? 1 : 0);
|
||||
g_bConvertEncoding = IsDlgButtonChecked(window, IDC_PRINTER_CONVERT_ENCODING ) ? true : false;
|
||||
SAVE(TEXT(REGVALUE_CONVERT_ENCODING), g_bConvertEncoding ? 1 : 0);
|
||||
|
||||
g_bFilterUnprintable = IsDlgButtonChecked(window, IDC_PRINTER_FILTER_UNPRINTABLE ) ? true : false;
|
||||
SAVE(TEXT(REGVALUE_FILTER_UNPRINTABLE), g_bFilterUnprintable ? 1 : 0);
|
||||
|
||||
g_bPrinterAppend = IsDlgButtonChecked(window, IDC_PRINTER_APPEND) ? true : false;
|
||||
SAVE(TEXT(REGVALUE_PRINTER_APPEND), g_bPrinterAppend ? 1 : 0);
|
||||
//
|
||||
|
||||
DWORD NewCloneType = (DWORD)SendDlgItemMessage(window, IDC_CLONETYPE, CB_GETCURSEL, 0, 0);
|
||||
|
||||
SAVE(TEXT(REGVALUE_CLONETYPE), NewCloneType);
|
||||
SAVE(TEXT(REGVALUE_THE_FREEZES_F8_ROM),g_uTheFreezesF8Rom); // NB. Can also be disabled on Config page (when Apple2Type changes)
|
||||
|
||||
Printer_SetIdleLimit((short)SendDlgItemMessage(window, IDC_SPIN_PRINTER_IDLE , UDM_GETPOS, 0, 0));
|
||||
SAVE(TEXT(REGVALUE_PRINTER_IDLE_LIMIT),Printer_GetIdleLimit());
|
||||
|
||||
eApple2Type NewApple2Clone = GetApple2Type(4, NewCloneType);
|
||||
|
||||
@ -1215,6 +1234,15 @@ static BOOL CALLBACK AdvancedDlgProc (HWND window,
|
||||
if(SaveStateSelectImage(window, TEXT("Select Save State file"), true))
|
||||
SendDlgItemMessage(window, IDC_SAVESTATE_FILENAME, WM_SETTEXT, 0, (LPARAM) g_szSSNewFilename);
|
||||
break;
|
||||
case IDC_DUMP_FILENAME_BROWSE:
|
||||
{
|
||||
char PrinterDumpLoc[MAX_PATH] = {0};
|
||||
strcpy(PrinterDumpLoc, BrowseToFile (window, TEXT("Select printer dump file"), REGVALUE_PRINTER_FILENAME, TEXT("Text files (*.txt)\0*.txt\0") TEXT("All Files\0*.*\0")).c_str());
|
||||
RegSaveString(TEXT("Configuration"),REGVALUE_PRINTER_FILENAME,1,PrinterDumpLoc);
|
||||
SendDlgItemMessage(window, IDC_DUMP_FILENAME, WM_SETTEXT, 0, (LPARAM) PrinterDumpLoc);
|
||||
Printer_SetFilename (PrinterDumpLoc);
|
||||
}
|
||||
break;
|
||||
case IDC_SAVESTATE_ON_EXIT:
|
||||
break;
|
||||
case IDC_SAVESTATE:
|
||||
@ -1249,13 +1277,20 @@ static BOOL CALLBACK AdvancedDlgProc (HWND window,
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_INITDIALOG:
|
||||
case WM_INITDIALOG: //Init advanced settings dialog
|
||||
{
|
||||
g_nLastPage = PG_ADVANCED;
|
||||
|
||||
SendDlgItemMessage(window,IDC_SAVESTATE_FILENAME,WM_SETTEXT,0,(LPARAM)Snapshot_GetFilename());
|
||||
|
||||
CheckDlgButton(window, IDC_SAVESTATE_ON_EXIT, g_bSaveStateOnExit ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(window, IDC_DUMPTOPRINTER, g_bDumpToPrinter ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(window, IDC_PRINTER_CONVERT_ENCODING, g_bConvertEncoding ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(window, IDC_PRINTER_FILTER_UNPRINTABLE, g_bFilterUnprintable ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(window, IDC_PRINTER_APPEND, g_bPrinterAppend ? BST_CHECKED : BST_UNCHECKED);
|
||||
SendDlgItemMessage(window, IDC_SPIN_PRINTER_IDLE, UDM_SETRANGE, 0, MAKELONG(999,0));
|
||||
SendDlgItemMessage(window, IDC_SPIN_PRINTER_IDLE, UDM_SETPOS, 0, MAKELONG(Printer_GetIdleLimit (),0));
|
||||
SendDlgItemMessage(window,IDC_DUMP_FILENAME,WM_SETTEXT,0,(LPARAM)Printer_GetFilename());
|
||||
|
||||
FillComboBox(window, IDC_CLONETYPE, g_CloneChoices, g_uCloneType);
|
||||
InitFreezeDlgButton(window);
|
||||
@ -1587,39 +1622,50 @@ bool PSP_SaveStateSelectImage(HWND hWindow, bool bSave)
|
||||
|
||||
//===========================================================================
|
||||
|
||||
static string BrowseToCiderPress (HWND hWindow, TCHAR* pszTitle)
|
||||
string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS)
|
||||
{
|
||||
static char PathToFile[MAX_PATH] = {0}; //This is a really awkward way to prevent mixing CiderPress and SaveStated values (RAPCS), but it seem the quickest. Here is its Line 1.
|
||||
strcpy(PathToFile, Snapshot_GetFilename()); //RAPCS, line 2.
|
||||
TCHAR szDirectory[MAX_PATH] = TEXT("");
|
||||
TCHAR szCPFilename[MAX_PATH] = TEXT("");
|
||||
RegLoadString(TEXT("Configuration"), REGVALUE_CIDERPRESSLOC, 1, szCPFilename ,MAX_PATH);
|
||||
string PathName = szCPFilename;
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
strcpy(szFilename, "");
|
||||
RegLoadString(TEXT("Configuration"), REGVALUE, 1, szFilename ,MAX_PATH);
|
||||
string PathName = szFilename;
|
||||
|
||||
OPENFILENAME ofn;
|
||||
ZeroMemory(&ofn,sizeof(OPENFILENAME));
|
||||
|
||||
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.hwndOwner = hWindow;
|
||||
ofn.hInstance = g_hInstance;
|
||||
ofn.lpstrFilter = TEXT("Applications (*.exe)\0*.exe\0")
|
||||
TEXT("All Files\0*.*\0");
|
||||
ofn.lpstrFile = szCPFilename;
|
||||
ofn.lpstrFilter = FILEMASKS;
|
||||
/*ofn.lpstrFilter = TEXT("Applications (*.exe)\0*.exe\0")
|
||||
TEXT("Text files (*.txt)\0*.txt\0")
|
||||
TEXT("All Files\0*.*\0");*/
|
||||
ofn.lpstrFile = szFilename;
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
ofn.lpstrInitialDir = szDirectory;
|
||||
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
|
||||
ofn.lpstrTitle = pszTitle;
|
||||
|
||||
|
||||
int nRes = GetOpenFileName(&ofn);
|
||||
if(nRes) //Okay is pressed
|
||||
{
|
||||
SetCurrentImageDir(); // Reset, since GetOpenFileName() will've changed curr dir
|
||||
PathName = szCPFilename;
|
||||
strcpy(g_szNewFilename, &szFilename[ofn.nFileOffset]);
|
||||
|
||||
szFilename[ofn.nFileOffset] = 0;
|
||||
if (_tcsicmp(szDirectory, szFilename))
|
||||
strcpy(g_szSSNewDirectory, szFilename);
|
||||
|
||||
PathName = szFilename;
|
||||
PathName.append (g_szNewFilename);
|
||||
}
|
||||
else //Cancel is pressed.
|
||||
{
|
||||
RegLoadString(TEXT("Configuration"), REGVALUE_CIDERPRESSLOC, 1, szCPFilename, MAX_PATH);
|
||||
PathName = szCPFilename;
|
||||
RegLoadString(TEXT("Configuration"), REGVALUE, 1, szFilename,MAX_PATH);
|
||||
PathName = szFilename;
|
||||
}
|
||||
|
||||
strcpy(g_szNewFilename, PathToFile); //RAPCS, line 3 (last).
|
||||
return PathName;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ bool PSP_SaveStateSelectImage(HWND hWindow, bool bSave);
|
||||
void ui_tfe_settings_dialog(HWND hwnd);
|
||||
void * get_tfe_interface(void);
|
||||
void get_tfe_enabled(int *tfe_enabled);
|
||||
string BrowseToCiderPress (HWND hWindow, TCHAR* pszTitle);
|
||||
string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE, TCHAR* FILEMASKS);
|
||||
|
||||
extern UINT g_uScrollLockToggle;
|
||||
extern UINT g_uMouseInSlot4;
|
||||
|
@ -1047,12 +1047,13 @@ HBRUSH CreateCustomBrush(COLORREF nColor)
|
||||
//===========================================================================
|
||||
void DrawMonoTextSource (HDC hDstDC)
|
||||
{
|
||||
static HBITMAP hCharBitmap[3];
|
||||
static HBITMAP hCharBitmap[4];
|
||||
HDC hSrcDC = CreateCompatibleDC(hDstDC);
|
||||
|
||||
hCharBitmap[0] = LoadBitmap(g_hInstance,TEXT("CHARSET40"));
|
||||
hCharBitmap[1] = LoadBitmap(g_hInstance,TEXT("CHARSET82"));
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET8C"));
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET8C")); //Pravets 8M probably has the same charset as Pravets 8C
|
||||
hCharBitmap[3] = LoadBitmap(g_hInstance,TEXT("CHARSET8C"));
|
||||
|
||||
HBRUSH hBrush;
|
||||
switch (videotype)
|
||||
@ -1081,11 +1082,12 @@ void DrawMonoTextSource (HDC hDstDC)
|
||||
void DrawTextSource (HDC dc)
|
||||
{
|
||||
HDC memdc = CreateCompatibleDC(dc);
|
||||
static HBITMAP hCharBitmap[3];
|
||||
static HBITMAP hCharBitmap[4];
|
||||
//The charset is set below
|
||||
hCharBitmap[0] = LoadBitmap(g_hInstance,TEXT("CHARSET40"));
|
||||
hCharBitmap[1] = LoadBitmap(g_hInstance,TEXT("CHARSET82"));
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET8C"));
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET8C")); //Pravets 8M probably has the same charset as Pravets 8C
|
||||
hCharBitmap[3] = LoadBitmap(g_hInstance,TEXT("CHARSET8C"));
|
||||
SelectObject(memdc,hCharBitmap[g_nCharsetType]);
|
||||
|
||||
BitBlt(
|
||||
|
Loading…
Reference in New Issue
Block a user