Compare commits
33 Commits
v4.0.5-d1a
...
master
Author | SHA1 | Date |
---|---|---|
Andy McFadden | fc2fc1429d | |
Andy McFadden | 53c4050b09 | |
Andy McFadden | e4cf9d8ba5 | |
Andy McFadden | 118b306e11 | |
Andy McFadden | 1d53e4bcae | |
polluks | 508475a094 | |
Andy McFadden | a1218a8dcb | |
Andy McFadden | 0790c97ee2 | |
Andy McFadden | 5f5c089506 | |
Andy McFadden | f63738444c | |
Andy McFadden | 2cb5bf0dcc | |
Andy McFadden | b42cc8efe9 | |
Andy McFadden | 5950cb7c74 | |
Andy McFadden | b87037b75e | |
Andy McFadden | d39c61255c | |
Andy McFadden | e098069b10 | |
Andy McFadden | 6de7cfefc0 | |
Andy McFadden | e782a9df6e | |
Andy McFadden | 4235b47748 | |
Andy McFadden | eff69cce86 | |
Andy McFadden | adaeb2c6eb | |
Andy McFadden | 8a6a4ada5c | |
Andy McFadden | 295d9c269c | |
Andy McFadden | 9698f46eae | |
Andy McFadden | 17689a7b23 | |
Andy McFadden | 1f17f9747d | |
Andy McFadden | 0a317cb0e7 | |
Andy McFadden | 27cefa61d3 | |
mlong | 8813a5efd9 | |
mlong | dcefd2d2b6 | |
mlong | db3ca0a8ca | |
mlong | fd4ac77bcf | |
mlong | 95c0ec7348 |
|
@ -1,28 +1,402 @@
|
|||
# build product output directories (top-level and component)
|
||||
Debug
|
||||
Release
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# precompiled headers
|
||||
ipch
|
||||
|
||||
# binaries generated by Visual Studio
|
||||
CP.sdf
|
||||
CP.opensdf
|
||||
CP.v12.suo
|
||||
*.aps
|
||||
.vs/
|
||||
|
||||
# installer binary
|
||||
# CiderPress-specific
|
||||
DIST/Setup*.exe
|
||||
DIST/CiderPress*.zip
|
||||
|
||||
# linux binaries
|
||||
*.o
|
||||
diskimg/libdiskimg.a
|
||||
diskimg/libhfs/libhfs.a
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# ctags
|
||||
tags
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# VIM
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.swp
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
|
BIN
DIST/mfc120u.dll
BIN
DIST/mfc120u.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,14 +1,14 @@
|
|||
DeployMaster Installation Script
|
||||
630
|
||||
720
|
||||
faddenSoft
|
||||
http://www.faddensoft.com/
|
||||
CiderPress
|
||||
http://a2ciderpress.com/
|
||||
4.0.5-d1
|
||||
4.1.1
|
||||
TRUE
|
||||
44046
|
||||
45058
|
||||
C:\DATA\faddenSoft\fs.ico
|
||||
Copyright © 2020 CiderPress project authors. All rights reserved.
|
||||
Copyright © 2023 CiderPress project authors. All rights reserved.
|
||||
C:\Src\CiderPress\DIST\ReadMe.txt
|
||||
C:\Src\CiderPress\DIST\License.txt
|
||||
FALSE
|
||||
|
@ -33,8 +33,8 @@ FALSE
|
|||
FALSE
|
||||
FALSE
|
||||
FALSE
|
||||
TRUE
|
||||
TRUE
|
||||
FALSE
|
||||
FALSE
|
||||
TRUE
|
||||
TRUE
|
||||
TRUE
|
||||
|
@ -42,6 +42,9 @@ TRUE
|
|||
1507
|
||||
9999
|
||||
TRUE
|
||||
21H2
|
||||
9999
|
||||
TRUE
|
||||
1
|
||||
You are attempting to run the installer for %APP% %VERSION%. This installer supports the following versions of Windows: %INSTALLER%. You are running %USER%. Please check the developer's website to see whether there is a separate installer for %APP% that you can use on %USER%.
|
||||
FALSE
|
||||
|
@ -185,16 +188,16 @@ FALSE
|
|||
1
|
||||
FALSE
|
||||
+
|
||||
C:\Src\ciderpress\DIST\mfc120u.dll
|
||||
C:\Src\ciderpress\DIST\mfc140u.dll
|
||||
3
|
||||
0
|
||||
1
|
||||
TRUE
|
||||
TRUE
|
||||
FALSE
|
||||
FALSE
|
||||
C:\Src\ciderpress\DIST\msvcr120.dll
|
||||
C:\Src\ciderpress\DIST\vcruntime140.dll
|
||||
3
|
||||
0
|
||||
1
|
||||
TRUE
|
||||
TRUE
|
||||
FALSE
|
||||
|
@ -396,9 +399,12 @@ FALSE
|
|||
4095
|
||||
|
||||
|
||||
Setup405d1.exe
|
||||
Setup411.exe
|
||||
|
||||
FALSE
|
||||
|
||||
|
||||
TRUE
|
||||
FALSE
|
||||
FALSE
|
||||
|
||||
|
|
44
README.md
44
README.md
|
@ -2,7 +2,10 @@ CiderPress
|
|||
==========
|
||||
|
||||
A Windows utility for managing Apple II file archives and disk images.
|
||||
Visit the web site at http://a2ciderpress.com/.
|
||||
Visit the web site at https://a2ciderpress.com/
|
||||
(or https://fadden.github.io/ciderpress).
|
||||
|
||||
**NEW!** CiderPress II is now available from [github](https://github.com/fadden/CiderPress2).
|
||||
|
||||
CiderPress was initially sold by faddenSoft, LLC as a shareware product,
|
||||
starting in March 2003. In March 2007, the program was released as
|
||||
|
@ -71,16 +74,9 @@ is not acceptable, you can remove HFS disk image support from CiderPress
|
|||
Building the Sources
|
||||
--------------------
|
||||
|
||||
The current version of CiderPress is targeted for Visual Studio 2013,
|
||||
using the WinXP compatibility Platform Toolset to allow installation on
|
||||
Windows XP systems. You should be able to select Debug or Release and
|
||||
just build the entire thing. The project files have been updated so
|
||||
that VS2015 Community Edition will accept them, but the new "universal CRT"
|
||||
causes problems with WinXP, so the build files still require the older
|
||||
set of tools.
|
||||
|
||||
If you want to use the static analyzer, you will need to change the
|
||||
Platform Toolset to straight Visual Studio 2013.
|
||||
The current version of CiderPress is targeted for Visual Studio 2019
|
||||
Community Edition (i.e. the free version). You should be able to select
|
||||
Debug or Release and just build the entire thing.
|
||||
|
||||
A pre-compiled .CHM file, with the help text and pop-up messages,
|
||||
is provided. The source files are all included, but generation of the
|
||||
|
@ -88,7 +84,7 @@ is provided. The source files are all included, but generation of the
|
|||
you will need to download the HTML Help Workshop from Microsoft, and use
|
||||
that to compile the help project in the app/Help directory.
|
||||
|
||||
The installer binary is created with [DeployMaster](http://deploymaster.com/).
|
||||
The installer binary is created with [DeployMaster](https://deploymaster.com/).
|
||||
|
||||
|
||||
Building for Linux
|
||||
|
@ -170,8 +166,8 @@ Miscellaneous utility functions.
|
|||
|
||||
#### NufxLib and zlib ####
|
||||
|
||||
These are source snapshots from [NufxLib](http://github.com/fadden/nulib2)
|
||||
and [zlib](http://www.zlib.org).
|
||||
These are source snapshots from [NufxLib](https://github.com/fadden/nulib2)
|
||||
and [zlib](https://zlib.net).
|
||||
|
||||
#### DIST ####
|
||||
|
||||
|
@ -179,7 +175,7 @@ Files used when making a distribution, notably:
|
|||
|
||||
- the DeployMaster configuration file
|
||||
- the license and README files that are included in the installer
|
||||
- redistributable Windows runtime libraries (only needed on WinXP?)
|
||||
- redistributable Windows runtime libraries
|
||||
- NiftyList data file
|
||||
|
||||
|
||||
|
@ -221,20 +217,16 @@ are expected to build on Linux, so converting them is a bit of a pain. At
|
|||
some point it may be necessary to support Unicode fully. v4.0 did a lot of
|
||||
code reorganization to make this easier, as did NufxLib v3.0.
|
||||
|
||||
4. Windows XP support. The default Visual Studio 2013 configuration creates
|
||||
executables that do not work in Windows XP. CiderPress uses a compatibility
|
||||
toolset and packs about 5MB of additional DLLs (mfc120u.dll, msvcr120.dll) in
|
||||
the install package to keep things working. Visual Studio 2015 shipped with a
|
||||
new "Universal CRT" that requires more effort and disk space. At some point
|
||||
it may not be possible to support WinXP, or building for WinXP will prevent
|
||||
something from working. The good news is that, for the current round of
|
||||
tools, it's possible to build a single binary that works fully on WinXP and
|
||||
later systems.
|
||||
|
||||
5. Installer magic. Security improvements and changes like the Win8 "Metro"
|
||||
4. Installer magic. Security improvements and changes like the Win8 "Metro"
|
||||
launcher affect the way apps are installed and launched. So far the only
|
||||
impact on CiderPress was to the file association handling (the stuff that
|
||||
allows you to double-click a file and have CiderPress open it), but it's
|
||||
likely that future OS changes will require matching app changes. The use
|
||||
of DeployMaster is helpful here, as it has been kept up-to-date with changes
|
||||
in Windows.
|
||||
|
||||
[ENDED] Windows XP support. Starting with the Visual Studio 2013 tools,
|
||||
building an app that would work under WinXP required jumping through some
|
||||
hoops. Microsoft's support for WinXP officially ended in April 2014.
|
||||
CiderPress continued to support WinXP for several years, but support has been
|
||||
dropped due to the added testing and maintenance burdens.
|
||||
|
|
|
@ -28,14 +28,8 @@ public:
|
|||
kActionConvFile,
|
||||
} Action;
|
||||
|
||||
ActionProgressDialog(void) {
|
||||
fAction = kActionUnknown;
|
||||
//fpSelSet = NULL;
|
||||
//fpOptionsDlg = NULL;
|
||||
fCancel = false;
|
||||
//fResult = 0;
|
||||
}
|
||||
virtual ~ActionProgressDialog(void) {}
|
||||
ActionProgressDialog(void) : fAction(kActionUnknown), fCancel(false) { }
|
||||
virtual ~ActionProgressDialog(void) { }
|
||||
|
||||
BOOL Create(Action action, CWnd* pParentWnd = NULL) {
|
||||
fAction = action;
|
||||
|
|
|
@ -227,7 +227,7 @@ BEGIN
|
|||
PUSHBUTTON "Enter registration code",IDC_ABOUT_ENTER_REG,157,132,86,14
|
||||
CONTROL IDB_FSLOGO,IDC_STATIC,"Static",SS_BITMAP,7,6,64,59
|
||||
LTEXT "CiderPress v%d.%d.%d%ls%ls",IDC_CIDERPRESS_VERS_TEXT,77,7,167,9
|
||||
LTEXT "Copyright © 2017 by CiderPress project authors.\rAll Rights Reserved.",IDC_STATIC,77,20,167,19
|
||||
LTEXT "Copyright © 2021 by CiderPress project authors.\rAll Rights Reserved.",IDC_STATIC,77,20,167,19
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,77,45,20,20
|
||||
ICON IDI_FILE_NUFX,IDC_STATIC,106,45,20,20
|
||||
ICON IDI_FILE_BINARY2,IDC_STATIC,136,45,20,20
|
||||
|
|
|
@ -459,7 +459,7 @@ CString MainWindow::CopyToCollection(GenericEntry* pEntry, void** pBuf,
|
|||
memset(&collEnt, 0x99, sizeof(collEnt));
|
||||
collEnt.signature = kEntrySignature;
|
||||
collEnt.dataOffset = sizeof(collEnt);
|
||||
collEnt.fileNameLen = (wcslen(pEntry->GetPathNameUNI()) +1) * sizeof(WCHAR);
|
||||
collEnt.fileNameLen = (uint16_t)((wcslen(pEntry->GetPathNameUNI()) +1) * sizeof(WCHAR));
|
||||
if (pEntry->GetRecordKind() == GenericEntry::kRecordKindDirectory) {
|
||||
collEnt.dataLen = collEnt.rsrcLen = collEnt.cmmtLen = 0;
|
||||
} else {
|
||||
|
|
|
@ -1798,8 +1798,8 @@ bail:
|
|||
|
||||
DIError DiskArchive::AddForksToDisk(DiskFS* pDiskFS,
|
||||
const DiskFS::CreateParms* pParms,
|
||||
const unsigned char* dataBuf, long dataLen,
|
||||
const unsigned char* rsrcBuf, long rsrcLen) const
|
||||
const uint8_t* dataBuf, long dataLen,
|
||||
const uint8_t* rsrcBuf, long rsrcLen) const
|
||||
{
|
||||
DIError dierr = kDIErrNone;
|
||||
const int kFileTypeBIN = 0x06;
|
||||
|
|
|
@ -64,8 +64,14 @@ private:
|
|||
*/
|
||||
class DiskArchive : public GenericArchive {
|
||||
public:
|
||||
DiskArchive(void) : fpPrimaryDiskFS(NULL), fIsReadOnly(false),
|
||||
fpAddDataHead(NULL), fpAddDataTail(NULL)
|
||||
DiskArchive(void) :
|
||||
fpPrimaryDiskFS(NULL),
|
||||
fIsReadOnly(false),
|
||||
fpAddDataHead(NULL),
|
||||
fpAddDataTail(NULL),
|
||||
fOverwriteExisting(false),
|
||||
fOverwriteNoAsk(false),
|
||||
fpXferTargetFS(NULL)
|
||||
{}
|
||||
virtual ~DiskArchive(void) { (void) Close(); }
|
||||
|
||||
|
|
|
@ -186,11 +186,11 @@ private:
|
|||
class SectorEditDialog : public DiskEditDialog {
|
||||
public:
|
||||
SectorEditDialog(CWnd* pParentWnd = NULL) :
|
||||
DiskEditDialog(IDD_DISKEDIT, pParentWnd)
|
||||
{
|
||||
fTrack = 0;
|
||||
fSector = 0;
|
||||
}
|
||||
DiskEditDialog(IDD_DISKEDIT, pParentWnd),
|
||||
fTrack(0),
|
||||
fSector(0),
|
||||
fSectorData()
|
||||
{ }
|
||||
virtual ~SectorEditDialog() {}
|
||||
|
||||
virtual int LoadData(void) override; // load the current track/sector
|
||||
|
@ -234,11 +234,15 @@ protected:
|
|||
class SectorFileEditDialog : public SectorEditDialog {
|
||||
public:
|
||||
SectorFileEditDialog(SectorEditDialog* pSectEdit, CWnd* pParentWnd = NULL):
|
||||
SectorEditDialog(pParentWnd)
|
||||
SectorEditDialog(pParentWnd),
|
||||
fOpenRsrcFork(false),
|
||||
fpFile(NULL),
|
||||
fpOpenFile(NULL),
|
||||
fSectorIdx(0),
|
||||
fLength(0)
|
||||
{
|
||||
DiskEditDialog::Setup(pSectEdit->GetDiskFS(),
|
||||
pSectEdit->GetFileName());
|
||||
fSectorIdx = 0;
|
||||
}
|
||||
virtual ~SectorFileEditDialog() {}
|
||||
|
||||
|
@ -326,7 +330,12 @@ protected:
|
|||
class BlockFileEditDialog : public BlockEditDialog {
|
||||
public:
|
||||
BlockFileEditDialog(BlockEditDialog* pBlockEdit, CWnd* pParentWnd = NULL) :
|
||||
BlockEditDialog(pParentWnd)
|
||||
BlockEditDialog(pParentWnd),
|
||||
fOpenRsrcFork(false),
|
||||
fpFile(NULL),
|
||||
fpOpenFile(NULL),
|
||||
fBlockIdx(0),
|
||||
fLength(0)
|
||||
{
|
||||
DiskEditDialog::Setup(pBlockEdit->GetDiskFS(),
|
||||
pBlockEdit->GetFileName());
|
||||
|
@ -379,10 +388,11 @@ private:
|
|||
class NibbleEditDialog : public DiskEditDialog {
|
||||
public:
|
||||
NibbleEditDialog(CWnd* pParentWnd = NULL) :
|
||||
DiskEditDialog(IDD_DISKEDIT, pParentWnd)
|
||||
{
|
||||
fTrack = 0;
|
||||
}
|
||||
DiskEditDialog(IDD_DISKEDIT, pParentWnd),
|
||||
fTrack(0),
|
||||
fNibbleData(),
|
||||
fNibbleDataLen(0)
|
||||
{ }
|
||||
virtual ~NibbleEditDialog() {}
|
||||
|
||||
virtual int LoadData(void) override; // load the current track/sector
|
||||
|
|
|
@ -17,7 +17,12 @@
|
|||
class EOLScanDialog : public CDialog {
|
||||
public:
|
||||
EOLScanDialog(CWnd* pParentWnd = NULL) :
|
||||
CDialog(IDD_EOLSCAN, pParentWnd)
|
||||
CDialog(IDD_EOLSCAN, pParentWnd),
|
||||
fCountChars(0),
|
||||
fCountCR(0),
|
||||
fCountLF(0),
|
||||
fCountCRLF(0),
|
||||
fCountHighASCII(0)
|
||||
{}
|
||||
virtual ~EOLScanDialog(void) {}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -508,7 +508,7 @@ The file type, displayed as its hexadecimal code and the common three-letter mne
|
|||
Tip: clicking in the file type box and then typing a letter takes you to the next entry whose mnemonic begins with that letter. This can make it easier to find an entry by "name".
|
||||
|
||||
.topic IDH_PROPS_AUXTYPE
|
||||
The file's auxilliary type. Sometimes used to indicate information about the file (such as a 'BIN' load address), sometimes used to distinguish between files with the same file type (such as the various application-specific 'CFG' config file formats).
|
||||
The file's auxiliary type. Sometimes used to indicate information about the file (such as a 'BIN' load address), sometimes used to distinguish between files with the same file type (such as the various application-specific 'CFG' config file formats).
|
||||
|
||||
Enter a four-digit hexadecimal number.
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2"> GetPort():@Port</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2"> FreeMem():FreeBytes/4</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">A "/" and a digit after a parmeter means it takes the specified number</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">A "/" and a digit after a parameter means it takes the specified number</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">of bytes. (When making a tool call, you must push space on the stack</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">for any result values *before* pushing the input values.)</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">When CiderPress encounters data that it can't interpret, it stops trying to read from that section of the WAV file. For this reason, damaged entries will usually be shorter than undamaged ones. If a file appears to have the correct length but the checksum still doesn't match, it means the signal was sufficiently distorted to make a '0' bit look like a '1' bit, which is actually pretty hard to do. In most cases the decoder will either make an accurate determination or will conclude that the signal is too distorted to process. So far only one case has been found where the checksum was deliberately altered, as part of a copy protection scheme (Sargon II).</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">If the tape has more than one program on it, you can usually tell if it's multiple copies of the same thing by comparing lengths and checksums. If the checkums say "good" but have different values, you probably have two different programs, or two slightly different versions of the same program.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">If the tape has more than one program on it, you can usually tell if it's multiple copies of the same thing by comparing lengths and checksums. If the checksums say "good" but have different values, you probably have two different programs, or two slightly different versions of the same program.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"><B>Saving the Data</B></FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The pathname and modification date will be displayed but may not be changed. (To change the pathname, use the <A HREF="t42.htm">rename</A> feature.) The file type will be shown in the drop-down box, and may be changed by selecting a new entry. Tip: if you click in the drop box and type a letter, you will move to the next entry that begins with that letter. This can make it easier to find a file type by its three-letter abbreviation.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The auxilliary type (usually called "aux type") is shown as a 4-digit hexadecimal number, and may be edited freely.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The auxiliary type (usually called "aux type") is shown as a 4-digit hexadecimal number, and may be edited freely.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The type description is based on both the file type and the aux type. For example, type "LBR $E0" with aux type "8002" is listed as a "ShrinkIt (NuFX) document" in the Apple File Type Notes.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">There are actually three formats here. All of them convert common symbols and accented characters from the IIgs fonts to Windows fonts. Not all of the symbols have equivalents, but many of them do. Text written in languages other than English should convert correctly.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The supported formats are:</FONT></P>
|
||||
<UL STYLE="margin-top:0;margin-bottom:0;margin-left:10pt;"><LI><FONT FACE="MS Sans Serif" SIZE="2">Teach document (GWP $5445). The "Teach" application on the Apple IIgs created these, which have text in the data fork and formatting information in the resource fork. Font size and style changes are supported, accented characters are converted, and an attempt is made to convert the typeface to something similar to the original. The results are ususally pretty good.</FONT>
|
||||
<UL STYLE="margin-top:0;margin-bottom:0;margin-left:10pt;"><LI><FONT FACE="MS Sans Serif" SIZE="2">Teach document (GWP $5445). The "Teach" application on the Apple IIgs created these, which have text in the data fork and formatting information in the resource fork. Font size and style changes are supported, accented characters are converted, and an attempt is made to convert the typeface to something similar to the original. The results are usually pretty good.</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">AppleWorks GS Word Processor (GWP $8010). Same basic features as "Teach", plus some basic formatting features like centered and justified paragraphs. The "header" and "footer" sections are displayed at the top of the converted document.</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Generic (GWP, any aux type except the two above). Does a IIgs text conversion without any other reformatting. If you have a text file that uses symbols or accented characters from the IIgs font values, you can change its file type to GWP to enable this converter.</FONT></UL>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
@ -118,7 +118,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"><B>Super Hi-Res Graphics (PIC/PNT or 32K BIN, 320/640x200)</B></FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">First introduced on the Apple IIgs, Super-Res was the first mode largely devoid of video idiosyncracies. When you set pixels to certain colors, the output on an RGB monitor was exactly what you expected. The resolution, which could be changed on every line, was 200 lines of either 320 pixels across with 4 bits of color per pixel, or 640 pixels across with 2 bits of color per pixel. The way colors in the file were translated to colors on screen involves some minor color palette gymnastics. The output of the converter is a 256-color 640x400 BMP.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">First introduced on the Apple IIgs, Super-Res was the first mode largely devoid of video idiosyncrasies. When you set pixels to certain colors, the output on an RGB monitor was exactly what you expected. The resolution, which could be changed on every line, was 200 lines of either 320 pixels across with 4 bits of color per pixel, or 640 pixels across with 2 bits of color per pixel. The way colors in the file were translated to colors on screen involves some minor color palette gymnastics. The output of the converter is a 256-color 640x400 BMP.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Super-Res images were also the first to be regularly compressed, which isn't surprising since they're 4x as large as standard hi-res. CiderPress can convert images in the following formats:</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">One caution: if you format a disk for ProDOS, and then format it with your camera, you may find that it still appears to have some ProDOS files on it. (CiderPress should identify it as an MS-DOS "FAT" filesystem, but if the camera uses a non-standard boot block it may not be detected correctly.) Some files may appear to be damaged. This is because the camera's format routine didn't zero out all of the blocks, so some of the ProDOS directory structure is still present. Attempting to read or write files to the volume as if it were a ProDOS disk is not recommended. The safe way to switch between Apple II and Windows formatting is to use the image-copy tool to overwrite the entire CF card. Be aware that formatting with a camera can reduce the number of blocks available on the drive, which will make copying images onto it impossible: the image copier only works if the destination volume is at least as large as the source volume.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The speed at which CF cards are read or written depends primarly on your card reader. USB2.0 readers will be faster than USB1.x, and Firewire, PCMCIA, or IDE interfaces will usually be faster than USB2.0. Also, some cards have a higher speed rating than others. Speeds of 200-400KB/sec are typical when copying from a USB1.x device, while writing to it may reach 700KB/sec. Writing tends to be faster than reading because of block caching.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The speed at which CF cards are read or written depends primarily on your card reader. USB2.0 readers will be faster than USB1.x, and Firewire, PCMCIA, or IDE interfaces will usually be faster than USB2.0. Also, some cards have a higher speed rating than others. Speeds of 200-400KB/sec are typical when copying from a USB1.x device, while writing to it may reach 700KB/sec. Writing tends to be faster than reading because of block caching.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">CiderPress assumes that the first partition on a CFFA card will be ProDOS or HFS. If it's not, the image will not be detected as CFFA.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"> </FONT></P>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"><B>Hard Drives</B></FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Apple II or Macintosh hard drives can be connected, assuming you have the necessary hardware (e.g. SCSI interface). Non-SCSI drives, such as the Applied Ingenuity InnerDrive or Vulcan drives, may not be formatted with the Macintosh partioning scheme and hence may be inaccessible.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Apple II or Macintosh hard drives can be connected, assuming you have the necessary hardware (e.g. SCSI interface). Non-SCSI drives, such as the Applied Ingenuity InnerDrive or Vulcan drives, may not be formatted with the Macintosh partitioning scheme and hence may be inaccessible.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Figuring out the size of a hard drive is a bit tricky under Windows, which uses different interfaces in different versions of the OS. Some interfaces return different answers depending on what version you're running. CiderPress currently scans the drive to determine its size.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;">
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">The sizes used are for the entire partition. If you formatted a 32MB ProDOS volume in a 1GB partition on a CFFA card, CiderPress will treat it as a 1GB volume, even though ProDOS is only on the first part of it. Extracting that ProDOS volume may be awkward.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Hard drives with Macintosh-style partioning have explicit filesystem identification for each partition. That is, each partition will be labeled as ProDOS, HFS, a device driver, or whatever is appropriate. CiderPress does not currently have the ability to change these labels. Copying the wrong thing onto a partition, such as putting a ProDOS volume into a partition meant for HFS, could have unexpected results.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Hard drives with Macintosh-style partitioning have explicit filesystem identification for each partition. That is, each partition will be labeled as ProDOS, HFS, a device driver, or whatever is appropriate. CiderPress does not currently have the ability to change these labels. Copying the wrong thing onto a partition, such as putting a ProDOS volume into a partition meant for HFS, could have unexpected results.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Bear in mind that old hard drives are pretty slow by today's standards. A 2GB drive purchased in the mid-1990s will deliver 4-5MB/sec on bulk reads, which means it'll take about 8 minutes to back up the entire drive. These drives tended to have small caches and slow seeks though, so it can take 30 seconds to a minute for the contents of the disk to be loaded, because scanning the list of files requires lots of single-block reads.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">You can also copy documents to other programs. To select the entire document, click on the document to set the input focus, then hit Ctrl-A to select all and Ctrl-C to copy it to the clipboard. Switch to another application (Windows WordPad and Microsoft Word are the most appropriate) and hit Ctrl-V to paste.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Bear in mind that not all applications support all formats. Pasting text into Windows notepad, which doesn't support Rich Text Format, will cause highlighed BASIC listings and formatted AppleWorks documents to be converted to plain text. Pasting graphics into Notepad doesn't work at all.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Bear in mind that not all applications support all formats. Pasting text into Windows notepad, which doesn't support Rich Text Format, will cause highlighted BASIC listings and formatted AppleWorks documents to be converted to plain text. Pasting graphics into Notepad doesn't work at all.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Click "Done" to close the window.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;text-indent:-17pt;margin-left:17pt;"><SPAN STYLE="margin-left:-17pt;text-indent:0pt;width: 17pt"><FONT FACE="Symbol" SIZE="2"><B> </FONT></span><FONT FACE="MS Sans Serif" SIZE="2">Free Space:</B> how much free space is on the disk. For formats like CFFA, which just hold other disk images, this is meaningless.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;text-indent:-17pt;margin-left:17pt;"><SPAN STYLE="margin-left:-17pt;text-indent:0pt;width: 17pt"><FONT FACE="Symbol" SIZE="2"><B> </FONT></span><FONT FACE="MS Sans Serif" SIZE="2">Writable Format:</B> says whether or not CiderPress is capable of adding and deleting files on disks with this format. Currently this is "yes" for DOS 3.3, ProDOS, and UCSD Pascal.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;text-indent:-17pt;margin-left:17pt;"><SPAN STYLE="margin-left:-17pt;text-indent:0pt;width: 17pt"><FONT FACE="Symbol" SIZE="2"><B> </FONT></span><FONT FACE="MS Sans Serif" SIZE="2">Damaged: </B>this indicates whether or not CiderPress believes the disk is damaged. If it does, the disk will be marked read-only, and attempts to add or delete files will be blocked.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;text-indent:-17pt;margin-left:17pt;"><SPAN STYLE="margin-left:-17pt;text-indent:0pt;width: 17pt"><FONT FACE="Symbol" SIZE="2"><B> </FONT></span><FONT FACE="MS Sans Serif" SIZE="2">Notes:</B> if CiderPress detects damage or other anomalies when scanning the disk, they wll be noted here.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;text-indent:-17pt;margin-left:17pt;"><SPAN STYLE="margin-left:-17pt;text-indent:0pt;width: 17pt"><FONT FACE="Symbol" SIZE="2"><B> </FONT></span><FONT FACE="MS Sans Serif" SIZE="2">Notes:</B> if CiderPress detects damage or other anomalies when scanning the disk, they will be noted here.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">More information about the different disk formats can be found <A HREF="t18.htm">here</A>.</FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3"> </FONT></P>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">Windows XP:</FONT></P>
|
||||
<UL STYLE="margin-top:0;margin-bottom:0;margin-left:17pt;"><LI><FONT FACE="MS Sans Serif" SIZE="2">From the "Start" menu, select "Control Panel".</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Click on "User Accounts". If you only see the current account, and it says "limited user", you're not an administator and cannot proceed further.</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Click on "User Accounts". If you only see the current account, and it says "limited user", you're not an administrator and cannot proceed further.</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Click on the account you want to change.</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Click on "Change my account type".</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Click the "Computer Administrator" radio button. Click "change account type".</FONT>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<LI><FONT FACE="MS Sans Serif" SIZE="2">UNIDOS / AmDOS / OzDOS (two DOS volumes on an 800k disk)</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">ProSel Uni-DOS / DOS Master (DOS volumes embedded in an 800K ProDOS disk)</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">CFFA fixed-size partitions (4-part and 8-part formats)</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Macintosh-style partitoning (for CD-ROMs and SCSI hard drives)</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">Macintosh-style partitioning (for CD-ROMs and SCSI hard drives)</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">///SHH Systeme MicroDrive partitioning</FONT>
|
||||
<LI><FONT FACE="MS Sans Serif" SIZE="2">FocusDrive partitioning</FONT></UL>
|
||||
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2"> </FONT></P>
|
||||
|
|
87
app/Main.cpp
87
app/Main.cpp
|
@ -133,6 +133,7 @@ static const UINT gFindReplaceID = RegisterWindowMessage(FINDMSGSTRING);
|
|||
|
||||
BEGIN_MESSAGE_MAP(MainWindow, CFrameWnd)
|
||||
ON_WM_CREATE()
|
||||
ON_WM_CLOSE()
|
||||
ON_MESSAGE(WMU_LATE_INIT, OnLateInit)
|
||||
//ON_MESSAGE(WMU_CLOSE_MAIN_DIALOG, OnCloseMainDialog)
|
||||
ON_WM_SIZE()
|
||||
|
@ -306,6 +307,12 @@ MainWindow::~MainWindow()
|
|||
LOGI("MainWindow destructor complete");
|
||||
}
|
||||
|
||||
void MainWindow::OnClose()
|
||||
{
|
||||
SaveWinPlacement();
|
||||
CFrameWnd::OnClose();
|
||||
}
|
||||
|
||||
BOOL MainWindow::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
BOOL res = CFrameWnd::PreCreateWindow(cs);
|
||||
|
@ -563,6 +570,8 @@ int MainWindow::OnCreate(LPCREATESTRUCT lpcs)
|
|||
|
||||
fStatusBar.SetPaneText(kProgressPane, L"");
|
||||
|
||||
RestoreWinPlacement();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1889,6 +1898,84 @@ void MainWindow::EventPause(int duration)
|
|||
* ===================================
|
||||
*/
|
||||
|
||||
static const WCHAR kMainWinSection[] = L"mainwin";
|
||||
static const WCHAR kMainWin_Left[] = L"left";
|
||||
static const WCHAR kMainWin_Top[] = L"top";
|
||||
static const WCHAR kMainWin_Right[] = L"right";
|
||||
static const WCHAR kMainWin_Bottom[] = L"bottom";
|
||||
static const WCHAR kMainWin_Cmd[] = L"cmd";
|
||||
|
||||
void MainWindow::SaveWinPlacement()
|
||||
{
|
||||
// Capture the current window position. At the point where the destructor
|
||||
// fires, too much has been shut down, so we need to do it here.
|
||||
WINDOWPLACEMENT wndpl;
|
||||
wndpl.length = sizeof(wndpl);
|
||||
if (!GetWindowPlacement(&wndpl)) {
|
||||
LOGW("Unable to get window placement");
|
||||
return;
|
||||
}
|
||||
|
||||
LOGD("Window is at ltrb=%ld,%ld %ldx%ld showCmd=%d",
|
||||
wndpl.rcNormalPosition.left,
|
||||
wndpl.rcNormalPosition.top,
|
||||
wndpl.rcNormalPosition.right - wndpl.rcNormalPosition.left,
|
||||
wndpl.rcNormalPosition.bottom - wndpl.rcNormalPosition.top,
|
||||
wndpl.showCmd);
|
||||
gMyApp.WriteProfileInt(kMainWinSection,
|
||||
kMainWin_Left, wndpl.rcNormalPosition.left);
|
||||
gMyApp.WriteProfileInt(kMainWinSection,
|
||||
kMainWin_Top, wndpl.rcNormalPosition.top);
|
||||
gMyApp.WriteProfileInt(kMainWinSection,
|
||||
kMainWin_Right, wndpl.rcNormalPosition.right);
|
||||
gMyApp.WriteProfileInt(kMainWinSection,
|
||||
kMainWin_Bottom, wndpl.rcNormalPosition.bottom);
|
||||
gMyApp.WriteProfileInt(kMainWinSection,
|
||||
kMainWin_Cmd, wndpl.showCmd);
|
||||
}
|
||||
|
||||
void MainWindow::RestoreWinPlacement()
|
||||
{
|
||||
const int kNoVal = -32000;
|
||||
|
||||
RECT normPos;
|
||||
normPos.left = gMyApp.GetProfileInt(kMainWinSection, kMainWin_Left, kNoVal);
|
||||
normPos.top = gMyApp.GetProfileInt(kMainWinSection, kMainWin_Top, kNoVal);
|
||||
normPos.right = gMyApp.GetProfileInt(kMainWinSection, kMainWin_Right, kNoVal);
|
||||
normPos.bottom = gMyApp.GetProfileInt(kMainWinSection, kMainWin_Bottom, kNoVal);
|
||||
int cmd = gMyApp.GetProfileInt(kMainWinSection, kMainWin_Cmd, kNoVal);
|
||||
|
||||
if (normPos.left == kNoVal || normPos.top == kNoVal ||
|
||||
normPos.right == kNoVal || normPos.bottom == kNoVal || cmd == kNoVal) {
|
||||
LOGI("Previous window placement not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
POINT nopt;
|
||||
nopt.x = nopt.y = -1;
|
||||
|
||||
// We need to set the placement for "normal", and then deal with
|
||||
// maximized windows by having the MyApp ShowWindow() call pass the
|
||||
// appropriate command. If we pass the correct normal rect here with
|
||||
// the "maximized" command, we end up with a non-maximized window of
|
||||
// maximum size. (If done correctly, you can maximize, quit, restart,
|
||||
// and un-maximize back to the original size.)
|
||||
WINDOWPLACEMENT wndpl;
|
||||
wndpl.length = sizeof(wndpl);
|
||||
wndpl.flags = 0;
|
||||
wndpl.showCmd = SW_SHOWNORMAL;
|
||||
wndpl.ptMinPosition = nopt;
|
||||
wndpl.ptMaxPosition = nopt;
|
||||
wndpl.rcNormalPosition = normPos;
|
||||
|
||||
LOGD("Restoring previous placement, cmd=%d", wndpl.showCmd);
|
||||
SetWindowPlacement(&wndpl);
|
||||
|
||||
// Stomp on MyApp's show command. We don't want to start minimized,
|
||||
// so switch to "normal" if that's set.
|
||||
gMyApp.m_nCmdShow = (cmd == SW_SHOWMINIMIZED ? SW_SHOWNORMAL : cmd);
|
||||
}
|
||||
|
||||
void MainWindow::DrawEmptyClientArea(CDC* pDC, const CRect& clientRect)
|
||||
{
|
||||
CBrush brush;
|
||||
|
|
17
app/Main.h
17
app/Main.h
|
@ -54,7 +54,7 @@ public:
|
|||
/*
|
||||
* Override the pre-create function to tweak the window style.
|
||||
*/
|
||||
BOOL PreCreateWindow(CREATESTRUCT& cs) override;
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs) override;
|
||||
|
||||
/*
|
||||
* Override GetClientRect so we can factor in the status and tool bars.
|
||||
|
@ -71,8 +71,8 @@ public:
|
|||
void ApplyNow(PrefsSheet*);
|
||||
|
||||
// get the text of the next file in the selection list
|
||||
int GetPrevFileText(ReformatHolder* pHolder, CString* pTitle);
|
||||
int GetNextFileText(ReformatHolder* pHolder, CString* pTitle);
|
||||
//int GetPrevFileText(ReformatHolder* pHolder, CString* pTitle);
|
||||
//int GetNextFileText(ReformatHolder* pHolder, CString* pTitle);
|
||||
|
||||
// update the progress meter
|
||||
void SetProgressBegin(void);
|
||||
|
@ -268,6 +268,7 @@ private:
|
|||
|
||||
// Command handlers
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpcs);
|
||||
afx_msg void OnClose();
|
||||
afx_msg LONG OnLateInit(UINT, LONG);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
afx_msg void OnGetMinMaxInfo(MINMAXINFO* pMMI);
|
||||
|
@ -489,6 +490,14 @@ private:
|
|||
*/
|
||||
void DrawEmptyClientArea(CDC* pDC, const CRect& clientRect);
|
||||
|
||||
/*
|
||||
* Save/restore main window placement. The restore function will move
|
||||
* the window if the previous placement is no longer visible (e.g. a
|
||||
* secondary monitor was removed).
|
||||
*/
|
||||
void SaveWinPlacement();
|
||||
void RestoreWinPlacement();
|
||||
|
||||
/*
|
||||
* Extract a record to the temp folder and open it with a new instance of
|
||||
* CiderPress. We might want to extract disk images as 2MG files to take
|
||||
|
@ -607,7 +616,7 @@ private:
|
|||
*/
|
||||
void HandleView(void);
|
||||
|
||||
void DeleteFileOnExit(const WCHAR* name);
|
||||
//void DeleteFileOnExit(const WCHAR* name);
|
||||
|
||||
/*
|
||||
* Close and re-open the current archive.
|
||||
|
|
|
@ -64,6 +64,16 @@ MyApp::~MyApp(void)
|
|||
|
||||
BOOL MyApp::InitInstance(void)
|
||||
{
|
||||
// This causes functions like SetProfileInt to use the registry rather
|
||||
// than a .INI file. The registry key is "usually the name of a company".
|
||||
// (Must do this before creating main window so we can restore the
|
||||
// previous window position.)
|
||||
#ifdef CAN_UPDATE_FILE_ASSOC
|
||||
SetRegistryKey(fRegistry.GetAppRegistryKey());
|
||||
#else
|
||||
SetRegistryKey(L"faddenSoft");
|
||||
#endif
|
||||
|
||||
// Create the main window.
|
||||
m_pMainWnd = new MainWindow;
|
||||
m_pMainWnd->ShowWindow(m_nCmdShow);
|
||||
|
@ -92,14 +102,6 @@ BOOL MyApp::InitInstance(void)
|
|||
LogModuleLocation(L"riched32.dll");
|
||||
LogModuleLocation(L"msftedit.dll");
|
||||
|
||||
// This causes functions like SetProfileInt to use the registry rather
|
||||
// than a .INI file. The registry key is "usually the name of a company".
|
||||
#ifdef CAN_UPDATE_FILE_ASSOC
|
||||
SetRegistryKey(fRegistry.GetAppRegistryKey());
|
||||
#else
|
||||
SetRegistryKey(L"faddenSoft");
|
||||
#endif
|
||||
|
||||
//LOGI("Registry key is '%ls'", m_pszRegistryKey);
|
||||
//LOGI("Profile name is '%ls'", m_pszProfileName);
|
||||
LOGI("Short command line is '%ls'", m_lpCmdLine);
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
/* CiderPress version numbers */
|
||||
#define kAppMajorVersion 4
|
||||
#define kAppMinorVersion 0
|
||||
#define kAppBugVersion 5
|
||||
#define kAppDevString L"-d1"
|
||||
#define kAppMinorVersion 1
|
||||
#define kAppBugVersion 1
|
||||
#define kAppDevString L""
|
||||
|
||||
/*
|
||||
* Windows application object.
|
||||
|
|
|
@ -247,16 +247,20 @@ Preferences::Preferences(void)
|
|||
|
||||
SetPrefString(kPrViewTextTypeFace, L"Courier New");
|
||||
SetPrefLong(kPrViewTextPointSize, 10);
|
||||
long width = 680 + /* exact width for 80-column text */
|
||||
::GetSystemMetrics(SM_CXVSCROLL);
|
||||
long height = 516; /* exact height for file viewer to show IIgs graphic */
|
||||
|
||||
float scaleFactor = GetDesktopScaleFactor();
|
||||
/* exact width for 80-column text; note text is scaled up */
|
||||
long width = (int)(680 * scaleFactor) + ::GetSystemMetrics(SM_CXVSCROLL);
|
||||
/* exact height for file viewer to show IIgs graphic at 1.0x */
|
||||
long height = (int)(516 * scaleFactor);
|
||||
|
||||
if (GetSystemMetrics(SM_CXSCREEN) < width)
|
||||
width = GetSystemMetrics(SM_CXSCREEN);
|
||||
if (GetSystemMetrics(SM_CYSCREEN) < height)
|
||||
height = GetSystemMetrics(SM_CYSCREEN); // may overlap system bar
|
||||
//width = 640; height = 480;
|
||||
SetPrefLong(kPrFileViewerWidth, width);
|
||||
SetPrefLong(kPrFileViewerHeight, height);
|
||||
|
||||
SetPrefLong(kPrDiskImageCreateFormat, -1);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,11 +23,14 @@ public:
|
|||
PrefsGeneralPage(void) :
|
||||
CPropertyPage(IDD_PREF_GENERAL),
|
||||
fReady(false),
|
||||
fColumn(),
|
||||
fMimicShrinkIt(FALSE),
|
||||
fBadMacSHK(FALSE),
|
||||
fReduceSHKErrorChecks(FALSE),
|
||||
fCoerceDOSFilenames(FALSE),
|
||||
fSpacesToUnder(FALSE),
|
||||
fPasteJunkPaths(FALSE),
|
||||
fBeepOnSuccess(FALSE),
|
||||
fDefaultsPushed(FALSE),
|
||||
fOurAssociations(NULL)
|
||||
{}
|
||||
|
@ -82,6 +85,7 @@ public:
|
|||
fReady(false),
|
||||
fQueryImageFormat(FALSE),
|
||||
fOpenVolumeRO(FALSE),
|
||||
fOpenVolumePhys0(FALSE),
|
||||
fProDOSAllowLower(FALSE),
|
||||
fProDOSUseSparse(FALSE)
|
||||
{}
|
||||
|
@ -119,7 +123,9 @@ class PrefsCompressionPage : public CPropertyPage
|
|||
{
|
||||
public:
|
||||
PrefsCompressionPage(void) :
|
||||
CPropertyPage(IDD_PREF_COMPRESSION), fReady(false)
|
||||
CPropertyPage(IDD_PREF_COMPRESSION),
|
||||
fReady(false),
|
||||
fCompressType(-1)
|
||||
{}
|
||||
|
||||
bool fReady;
|
||||
|
@ -159,7 +165,39 @@ class PrefsFviewPage : public CPropertyPage
|
|||
{
|
||||
public:
|
||||
PrefsFviewPage(void) :
|
||||
CPropertyPage(IDD_PREF_FVIEW), fReady(false)
|
||||
CPropertyPage(IDD_PREF_FVIEW),
|
||||
fReady(false),
|
||||
fEOLConvRaw(FALSE),
|
||||
fNoWrapText(FALSE),
|
||||
fHighlightHexDump(FALSE),
|
||||
fHighlightBASIC(FALSE),
|
||||
fConvDisasmOneByteBrkCop(FALSE),
|
||||
fConvMouseTextToASCII(FALSE),
|
||||
fConvHiResBlackWhite(FALSE),
|
||||
fConvDHRAlgorithm(-1),
|
||||
fConvTextEOL_HA(FALSE),
|
||||
fConvCPMText(FALSE),
|
||||
fConvPascalText(FALSE),
|
||||
fConvPascalCode(FALSE),
|
||||
fConvApplesoft(FALSE),
|
||||
fConvInteger(FALSE),
|
||||
fConvBusiness(FALSE),
|
||||
fConvGWP(FALSE),
|
||||
fConvText8(FALSE),
|
||||
fConvAWP(FALSE),
|
||||
fConvADB(FALSE),
|
||||
fConvASP(FALSE),
|
||||
fConvSCAssem(FALSE),
|
||||
fConvDisasm(FALSE),
|
||||
fConvHiRes(FALSE),
|
||||
fConvDHR(FALSE),
|
||||
fConvSHR(FALSE),
|
||||
fConvPrintShop(FALSE),
|
||||
fConvMacPaint(FALSE),
|
||||
fConvProDOSFolder(FALSE),
|
||||
fConvResources(FALSE),
|
||||
fRelaxGfxTypeCheck(FALSE),
|
||||
fMaxViewFileSizeKB(0)
|
||||
{}
|
||||
bool fReady;
|
||||
|
||||
|
|
|
@ -1787,7 +1787,7 @@ long MainWindow::SSTGetBufOffset(int track)
|
|||
return offset;
|
||||
}
|
||||
|
||||
long MainWindow::SSTCountBadBytes(const unsigned char* sctBuf, int count)
|
||||
long MainWindow::SSTCountBadBytes(const uint8_t* sctBuf, int count)
|
||||
{
|
||||
long badCount = 0;
|
||||
unsigned char uch;
|
||||
|
@ -1802,7 +1802,7 @@ long MainWindow::SSTCountBadBytes(const unsigned char* sctBuf, int count)
|
|||
return badCount;
|
||||
}
|
||||
|
||||
void MainWindow::SSTProcessTrackData(unsigned char* trackBuf)
|
||||
void MainWindow::SSTProcessTrackData(uint8_t* trackBuf)
|
||||
{
|
||||
unsigned char* trackPtr;
|
||||
int track;
|
||||
|
@ -1812,7 +1812,7 @@ void MainWindow::SSTProcessTrackData(unsigned char* trackBuf)
|
|||
{
|
||||
bool inRun;
|
||||
int start, longestStart;
|
||||
int count7f, longest = -1;
|
||||
int count7f = 0, longest = -1;
|
||||
int i;
|
||||
|
||||
inRun = false;
|
||||
|
|
|
@ -17,7 +17,13 @@
|
|||
class UseSelectionDialog : public CDialog {
|
||||
public:
|
||||
UseSelectionDialog(int selCount, CWnd* pParentWnd = NULL, int rsrcID = IDD_USE_SELECTION) :
|
||||
CDialog(rsrcID, pParentWnd), fSelectedCount(selCount)
|
||||
CDialog(rsrcID, pParentWnd),
|
||||
fSelectedCount(selCount),
|
||||
fTitleID(-1),
|
||||
fOkLabelID(-1),
|
||||
fSelCountID(-1),
|
||||
fSelCountsID(-1),
|
||||
fAllID(-1)
|
||||
{
|
||||
// init values; these should be overridden before DoModal
|
||||
fFilesToAction = 0;
|
||||
|
|
|
@ -154,8 +154,12 @@ void ViewFilesDialog::OnCancel(void)
|
|||
|
||||
void ViewFilesDialog::OnGetMinMaxInfo(MINMAXINFO* pMMI)
|
||||
{
|
||||
pMMI->ptMinTrackSize.x = 664;
|
||||
pMMI->ptMinTrackSize.y = 200;
|
||||
float scaleFactor = GetDesktopScaleFactor();
|
||||
|
||||
// 664x200 was determined empirically to fit all controls. The initial
|
||||
// window size is set over in the Preferences constructor.
|
||||
pMMI->ptMinTrackSize.x = (int)(664 * scaleFactor);
|
||||
pMMI->ptMinTrackSize.y = (int)(200 * scaleFactor);
|
||||
}
|
||||
|
||||
void ViewFilesDialog::OnSize(UINT nType, int cx, int cy)
|
||||
|
|
|
@ -15,18 +15,17 @@
|
|||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<ProjectGuid>{B023611B-7086-46E1-847B-3B21C4732384}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -835,6 +835,9 @@ DIError DiskFSDOS33::ProcessCatalogSector(int catTrack, int catSect,
|
|||
break;
|
||||
}
|
||||
|
||||
memcpy(pFile->fRawFileName, &pEntry[0x03], A2FileDOS::kMaxFileName);
|
||||
pFile->fRawFileName[A2FileDOS::kMaxFileName] = '\0';
|
||||
|
||||
memcpy(pFile->fFileName, &pEntry[0x03], A2FileDOS::kMaxFileName);
|
||||
pFile->fFileName[A2FileDOS::kMaxFileName] = '\0';
|
||||
pFile->FixFilename();
|
||||
|
@ -860,7 +863,6 @@ DIError DiskFSDOS33::ProcessCatalogSector(int catTrack, int catSect,
|
|||
return kDIErrNone;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Perform consistency checks on the filesystem.
|
||||
*
|
||||
|
@ -2768,7 +2770,7 @@ DIError A2FileDOS::LoadTSList(TrackSector** pTSList, int* pTSCount,
|
|||
if (dierr != kDIErrNone)
|
||||
goto bail;
|
||||
|
||||
if (track != 0 && sector != 0) {
|
||||
if (track != 0) {
|
||||
/* more T/S lists to come, so we keep all entries */
|
||||
tsCount += kMaxTSPairs;
|
||||
} else {
|
||||
|
@ -2869,6 +2871,19 @@ bail:
|
|||
return dierr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the raw filename.
|
||||
*
|
||||
* If a pointer to a size_t is passed in, it will be filled with the
|
||||
* raw filename length.
|
||||
*/
|
||||
const char* A2FileDOS::GetRawFileName(size_t* size) const {
|
||||
if (size) {
|
||||
*size = strlen(fRawFileName);
|
||||
}
|
||||
return fRawFileName;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ===========================================================================
|
||||
|
|
|
@ -211,6 +211,10 @@ DiskImg::DiskImg(void)
|
|||
fNumBlocks = -1;
|
||||
|
||||
fpScanProgressCallback = NULL;
|
||||
fScanProgressCookie = NULL;
|
||||
fScanCount = 0;
|
||||
fScanMsg[0] = '\0';
|
||||
fScanLastMsgWhen = 0;
|
||||
|
||||
/*
|
||||
* Create a working copy of the nibble descr table. We want to leave
|
||||
|
@ -292,6 +296,12 @@ void DiskImg::SetCustomNibbleDescr(const NibbleDescr* pDescr)
|
|||
}
|
||||
}
|
||||
|
||||
const char* A2File::GetRawFileName(size_t* size) const { // get unmodified file name
|
||||
if (size) {
|
||||
*size = strlen(GetFileName());
|
||||
}
|
||||
return GetFileName();
|
||||
}
|
||||
|
||||
/*
|
||||
* Open a volume or a file on disk.
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
|
||||
//#define EXCISE_GPL_CODE
|
||||
|
@ -1471,9 +1472,12 @@ public:
|
|||
* The filename returned is defined to be null-terminated Mac OS Roman.
|
||||
* For most filesystems this is automatic, as filenames are restricted
|
||||
* to ASCII, but for DOS 3.3 it requires stripping high bits. It also
|
||||
* means that embedded nulls in HFS filenames (which are discouraged but
|
||||
* allowed) will be lost.
|
||||
* means that embedded nulls will be lost.
|
||||
*
|
||||
* The original unmodified filename is available through GetRawFileName,
|
||||
* which can be optionally passed a size_t pointer to get the size
|
||||
* of the raw file name, in case it has embedded nulls.
|
||||
*
|
||||
* We do guarantee that the contents of subdirectories are grouped
|
||||
* together. This makes it much easier to construct a hierarchy out of
|
||||
* the linear list. This becomes important when dynamically adding
|
||||
|
@ -1481,6 +1485,7 @@ public:
|
|||
*/
|
||||
virtual const char* GetFileName(void) const = 0; // name of this file
|
||||
virtual const char* GetPathName(void) const = 0; // full path
|
||||
virtual const char* GetRawFileName(size_t* size = NULL) const; // get unmodified file name
|
||||
virtual char GetFssep(void) const = 0; // '\0' if none
|
||||
virtual uint32_t GetFileType(void) const = 0;
|
||||
virtual uint32_t GetAuxType(void) const = 0;
|
||||
|
@ -1576,7 +1581,12 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FileDescr {
|
||||
public:
|
||||
A2FileDescr(A2File* pFile) : fpFile(pFile), fProgressUpdateFunc(NULL) {}
|
||||
A2FileDescr(A2File* pFile) :
|
||||
fpFile(pFile),
|
||||
fProgressUpdateFunc(NULL),
|
||||
fProgressUpdateMax(0),
|
||||
fProgressUpdateState(NULL)
|
||||
{}
|
||||
virtual ~A2FileDescr(void) { fpFile = NULL; /*paranoia*/ }
|
||||
|
||||
virtual DIError Read(void* buf, size_t len, size_t* pActual = NULL) = 0;
|
||||
|
|
|
@ -630,7 +630,7 @@ private:
|
|||
|
||||
class WrapperFDI : public ImageWrapper {
|
||||
public:
|
||||
WrapperFDI(void) {}
|
||||
WrapperFDI(void) : fHeaderBuf(), fImageTracks(0), fStorageName(NULL) {}
|
||||
virtual ~WrapperFDI(void) {}
|
||||
|
||||
static DIError Test(GenericFD* pGFD, di_off_t wrappedLength);
|
||||
|
@ -1213,10 +1213,21 @@ class A2FileDOS;
|
|||
*/
|
||||
class DISKIMG_API DiskFSDOS33 : public DiskFS {
|
||||
public:
|
||||
DiskFSDOS33(void) : DiskFS() {
|
||||
fVTOCLoaded = false;
|
||||
fDiskIsGood = false;
|
||||
}
|
||||
DiskFSDOS33(void) :
|
||||
DiskFS(),
|
||||
fFirstCatTrack(0),
|
||||
fFirstCatSector(0),
|
||||
fVTOCVolumeNumber(0),
|
||||
fVTOCNumTracks(0),
|
||||
fVTOCNumSectors(0),
|
||||
fDiskVolumeNum(0),
|
||||
fDiskVolumeName(),
|
||||
fDiskVolumeID(),
|
||||
fVTOC(),
|
||||
fVTOCLoaded(false),
|
||||
fCatalogSectors(),
|
||||
fDiskIsGood(false)
|
||||
{}
|
||||
virtual ~DiskFSDOS33(void) {}
|
||||
|
||||
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
|
||||
|
@ -1259,7 +1270,7 @@ public:
|
|||
|
||||
// utility function
|
||||
static void LowerASCII(uint8_t* buf, long len);
|
||||
static void ReplaceFssep(char* str, char replacement);
|
||||
//static void ReplaceFssep(char* str, char replacement);
|
||||
|
||||
enum {
|
||||
kMinTracks = 17, // need to put the catalog track here
|
||||
|
@ -1360,12 +1371,17 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FDDOS : public A2FileDescr {
|
||||
public:
|
||||
A2FDDOS(A2File* pFile) : A2FileDescr(pFile) {
|
||||
fTSList = NULL;
|
||||
fIndexList = NULL;
|
||||
fOffset = 0;
|
||||
fModified = false;
|
||||
}
|
||||
A2FDDOS(A2File* pFile) :
|
||||
A2FileDescr(pFile),
|
||||
fTSList(NULL),
|
||||
fTSCount(0),
|
||||
fIndexList(NULL),
|
||||
fIndexCount(0),
|
||||
fOffset(0),
|
||||
fOpenEOF(0),
|
||||
fOpenSectorsUsed(0),
|
||||
fModified(false)
|
||||
{}
|
||||
virtual ~A2FDDOS(void) {
|
||||
delete[] fTSList;
|
||||
delete[] fIndexList;
|
||||
|
@ -1444,6 +1460,7 @@ public:
|
|||
*/
|
||||
virtual const char* GetFileName(void) const override { return fFileName; }
|
||||
virtual const char* GetPathName(void) const override { return fFileName; }
|
||||
virtual const char* GetRawFileName(size_t* size = NULL) const override;
|
||||
virtual char GetFssep(void) const override { return '\0'; }
|
||||
virtual uint32_t GetFileType(void) const override;
|
||||
virtual uint32_t GetAuxType(void) const override { return fAuxType; }
|
||||
|
@ -1482,6 +1499,7 @@ private:
|
|||
short fTSListSector;
|
||||
uint16_t fLengthInSectors;
|
||||
bool fLocked;
|
||||
char fRawFileName[kMaxFileName + 1]; // "raw" version
|
||||
char fFileName[kMaxFileName+1]; // "fixed" version
|
||||
FileType fFileType;
|
||||
|
||||
|
@ -1536,8 +1554,19 @@ class A2FileProDOS;
|
|||
*/
|
||||
class DISKIMG_API DiskFSProDOS : public DiskFS {
|
||||
public:
|
||||
DiskFSProDOS(void) : fBitMapPointer(0), fTotalBlocks(0), fBlockUseMap(NULL)
|
||||
{}
|
||||
DiskFSProDOS(void) :
|
||||
fVolumeName(),
|
||||
fVolumeID(),
|
||||
fAccess(0),
|
||||
fCreateWhen(0),
|
||||
fModWhen(0),
|
||||
fBitMapPointer(0),
|
||||
fTotalBlocks(0),
|
||||
fVolDirFileCount(0),
|
||||
fBlockUseMap(NULL),
|
||||
fDiskIsGood(false),
|
||||
fEarlyDamage(false)
|
||||
{}
|
||||
virtual ~DiskFSProDOS(void) {
|
||||
if (fBlockUseMap != NULL) {
|
||||
assert(false); // unexpected
|
||||
|
@ -1698,8 +1727,16 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FDProDOS : public A2FileDescr {
|
||||
public:
|
||||
A2FDProDOS(A2File* pFile) : A2FileDescr(pFile), fModified(false),
|
||||
fBlockList(NULL), fOffset(0)
|
||||
A2FDProDOS(A2File* pFile) :
|
||||
A2FileDescr(pFile),
|
||||
fModified(false),
|
||||
fBlockCount(0),
|
||||
fBlockList(NULL),
|
||||
fOpenEOF(0),
|
||||
fOpenBlocksUsed(0),
|
||||
fOpenStorageType(0),
|
||||
fOpenRsrcFork(false),
|
||||
fOffset(0)
|
||||
{}
|
||||
virtual ~A2FDProDOS(void) {
|
||||
delete[] fBlockList;
|
||||
|
@ -1743,14 +1780,16 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FileProDOS : public A2File {
|
||||
public:
|
||||
A2FileProDOS(DiskFS* pDiskFS) : A2File(pDiskFS) {
|
||||
fPathName = NULL;
|
||||
fSparseDataEof = fSparseRsrcEof = -1;
|
||||
fpOpenFile = NULL;
|
||||
fParentDirBlock = 0;
|
||||
fParentDirIdx = -1;
|
||||
fpParent = NULL;
|
||||
}
|
||||
A2FileProDOS(DiskFS* pDiskFS) :
|
||||
A2File(pDiskFS),
|
||||
fParentDirBlock(0),
|
||||
fParentDirIdx(0),
|
||||
fSparseDataEof(0),
|
||||
fSparseRsrcEof(0),
|
||||
fPathName(NULL),
|
||||
fpOpenFile(NULL),
|
||||
fpParent(NULL)
|
||||
{}
|
||||
virtual ~A2FileProDOS(void) {
|
||||
delete fpOpenFile;
|
||||
delete[] fPathName;
|
||||
|
@ -1950,7 +1989,21 @@ class A2FilePascal;
|
|||
|
||||
class DISKIMG_API DiskFSPascal : public DiskFS {
|
||||
public:
|
||||
DiskFSPascal(void) : fDirectory(NULL) {}
|
||||
DiskFSPascal(void) :
|
||||
fStartBlock(0),
|
||||
fNextBlock(0),
|
||||
fVolumeName(),
|
||||
fVolumeID(),
|
||||
fTotalBlocks(0),
|
||||
fNumFiles(0),
|
||||
fAccessWhen(0),
|
||||
fDateSetWhen(0),
|
||||
fStuff1(0),
|
||||
fStuff2(0),
|
||||
fDiskIsGood(false),
|
||||
fEarlyDamage(false),
|
||||
fDirectory(NULL)
|
||||
{}
|
||||
virtual ~DiskFSPascal(void) {
|
||||
if (fDirectory != NULL) {
|
||||
assert(false); // unexpected
|
||||
|
@ -2052,9 +2105,13 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FDPascal : public A2FileDescr {
|
||||
public:
|
||||
A2FDPascal(A2File* pFile) : A2FileDescr(pFile) {
|
||||
fOffset = 0;
|
||||
}
|
||||
A2FDPascal(A2File* pFile) :
|
||||
A2FileDescr(pFile),
|
||||
fOffset(0),
|
||||
fOpenEOF(0),
|
||||
fOpenBlocksUsed(0),
|
||||
fModified(0)
|
||||
{}
|
||||
virtual ~A2FDPascal(void) {
|
||||
/* nothing to clean up */
|
||||
}
|
||||
|
@ -2086,9 +2143,17 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FilePascal : public A2File {
|
||||
public:
|
||||
A2FilePascal(DiskFS* pDiskFS) : A2File(pDiskFS) {
|
||||
fpOpenFile = NULL;
|
||||
}
|
||||
A2FilePascal(DiskFS* pDiskFS) :
|
||||
A2File(pDiskFS),
|
||||
fStartBlock(0),
|
||||
fNextBlock(0),
|
||||
fFileType(A2FilePascal::FileType::kTypeUntyped),
|
||||
fFileName(),
|
||||
fBytesRemaining(0),
|
||||
fModWhen(0),
|
||||
fLength(0),
|
||||
fpOpenFile(NULL)
|
||||
{}
|
||||
virtual ~A2FilePascal(void) {
|
||||
/* this comes back and calls CloseDescr */
|
||||
if (fpOpenFile != NULL)
|
||||
|
@ -2186,7 +2251,7 @@ private:
|
|||
class A2FileCPM;
|
||||
class DISKIMG_API DiskFSCPM : public DiskFS {
|
||||
public:
|
||||
DiskFSCPM(void) : fDiskIsGood(false) {}
|
||||
DiskFSCPM(void) : fDirEntry(), fDiskIsGood(false) {}
|
||||
virtual ~DiskFSCPM(void) {}
|
||||
|
||||
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
|
||||
|
@ -2270,10 +2335,12 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FDCPM : public A2FileDescr {
|
||||
public:
|
||||
A2FDCPM(A2File* pFile) : A2FileDescr(pFile) {
|
||||
//fOpen = false;
|
||||
fBlockList = NULL;
|
||||
}
|
||||
A2FDCPM(A2File* pFile) :
|
||||
A2FileDescr(pFile),
|
||||
fOffset(0),
|
||||
fBlockCount(0),
|
||||
fBlockList(NULL)
|
||||
{}
|
||||
virtual ~A2FDCPM(void) {
|
||||
delete fBlockList;
|
||||
fBlockList = NULL;
|
||||
|
@ -2309,7 +2376,13 @@ public:
|
|||
typedef DiskFSCPM::DirEntry DirEntry;
|
||||
|
||||
A2FileCPM(DiskFS* pDiskFS, DirEntry* pDirEntry) :
|
||||
A2File(pDiskFS), fpDirEntry(pDirEntry)
|
||||
A2File(pDiskFS),
|
||||
fFileName(),
|
||||
fReadOnly(false),
|
||||
fLength(0),
|
||||
fDirIdx(0),
|
||||
fpDirEntry(pDirEntry),
|
||||
fpOpenFile(NULL)
|
||||
{
|
||||
fDirIdx = -1;
|
||||
fpOpenFile = NULL;
|
||||
|
@ -2390,7 +2463,7 @@ private:
|
|||
class A2FileRDOS;
|
||||
class DISKIMG_API DiskFSRDOS : public DiskFS {
|
||||
public:
|
||||
DiskFSRDOS(void) {}
|
||||
DiskFSRDOS(void) : fVolumeName(), fOurSectPerTrack(0) {}
|
||||
virtual ~DiskFSRDOS(void) {}
|
||||
|
||||
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
|
||||
|
@ -2469,10 +2542,17 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FileRDOS : public A2File {
|
||||
public:
|
||||
A2FileRDOS(DiskFS* pDiskFS) : A2File(pDiskFS) {
|
||||
//fOpen = false;
|
||||
fpOpenFile = NULL;
|
||||
}
|
||||
A2FileRDOS(DiskFS* pDiskFS) :
|
||||
A2File(pDiskFS),
|
||||
fFileName(),
|
||||
fRawFileName(),
|
||||
fFileType(A2FileRDOS::FileType::kTypeUnknown),
|
||||
fNumSectors(0),
|
||||
fLoadAddr(0),
|
||||
fLength(0),
|
||||
fStartSector(0),
|
||||
fpOpenFile(NULL)
|
||||
{}
|
||||
virtual ~A2FileRDOS(void) {
|
||||
delete fpOpenFile;
|
||||
}
|
||||
|
@ -2493,6 +2573,7 @@ public:
|
|||
*/
|
||||
virtual const char* GetFileName(void) const override { return fFileName; }
|
||||
virtual const char* GetPathName(void) const override { return fFileName; }
|
||||
virtual const char* GetRawFileName(size_t* size = NULL) const override;
|
||||
virtual char GetFssep(void) const override { return '\0'; }
|
||||
virtual uint32_t GetFileType(void) const override;
|
||||
virtual uint32_t GetAuxType(void) const override { return fLoadAddr; }
|
||||
|
@ -2518,6 +2599,7 @@ public:
|
|||
|
||||
/* fields pulled out of directory block */
|
||||
char fFileName[kMaxFileName+1];
|
||||
char fRawFileName[kMaxFileName + 1];
|
||||
FileType fFileType;
|
||||
uint16_t fNumSectors;
|
||||
uint16_t fLoadAddr;
|
||||
|
@ -2543,9 +2625,19 @@ private:
|
|||
class A2FileHFS;
|
||||
class DISKIMG_API DiskFSHFS : public DiskFS {
|
||||
public:
|
||||
DiskFSHFS(void) {
|
||||
fLocalTimeOffset = -1;
|
||||
fDiskIsGood = true;
|
||||
DiskFSHFS(void) :
|
||||
fVolumeName(),
|
||||
fVolumeID(),
|
||||
fTotalBlocks(0),
|
||||
fAllocationBlockSize(0),
|
||||
fNumAllocationBlocks(0),
|
||||
fCreatedDateTime(0),
|
||||
fModifiedDateTime(0),
|
||||
fNumFiles(0),
|
||||
fNumDirectories(0),
|
||||
fLocalTimeOffset(-1),
|
||||
fDiskIsGood(true)
|
||||
{
|
||||
#ifndef EXCISE_GPL_CODE
|
||||
fHfsVol = NULL;
|
||||
#endif
|
||||
|
@ -2718,12 +2810,25 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FileHFS : public A2File {
|
||||
public:
|
||||
A2FileHFS(DiskFS* pDiskFS) : A2File(pDiskFS) {
|
||||
fPathName = NULL;
|
||||
fpOpenFile = NULL;
|
||||
A2FileHFS(DiskFS* pDiskFS) :
|
||||
A2File(pDiskFS),
|
||||
fIsDir(false),
|
||||
fIsVolumeDir(false),
|
||||
fType(0),
|
||||
fCreator(0),
|
||||
fFileName(),
|
||||
fPathName(NULL),
|
||||
fDataLength(0),
|
||||
fRsrcLength(0),
|
||||
fCreateWhen(0),
|
||||
fModWhen(0),
|
||||
fAccess(0),
|
||||
fpOpenFile(NULL)
|
||||
{
|
||||
#ifdef EXCISE_GPL_CODE
|
||||
fFakeFileBuf = NULL;
|
||||
#else
|
||||
fpParent = NULL;
|
||||
//fOrigPathName = NULL;
|
||||
#endif
|
||||
}
|
||||
|
@ -2829,10 +2934,19 @@ class A2FileGutenberg;
|
|||
*/
|
||||
class DISKIMG_API DiskFSGutenberg : public DiskFS {
|
||||
public:
|
||||
DiskFSGutenberg(void) : DiskFS() {
|
||||
fVTOCLoaded = false;
|
||||
fDiskIsGood = false;
|
||||
}
|
||||
DiskFSGutenberg(void) : DiskFS(),
|
||||
fFirstCatTrack(0),
|
||||
fFirstCatSector(0),
|
||||
fVTOCVolumeNumber(0),
|
||||
fVTOCNumTracks(0),
|
||||
fVTOCNumSectors(0),
|
||||
fDiskVolumeName(),
|
||||
fDiskVolumeID(),
|
||||
fVTOC(),
|
||||
fVTOCLoaded(false),
|
||||
fCatalogSectors(),
|
||||
fDiskIsGood(false)
|
||||
{}
|
||||
virtual ~DiskFSGutenberg(void) {}
|
||||
|
||||
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
|
||||
|
@ -2853,12 +2967,12 @@ public:
|
|||
virtual DIError GetFreeSpaceCount(long* pTotalUnits, long* pFreeUnits,
|
||||
int* pUnitSize) const override;
|
||||
|
||||
static bool IsValidFileName(const char* name);
|
||||
static bool IsValidVolumeName(const char* name);
|
||||
//static bool IsValidFileName(const char* name);
|
||||
//static bool IsValidVolumeName(const char* name);
|
||||
|
||||
// utility function
|
||||
static void LowerASCII(uint8_t* buf, long len);
|
||||
static void ReplaceFssep(char* str, char replacement);
|
||||
//static void ReplaceFssep(char* str, char replacement);
|
||||
|
||||
enum {
|
||||
kMinTracks = 17, // need to put the catalog track here
|
||||
|
@ -2876,43 +2990,13 @@ public:
|
|||
|
||||
private:
|
||||
DIError Initialize(InitMode initMode);
|
||||
DIError ReadVTOC(void);
|
||||
void UpdateVolumeNum(void);
|
||||
void DumpVTOC(void);
|
||||
void SetSectorUsage(long track, long sector,
|
||||
VolumeUsage::ChunkPurpose purpose);
|
||||
void FixVolumeUsageMap(void);
|
||||
DIError ReadCatalog(void);
|
||||
DIError ProcessCatalogSector(int catTrack, int catSect,
|
||||
const uint8_t* sctBuf);
|
||||
DIError GetFileLengths(void);
|
||||
DIError ComputeLength(A2FileGutenberg* pFile, const TrackSector* tsList,
|
||||
int tsCount);
|
||||
DIError TrimLastSectorUp(A2FileGutenberg* pFile, TrackSector lastTS);
|
||||
void MarkFileUsage(A2FileGutenberg* pFile, TrackSector* tsList, int tsCount,
|
||||
TrackSector* indexList, int indexCount);
|
||||
DIError MakeFileNameUnique(char* fileName);
|
||||
DIError GetFreeCatalogEntry(TrackSector* pCatSect, int* pCatEntry,
|
||||
uint8_t* sctBuf, A2FileGutenberg** ppPrevEntry);
|
||||
void CreateDirEntry(uint8_t* sctBuf, int catEntry,
|
||||
const char* fileName, TrackSector* pTSSect, uint8_t fileType,
|
||||
int access);
|
||||
void FreeTrackSectors(TrackSector* pList, int count);
|
||||
|
||||
bool CheckDiskIsGood(void);
|
||||
|
||||
DIError WriteDOSTracks(int sectPerTrack);
|
||||
|
||||
DIError ScanVolBitmap(void);
|
||||
DIError LoadVolBitmap(void);
|
||||
DIError SaveVolBitmap(void);
|
||||
void FreeVolBitmap(void);
|
||||
DIError AllocSector(TrackSector* pTS);
|
||||
DIError CreateEmptyBlockMap(bool withDOS);
|
||||
bool GetSectorUseEntry(long track, int sector) const;
|
||||
void SetSectorUseEntry(long track, int sector, bool inUse);
|
||||
inline uint32_t GetVTOCEntry(const uint8_t* pVTOC, long track) const;
|
||||
|
||||
// Largest interesting volume is 400K (50 tracks, 32 sectors), but
|
||||
// we may be looking at it in 16-sector mode, so max tracks is 100.
|
||||
enum {
|
||||
|
@ -2932,7 +3016,7 @@ private:
|
|||
/* private data */
|
||||
char fDiskVolumeName[10]; //
|
||||
char fDiskVolumeID[11+12+1]; // sizeof "Gutenberg: " + 12 + null
|
||||
uint8_t fVTOC[kSectorSize];
|
||||
uint8_t fVTOC[kSectorSize];
|
||||
bool fVTOCLoaded;
|
||||
|
||||
/*
|
||||
|
@ -2951,12 +3035,15 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FDGutenberg : public A2FileDescr {
|
||||
public:
|
||||
A2FDGutenberg(A2File* pFile) : A2FileDescr(pFile) {
|
||||
fOffset = 0;
|
||||
fModified = false;
|
||||
}
|
||||
virtual ~A2FDGutenberg(void) {
|
||||
}
|
||||
A2FDGutenberg(A2File* pFile) :
|
||||
A2FileDescr(pFile),
|
||||
fTSCount(0),
|
||||
fOffset(0),
|
||||
fOpenEOF(0),
|
||||
fOpenSectorsUsed(0),
|
||||
fModified(false)
|
||||
{}
|
||||
virtual ~A2FDGutenberg(void) {}
|
||||
|
||||
friend class A2FileGutenberg;
|
||||
|
||||
|
@ -3056,16 +3143,11 @@ public:
|
|||
|
||||
void FixFilename(void);
|
||||
|
||||
static FileType ConvertFileType(long prodosType, di_off_t fileLen);
|
||||
static bool IsValidType(long prodosType);
|
||||
static void MakeDOSName(char* buf, const char* name);
|
||||
static void TrimTrailingSpaces(char* filename);
|
||||
|
||||
private:
|
||||
DIError ExtractTSPairs(const uint8_t* sctBuf, TrackSector* tsList,
|
||||
int* pLastNonZero);
|
||||
|
||||
A2FDGutenberg* fpOpenFile;
|
||||
A2FDGutenberg* fpOpenFile;
|
||||
};
|
||||
|
||||
|
||||
|
@ -3084,7 +3166,11 @@ private:
|
|||
class A2FileFAT;
|
||||
class DISKIMG_API DiskFSFAT : public DiskFS {
|
||||
public:
|
||||
DiskFSFAT(void) {}
|
||||
DiskFSFAT(void) :
|
||||
fVolumeName(),
|
||||
fVolumeID(),
|
||||
fTotalBlocks(0)
|
||||
{}
|
||||
virtual ~DiskFSFAT(void) {}
|
||||
|
||||
static DIError TestFS(DiskImg* pImg, DiskImg::SectorOrder* pOrder,
|
||||
|
@ -3169,11 +3255,13 @@ private:
|
|||
*/
|
||||
class DISKIMG_API A2FileFAT : public A2File {
|
||||
public:
|
||||
A2FileFAT(DiskFS* pDiskFS) : A2File(pDiskFS) {
|
||||
fFakeFileBuf = NULL;
|
||||
//fFakeFileLen = -1;
|
||||
fpOpenFile = NULL;
|
||||
}
|
||||
A2FileFAT(DiskFS* pDiskFS) :
|
||||
A2File(pDiskFS),
|
||||
fFileName(),
|
||||
fLength(0),
|
||||
fFakeFileBuf(NULL),
|
||||
fpOpenFile(NULL)
|
||||
{}
|
||||
virtual ~A2FileFAT(void) {
|
||||
delete fpOpenFile;
|
||||
delete[] fFakeFileBuf;
|
||||
|
|
|
@ -337,6 +337,7 @@ void DiskFSFAT::CreateFakeFile(void)
|
|||
fVolumeName,
|
||||
capacity,
|
||||
(double) capacity / 2048.0);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
|
||||
pFile = new A2FileFAT(this);
|
||||
pFile->SetFakeFile(buf, strlen(buf));
|
||||
|
|
|
@ -175,8 +175,12 @@ private:
|
|||
#ifdef _WIN32
|
||||
class GFDWinVolume : public GenericFD {
|
||||
public:
|
||||
GFDWinVolume(void) : fPathName(NULL), fCurrentOffset(0), fVolumeEOF(-1)
|
||||
{}
|
||||
GFDWinVolume(void) :
|
||||
fPathName(NULL),
|
||||
fCurrentOffset(0),
|
||||
fVolumeEOF(-1),
|
||||
fBlockSize(0)
|
||||
{}
|
||||
virtual ~GFDWinVolume(void) { delete[] fPathName; }
|
||||
|
||||
virtual DIError Open(const char* deviceName, bool readOnly);
|
||||
|
@ -203,7 +207,14 @@ private:
|
|||
|
||||
class GFDBuffer : public GenericFD {
|
||||
public:
|
||||
GFDBuffer(void) : fBuffer(NULL) {}
|
||||
GFDBuffer(void) :
|
||||
fBuffer(NULL),
|
||||
fLength(0),
|
||||
fAllocLength(0),
|
||||
fDoDelete(false),
|
||||
fDoExpand(false),
|
||||
fCurrentOffset(0)
|
||||
{}
|
||||
virtual ~GFDBuffer(void) { Close(); }
|
||||
|
||||
// If "doDelete" is set, the buffer will be freed with delete[] when
|
||||
|
|
|
@ -1145,7 +1145,7 @@ DIError WrapperDiskCopy42::WriteHeader(GenericFD* pGFD, const DC42Header* pHeade
|
|||
* magic string. To be safe, we only increment it if it starts with '-'.
|
||||
* (Need access to a Macintosh to test this.)
|
||||
*/
|
||||
hdrBuf[0] = strlen(pHeader->diskName);
|
||||
hdrBuf[0] = (uint8_t) (strlen(pHeader->diskName) & 0xff);
|
||||
if (pHeader->diskName[0] == '-' && hdrBuf[0] < (kDC42NameLen-1))
|
||||
hdrBuf[0]++;
|
||||
memcpy(&hdrBuf[1], pHeader->diskName, hdrBuf[0]);
|
||||
|
|
|
@ -1220,7 +1220,7 @@ void OuterZip::LocalFileHeader::SetFileName(const char* name)
|
|||
fFileNameLength = 0;
|
||||
|
||||
if (name != NULL) {
|
||||
fFileNameLength = strlen(name);
|
||||
fFileNameLength = (uint16_t)strlen(name);
|
||||
fFileName = new uint8_t[fFileNameLength+1];
|
||||
if (fFileName == NULL) {
|
||||
LOGW("Malloc failure in SetFileName %u", fFileNameLength);
|
||||
|
@ -1388,7 +1388,7 @@ void OuterZip::CentralDirEntry::SetFileName(const char* name)
|
|||
fFileNameLength = 0;
|
||||
|
||||
if (name != NULL) {
|
||||
fFileNameLength = strlen(name);
|
||||
fFileNameLength = (uint16_t)strlen(name);
|
||||
fFileName = new uint8_t[fFileNameLength+1];
|
||||
if (fFileName == NULL) {
|
||||
LOGI("Malloc failure in SetFileName %u", fFileNameLength);
|
||||
|
|
|
@ -535,7 +535,7 @@ DIError DiskFSPascal::Format(DiskImg* pDiskImg, const char* volName)
|
|||
PutShortLE(&blkBuf[0x00], 0); // start block
|
||||
PutShortLE(&blkBuf[0x02], 6); // next block
|
||||
PutShortLE(&blkBuf[0x04], 0); // "file" type
|
||||
blkBuf[0x06] = strlen(volName);
|
||||
blkBuf[0x06] = (uint8_t)strlen(volName);
|
||||
memcpy(&blkBuf[0x07], volName, strlen(volName));
|
||||
PutShortLE(&blkBuf[0x0e], (uint16_t) pDiskImg->GetNumBlocks());
|
||||
PutShortLE(&blkBuf[0x10], 0); // num files
|
||||
|
@ -1255,7 +1255,7 @@ DIError DiskFSPascal::RenameFile(A2File* pGenericFile, const char* newName)
|
|||
goto bail;
|
||||
}
|
||||
|
||||
pEntry[0x06] = strlen(normalName);
|
||||
pEntry[0x06] = (uint8_t)strlen(normalName);
|
||||
memcpy(&pEntry[0x07], normalName, A2FilePascal::kMaxFileName);
|
||||
strcpy(pFile->fFileName, normalName);
|
||||
|
||||
|
@ -1339,7 +1339,7 @@ DIError DiskFSPascal::RenameVolume(const char* newName)
|
|||
if (dierr != kDIErrNone)
|
||||
goto bail;
|
||||
|
||||
fDirectory[0x06] = strlen(normalName);
|
||||
fDirectory[0x06] = (uint8_t)strlen(normalName);
|
||||
memcpy(&fDirectory[0x07], normalName, fDirectory[0x06]);
|
||||
strcpy(fVolumeName, normalName);
|
||||
|
||||
|
|
|
@ -1133,8 +1133,9 @@ DIError DiskFSProDOS::ScanFileUsage(void)
|
|||
&sparseCount);
|
||||
pFile->fSparseDataEof =
|
||||
(di_off_t) pFile->fExtData.eof - sparseCount * kBlkSize;
|
||||
//LOGI(" SparseCount %d dataEof %d '%s'",
|
||||
// sparseCount, pFile->fSparseDataEof, pFile->fDirEntry.fileName);
|
||||
//LOGI(" SparseCount %ld dataEof %ld -> %lld '%s'",
|
||||
// sparseCount, pFile->fExtData.eof, pFile->fSparseDataEof,
|
||||
// pFile->fDirEntry.fileName);
|
||||
delete[] blockList;
|
||||
blockList = NULL;
|
||||
delete[] indexList;
|
||||
|
@ -1168,9 +1169,9 @@ DIError DiskFSProDOS::ScanFileUsage(void)
|
|||
&sparseCount);
|
||||
pFile->fSparseDataEof =
|
||||
(di_off_t) pFile->fDirEntry.eof - sparseCount * kBlkSize;
|
||||
//LOGI(" +++ sparseCount=%ld blockCount=%ld sparseDataEof=%ld '%s'",
|
||||
// sparseCount, blockCount, (long) pFile->fSparseDataEof,
|
||||
// pFile->fDirEntry.fileName);
|
||||
//LOGI(" +++ sparseCount=%ld blockCount=%ld sparseDataEof=%lld '%s'",
|
||||
// sparseCount, blockCount, pFile->fSparseDataEof,
|
||||
// pFile->fDirEntry.fileName);
|
||||
|
||||
delete[] blockList;
|
||||
blockList = NULL;
|
||||
|
@ -1571,7 +1572,7 @@ DIError DiskFSProDOS::Format(DiskImg* pDiskImg, const char* volName)
|
|||
|
||||
PutShortLE(&blkBuf[0x00], 0);
|
||||
PutShortLE(&blkBuf[0x02], kVolHeaderBlock+1);
|
||||
blkBuf[0x04] = strlen(upperName) | (A2FileProDOS::kStorageVolumeDirHeader << 4);
|
||||
blkBuf[0x04] = (uint8_t)(strlen(upperName) | (A2FileProDOS::kStorageVolumeDirHeader << 4));
|
||||
strncpy((char*) &blkBuf[0x05], upperName, A2FileProDOS::kMaxFileName);
|
||||
PutLongLE(&blkBuf[0x16], A2FileProDOS::ConvertProDate(now));
|
||||
PutShortLE(&blkBuf[0x1a], lcFlags);
|
||||
|
@ -2014,7 +2015,7 @@ DIError DiskFSProDOS::CreateFile(const CreateParms* pParms, A2File** ppNewFile)
|
|||
* are lower case. (Some parts of the original may have been stomped
|
||||
* when the name was made unique, so we need to watch for that.)
|
||||
*/
|
||||
dirEntryPtr[0x00] = (pParms->storageType << 4) | strlen(upperName);
|
||||
dirEntryPtr[0x00] = (uint8_t)((pParms->storageType << 4) | strlen(upperName));
|
||||
strncpy((char*) &dirEntryPtr[0x01], upperName, A2FileProDOS::kMaxFileName);
|
||||
if (pParms->fileType >= 0 && pParms->fileType <= 0xff)
|
||||
dirEntryPtr[0x10] = (uint8_t) pParms->fileType;
|
||||
|
@ -2270,7 +2271,7 @@ DIError DiskFSProDOS::AllocInitialFileStorage(const CreateParms* pParms,
|
|||
/* fill in directory header fields */
|
||||
// 0x00: prev, set to zero
|
||||
// 0x02: next, set to zero
|
||||
blkBuf[0x04] = (A2FileProDOS::kStorageSubdirHeader << 4) | strlen(upperName);
|
||||
blkBuf[0x04] = (uint8_t)((A2FileProDOS::kStorageSubdirHeader << 4) | strlen(upperName));
|
||||
strncpy((char*) &blkBuf[0x05], upperName, A2FileProDOS::kMaxFileName);
|
||||
blkBuf[0x14] = 0x76; // 0x75 under old P8, 0x76 under GS/OS
|
||||
PutLongLE(&blkBuf[0x1c], A2FileProDOS::ConvertProDate(pParms->createWhen));
|
||||
|
@ -3511,7 +3512,7 @@ DIError DiskFSProDOS::RenameFile(A2File* pGenericFile, const char* newName)
|
|||
dierr = kDIErrBadDirectory;
|
||||
goto bail;
|
||||
}
|
||||
ptr[0x00] = (ptr[0x00] & 0xf0) | strlen(upperName);
|
||||
ptr[0x00] = (uint8_t)((ptr[0x00] & 0xf0) | strlen(upperName));
|
||||
memcpy(&ptr[0x01], upperName, A2FileProDOS::kMaxFileName);
|
||||
PutShortLE(&ptr[0x1c], lcFlags); // version/min_version
|
||||
if (isAW)
|
||||
|
@ -3526,7 +3527,7 @@ DIError DiskFSProDOS::RenameFile(A2File* pGenericFile, const char* newName)
|
|||
dierr = kDIErrBadDirectory;
|
||||
goto bail;
|
||||
}
|
||||
ptr[0x00] = (ptr[0x00] & 0xf0) | strlen(upperName);
|
||||
ptr[0x00] = (uint8_t)((ptr[0x00] & 0xf0) | strlen(upperName));
|
||||
memcpy(&ptr[0x01], upperName, A2FileProDOS::kMaxFileName);
|
||||
PutShortLE(&ptr[0x1c], lcFlags); // version/min_version
|
||||
}
|
||||
|
@ -3777,7 +3778,7 @@ DIError DiskFSProDOS::RenameVolume(const char* newName)
|
|||
dierr = kDIErrBadDirectory;
|
||||
goto bail;
|
||||
}
|
||||
ptr[0x00] = (ptr[0x00] & 0xf0) | strlen(upperName);
|
||||
ptr[0x00] = (uint8_t)((ptr[0x00] & 0xf0) | strlen(upperName));
|
||||
memcpy(&ptr[0x01], upperName, A2FileProDOS::kMaxFileName);
|
||||
PutShortLE(&ptr[0x16], lcFlags); // reserved fields
|
||||
|
||||
|
@ -4537,6 +4538,8 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
bool allocSparse = (pDiskFS->GetParameter(DiskFS::kParmProDOS_AllocSparse) != 0);
|
||||
uint8_t blkBuf[kBlkSize];
|
||||
uint16_t keyBlock;
|
||||
bool allZero = true;
|
||||
const uint8_t* scanPtr = (const uint8_t*)buf;
|
||||
|
||||
if (len >= 0x01000000) { // 16MB
|
||||
assert(false);
|
||||
|
@ -4572,13 +4575,32 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
keyBlock = pFile->fExtData.keyBlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* See if the file is completely empty. This lets us do an optimization
|
||||
* where we store it as a seedling. (GS/OS seems to do this, ProDOS 8
|
||||
* v2.0.3 tends to allocate the first block.)
|
||||
*/
|
||||
for (unsigned int i = 0; i < len; ++i, ++scanPtr) {
|
||||
if (*scanPtr != 0x00) {
|
||||
allZero = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (allZero) {
|
||||
LOGI("+++ found file filled with %zd zeroes", len);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special-case seedling files. Just write the data into the key block
|
||||
* and we're done.
|
||||
*/
|
||||
if (len <= (size_t)kBlkSize) {
|
||||
if (allZero || len <= (size_t)kBlkSize) {
|
||||
memset(blkBuf, 0, sizeof(blkBuf));
|
||||
memcpy(blkBuf, buf, len);
|
||||
if (!allZero) {
|
||||
memcpy(blkBuf, buf, len);
|
||||
} else {
|
||||
LOGI("+++ ProDOS storing large but empty file as seedling");
|
||||
}
|
||||
dierr = pDiskFS->GetDiskImg()->WriteBlock(keyBlock, blkBuf);
|
||||
if (dierr != kDIErrNone)
|
||||
goto bail;
|
||||
|
@ -4613,11 +4635,9 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
*/
|
||||
const uint8_t* blkPtr;
|
||||
long blockIdx;
|
||||
bool allZero;
|
||||
long progressCounter;
|
||||
|
||||
progressCounter = 0;
|
||||
allZero = true;
|
||||
blkPtr = (const uint8_t*) buf;
|
||||
for (blockIdx = 0; blockIdx < fBlockCount; blockIdx++) {
|
||||
long newBlock;
|
||||
|
@ -4631,12 +4651,24 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
blkPtr = blkBuf;
|
||||
}
|
||||
|
||||
if (allocSparse && IsEmptyBlock(blkPtr))
|
||||
newBlock = 0;
|
||||
else {
|
||||
if (allocSparse && IsEmptyBlock(blkPtr)) {
|
||||
if (blockIdx == 0) {
|
||||
// Fix for issues #18 and #49. GS/OS appears to get confused
|
||||
// if the first entry in the master index block for a "tree"
|
||||
// file is zero. We can avoid the problem by always allocating
|
||||
// the first data block, which causes allocation of the first
|
||||
// index block. (The "all zeroes" case was handled earlier,
|
||||
// so if we got here we know this won't be an empty seedling.)
|
||||
LOGI("+++ allocating storage for empty first block");
|
||||
newBlock = pDiskFS->AllocBlock();
|
||||
fOpenBlocksUsed++;
|
||||
} else {
|
||||
// Sparse.
|
||||
newBlock = 0;
|
||||
}
|
||||
} else {
|
||||
newBlock = pDiskFS->AllocBlock();
|
||||
fOpenBlocksUsed++;
|
||||
allZero = false;
|
||||
}
|
||||
|
||||
if (newBlock < 0) {
|
||||
|
@ -4692,7 +4724,9 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
/*
|
||||
* Now we have a full block map. Allocate any needed index blocks and
|
||||
* write them.
|
||||
*
|
||||
*/
|
||||
#if 0 // now done earlier
|
||||
/*
|
||||
* If our block map is empty, i.e. the entire file is sparse, then
|
||||
* there's no need to create a sapling. We just leave the file in
|
||||
* seedling form. This can only happen for a completely empty file.
|
||||
|
@ -4706,7 +4740,9 @@ DIError A2FDProDOS::Write(const void* buf, size_t len, size_t* pActual)
|
|||
goto bail;
|
||||
fOpenStorageType = A2FileProDOS::kStorageSeedling;
|
||||
fBlockList[0] = keyBlock;
|
||||
} else if (fBlockCount <= 256) {
|
||||
} else
|
||||
#endif
|
||||
if (fBlockCount <= 256) {
|
||||
/* sapling file, write an index block into the key block */
|
||||
//bool allzero = true; <-- should this be getting used?
|
||||
assert(fBlockCount > 1);
|
||||
|
@ -5013,12 +5049,27 @@ DIError A2FDProDOS::Close(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Find the #of sparse blocks.
|
||||
* Find the #of sparse blocks. We do this to update the "sparse EOF",
|
||||
* which determines the "compressed" size shown in the file list. We
|
||||
* have two cases: normal file with sparse contents, and seedling file
|
||||
* that is entirely sparse except for the first block.
|
||||
*
|
||||
* In the normal case, we walk through the list of data blocks,
|
||||
* looking for gaps. In the seedling case, we just use the EOF.
|
||||
*
|
||||
* This is just for display. The value seen after adding a file should
|
||||
* not change if you reload the disk image.
|
||||
*/
|
||||
int sparseCount = 0;
|
||||
for (int i = 0; i < fBlockCount; i++) {
|
||||
if (fBlockList[i] == 0)
|
||||
sparseCount++;
|
||||
int sparseBlocks = 0;
|
||||
if (fBlockCount == 1 && fOpenEOF > kBlkSize) {
|
||||
// 1023/1024 = 2 blocks = 1 sparse
|
||||
// 1025 = 3 blocks = 2 sparse
|
||||
sparseBlocks = (int)((fOpenEOF-1) / kBlkSize);
|
||||
} else {
|
||||
for (int i = 0; i < fBlockCount; i++) {
|
||||
if (fBlockList[i] == 0)
|
||||
sparseBlocks++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5036,19 +5087,19 @@ DIError A2FDProDOS::Close(void)
|
|||
pFile->fExtData.storageType = fOpenStorageType;
|
||||
pFile->fExtData.blocksUsed = newBlocksUsed;
|
||||
pFile->fExtData.eof = newEOF;
|
||||
pFile->fSparseDataEof = (di_off_t) newEOF - (sparseCount * kBlkSize);
|
||||
pFile->fSparseDataEof = (di_off_t) newEOF - (sparseBlocks * kBlkSize);
|
||||
if (pFile->fSparseDataEof < 0)
|
||||
pFile->fSparseDataEof = 0;
|
||||
} else {
|
||||
pFile->fExtRsrc.storageType = fOpenStorageType;
|
||||
pFile->fExtRsrc.blocksUsed = newBlocksUsed;
|
||||
pFile->fExtRsrc.eof = newEOF;
|
||||
pFile->fSparseRsrcEof = (di_off_t) newEOF - (sparseCount * kBlkSize);
|
||||
pFile->fSparseRsrcEof = (di_off_t) newEOF - (sparseBlocks * kBlkSize);
|
||||
if (pFile->fSparseRsrcEof < 0)
|
||||
pFile->fSparseRsrcEof = 0;
|
||||
}
|
||||
} else {
|
||||
pFile->fSparseDataEof = (di_off_t) newEOF - (sparseCount * kBlkSize);
|
||||
pFile->fSparseDataEof = (di_off_t) newEOF - (sparseBlocks * kBlkSize);
|
||||
if (pFile->fSparseDataEof < 0)
|
||||
pFile->fSparseDataEof = 0;
|
||||
}
|
||||
|
|
|
@ -344,6 +344,9 @@ DIError DiskFSRDOS::ReadCatalog(void)
|
|||
|
||||
pFile = new A2FileRDOS(this);
|
||||
|
||||
memcpy(pFile->fRawFileName, dirPtr, A2FileRDOS::kMaxFileName);
|
||||
pFile->fRawFileName[A2FileRDOS::kMaxFileName] = '\0';
|
||||
|
||||
memcpy(pFile->fFileName, dirPtr, A2FileRDOS::kMaxFileName);
|
||||
pFile->fFileName[A2FileRDOS::kMaxFileName] = '\0';
|
||||
pFile->FixFilename();
|
||||
|
@ -521,6 +524,19 @@ DIError A2FileRDOS::Open(A2FileDescr** ppOpenFile, bool readOnly,
|
|||
return kDIErrNone;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the raw filename.
|
||||
*
|
||||
* If a pointer to a size_t is passed in, it will be filled with the
|
||||
* raw filename length.
|
||||
*/
|
||||
const char* A2FileRDOS::GetRawFileName(size_t* size) const {
|
||||
if (size) {
|
||||
*size = strlen(fRawFileName);
|
||||
}
|
||||
return fRawFileName;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ===========================================================================
|
||||
|
|
|
@ -30,7 +30,7 @@ int TwoImgHeader::InitHeader(int imageFormat, uint32_t imageSize,
|
|||
{
|
||||
if (imageSize == 0)
|
||||
return -1;
|
||||
if (imageFormat < kImageFormatDOS || imageFormat > (int) kImageFormatNibble)
|
||||
if (imageFormat < (int) kImageFormatDOS || imageFormat > (int) kImageFormatNibble)
|
||||
return -1;
|
||||
|
||||
if (imageFormat != kImageFormatNibble &&
|
||||
|
|
|
@ -30,7 +30,27 @@ namespace DiskImgLib {
|
|||
*/
|
||||
class DISKIMG_API TwoImgHeader {
|
||||
public:
|
||||
TwoImgHeader(void) : fDOSVolumeNum(-1), fComment(NULL), fCreatorChunk(NULL)
|
||||
TwoImgHeader(void) :
|
||||
fMagic(0),
|
||||
fCreator(0),
|
||||
fHeaderLen(0),
|
||||
fVersion(0),
|
||||
fImageFormat(0),
|
||||
fFlags(0),
|
||||
fNumBlocks(0),
|
||||
fDataOffset(0),
|
||||
fDataLen(0),
|
||||
fCmtOffset(0),
|
||||
fCmtLen(0),
|
||||
fCreatorOffset(0),
|
||||
fCreatorLen(0),
|
||||
fSpare(),
|
||||
|
||||
fDOSVolumeNum(-1),
|
||||
fMagicStr(),
|
||||
fCreatorStr(),
|
||||
fComment(NULL),
|
||||
fCreatorChunk(NULL)
|
||||
{}
|
||||
virtual ~TwoImgHeader(void) {
|
||||
delete[] fComment;
|
||||
|
|
|
@ -119,7 +119,9 @@ private:
|
|||
*/
|
||||
class Win32VolumeAccess {
|
||||
public:
|
||||
Win32VolumeAccess(void) : fpBlockAccess(NULL)
|
||||
Win32VolumeAccess(void) :
|
||||
fTotalBlocks(-1),
|
||||
fpBlockAccess(NULL)
|
||||
{}
|
||||
virtual ~Win32VolumeAccess(void) {
|
||||
if (fpBlockAccess != NULL) {
|
||||
|
@ -305,7 +307,11 @@ private:
|
|||
*/
|
||||
class PhysicalBlockAccess : public BlockAccess {
|
||||
public:
|
||||
PhysicalBlockAccess(void) : fHandle(NULL), fInt13Unit(-1) {}
|
||||
PhysicalBlockAccess(void) :
|
||||
fHandle(NULL),
|
||||
fInt13Unit(-1),
|
||||
fFloppyKind(kFloppyUnknown)
|
||||
{}
|
||||
virtual ~PhysicalBlockAccess(void) {}
|
||||
|
||||
virtual DIError Open(const WCHAR* deviceName, bool readOnly);
|
||||
|
|
|
@ -14,18 +14,17 @@
|
|||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<ProjectGuid>{0CFE6FAD-0126-4E99-8625-C807D1D2AAF4}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -14,20 +14,19 @@
|
|||
<ProjectGuid>{0FA742E9-8C07-43DD-AFF8-CE31FAF70821}</ProjectGuid>
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -15,18 +15,17 @@
|
|||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<ProjectGuid>{7DF41D71-C8DC-48AA-B372-4613210310A4}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
<ProjectGuid>{C48AE53B-3DCB-43B1-9207-B7C5B6BB78AF}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>nufxlib</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
class ReformatAsm : public ReformatText {
|
||||
public:
|
||||
ReformatAsm(void) {}
|
||||
ReformatAsm(void) : fOutBuf(), fOutBufIndex(0) {}
|
||||
virtual ~ReformatAsm(void) {}
|
||||
|
||||
void OutputStart(void) {
|
||||
|
@ -129,7 +129,7 @@ private:
|
|||
*/
|
||||
class ReformatLISA3 : public ReformatAsm {
|
||||
public:
|
||||
ReformatLISA3(void) : fSymTab(NULL) {}
|
||||
ReformatLISA3(void) : fSymTab(NULL), fSymCount(0) {}
|
||||
virtual ~ReformatLISA3(void) {}
|
||||
|
||||
virtual void Examine(ReformatHolder* pHolder) override;
|
||||
|
@ -197,7 +197,14 @@ private:
|
|||
*/
|
||||
class ReformatLISA4 : public ReformatAsm {
|
||||
public:
|
||||
ReformatLISA4(void) : fSymTab(NULL) {}
|
||||
ReformatLISA4(void) :
|
||||
fSymTab(NULL),
|
||||
fSymCount(0),
|
||||
fOpTab(0),
|
||||
fAdTab(0),
|
||||
fComTab(0),
|
||||
fCpuType(0)
|
||||
{}
|
||||
virtual ~ReformatLISA4(void) { delete[] fSymTab; }
|
||||
|
||||
virtual void Examine(ReformatHolder* pHolder) override;
|
||||
|
|
|
@ -200,7 +200,16 @@ public:
|
|||
/*
|
||||
* Construct/destruct our object.
|
||||
*/
|
||||
ReformatHolder(void) {
|
||||
ReformatHolder(void) :
|
||||
fApplies(),
|
||||
fFileType(0),
|
||||
fAuxType(0),
|
||||
fSourceFormat(kSourceFormatGeneric),
|
||||
fNameExt(NULL),
|
||||
fSourceBuf(),
|
||||
fSourceLen(),
|
||||
fErrorBuf()
|
||||
{
|
||||
int i;
|
||||
for (int part = 0; part < kPartMAX; part++) {
|
||||
if (part == kPartUnknown)
|
||||
|
@ -216,10 +225,6 @@ public:
|
|||
}
|
||||
for (i = 0; i < kOptMAX; i++)
|
||||
fOption[i] = 0;
|
||||
|
||||
fFileType = fAuxType = 0;
|
||||
fSourceFormat = kSourceFormatGeneric;
|
||||
fNameExt = NULL;
|
||||
}
|
||||
~ReformatHolder(void) {
|
||||
LOGI("In ~ReformatHolder");
|
||||
|
|
|
@ -15,18 +15,17 @@
|
|||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
class CancelDialog : public ModelessDialog {
|
||||
public:
|
||||
CancelDialog(void) {}
|
||||
CancelDialog(void) : fpCancelFlag(NULL) {}
|
||||
virtual ~CancelDialog(void) {}
|
||||
|
||||
BOOL Create(bool* pCancelFlag, int dialogID, CWnd* pParentWnd = NULL) {
|
||||
|
|
|
@ -46,7 +46,8 @@ class SelectFilesDialog : public CFileDialog {
|
|||
public:
|
||||
SelectFilesDialog(const WCHAR* rctmpl, bool showHelp, CWnd* pParentWnd = NULL) :
|
||||
CFileDialog(true, NULL, NULL, OFN_HIDEREADONLY, NULL, pParentWnd,
|
||||
0, FALSE /*disable Vista style*/)
|
||||
0, FALSE /*disable Vista style*/),
|
||||
fPrevWndProc(NULL)
|
||||
{
|
||||
// Set flags. We specify ALLOWMULTISELECT but no filename buffer;
|
||||
// we want the multi-select behavior but we don't want to return
|
||||
|
|
|
@ -362,7 +362,7 @@ void CreateSimpleFont(CFont* pFont, CWnd* pWnd, const WCHAR* typeFace,
|
|||
void GetWin32ErrorString(DWORD err, CString* pStr)
|
||||
{
|
||||
DWORD count;
|
||||
LPVOID lpMsgBuf;
|
||||
LPVOID lpMsgBuf = NULL;
|
||||
|
||||
count = FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
|
@ -417,6 +417,27 @@ void CheckedLoadString(CString* pString, UINT nID)
|
|||
}
|
||||
}
|
||||
|
||||
float GetDesktopScaleFactor()
|
||||
{
|
||||
// The current scale factor for controls is determined by the settings
|
||||
// for the main display at the time the application was launched. If we
|
||||
// don't do this, the controls will get all scrunched together if the
|
||||
// scale is over 100% (issue #53). The settings API doesn't seem to
|
||||
// allow scaling things down, so we're only worried about expansion here.
|
||||
//
|
||||
// https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dpi-related-apis-and-registry-settings?view=windows-11#primary-display-dpi-scale-factor
|
||||
// Get desktop dc
|
||||
HDC desktopDc = ::GetDC(NULL);
|
||||
// Get native resolution
|
||||
int horizontalDPI = GetDeviceCaps(desktopDc, LOGPIXELSX);
|
||||
int verticalDPI = GetDeviceCaps(desktopDc, LOGPIXELSY);
|
||||
|
||||
float scaleFactor = horizontalDPI / 96.0f;
|
||||
LOGD("Native DPI: %dx%d, scaleFactor=%.3f",
|
||||
horizontalDPI, verticalDPI, scaleFactor);
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ===========================================================================
|
||||
|
@ -486,6 +507,7 @@ void LogHexDump(const void* vbuf, long len)
|
|||
cp = outBuf + strlen(outBuf);
|
||||
}
|
||||
|
||||
ASSERT(cp != NULL);
|
||||
sprintf(cp, "%02x ", *buf++);
|
||||
cp += 3;
|
||||
}
|
||||
|
|
|
@ -199,6 +199,13 @@ bool IsWin9x(void);
|
|||
*/
|
||||
void CheckedLoadString(CString* pString, UINT nID);
|
||||
|
||||
/*
|
||||
* Returns the desktop scaling factor (usually 1.0). Assumes vertical and
|
||||
* horizontal scaling is identical.
|
||||
*/
|
||||
float GetDesktopScaleFactor();
|
||||
|
||||
|
||||
/*
|
||||
* ====================================
|
||||
* Miscellaneous functions
|
||||
|
|
|
@ -15,18 +15,17 @@
|
|||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<ProjectGuid>{04BFAE2A-7AB3-4B63-B4AB-42FF1D6AD3C5}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
<ProjectGuid>{B66109F4-217B-43C0-86AA-EB55657E5AC0}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>zlib</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
Loading…
Reference in New Issue