Compare commits

...

16 Commits

Author SHA1 Message Date
Andy McFadden fc2fc1429d
Add link to CiderPress II 2023-12-28 10:37:40 -08:00
Andy McFadden 53c4050b09 Version 4.1.1 2023-05-12 16:12:15 -07:00
Andy McFadden e4cf9d8ba5 Fix DOS T/S end-of-list test
Only affects a small percentage of very large or sparse files.

(issue #59)
2023-03-10 17:25:13 -08:00
Andy McFadden 118b306e11 Recompile help blob
The hardest part is finding the HTML Help Workshop installer.

http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe
http://web.archive.org/web/20160314043751/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/helpdocs.zip
2023-01-14 21:19:33 -08:00
Andy McFadden 1d53e4bcae
Merge pull request #57 from polluks2/master
Fixed some typos
2023-01-14 15:16:34 -08:00
polluks 508475a094 Fixed some typos 2023-01-14 23:42:17 +01:00
Andy McFadden a1218a8dcb Update URLs 2022-10-08 09:20:32 -07:00
Andy McFadden 0790c97ee2 Fix comment 2022-08-07 12:53:29 -07:00
Andy McFadden 5f5c089506 Update to Visual Studio 2022 2022-06-15 08:17:39 -07:00
Andy McFadden f63738444c Version 4.1.1-d1 2022-01-07 11:35:36 -08:00
Andy McFadden 2cb5bf0dcc Fix file viewer layout
If scaling > 100% is enabled on the primary display, the controls in
the dialog window get bigger.  The file viewer uses hard-coded values
for the initial and minimum window size, which causes the expanded
controls to draw on top of each other.  (Issue #53.)

We now query the system for the scale factor, and adjust the window
size accordingly.
2022-01-07 11:34:46 -08:00
Andy McFadden b42cc8efe9 Fix Linux build
gcc is justifiably annoyed by variable initialization crossed by
a goto.

(issue #51)
2021-09-07 13:36:28 -07:00
Andy McFadden 5950cb7c74 Version 4.1.0 2021-08-16 15:20:10 -07:00
Andy McFadden b87037b75e Version 4.1.0-d3 2021-07-23 19:24:15 -07:00
Andy McFadden d39c61255c Work around ProDOS sparse block issue
It appears that some programs, notably Copy ][+ and the GS/OS FST,
expect that the first block of a sparse file will always be
allocated, even if it's just 512 zeroes.  I've only seen this fail
in cases where the first entry in the master index block of a "tree"
file is zero, because the first 128KB are sparse, but rumor has it
that the issue can affect "sapling" files as well.

This changes CiderPress to work the way ProDOS does: always allocate
a block to hold the first 512 bytes of the file.  The only exception
to this is a file that is nothing but zeroes (perhaps populated by
creating a file and setting its EOF to something large), which can
be stored as a seedling.

(for issues #15 and #49)
2021-07-23 18:52:23 -07:00
Andy McFadden e098069b10 Version 4.1.0-d2 2021-05-10 17:42:39 -07:00
32 changed files with 564 additions and 102 deletions

418
.gitignore vendored
View File

@ -1,32 +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
# Doxygen
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
diskimg/doc/
# 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

View File

@ -1,14 +1,14 @@
DeployMaster Installation Script
630
720
faddenSoft
http://www.faddensoft.com/
CiderPress
http://a2ciderpress.com/
4.1.0-d1
4.1.1
TRUE
44310
45058
C:\DATA\faddenSoft\fs.ico
Copyright © 2021 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
@ -396,9 +399,12 @@ FALSE
4095
Setup410d1.exe
Setup411.exe
FALSE
TRUE
FALSE
FALSE

View File

@ -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
@ -81,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
@ -163,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 ####

Binary file not shown.

View File

@ -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.

View File

@ -91,7 +91,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">&nbsp;&nbsp; GetPort():@Port</FONT></P>
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">&nbsp;&nbsp; FreeMem():FreeBytes/4</FONT></P>
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="Courier New" SIZE="2">&nbsp;</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.&nbsp; (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">&nbsp;</FONT></P>

View File

@ -73,7 +73,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; For this reason, damaged entries will usually be shorter than undamaged ones.&nbsp; 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.&nbsp; In most cases the decoder will either make an accurate determination or will conclude that the signal is too distorted to process.&nbsp; 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">&nbsp;</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.&nbsp; 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.&nbsp; 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">&nbsp;</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">&nbsp;</FONT></P>

View File

@ -17,7 +17,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; (To change the pathname, use the <A HREF="t42.htm">rename</A> feature.)&nbsp; The file type will be shown in the drop-down box, and may be changed by selecting a new entry.&nbsp; Tip: if you click in the drop box and type a letter, you will move to the next entry that begins with that letter.&nbsp; 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">&nbsp;</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">&nbsp;</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.&nbsp; 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">&nbsp;</FONT></P>

View File

@ -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.&nbsp; All of them convert common symbols and accented characters from the IIgs fonts to Windows fonts.&nbsp; Not all of the symbols have equivalents, but many of them do.&nbsp; 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">&nbsp;</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).&nbsp; The "Teach" application on the Apple IIgs created these, which have text in the data fork and formatting information in the resource fork.&nbsp; 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.&nbsp; 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).&nbsp; The "Teach" application on the Apple IIgs created these, which have text in the data fork and formatting information in the resource fork.&nbsp; 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.&nbsp; The results are usually pretty good.</FONT>
<LI><FONT FACE="MS Sans Serif" SIZE="2">AppleWorks GS Word Processor (GWP $8010).&nbsp; Same basic features as "Teach", plus some basic formatting features like centered and justified paragraphs.&nbsp; 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).&nbsp; Does a IIgs text conversion without any other reformatting.&nbsp; 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">&nbsp;</FONT></P>
@ -118,7 +118,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3">&nbsp;</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">&nbsp;</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.&nbsp; When you set pixels to certain colors, the output on an RGB monitor was exactly what you expected.&nbsp; 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.&nbsp; The way colors in the file were translated to colors on screen involves some minor color palette gymnastics.&nbsp; 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.&nbsp; When you set pixels to certain colors, the output on an RGB monitor was exactly what you expected.&nbsp; 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.&nbsp; The way colors in the file were translated to colors on screen involves some minor color palette gymnastics.&nbsp; 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">&nbsp;</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.&nbsp; 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">&nbsp;</FONT></P>

View File

@ -42,7 +42,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; (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.)&nbsp; Some files may appear to be damaged.&nbsp; 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.&nbsp; Attempting to read or write files to the volume as if it were a ProDOS disk is not recommended.&nbsp; The safe way to switch between Apple II and Windows formatting is to use the image-copy tool to overwrite the entire CF card.&nbsp; 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">&nbsp;</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.&nbsp; USB2.0 readers will be faster than USB1.x, and Firewire, PCMCIA, or IDE interfaces will usually be faster than USB2.0.&nbsp; Also, some cards have a higher speed rating than others.&nbsp; Speeds of 200-400KB/sec are typical when copying from a USB1.x device, while writing to it may reach 700KB/sec.&nbsp; 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.&nbsp; USB2.0 readers will be faster than USB1.x, and Firewire, PCMCIA, or IDE interfaces will usually be faster than USB2.0.&nbsp; Also, some cards have a higher speed rating than others.&nbsp; Speeds of 200-400KB/sec are typical when copying from a USB1.x device, while writing to it may reach 700KB/sec.&nbsp; 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">&nbsp;</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.&nbsp; 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">&nbsp;</FONT></P>
@ -56,7 +56,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="3">&nbsp;</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">&nbsp;</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).&nbsp; 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).&nbsp; 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">&nbsp;</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.&nbsp; Some interfaces return different answers depending on what version you're running.&nbsp; CiderPress currently scans the drive to determine its size.</FONT></P>
<P STYLE="margin-top:0;margin-bottom:0;">

View File

@ -34,7 +34,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; 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.&nbsp; Extracting that ProDOS volume may be awkward.</FONT></P>
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; That is, each partition will be labeled as ProDOS, HFS, a device driver, or whatever is appropriate.&nbsp; CiderPress does not currently have the ability to change these labels.&nbsp; 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.&nbsp; That is, each partition will be labeled as ProDOS, HFS, a device driver, or whatever is appropriate.&nbsp; CiderPress does not currently have the ability to change these labels.&nbsp; 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">&nbsp;</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.&nbsp; 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.&nbsp; 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">&nbsp;</FONT></P>

View File

@ -35,7 +35,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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.&nbsp; 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.&nbsp; 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">&nbsp;</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.&nbsp; 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.&nbsp; 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.&nbsp; 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.&nbsp; 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">&nbsp;</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">&nbsp;</FONT></P>

View File

@ -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.&nbsp; 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.&nbsp; 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.&nbsp; 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">&nbsp;</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">&nbsp;</FONT></P>

View File

@ -29,7 +29,7 @@
<P STYLE="margin-top:0;margin-bottom:0;"><FONT FACE="MS Sans Serif" SIZE="2">&nbsp;</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".&nbsp; 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".&nbsp; 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.&nbsp; Click "change account type".</FONT>

View File

@ -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">&nbsp;</FONT></P>

View File

@ -14,8 +14,8 @@
/* CiderPress version numbers */
#define kAppMajorVersion 4
#define kAppMinorVersion 1
#define kAppBugVersion 0
#define kAppDevString L"-d1"
#define kAppBugVersion 1
#define kAppDevString L""
/*
* Windows application object.

View File

@ -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);
}

View File

@ -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)

View File

@ -20,12 +20,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -2770,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 {

View File

@ -1472,11 +1472,7 @@ 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 will be lost. (Some HFS references indicate
* that '\0' is allowed, but I think people assume that because the API
* uses a string with an explicit length. Looking at "Inside Mac: Files"
* chapter 2, page 2-71, HFS filenames are stored in a fixed 31-byte
* field that is padded with zeroes, so embedded nulls are impossible.)
* 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

View File

@ -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;
@ -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;
}

View File

@ -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 &&

View File

@ -18,13 +18,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -18,13 +18,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>

View File

@ -19,13 +19,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -19,14 +19,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</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>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -19,13 +19,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -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;
}
/*
* ===========================================================================

View File

@ -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

View File

@ -19,13 +19,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@ -19,14 +19,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</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>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>