Packaging enhancements.

This commit is contained in:
Scott Duensing 2026-10-18 23:00:53 -05:00
parent aecc93b7ab
commit b5b4091f7f
195 changed files with 5018 additions and 1021 deletions

2
.gitignore vendored
View file

@ -15,3 +15,5 @@ claudeDocs/
toolchains/ toolchains/
dist/ dist/
NOTES.md NOTES.md
__pycache__/
*.py[cod]

View file

@ -22,7 +22,7 @@ FRM = apps/kpunch/dvxbasic/dvxbasic.app
CLS = apps/kpunch/dvxbasic/dvxbasic.app CLS = apps/kpunch/dvxbasic/dvxbasic.app
CTL = apps/kpunch/dvxbasic/dvxbasic.app CTL = apps/kpunch/dvxbasic/dvxbasic.app
HLP = apps/kpunch/dvxhelp/dvxhelp.app HLP = apps/kpunch/dvxhelp/dvxhelp.app
DHS = apps/kpunch/dvxhelp/helpedit.app DHS = apps/kpunch/helpedit/helpedit.app
DPK = apps/kpunch/software/software.app DPK = apps/kpunch/software/software.app
MOD = apps/kpunch/player/player.app MOD = apps/kpunch/player/player.app
S3M = apps/kpunch/player/player.app S3M = apps/kpunch/player/player.app

View file

@ -2,8 +2,8 @@
The settings files DVX ships and the files it shares with every program. The settings files DVX ships and the files it shares with every program.
The build copies them into `bin/` (text files converted to DOS line The build copies them into `bin/` (text files converted to DOS line
endings, CR+LF, with sed): the settings into `bin/system/`, the themes and endings, CR+LF, with sed): the settings into `bin/system/`, the themes,
wallpapers into `bin/shared/`. At its first start DVX copies `DVX.INI` to wallpapers, and instrument banks into `bin/shared/`. At its first start DVX copies `DVX.INI` to
the user folder (`USER`, or the folder `DVXUSER` names), where every the user folder (`USER`, or the folder `DVXUSER` names), where every
change is saved; the shipped copy is never written. File types work the change is saved; the shipped copy is never written. File types work the
same way, except that the user's `ASSOC.INI` holds only their changes to same way, except that the user's `ASSOC.INI` holds only their changes to
@ -24,6 +24,10 @@ the shipped list.
| `wpaper/blueglow.jpg` | `bin/shared/wpaper/blueglow.jpg` | Wallpaper image | | `wpaper/blueglow.jpg` | `bin/shared/wpaper/blueglow.jpg` | Wallpaper image |
| `wpaper/swoop.jpg` | `bin/shared/wpaper/swoop.jpg` | Wallpaper image | | `wpaper/swoop.jpg` | `bin/shared/wpaper/swoop.jpg` | Wallpaper image |
| `wpaper/triangle.jpg` | `bin/shared/wpaper/triangle.jpg` | Wallpaper image | | `wpaper/triangle.jpg` | `bin/shared/wpaper/triangle.jpg` | Wallpaper image |
| `banks/DMXOPL.OP2` | `bin/shared/banks/DMXOPL.OP2` | DMXOPL 1.11, a General MIDI instrument bank for FM music by ConSiGno (MIT): https://github.com/sneakernets/DMXOPL, branch master, commit 63bd4821c6adaff29074f1f6486261961c2014b4 (2017-08-22, "V1.11 Release"), GENMIDI.op2 unchanged (SHA-256 d3feb807e5102d7de3075c2351cced7e853ba2da8708eff98cc1c8ef8f240ce2) |
| `banks/DMXOPL.TXT` | `bin/shared/banks/DMXOPL.TXT` | Its licence and credits |
| `banks/DMXOPL3.OP2` | `bin/shared/banks/DMXOPL3.OP2` | DMXOPL3, its OPL3 successor, by Sneakernets (MIT): the same repository, branch DMXOPL3, commit e83c144a2e6d3c283e20f9d16d011126931892f5 (2018-07-13, after the v2.11d release), GENMIDI.op2 unchanged (SHA-256 92fc03c7734c45b1ece2bfad1f79d1abbd2b27ec6b45fbfb1c5a74f5ce0138c9); DVX plays its OPL3-only waveforms as the OPL2's four, as for every bank |
| `banks/DMXOPL3.TXT` | `bin/shared/banks/DMXOPL3.TXT` | Its licence and credits ("DMXOPL3 by Sneakernets", as the author asks) |
| `keys/*.KEY` | `bin/system/KEYS/*.KEY` | DVX's repository key: packages it signs (DVX's own, and everything the package server publishes) are trusted as DVX's | | `keys/*.KEY` | `bin/system/KEYS/*.KEY` | DVX's repository key: packages it signs (DVX's own, and everything the package server publishes) are trusted as DVX's |
The desktop sounds (`bin/shared/sounds/`) are made by mksounds and the The desktop sounds (`bin/shared/sounds/`) are made by mksounds and the

View file

@ -1258,6 +1258,7 @@ img { max-width: 100%; }
<li><a href="#lang.runtime">SYS_VIDEO_DEFAULT_WIDTH</a></li> <li><a href="#lang.runtime">SYS_VIDEO_DEFAULT_WIDTH</a></li>
<li><a href="#lang.runtime">SysFontGlyphRow</a></li> <li><a href="#lang.runtime">SysFontGlyphRow</a></li>
<li><a href="#lang.runtime">SysGetColor</a></li> <li><a href="#lang.runtime">SysGetColor</a></li>
<li><a href="#lang.runtime">SysLibraryLoaded</a></li>
<li><a href="#lang.runtime">SysLoadTheme</a></li> <li><a href="#lang.runtime">SysLoadTheme</a></li>
<li><a href="#lang.runtime">SysMemoryFreeKb</a></li> <li><a href="#lang.runtime">SysMemoryFreeKb</a></li>
<li><a href="#lang.runtime">SysMemoryTotalKb</a></li> <li><a href="#lang.runtime">SysMemoryTotalKb</a></li>
@ -4653,6 +4654,7 @@ fruit.Remove 1 ' removes Banana, now the first item</code></pre
<div class="topic" id="lang.sql"> <div class="topic" id="lang.sql">
<h1>SQL Functions</h1> <h1>SQL Functions</h1>
<p>DVX BASIC includes SQLite database support through the sql.bas include library. Add sql.bas to your project to gain access to these functions. All functions use database handles and result-set handles (Long integers) returned by SQLOpen and SQLQuery. Numeric parameters and results are Long, so row counts and integer column values keep their full 32-bit range.</p> <p>DVX BASIC includes SQLite database support through the sql.bas include library. Add sql.bas to your project to gain access to these functions. All functions use database handles and result-set handles (Long integers) returned by SQLOpen and SQLQuery. Numeric parameters and results are Long, so row counts and integer column values keep their full 32-bit range.</p>
<p>SQLite is in the Databases part of DVX, which can be left out when DVX is installed. Without it the SQL functions do nothing: SQLOpen returns 0, and SQLError$ says that Databases are not installed. SysLibraryLoaded(&quot;dvxsql&quot;) (system.bas) tells beforehand.</p>
<h2>Opening and Closing Databases</h2> <h2>Opening and Closing Databases</h2>
<h3>SQLOpen</h3> <h3>SQLOpen</h3>
<p>Opens a SQLite database file and returns a database handle (&gt; 0) or 0 on failure. The file is created if it does not exist. A file that cannot be changed (for example one marked read-only) still opens, but only for reading. When SQLOpen returns 0, SQLError$(0) tells you why.</p> <p>Opens a SQLite database file and returns a database handle (&gt; 0) or 0 on failure. The file is created if it does not exist. A file that cannot be changed (for example one marked read-only) still opens, but only for reading. When SQLOpen returns 0, SQLError$(0) tells you why.</p>
@ -4775,7 +4777,7 @@ If Clipboard.GetFormat(vbCFText) Then Text2.Text = Clipboard.GetText()</code></p
CurrentX, CurrentY Where the next drawing starts. CurrentX, CurrentY Where the next drawing starts.
ForeColor, FillColor, FillStyle, DrawWidth, DrawStyle As on a PictureBox (black, transparent fills, a solid pen 1 dot wide to start). ForeColor, FillColor, FillStyle, DrawWidth, DrawStyle As on a PictureBox (black, transparent fills, a solid pen 1 dot wide to start).
ScaleMode, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight The scale (vbTwips to start). ScaleMode, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight The scale (vbTwips to start).
FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikethru The font of Print's text; FontSize is in points (12 to start, in DejaVu Sans). Text prints crisp where the font has large sizes (the Printer Fonts add-on gives DejaVu Sans, Serif, and Sans Mono them), and blockier where a screen size is enlarged. FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikethru The font of Print's text; FontSize is in points (12 to start, in DejaVu Sans). Text prints crisp where the font has sizes made for printing (DejaVu Sans, Serif, and Sans Mono have them from 6 to 24 points at 300 dpi), and a little softer where a smaller size is enlarged.
Copies How many times each page prints (1 to 99); as PrintChoose chose when it is not set. Copies How many times each page prints (1 to 99); as PrintChoose chose when it is not set.
Page The page being drawn (1 first). Read only. Page The page being drawn (1 first). Read only.
Width, Height The page's size in twips (11520 by 14400). Read only. Width, Height The page's size in twips (11520 by 14400). Read only.
@ -5107,7 +5109,7 @@ End Sub</code></pre>
sound.bas Sound: play WAV and VOC files, tones and noise, set the volume (PlayWave, PlayTone, StopWave, SoundInfo$, ...); sounds loaded once and played with volume, pan, and pitch, sound made by the program as it goes, recording from a microphone or line input (RecordStart, RecordStop, RecordLevel, ...), the FM synthesizer chip, a wavetable card's voices and memory (SoundLoad, SoundPlay, SoundSetPitch, SoundCreate, SoundStreamOpen, SoundStreamWrite, FmAlloc, FmWrite, WtAlloc, WtStart, ...); DVX's own event sounds (SoundPlayEvent), master volume, sound driver, and MIDI settings (SoundEventFile$, SoundSetMasterVolume, SoundSettingsStore, ...) sound.bas Sound: play WAV and VOC files, tones and noise, set the volume (PlayWave, PlayTone, StopWave, SoundInfo$, ...); sounds loaded once and played with volume, pan, and pitch, sound made by the program as it goes, recording from a microphone or line input (RecordStart, RecordStop, RecordLevel, ...), the FM synthesizer chip, a wavetable card's voices and memory (SoundLoad, SoundPlay, SoundSetPitch, SoundCreate, SoundStreamOpen, SoundStreamWrite, FmAlloc, FmWrite, WtAlloc, WtStart, ...); DVX's own event sounds (SoundPlayEvent), master volume, sound driver, and MIDI settings (SoundEventFile$, SoundSetMasterVolume, SoundSettingsStore, ...)
music.bas Music: play MOD, S3M, XM, IT, MIDI, WAV, and VOC files, and play notes yourself (MusicLoad, MusicPlay, MusicStop, MusicNoteOn, MusicInfo$, ...); instruments from banks and SoundFonts, a sound card's own (MusicSetBank, MusicPatchSet$, MusicRomBank$); raw bytes to the MIDI port (MidiAcquire, MidiPut, MidiRelease, MidiPortInfo$); what a MIDI keyboard plays, heard as it comes and recorded into MIDI files (MidiInOpen, MidiInMessage, MusicMidiSend, MidiRecordNew, MidiRecordSave, ...) music.bas Music: play MOD, S3M, XM, IT, MIDI, WAV, and VOC files, and play notes yourself (MusicLoad, MusicPlay, MusicStop, MusicNoteOn, MusicInfo$, ...); instruments from banks and SoundFonts, a sound card's own (MusicSetBank, MusicPatchSet$, MusicRomBank$); raw bytes to the MIDI port (MidiAcquire, MidiPut, MidiRelease, MidiPortInfo$); what a MIDI keyboard plays, heard as it comes and recorded into MIDI files (MidiInOpen, MidiInMessage, MusicMidiSend, MidiRecordNew, MidiRecordSave, ...)
fileops.bas Files and folders: folder listings for a file list, paths and names, the file dialogs' filter rule, attributes and the time a file was changed, sizes, free space and disk sizes, drive kinds, whether a folder can be written, the folder for scratch files, making a folder path, and copying, moving, and deleting whole folders at once or as a job with progress, Cancel, and questions (FileOpsList, FileOpsListRows$, FileOpsFilterMatch, FileOpsSetModified, FileOpsDriveType, FileOpsIsWritable, FileOpsMakePath, FileOpsJobCreate, FileOpsJobRunFor, ...) fileops.bas Files and folders: folder listings for a file list, paths and names, the file dialogs' filter rule, attributes and the time a file was changed, sizes, free space and disk sizes, drive kinds, whether a folder can be written, the folder for scratch files, making a folder path, and copying, moving, and deleting whole folders at once or as a job with progress, Cancel, and questions (FileOpsList, FileOpsListRows$, FileOpsFilterMatch, FileOpsSetModified, FileOpsDriveType, FileOpsIsWritable, FileOpsMakePath, FileOpsJobCreate, FileOpsJobRunFor, ...)
system.bas What Control Panel changes, at once for the whole desktop: the screen mode, the system colors and themes, the wallpaper, text smoothing, and the mouse (with DVX's limits and defaults, MOUSE_* and SYS_VIDEO_DEFAULT_*), and storing them in DVX's settings; the system font's character pictures; the mouse pointer and the Shift, Ctrl, and Alt keys anywhere on the screen, moving the pointer, typing keys into the window in front, a picture of the whole screen, and the memory (SysSetVideoMode, SysSetColor, SysLoadTheme, SysSetWallpaper, SysSetTextSmoothing, SysSetMouse, SysColorsStore, SysFontGlyphRow, SysMouseX, SysSendKey, SysScreenshot, SysMemoryFreeKb, ...) system.bas What Control Panel changes, at once for the whole desktop: the screen mode, the system colors and themes, the wallpaper, text smoothing, and the mouse (with DVX's limits and defaults, MOUSE_* and SYS_VIDEO_DEFAULT_*), and storing them in DVX's settings; the system font's character pictures; the mouse pointer and the Shift, Ctrl, and Alt keys anywhere on the screen, moving the pointer, typing keys into the window in front, a picture of the whole screen, the memory, and whether a library is installed (SysSetVideoMode, SysSetColor, SysLoadTheme, SysSetWallpaper, SysSetTextSmoothing, SysSetMouse, SysColorsStore, SysFontGlyphRow, SysMouseX, SysSendKey, SysScreenshot, SysMemoryFreeKb, SysLibraryLoaded, ...)
font.bas Fonts: the font families DVX has, the sizes each comes in, whether one is fixed-pitch, and how wide text and how tall a line is in a font (FontFamilyCount, FontFamilyName$, FontFamilyFixed, FontSizeCount, FontSizeAt, FontNearestSize, FontTextWidth, FontLineHeight, FontAscent, FontRescan) font.bas Fonts: the font families DVX has, the sizes each comes in, whether one is fixed-pitch, and how wide text and how tall a line is in a font (FontFamilyCount, FontFamilyName$, FontFamilyFixed, FontSizeCount, FontSizeAt, FontNearestSize, FontTextWidth, FontLineHeight, FontAscent, FontRescan)
richtext.bas RTF without a control: an RTF document as plain text and plain text as RTF (RtfToText$, TextToRtf$); a RichEdit control reads and writes RTF itself (TextRTF, SelRTF, LoadFile, SaveFile) richtext.bas RTF without a control: an RTF document as plain text and plain text as RTF (RtfToText$, TextToRtf$); a RichEdit control reads and writes RTF itself (TextRTF, SelRTF, LoadFile, SaveFile)
layout.bas Control sizes in characters or in percent of the container instead of pixels (SizeChars, SizePercent) layout.bas Control sizes in characters or in percent of the container instead of pixels (SizeChars, SizePercent)
@ -5387,7 +5389,7 @@ End Sub</code></pre>
End Sub</code></pre> End Sub</code></pre>
<h2>Add-on Packages</h2> <h2>Add-on Packages</h2>
<p>With pkg.bas in the project, a program installs, removes, and makes add-on packages -- the .DPK files Software installs -- the way Software and Package Builder (both written in BASIC) do. PkgOpen() starts a session (a number; PkgClose ends it), and PkgError$(session) says why the last call that failed did. Lists come back as rows for a ListView's SetRows: cells separated by TAB, each row ending in a line feed.</p> <p>With pkg.bas in the project, a program installs, removes, and makes add-on packages -- the .DPK files Software installs -- the way Software and Package Builder (both written in BASIC) do. PkgOpen() starts a session (a number; PkgClose ends it), and PkgError$(session) says why the last call that failed did. Lists come back as rows for a ListView's SetRows: cells separated by TAB, each row ending in a line feed.</p>
<p>What is installed. PkgInstalledRows$ lists every installed package (DVX itself is kpunch.dvx): id, name, version, kind, and summary. A package is named by its id, vendor.name (acme.chess). PkgField$(s, id, field) gives one detail (PKG_FIELD_NAME, PKG_FIELD_VERSION, PKG_FIELD_PUBLISHER, PKG_FIELD_SIGNER_NAME, ...); PkgFilesRows$, PkgDependsRows$, and PkgNeededBy$ its files, what it needs, and what needs it. PkgFileOwner$(s, fileName) is the other way: the id of the package that put a file there (its name from the DVX folder, such as &quot;SHARED\BANKS\KPUNCH\DMXOPL.OP2&quot;; &quot;&quot; when none did).</p> <p>What is installed. PkgInstalledRows$ lists every installed package (DVX itself is kpunch.dvx): id, name, version, kind, and summary. A package is named by its id, vendor.name (acme.chess). PkgField$(s, id, field) gives one detail (PKG_FIELD_NAME, PKG_FIELD_VERSION, PKG_FIELD_PUBLISHER, PKG_FIELD_SIGNER_NAME, ...); PkgFilesRows$, PkgDependsRows$, and PkgNeededBy$ its files, what it needs, and what needs it. PkgFileOwner$(s, fileName) is the other way: the id of the package that put a file there (its name from the DVX folder, such as &quot;SHARED\FONTS\KPUNCH\ARIMO.DFN&quot;; &quot;&quot; when none did).</p>
<p>Installing. PkgOfferFile(s, path) reads a package file and every package beside it (what it may need) as offers, numbered from 0, and returns the number of the one at path (-1 when it cannot be read). PkgOfferField$ and PkgOfferFilesRows$ describe an offer before it is installed; PKG_FIELD_TRUST says whether DVX trusts who signed it. PkgPlan(s, &quot;0&quot;) plans installing it with everything it needs, checked against this DVX and the packages installed (False, with PkgError$ saying why, when it cannot be installed); PkgPlanRows$ lists what will go in, PkgPlanBytes the disk space, and PkgPlanRestart whether libraries or widgets are among them (they work from the next time DVX starts). PkgInstallStart(s) then starts the job, and PkgRunFor(s, milliseconds) runs it a little at a time, returning PKG_RUN_BUSY until it is PKG_RUN_DONE or PKG_RUN_FAILED (PkgRunMessage$ says why); PkgRunPercent and PkgRunCurrent$ show how far it is.</p> <p>Installing. PkgOfferFile(s, path) reads a package file and every package beside it (what it may need) as offers, numbered from 0, and returns the number of the one at path (-1 when it cannot be read). PkgOfferField$ and PkgOfferFilesRows$ describe an offer before it is installed; PKG_FIELD_TRUST says whether DVX trusts who signed it. PkgPlan(s, &quot;0&quot;) plans installing it with everything it needs, checked against this DVX and the packages installed (False, with PkgError$ saying why, when it cannot be installed); PkgPlanRows$ lists what will go in, PkgPlanBytes the disk space, and PkgPlanRestart whether libraries or widgets are among them (they work from the next time DVX starts). PkgInstallStart(s) then starts the job, and PkgRunFor(s, milliseconds) runs it a little at a time, returning PKG_RUN_BUSY until it is PKG_RUN_DONE or PKG_RUN_FAILED (PkgRunMessage$ says why); PkgRunPercent and PkgRunCurrent$ show how far it is.</p>
<pre><code>offer = PkgOfferFile(s, path) <pre><code>offer = PkgOfferFile(s, path)
If offer &gt;= 0 And PkgPlan(s, CStr(offer)) Then If offer &gt;= 0 And PkgPlan(s, CStr(offer)) Then
@ -5446,6 +5448,12 @@ body = &quot;{&quot; &amp; JsonQuote$(&quot;name&quot;) &amp; &quot;: &quot; &am
<p>Mouse: SysSetMouse wheelDir, dblClickMs, accel, mickeys, wheelStep applies a whole mouse setup at once: the scroll wheel's direction (1 or -1, the values of PREFS_CHOICE_WHEEL), the double-click time in milliseconds, the acceleration (a value of PREFS_CHOICE_ACCEL), how far the mouse moves for 8 pixels of pointer movement (8 is normal, higher is slower), and the lines scrolled per wheel notch (1 to 10). An accel or mickeys of 0 leaves that one as it is. SysMouseWheelDir, SysMouseDoubleClick, SysMouseAccel, SysMouseMickeys, and SysMouseWheelStep read the setup in effect. MOUSE_WHEEL_STEP_MIN and MOUSE_WHEEL_STEP_MAX are the limits of the wheel step, and MOUSE_WHEEL_STEP_DEFAULT, MOUSE_DBLCLICK_DEFAULT_MS, and MOUSE_SPEED_DEFAULT are DVX's defaults (what a Default button puts back).</p> <p>Mouse: SysSetMouse wheelDir, dblClickMs, accel, mickeys, wheelStep applies a whole mouse setup at once: the scroll wheel's direction (1 or -1, the values of PREFS_CHOICE_WHEEL), the double-click time in milliseconds, the acceleration (a value of PREFS_CHOICE_ACCEL), how far the mouse moves for 8 pixels of pointer movement (8 is normal, higher is slower), and the lines scrolled per wheel notch (1 to 10). An accel or mickeys of 0 leaves that one as it is. SysMouseWheelDir, SysMouseDoubleClick, SysMouseAccel, SysMouseMickeys, and SysMouseWheelStep read the setup in effect. MOUSE_WHEEL_STEP_MIN and MOUSE_WHEEL_STEP_MAX are the limits of the wheel step, and MOUSE_WHEEL_STEP_DEFAULT, MOUSE_DBLCLICK_DEFAULT_MS, and MOUSE_SPEED_DEFAULT are DVX's defaults (what a Default button puts back).</p>
<p>The pointer and the keyboard: SysMouseX() and SysMouseY() are where the mouse pointer is on the screen, and SysMouseButtons() the buttons held (vbLeftButton, vbRightButton, and vbMiddleButton bits) -- also while the pointer is over another program's window, where your MouseMove events do not see it. SysSetMousePos x, y moves the pointer (it is kept on the screen). SysShiftState() is the Shift, Ctrl, and Alt keys held now (vbShiftMask, vbCtrlMask, and vbAltMask bits). SysSendKey(keyCode, shift) types a key into the window that has the focus as if the user pressed it, like SendKeys in other BASICs: keyCode as a KeyDown event gets it -- a character code such as ASC(&quot;a&quot;) or 13 for Enter, or a vbKey constant such as vbKeyF1 -- and shift the vbShiftMask, vbCtrlMask, and vbAltMask bits held with it (SysSendKey ASC(&quot;s&quot;), vbCtrlMask is Ctrl+S). The keys arrive in order, one at a time, once your code has returned to DVX; up to 64 can wait, and SysSendKey returns False when that many are waiting. A program cannot press the mouse buttons: to &quot;click&quot; a control, call its event procedure or set its value.</p> <p>The pointer and the keyboard: SysMouseX() and SysMouseY() are where the mouse pointer is on the screen, and SysMouseButtons() the buttons held (vbLeftButton, vbRightButton, and vbMiddleButton bits) -- also while the pointer is over another program's window, where your MouseMove events do not see it. SysSetMousePos x, y moves the pointer (it is kept on the screen). SysShiftState() is the Shift, Ctrl, and Alt keys held now (vbShiftMask, vbCtrlMask, and vbAltMask bits). SysSendKey(keyCode, shift) types a key into the window that has the focus as if the user pressed it, like SendKeys in other BASICs: keyCode as a KeyDown event gets it -- a character code such as ASC(&quot;a&quot;) or 13 for Enter, or a vbKey constant such as vbKeyF1 -- and shift the vbShiftMask, vbCtrlMask, and vbAltMask bits held with it (SysSendKey ASC(&quot;s&quot;), vbCtrlMask is Ctrl+S). The keys arrive in order, one at a time, once your code has returned to DVX; up to 64 can wait, and SysSendKey returns False when that many are waiting. A program cannot press the mouse buttons: to &quot;click&quot; a control, call its event procedure or set its value.</p>
<p>Memory: SysMemoryTotalKb() is the computer's memory in KB and SysMemoryFreeKb() how much of it is free (-1 when it cannot be told).</p> <p>Memory: SysMemoryTotalKb() is the computer's memory in KB and SysMemoryFreeKb() how much of it is free (-1 when it cannot be told).</p>
<p>Libraries: some parts of DVX are optional (Setup's &quot;What to install&quot; page; Software lists each as one package), and so are their libraries: Networking has dvxnet, http, and pkgnet (net.bas, http.bas, pkgnet.bas), Databases has dvxsql (sql.bas), and Communications has conn and xfer (conn.bas, xfer.bas). SysLibraryLoaded(libName) is True when the library a DECLARE LIBRARY line names (any case) is installed and was started with DVX. A program that can do without such a library asks first and leaves out what needs it: calling a function of a library that is not there stops the program with &quot;External function not found&quot;. Software, for one, keeps its package server pages off without pkgnet.</p>
<pre><code>If SysLibraryLoaded(&quot;pkgnet&quot;) Then
handle = PkgNetOpen(&quot;&quot;)
Else
lblStatus.Caption = &quot;The package server needs DVX's Networking part.&quot;
End If</code></pre>
<p>System font: SysFontWidth() and SysFontHeight() are the size of every character of the system font in pixels, and SysFontFirstChar() to SysFontFirstChar() + SysFontCharCount() - 1 the character codes it has. SysFontGlyphRow(code, row) is one row of a character's picture: a bit per pixel, &amp;H80 the leftmost -- for drawing text dot by dot, enlarged or in a font editor of your own.</p> <p>System font: SysFontWidth() and SysFontHeight() are the size of every character of the system font in pixels, and SysFontFirstChar() to SysFontFirstChar() + SysFontCharCount() - 1 the character codes it has. SysFontGlyphRow(code, row) is one row of a character's picture: a bit per pixel, &amp;H80 the leftmost -- for drawing text dot by dot, enlarged or in a font editor of your own.</p>
<p>Saving: SysColorsStore, SysWallpaperStore, SysScreenSaverStore, SysFontsStore, and SysMouseStore write the colors, the wallpaper, the screen saver, text smoothing, and the mouse setup into a prefs.bas handle, in the sections DVX reads when it starts; PrefsSetVideoMode does the same for a screen mode. Store them in PrefsLoad(PrefsDvxIni$()) and save it, and DVX starts with them next time. SysColorsLoad, SysWallpaperLoad, SysScreenSaverLoad, SysFontsLoad, and SysMouseLoad apply what a handle holds. A PrefsCreate handle filled with the Store calls is a snapshot in memory: load it again to undo every change, the way Cancel works in Control Panel.</p> <p>Saving: SysColorsStore, SysWallpaperStore, SysScreenSaverStore, SysFontsStore, and SysMouseStore write the colors, the wallpaper, the screen saver, text smoothing, and the mouse setup into a prefs.bas handle, in the sections DVX reads when it starts; PrefsSetVideoMode does the same for a screen mode. Store them in PrefsLoad(PrefsDvxIni$()) and save it, and DVX starts with them next time. SysColorsLoad, SysWallpaperLoad, SysScreenSaverLoad, SysFontsLoad, and SysMouseLoad apply what a handle holds. A PrefsCreate handle filled with the Store calls is a snapshot in memory: load it again to undo every change, the way Cancel works in Control Panel.</p>
<pre><code>Dim snap As Long <pre><code>Dim snap As Long
@ -5511,7 +5519,7 @@ If FontAddFile(App.Path + &quot;\TITLE.DFN&quot;) Then
lblTitle.FontSize = 36 lblTitle.FontSize = 36
lblTitle.FontBold = True lblTitle.FontBold = True
End If</code></pre> End If</code></pre>
<p>Every control and every form can have a font of its own, set with the properties FontName, FontSize (in pixels), FontBold, FontItalic, FontUnderline, and FontStrikethru, as in Visual Basic; they need no include file. A control that is given no font uses the font of the control it is in (a Frame, for example), else its form's, so setting a form's font changes every control on it that has none. Reading one of the properties gives the font the object draws with: a FontSize the family does not come in reads back as the nearest size it has, and a FontName DVX does not have reads back as &quot;System&quot;. Setting one changes only that part of the font. Controls that edit text in columns (TextBox, TextArea, ComboBox, SpinButton, and Terminal) take only fixed-pitch families and show the System font in place of a proportional one. Print, TextWidth, TextHeight, PrintAccel, and TextWidthAccel on forms and picture boxes use the object's font. In the form designer, the Font row of the Properties window sets the six properties at once, and they are saved in the .frm file; DlgFont (see Font Dialog) lets the user choose a font while the program runs.</p> <p>Every control and every form can have a font of its own, set with the properties FontName, FontSize (in pixels), FontBold, FontItalic, FontUnderline, and FontStrikethru, as in Visual Basic; they need no include file. A control that is given no font uses the font of the control it is in (a Frame, for example), else its form's, so setting a form's font changes every control on it that has none. Reading one of the properties gives the font the object draws with: a FontSize the family does not come in reads back as the nearest size it has, and a FontName DVX does not have reads back as &quot;System&quot;. Setting one changes only that part of the font, keeping the size the font has: where a family's styles come in different sizes (a font the program carries in bold only, say), set FontBold and FontItalic before FontSize, so the size is picked from the style's own sizes. Controls that edit text in columns (TextBox, TextArea, ComboBox, SpinButton, and Terminal) take only fixed-pitch families and show the System font in place of a proportional one. Print, TextWidth, TextHeight, PrintAccel, and TextWidthAccel on forms and picture boxes use the object's font. In the form designer, the Font row of the Properties window sets the six properties at once, and they are saved in the .frm file; DlgFont (see Font Dialog) lets the user choose a font while the program runs.</p>
<pre><code>Sub Form1_Load () <pre><code>Sub Form1_Load ()
Me.FontName = &quot;DejaVu Sans&quot; ' every control without a font of its own Me.FontName = &quot;DejaVu Sans&quot; ' every control without a font of its own
Me.FontSize = 14 Me.FontSize = 14
@ -5615,7 +5623,7 @@ Next i</code></pre>
<p>MusicLoad(fileName) loads a music file and returns its music number, or MUSIC_FAILED (0) when it could not be loaded; MusicError$() then says why. MusicPlay(music, loopIt) plays it from where it is (the start after loading or stopping); with loopIt True it starts over at the end until it is stopped. MusicStop(music) stops and goes back to the start, MusicPause(music) and MusicResume(music) pause and go on, and MusicPlaying(music) is True while it plays. MusicVolume(music, volume) sets its volume in percent (0 to 100). MusicPosition(music) and MusicLength(music) give the place and the length in milliseconds, and MusicSeek(music, milliseconds) goes to a place (a module goes to the start of the part that holds it). MusicFree(music) stops a music and forgets it.</p> <p>MusicLoad(fileName) loads a music file and returns its music number, or MUSIC_FAILED (0) when it could not be loaded; MusicError$() then says why. MusicPlay(music, loopIt) plays it from where it is (the start after loading or stopping); with loopIt True it starts over at the end until it is stopped. MusicStop(music) stops and goes back to the start, MusicPause(music) and MusicResume(music) pause and go on, and MusicPlaying(music) is True while it plays. MusicVolume(music, volume) sets its volume in percent (0 to 100). MusicPosition(music) and MusicLength(music) give the place and the length in milliseconds, and MusicSeek(music, milliseconds) goes to a place (a module goes to the start of the part that holds it). MusicFree(music) stops a music and forgets it.</p>
<p>MusicLoadMacro(macro) makes a music from a music macro string, the kind PLAY takes, with its notes on the General MIDI instruments its I commands name (the piano before any I): the tune can then be played in the background, paused, stopped, and made quieter like any music. MIDI music plays on the instruments chosen in Control Panel; MusicSetBank music, bank plays one music on another instrument bank, named as in the banks folders (&quot;&quot; is DVX's standard bank), before the music first plays (MusicError$ says when the bank is missing or damaged). A SoundFont (.SF2 or .SBK) gives the recorded instruments for a wavetable card or the built-in SoundFont synthesizer, as can a Gravis UltraSound's own patches: MusicPatchSet$() names them (their ULTRASND.INI, &quot;&quot; when there are none), and MusicRomBank$() names the instruments built into a Sound Blaster AWE card (&quot;&quot; when Creative's software is not installed).</p> <p>MusicLoadMacro(macro) makes a music from a music macro string, the kind PLAY takes, with its notes on the General MIDI instruments its I commands name (the piano before any I): the tune can then be played in the background, paused, stopped, and made quieter like any music. MIDI music plays on the instruments chosen in Control Panel; MusicSetBank music, bank plays one music on another instrument bank, named as in the banks folders (&quot;&quot; is DVX's standard bank), before the music first plays (MusicError$ says when the bank is missing or damaged). A SoundFont (.SF2 or .SBK) gives the recorded instruments for a wavetable card or the built-in SoundFont synthesizer, as can a Gravis UltraSound's own patches: MusicPatchSet$() names them (their ULTRASND.INI, &quot;&quot; when there are none), and MusicRomBank$() names the instruments built into a Sound Blaster AWE card (&quot;&quot; when Creative's software is not installed).</p>
<pre><code>tune = MusicLoadMacro(&quot;T150 I41 O4 L8 CEG&gt;C4&quot;) <pre><code>tune = MusicLoadMacro(&quot;T150 I41 O4 L8 CEG&gt;C4&quot;)
MusicSetBank tune, &quot;KPUNCH\DMXOPL.OP2&quot; MusicSetBank tune, &quot;DMXOPL.OP2&quot;
MusicPlay tune, False</code></pre> MusicPlay tune, False</code></pre>
<pre><code>Dim Shared tune As Long <pre><code>Dim Shared tune As Long

View file

@ -156,7 +156,7 @@ This is a warning message.
</div> </div>
<div class="topic" id="help.compiler"> <div class="topic" id="help.compiler">
<h1>Help Compiler (dvxhlpc)</h1> <h1>Help Compiler (dvxhlpc)</h1>
<p>The dvxhlpc tool runs on the host (Linux) and compiles .dhs source files into binary .hlp files for the viewer, and optionally into self-contained HTML.</p> <p>The dvxhlpc tool runs on the host (Linux) and compiles .dhs source files into binary .hlp files for the viewer, and optionally into self-contained HTML. On DVX it is DVXHLPC.EXE in the SYSTEM folder, for the DOS prompt, which comes with the Help Editor in Developer Tools (the Help Editor compiles help itself, and DVX compiles the help of its libraries and widgets when it starts).</p>
<h2>Usage</h2> <h2>Usage</h2>
<pre><code>dvxhlpc -o output.hlp [-i imagedir] [--html out.html] [--quiet] input.dhs [@filelist] [...]</code></pre> <pre><code>dvxhlpc -o output.hlp [-i imagedir] [--html out.html] [--quiet] input.dhs [@filelist] [...]</code></pre>
<h2>Options</h2> <h2>Options</h2>

View file

@ -245,6 +245,7 @@ img { max-width: 100%; }
<li><a href="#sdk.debug">Debugging: the Log and Crash Reports</a></li> <li><a href="#sdk.debug">Debugging: the Log and Crash Reports</a></li>
<li><a href="#sdk.abi">Binary Interface Rules</a></li> <li><a href="#sdk.abi">Binary Interface Rules</a></li>
<li><a href="#sdk.packaging">Packaging and Installing</a></li> <li><a href="#sdk.packaging">Packaging and Installing</a></li>
<li><a href="#sdk.fonts">Making Fonts</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -447,6 +448,7 @@ img { max-width: 100%; }
<li><a href="#arch.dxe">Boot Sequence</a></li> <li><a href="#arch.dxe">Boot Sequence</a></li>
<li><a href="#lib.dvxnet">BSD sockets</a></li> <li><a href="#lib.dvxnet">BSD sockets</a></li>
<li><a href="#arch.build">Build</a></li> <li><a href="#arch.build">Build</a></li>
<li><a href="#sdk.packaging">Bundles</a></li>
<li><a href="#widget.button">Button</a></li> <li><a href="#widget.button">Button</a></li>
<li><a href="#user.controls">Buttons</a></li> <li><a href="#user.controls">Buttons</a></li>
<li><a href="#widget.canvas">Canvas</a></li> <li><a href="#widget.canvas">Canvas</a></li>
@ -725,6 +727,7 @@ img { max-width: 100%; }
<li><a href="#api.dialog">dvxIntInputBox</a></li> <li><a href="#api.dialog">dvxIntInputBox</a></li>
<li><a href="#api.app">dvxInvalidateRect</a></li> <li><a href="#api.app">dvxInvalidateRect</a></li>
<li><a href="#api.app">dvxInvalidateWindow</a></li> <li><a href="#api.app">dvxInvalidateWindow</a></li>
<li><a href="#api.app">dvxLibraryLoaded</a></li>
<li><a href="#api.app">dvxLoadImage</a></li> <li><a href="#api.app">dvxLoadImage</a></li>
<li><a href="#api.app">dvxLoadImageAlpha</a></li> <li><a href="#api.app">dvxLoadImageAlpha</a></li>
<li><a href="#api.app">dvxLoadImageFromMemory</a></li> <li><a href="#api.app">dvxLoadImageFromMemory</a></li>
@ -872,13 +875,16 @@ img { max-width: 100%; }
<li><a href="#user.filedlg">Folders</a></li> <li><a href="#user.filedlg">Folders</a></li>
<li><a href="#arch.folders">Folders</a></li> <li><a href="#arch.folders">Folders</a></li>
<li><a href="#api.font">Font</a></li> <li><a href="#api.font">Font</a></li>
<li><a href="#sdk.fonts">Font add-on</a></li>
<li><a href="#api.text">Font families</a></li> <li><a href="#api.text">Font families</a></li>
<li><a href="#arch.fonts">Font files</a></li> <li><a href="#arch.fonts">Font files</a></li>
<li><a href="#api.text">Font licences</a></li> <li><a href="#api.text">Font licences</a></li>
<li><a href="#lib.basrt.frmmodel">Font properties (C)</a></li> <li><a href="#lib.basrt.frmmodel">Font properties (C)</a></li>
<li><a href="#sdk.fonts">Font sizes</a></li>
<li><a href="#arch.fonts">Font smoothing</a></li> <li><a href="#arch.fonts">Font smoothing</a></li>
<li><a href="#api.text">Font smoothing</a></li> <li><a href="#api.text">Font smoothing</a></li>
<li><a href="#arch.fonts">Fonts</a></li> <li><a href="#arch.fonts">Fonts</a></li>
<li><a href="#sdk.fonts">fonts.ini</a></li>
<li><a href="#user.help">Forward</a></li> <li><a href="#user.help">Forward</a></li>
<li><a href="#widget.box">Frame</a></li> <li><a href="#widget.box">Frame</a></li>
<li><a href="#games.timing">Frame Pacing</a></li> <li><a href="#games.timing">Frame Pacing</a></li>
@ -1066,6 +1072,7 @@ img { max-width: 100%; }
<li><a href="#lib.dvxnet">lwIP</a></li> <li><a href="#lib.dvxnet">lwIP</a></li>
<li><a href="#sdk.packaging">make package</a></li> <li><a href="#sdk.packaging">make package</a></li>
<li><a href="#arch.build">Makefile</a></li> <li><a href="#arch.build">Makefile</a></li>
<li><a href="#sdk.fonts">Making Fonts</a></li>
<li><a href="#widget.datactrl">Master-Detail</a></li> <li><a href="#widget.datactrl">Master-Detail</a></li>
<li><a href="#user.windows">Maximize</a></li> <li><a href="#user.windows">Maximize</a></li>
<li><a href="#user.trouble">Memory</a></li> <li><a href="#user.trouble">Memory</a></li>
@ -1091,6 +1098,7 @@ img { max-width: 100%; }
<li><a href="#arch.windows">Minimized Windows</a></li> <li><a href="#arch.windows">Minimized Windows</a></li>
<li><a href="#arch.build">mkcd.sh</a></li> <li><a href="#arch.build">mkcd.sh</a></li>
<li><a href="#arch.fonts">mkfont</a></li> <li><a href="#arch.fonts">mkfont</a></li>
<li><a href="#sdk.fonts">mkfont</a></li>
<li><a href="#lib.music">MOD</a></li> <li><a href="#lib.music">MOD</a></li>
<li><a href="#lib.conn">Modem</a></li> <li><a href="#lib.conn">Modem</a></li>
<li><a href="#arch.dxe">Modules</a></li> <li><a href="#arch.dxe">Modules</a></li>
@ -1163,6 +1171,7 @@ img { max-width: 100%; }
<li><a href="#user.filedlg">Open Dialog</a></li> <li><a href="#user.filedlg">Open Dialog</a></li>
<li><a href="#lib.audio">OPL</a></li> <li><a href="#lib.audio">OPL</a></li>
<li><a href="#user.controls">Option Buttons</a></li> <li><a href="#user.controls">Option Buttons</a></li>
<li><a href="#sdk.packaging">Optional parts of DVX</a></li>
<li><a href="#user.trouble">Out of Memory</a></li> <li><a href="#user.trouble">Out of Memory</a></li>
<li><a href="#user.addons">Package Builder</a></li> <li><a href="#user.addons">Package Builder</a></li>
<li><a href="#user.addons">Package server</a></li> <li><a href="#user.addons">Package server</a></li>
@ -1313,13 +1322,14 @@ img { max-width: 100%; }
<li><a href="#api.prefs">prefsWheelDirChoices</a></li> <li><a href="#api.prefs">prefsWheelDirChoices</a></li>
<li><a href="#user.printing">Print</a></li> <li><a href="#user.printing">Print</a></li>
<li><a href="#lib.print">print</a></li> <li><a href="#lib.print">print</a></li>
<li><a href="#sdk.fonts">Print sizes</a></li>
<li><a href="#lib.print">Print sizes</a></li>
<li><a href="#lib.print">printDialog</a></li> <li><a href="#lib.print">printDialog</a></li>
<li><a href="#lib.print">printDocOpen</a></li> <li><a href="#lib.print">printDocOpen</a></li>
<li><a href="#lib.print">printDocPage</a></li> <li><a href="#lib.print">printDocPage</a></li>
<li><a href="#lib.print">printDocPicture</a></li> <li><a href="#lib.print">printDocPicture</a></li>
<li><a href="#lib.print">PrintDocT</a></li> <li><a href="#lib.print">PrintDocT</a></li>
<li><a href="#user.printing">Printer</a></li> <li><a href="#user.printing">Printer</a></li>
<li><a href="#lib.print">Printer Fonts</a></li>
<li><a href="#lib.print">printFontOpen</a></li> <li><a href="#lib.print">printFontOpen</a></li>
<li><a href="#lib.print">PrintFontT</a></li> <li><a href="#lib.print">PrintFontT</a></li>
<li><a href="#user.printing">Printing</a></li> <li><a href="#user.printing">Printing</a></li>
@ -1639,6 +1649,7 @@ img { max-width: 100%; }
<li><a href="#shell.sysbasic">SysFontsStore</a></li> <li><a href="#shell.sysbasic">SysFontsStore</a></li>
<li><a href="#shell.sysbasic">SysGetColor</a></li> <li><a href="#shell.sysbasic">SysGetColor</a></li>
<li><a href="#shell.sysbasic">SysIdleSeconds</a></li> <li><a href="#shell.sysbasic">SysIdleSeconds</a></li>
<li><a href="#shell.sysbasic">SysLibraryLoaded</a></li>
<li><a href="#shell.sysbasic">SysLoadTheme</a></li> <li><a href="#shell.sysbasic">SysLoadTheme</a></li>
<li><a href="#shell.sysbasic">SysMemoryFreeKb</a></li> <li><a href="#shell.sysbasic">SysMemoryFreeKb</a></li>
<li><a href="#shell.sysbasic">SysMemoryTotalKb</a></li> <li><a href="#shell.sysbasic">SysMemoryTotalKb</a></li>
@ -2419,7 +2430,7 @@ img { max-width: 100%; }
<p>File &gt; Page Setup... chooses how text is laid out on paper: the margins, how many lines fit on a page, how wide a line is, and a header and footer printed on every page (for example the file name and the page number). Your choices are kept for next time and used by every program that prints text.</p> <p>File &gt; Page Setup... chooses how text is laid out on paper: the margins, how many lines fit on a page, how wide a line is, and a header and footer printed on every page (for example the file name and the page number). Your choices are kept for next time and used by every program that prints text.</p>
<h2>Pictures</h2> <h2>Pictures</h2>
<p>Pictures print as large as fits on the page: in color on a color printer (one with a color ribbon or cartridge), and in shades of grey on the others. Printing pictures needs your printer's model to be set (see Changing Settings); with the setting for text only, a program tells you so.</p> <p>Pictures print as large as fits on the page: in color on a color printer (one with a color ribbon or cartridge), and in shades of grey on the others. Printing pictures needs your printer's model to be set (see Changing Settings); with the setting for text only, a program tells you so.</p>
<p>Some programs draw whole pages of their own, such as reports with charts. On a PostScript printer the printer draws those pages itself, as sharp as it can print. On other printers their text prints crisper with the Printer Fonts add-on installed (see Adding and Removing Software).</p> <p>Some programs draw whole pages of their own, such as reports with charts. On a PostScript printer the printer draws those pages itself, as sharp as it can print. On other printers their text is made from DVX's fonts: DejaVu Sans, Sans Mono, and Serif have sizes made for printing, so they print crisp from 6 to 24 points; other fonts, and larger text, are enlarged and smoothed, a little softer.</p>
</div> </div>
<div class="topic" id="user.programs"> <div class="topic" id="user.programs">
<h1>Running Programs</h1> <h1>Running Programs</h1>
@ -2587,9 +2598,11 @@ img { max-width: 100%; }
<h2>An empty floppy or CD-ROM drive</h2> <h2>An empty floppy or CD-ROM drive</h2>
<p>When a program tries to read a drive that has no disk in it, or to write to a write-protected disk, the program simply reports that it could not read or write the file. DVX never stops at the DOS &quot;Abort, Retry, Fail&quot; question. Put the disk in and try again.</p> <p>When a program tries to read a drive that has no disk in it, or to write to a write-protected disk, the program simply reports that it could not read or write the file. DVX never stops at the DOS &quot;Abort, Retry, Fail&quot; question. Put the disk in and try again.</p>
<h2>Installing, upgrading, and removing DVX</h2> <h2>Installing, upgrading, and removing DVX</h2>
<p>DVX is installed with SETUP, from the DVX CD or from Disk 1 of the DVX floppy disks: change to that drive and type SETUP. After the licence, Setup asks what you would like to do: Install DVX, Upgrade or repair DVX, or Remove DVX. Click the picture or the button of your choice. To install, choose the folder for DVX (type it, or click Browse... to pick it; a folder that does not exist yet is made) and which fonts to install. Setup checks that there is room and unpacks DVX there, asking for each floppy disk it needs in turn. It can also make DVX start when the computer starts (it shows the line it adds to AUTOEXEC.BAT and keeps a copy of the old file as AUTOEXEC.DVX). Setup never writes to the CD or the floppy disks.</p> <p>DVX is installed with SETUP, from the DVX CD or from Disk 1 of the DVX floppy disks: change to that drive and type SETUP. After the licence, Setup asks what you would like to do: Install DVX, Upgrade or repair DVX, or Remove DVX. Click the picture or the button of your choice. To install, choose the folder for DVX (type it, or click Browse... to pick it; a folder that does not exist yet is made), then Next: what to install, that is the fonts, the parts of DVX, and the add-ons you want. Setup checks that there is room and unpacks DVX there, asking for each floppy disk it needs in turn. It can also make DVX start when the computer starts (it shows the line it adds to AUTOEXEC.BAT and keeps a copy of the old file as AUTOEXEC.DVX). Setup never writes to the CD or the floppy disks.</p>
<p>The fonts are up to you. None keeps DVX to its own font; the base set adds DejaVu Sans, Sans Mono, and Serif in all their styles (about 2 MB); and All adds every font that comes with DVX (about 8 MB). A program that asks for a font you did not install shows its text in DVX's own font instead, unless it carries that font itself (some programs do, such as Welcome and the DVX Demo). Every font file holds its own licence: the Licence button of the Font dialog shows it. With None or the base set, Setup does not ask for the last floppy disks, which hold only fonts.</p> <p>The fonts are up to you. None keeps DVX to its own font; the base set adds DejaVu Sans, Sans Mono, and Serif in all their styles, in sizes for the screen and for printing (about 8 MB). A program that asks for a font you did not install shows its text in DVX's own font instead, unless it carries that font itself (some programs do, such as Welcome and the DVX Demo). Every font file holds its own licence: the Licence button of the Font dialog shows it. With None, Setup does not ask for the last floppy disks, which hold only fonts; you can add the base set later from the package server in Software (as DVX Fonts), or by running Setup again. Software lists DVX and DVX Fonts among the installed software, and offers updates to them as they are published.</p>
<p>To upgrade or repair DVX, run Setup again and choose Upgrade or repair DVX, with the folder DVX is in. (When DVX is in the usual folder, such as C:\DVX, Setup says so and suggests this choice.) Your settings and saved files (the USER folder) are kept, unless you tick Start over to remove them. Setup starts with the fonts that folder already has; choose others to add fonts or remove them. If you choose Install DVX for a folder that already has DVX, Setup offers to upgrade it instead.</p> <p>DVX comes in parts. The desktop and the everyday programs (Program Manager, File Manager, Notepad, Clock, the Image Viewer, the Help Viewer, Control Panel, and Software) are always installed; the other parts each have a box to tick: DVX BASIC (for writing your own programs, with BASCOMP to build them at the DOS prompt), Databases (for BASIC programs that keep their data in a database), Networking (network cards, the web, and the package server), Communications (the Terminal; it needs Networking), Media (the Media Player and the Sound Recorder), Developer Tools (the Icon Editor, the Resource Editor, the Help Editor, the Package Builder, and the Widget Showcase, with DVXRES and DVXHLPC for the DOS prompt), and Demos (the DVX Demo and the BASIC Demo). Point at one to see what it holds. A part you leave out takes no disk space and leaves more memory for your programs. To add or remove parts later, run Setup again. Software lists each part as one package, whose details name what it holds; without Networking, Software installs packages from files only.</p>
<p>The CD also has add-ons, which Setup offers with a box to tick for each: More Fonts (more than forty more typefaces, about 8 MB) and DVX General MIDI (instruments for MIDI music on a Gravis UltraSound or a Sound Blaster AWE32 or AWE64, about 4 MB). They are installed like any other add-on, so Software lists them and can remove them; to add one later, choose Install from File in Software and open it from the ADDONS folder of the CD. The floppy disks have no add-ons: get them from the package server in Software instead.</p>
<p>To upgrade or repair DVX, run Setup again and choose Upgrade or repair DVX, with the folder DVX is in. (When DVX is in the usual folder, such as C:\DVX, Setup says so and suggests this choice.) Your settings and saved files (the USER folder) are kept, unless you tick Start over to remove them. Setup starts with the fonts, parts, and add-ons that folder already has; choose others to add or remove them. A part you untick is removed, unless other software in the folder needs it (Setup then tells you it keeps it). If you choose Install DVX for a folder that already has DVX, Setup offers to upgrade it instead.</p>
<p>To remove DVX, run Setup and choose Remove DVX, with the folder DVX is in. The SETUP in the DVX folder (for example C:\DVX\SETUP) can remove DVX too, from its own folder only. Files you added to the folder yourself are not removed, and the USER folder is only removed if you ask.</p> <p>To remove DVX, run Setup and choose Remove DVX, with the folder DVX is in. The SETUP in the DVX folder (for example C:\DVX\SETUP) can remove DVX too, from its own folder only. Files you added to the folder yourself are not removed, and the USER folder is only removed if you ask.</p>
<h2>Running DVX from a CD-ROM or a write-protected disk</h2> <h2>Running DVX from a CD-ROM or a write-protected disk</h2>
<p>DVX also runs straight from a disk it cannot write to. It then keeps your settings and files in a DVXUSER folder in your TEMP folder, and tells you so once. To keep them somewhere of your choosing, set DVXUSER to a folder on your hard disk before starting DVX (see Changing Settings). Without a TEMP folder, DVX tells you that changed settings last only until you exit DVX. Either way the help files are used as they are. To keep everything on your hard disk, install DVX there with Setup.</p> <p>DVX also runs straight from a disk it cannot write to. It then keeps your settings and files in a DVXUSER folder in your TEMP folder, and tells you so once. To keep them somewhere of your choosing, set DVXUSER to a folder on your hard disk before starting DVX (see Changing Settings). Without a TEMP folder, DVX tells you that changed settings last only until you exit DVX. Either way the help files are used as they are. To keep everything on your hard disk, install DVX there with Setup.</p>
@ -3086,7 +3099,7 @@ prefsClose(h);</code></pre>
</div> </div>
<div class="topic" id="arch.fonts"> <div class="topic" id="arch.fonts">
<h1>Font System</h1> <h1>Font System</h1>
<p>Every text call takes a BitmapFontT, and there are two kinds of them. The system font is the 8x16 VGA ROM font (code page 437, 256 glyphs) built into libdvx: 8-pixel cells, one byte per glyph row, so character positions are a multiplication, glyph lookup an index, and every scanline a single byte -- the hot paths of drawChar, drawTextN, and drawTermRow depend on it. A loaded font (dvxText.h) is one size of a font family from the FONTS folder (Setup installs none, the base set of DejaVu Sans, Sans Mono, and Serif, or all of them; a family that is not there opens as the system font): per-glyph advances and bitmap boxes, any width, proportional or fixed-pitch, and in up to four styles. The same calls draw and measure both; a loaded font's glyphs field is what sends them to the general paths.</p> <p>Every text call takes a BitmapFontT, and there are two kinds of them. The system font is the 8x16 VGA ROM font (code page 437, 256 glyphs) built into libdvx: 8-pixel cells, one byte per glyph row, so character positions are a multiplication, glyph lookup an index, and every scanline a single byte -- the hot paths of drawChar, drawTextN, and drawTermRow depend on it. A loaded font (dvxText.h) is one size of a font family from the FONTS folder (Setup installs the base set of DejaVu Sans, Sans Mono, and Serif or none, and the More Fonts add-on the others; a family that is not there opens as the system font): per-glyph advances and bitmap boxes, any width, proportional or fixed-pitch, and in up to four styles. The same calls draw and measure both; a loaded font's glyphs field is what sends them to the general paths.</p>
<h2>BitmapFontT</h2> <h2>BitmapFontT</h2>
<pre><code> typedef struct { <pre><code> typedef struct {
int32_t charWidth; // cell width (fixed pitch) or the digit 0's advance int32_t charWidth; // cell width (fixed pitch) or the digit 0's advance
@ -3138,10 +3151,10 @@ prefsClose(h);</code></pre>
<h2>Rich Text</h2> <h2>Rich Text</h2>
<p>Text in several fonts in one control is built on the text flow (dvxFlow.h): runs of text, each in a font and a color, laid out into wrapped, aligned lines as tall as the tallest font on them, with offsets for carets, hit tests, and selections. The RichLabel widget is one flow built by calls. The RichEdit widget keeps its document in the richtext library (styled text: runs of interned styles over code page 437 text, an alignment per paragraph, copy / replace / restyle, and RTF in and out) and lays each paragraph out as a flow of its own, so an edit lays out only the paragraphs it touched and repaints only the rows they hold (its quick repaint); a change of height repaints the widget. Its undo steps are pieces of styled text swapped back in, and Copy keeps a styled copy for a paste of the same text.</p> <p>Text in several fonts in one control is built on the text flow (dvxFlow.h): runs of text, each in a font and a color, laid out into wrapped, aligned lines as tall as the tallest font on them, with offsets for carets, hit tests, and selections. The RichLabel widget is one flow built by calls. The RichEdit widget keeps its document in the richtext library (styled text: runs of interned styles over code page 437 text, an alignment per paragraph, copy / replace / restyle, and RTF in and out) and lays each paragraph out as a flow of its own, so an edit lays out only the paragraphs it touched and repaints only the rows they hold (its quick repaint); a change of height repaints the widget. Its undo steps are pieces of styled text swapped back in, and Copy keeps a styled copy for a paste of the same text.</p>
<h2>Font Files (.DFN)</h2> <h2>Font Files (.DFN)</h2>
<p>One file holds one family in one style at every size it comes in, made on the build host by mkfont (src/tools/mkfont.c) with FreeType from TrueType, OpenType, Type 1, BDF, and PCF fonts, as listed in src/fonts/fonts.ini. A .DFN is a pure format conversion: the converter never adds or changes a glyph, it only marks the characters a face lacks. Little-endian, every record read whole:</p> <p>One file holds one family in one style at every size it comes in -- its screen sizes, their smoothed copies, and its print sizes (mkfont's print key; the SDK guide's Making Fonts) -- made on the build host by mkfont (src/tools/mkfont.c) with FreeType from TrueType, OpenType, Type 1, BDF, and PCF fonts, as listed in src/fonts/fonts.ini. Opening a font reads only the header and the strike table, so sizes nothing uses cost disk space, not memory. A .DFN is a pure format conversion: the converter never adds or changes a glyph, it only marks the characters a face lacks. Little-endian, every record read whole:</p>
<pre> Part Size Holds <pre> Part Size Holds
---- ---- ----- ---- ---- -----
DfnHeaderT 60 bytes &quot;DVXF&quot;, format version (2), style, face flags (fixed pitch; box characters drawn by DVX), strike count (1 to 32), family name (31 characters), where the notice and licence texts are and their lengths DfnHeaderT 60 bytes &quot;DVXF&quot;, format version (2), style, face flags (fixed pitch; box characters drawn by DVX), strike count (1 to 64), family name (31 characters), where the notice and licence texts are and their lengths
DfnStrikeT x count 24 bytes each per size, smallest first: where its glyph table and bitmaps are, the bitmaps' size, the pixel size, ascent, descent, line height, widest advance DfnStrikeT x count 24 bytes each per size, smallest first: where its glyph table and bitmaps are, the bitmaps' size, the pixel size, ascent, descent, line height, widest advance
FontGlyphT x 256 6 bytes each per size, at its glyph table offset FontGlyphT x 256 6 bytes each per size, at its glyph table offset
glyph bitmaps as listed per size, back to back in character order glyph bitmaps as listed per size, back to back in character order
@ -3738,7 +3751,7 @@ DVX_ABI_STAMP(mylib);</code></pre>
</div> </div>
<div class="topic" id="api.text"> <div class="topic" id="api.text">
<h1>dvxText.h -- Fonts</h1> <h1>dvxText.h -- Fonts</h1>
<p>The font families DVX draws with: &quot;System&quot;, the built-in 8x16 font, and the families in the FONTS folder. Which families that folder holds depends on the install -- Setup puts in none, the base set (DejaVu Sans, Sans Mono, and Serif), or all of them -- and dvxFontOpen of a family that is not there gives the system font. A family has up to four faces (regular, bold, italic, bold italic), each a .DFN file holding the face at the pixel sizes it was made at; the files are made on the build host from TrueType, Type 1, and bitmap fonts (src/tools/mkfont.c), so DVX only copies bitmaps. More files of the same family and style (up to four in all) add the sizes the face lacks, each size read from the file it came in: the printer-fonts add-on gives the DejaVu faces their large sizes that way, from FONTS\KPUNCH.</p> <p>The font families DVX draws with: &quot;System&quot;, the built-in 8x16 font, and the families in the FONTS folder. Which families that folder holds depends on the install -- Setup puts in the base set (DejaVu Sans, Sans Mono, and Serif) or none, and the More Fonts add-on the rest -- and dvxFontOpen of a family that is not there gives the system font. A family has up to four faces (regular, bold, italic, bold italic), each a .DFN file holding the face at the pixel sizes it was made at; the files are made on the build host from TrueType, Type 1, and bitmap fonts (src/tools/mkfont.c), so DVX only copies bitmaps. A face's file holds its screen sizes, their smoothed copies, and its print sizes together (the base set's have 25 to 100 pixels for printing; FONT_SIZES_MAX sizes at most). More files of the same family and style (up to four in all) add the sizes the face lacks, each size read from the file it came in: a program's own copy of a face adds its sizes that way.</p>
<p>dvxFontOpen gives a BitmapFontT every text call draws and measures with. It never scales: it picks the face's size nearest the one asked for. A style the family has no face for is made from the nearest face -- bold by thickening each stroke a column (two from 24 pixels), italic by slanting a column per four rows -- and the font's flags say so. Every character of code page 437 draws: what a face lacks is filled in when the font loads. Box drawing, block, and shade characters are drawn to fill the character cell (the pitch, or the digit 0's width) so lines join, also in place of a face's own when its file asks; other characters come from FONT_FALLBACK_FAMILY (FONT_FALLBACK_FIXED for a fixed-pitch face, centered in its pitch) at the nearest size and the same style, or from the system font when that family is not installed.</p> <p>dvxFontOpen gives a BitmapFontT every text call draws and measures with. It never scales: it picks the face's size nearest the one asked for. A style the family has no face for is made from the nearest face -- bold by thickening each stroke a column (two from 24 pixels), italic by slanting a column per four rows -- and the font's flags say so. Every character of code page 437 draws: what a face lacks is filled in when the font loads. Box drawing, block, and shade characters are drawn to fill the character cell (the pitch, or the digit 0's width) so lines join, also in place of a face's own when its file asks; other characters come from FONT_FALLBACK_FAMILY (FONT_FALLBACK_FIXED for a fixed-pitch face, centered in its pitch) at the nearest size and the same style, or from the system font when that family is not installed.</p>
<p>A face can also hold a size smoothed (anti-aliased): each pixel one of four levels, from none to full, drawn as that blend of the text color and what is under it. When smoothing is on (dvxFontSetSmooth) such a size opens smoothed, with FONT_FLAG_GRAY set and FONT_GRAY_BPP bits per pixel; other sizes and faces stay 1-bit. At 8 bits per pixel there are no colors to blend: the pixels of FONT_GRAY_HALF and more are drawn, the rest not.</p> <p>A face can also hold a size smoothed (anti-aliased): each pixel one of four levels, from none to full, drawn as that blend of the text color and what is under it. When smoothing is on (dvxFontSetSmooth) such a size opens smoothed, with FONT_FLAG_GRAY set and FONT_GRAY_BPP bits per pixel; other sizes and faces stay 1-bit. At 8 bits per pixel there are no colors to blend: the pixels of FONT_GRAY_HALF and more are drawn, the rest not.</p>
<p>Fonts are shared and counted: the same family, size, and style opened again is the same font, and dvxFontClose gives one up. A few fonts no one holds stay loaded so reopening them is quick. A font's memory belongs to DVX, not to the program that opened it. The family list is read from DVX_FONTS_DIR the first time it is needed; a file that cannot be read is logged and skipped.</p> <p>Fonts are shared and counted: the same family, size, and style opened again is the same font, and dvxFontClose gives one up. A few fonts no one holds stay loaded so reopening them is quick. A font's memory belongs to DVX, not to the program that opened it. The family list is read from DVX_FONTS_DIR the first time it is needed; a file that cannot be read is logged and skipped.</p>
@ -3752,7 +3765,8 @@ DVX_ABI_STAMP(mylib);</code></pre>
DVX_FONTS_DIR &quot;FONTS&quot; The fonts folder (dvxPlat.h), in SHARED and in the user folder DVX_FONTS_DIR &quot;FONTS&quot; The fonts folder (dvxPlat.h), in SHARED and in the user folder
FONT_SYSTEM_FAMILY &quot;System&quot; The built-in 8x16 font's family name FONT_SYSTEM_FAMILY &quot;System&quot; The built-in 8x16 font's family name
FONT_FALLBACK_FAMILY &quot;DejaVu Sans&quot; Fills what a proportional face lacks FONT_FALLBACK_FAMILY &quot;DejaVu Sans&quot; Fills what a proportional face lacks
FONT_FALLBACK_FIXED &quot;DejaVu Sans Mono&quot; Fills what a fixed-pitch face lacks</pre> FONT_FALLBACK_FIXED &quot;DejaVu Sans Mono&quot; Fills what a fixed-pitch face lacks
FONT_SIZES_MAX 64 The most sizes a face has (dvxFontSizes)</pre>
<h2>dvxFontOpen</h2> <h2>dvxFontOpen</h2>
<pre><code>BitmapFontT *dvxFontOpen(const char *family, int32_t pixelSize, uint32_t style);</code></pre> <pre><code>BitmapFontT *dvxFontOpen(const char *family, int32_t pixelSize, uint32_t style);</code></pre>
<p>The font of family at the size nearest pixelSize in style. NULL, &quot;&quot;, and a family there is none of give the system font (16 pixels; plain, it is dvxFont8x16 itself, drawn by the fast fixed paths).</p> <p>The font of family at the size nearest pixelSize in style. NULL, &quot;&quot;, and a family there is none of give the system font (16 pixels; plain, it is dvxFont8x16 itself, drawn by the fast fixed paths).</p>
@ -5193,6 +5207,9 @@ int32_t platformDosRun(const char *command, const char *folder, bool pause, cons
bool platformPathAbsolute(const char *path, char *out, int32_t outSize);</code></pre> bool platformPathAbsolute(const char *path, char *out, int32_t outSize);</code></pre>
<p>dvxRunDos runs a DOS program (an .EXE, .COM, or .BAT file, or a command DOS knows) with DVX stepped aside, and comes back. Full screen, menus, and drags end; program is made absolute (a bare name stays one, for the PATH) and given to DOS by its short name, with args after it, in folder (NULL or &quot;&quot;: the program's own folder). platformDosRun then runs the suspend hooks (newest first), lets the keyboard hook and the timer service go (the timers are kept and stand still), sets text mode, gives the INT 24h handler and Ctrl+Break back to DOS, makes the folder current, and runs the command line with system() (as at the DOS prompt: a batch file through the command interpreter, PATH, redirection); with pause it prints &quot;Press any key to return to DVX.&quot; and waits for a key. Everything is taken back in the opposite order, the desktop's mode (and palette) set again, and the resume hooks run (oldest first); dvxRunDos sets the mouse up again where it was, forgets held keys, and repaints the whole screen. DVX logs &quot;DOS: running&quot; and &quot;DOS: back from&quot; with the command line. Nothing of DVX runs meanwhile: close the other programs first (the shell's shellRunDos asks them). Returns the program's exit code, or -1 when it could not be run (errno: ENOENT, ENOMEM, E2BIG for a command line longer than DOS's 126 characters). DVX stays in memory: the program gets the conventional memory DVX's DOS part and the DPMI host leave. On the host, platformDosRun is system() in the folder with the hooks around it.</p> <p>dvxRunDos runs a DOS program (an .EXE, .COM, or .BAT file, or a command DOS knows) with DVX stepped aside, and comes back. Full screen, menus, and drags end; program is made absolute (a bare name stays one, for the PATH) and given to DOS by its short name, with args after it, in folder (NULL or &quot;&quot;: the program's own folder). platformDosRun then runs the suspend hooks (newest first), lets the keyboard hook and the timer service go (the timers are kept and stand still), sets text mode, gives the INT 24h handler and Ctrl+Break back to DOS, makes the folder current, and runs the command line with system() (as at the DOS prompt: a batch file through the command interpreter, PATH, redirection); with pause it prints &quot;Press any key to return to DVX.&quot; and waits for a key. Everything is taken back in the opposite order, the desktop's mode (and palette) set again, and the resume hooks run (oldest first); dvxRunDos sets the mouse up again where it was, forgets held keys, and repaints the whole screen. DVX logs &quot;DOS: running&quot; and &quot;DOS: back from&quot; with the command line. Nothing of DVX runs meanwhile: close the other programs first (the shell's shellRunDos asks them). Returns the program's exit code, or -1 when it could not be run (errno: ENOENT, ENOMEM, E2BIG for a command line longer than DOS's 126 characters). DVX stays in memory: the program gets the conventional memory DVX's DOS part and the DPMI host leave. On the host, platformDosRun is system() in the folder with the hooks around it.</p>
<p>platformPathAbsolute makes a path absolute against the current folder (it need not exist).</p> <p>platformPathAbsolute makes a path absolute against the current folder (it need not exist).</p>
<h2>Optional Libraries: dvxLibraryLoaded</h2>
<pre><code>bool dvxLibraryLoaded(const char *name);</code></pre>
<p>Whether the library (or widget) name, its file's base name in any case (&quot;pkgnet&quot;, &quot;dvxsql&quot;), is loaded: installed and started with DVX, which loads every library and widget it has at start. It looks for the module's ABI stamp (DVX_ABI_STAMP: name and DVX_ABI_SUFFIX), which the loader checked before it took the module; a module that is not there, or did not load, has none. Some parts of DVX are optional (Setup's &quot;What to install&quot; page installs them as bundles: src/packages.ini), so a program that uses one of their libraries only when it is there asks first, and does not import it: an import of a missing library stops the program from loading. BASIC: SysLibraryLoaded (system.bas).</p>
<h2>Idle Time: dvxIdleMs</h2> <h2>Idle Time: dvxIdleMs</h2>
<pre><code>uint32_t dvxIdleMs(const AppContextT *ctx);</code></pre> <pre><code>uint32_t dvxIdleMs(const AppContextT *ctx);</code></pre>
<p>The milliseconds since the last key or mouse input: a key (pressed, released, or typed), the mouse moving, a button, or the wheel, injected input (a test script, SysSendKey) included, and input that came while DVX was busy and was thrown away. DVX coming back from a DOS program or from full-screen mode counts as input too. The shell's screen saver starts after DVX.INI [desktop] saverWait minutes of it (shellSaver.h); BASIC: SysIdleSeconds. The time is kept in AppContextT.lastInputTime (platformClock ticks).</p> <p>The milliseconds since the last key or mouse input: a key (pressed, released, or typed), the mouse moving, a button, or the wheel, injected input (a test script, SysSendKey) included, and input that came while DVX was busy and was thrown away. DVX coming back from a DOS program or from full-screen mode counts as input too. The shell's screen saver starts after DVX.INI [desktop] saverWait minutes of it (shellSaver.h); BASIC: SysIdleSeconds. The time is kept in AppContextT.lastInputTime (platformClock ticks).</p>
@ -8745,7 +8762,8 @@ int32_t SysShiftState(void);
int32_t SysSendKey(int32_t keyCode, int32_t shift); int32_t SysSendKey(int32_t keyCode, int32_t shift);
int32_t SysScreenshot(const char *path); int32_t SysScreenshot(const char *path);
int32_t SysMemoryTotalKb(void); int32_t SysMemoryTotalKb(void);
int32_t SysMemoryFreeKb(void);</code></pre> int32_t SysMemoryFreeKb(void);
int32_t SysLibraryLoaded(const char *name);</code></pre>
<pre> Function Calls <pre> Function Calls
-------- ----- -------- -----
SysVideoMode* dvxGetVideoModes (0 out of range) SysVideoMode* dvxGetVideoModes (0 out of range)
@ -8778,7 +8796,8 @@ int32_t SysMemoryFreeKb(void);</code></pre>
SysShiftState ctx-&gt;keyModifiers &amp; KEY_MOD_ALL (KEY_MOD_SHIFT / CTRL / ALT = vbShiftMask / vbCtrlMask / vbAltMask) SysShiftState ctx-&gt;keyModifiers &amp; KEY_MOD_ALL (KEY_MOD_SHIFT / CTRL / ALT = vbShiftMask / vbCtrlMask / vbAltMask)
SysSendKey queues (up to 64) keyCode + shift as the BIOS stores the keystroke (platformBiosScanCode for combinations with codes of their own, KEY_EXT_FLAG keys by scan code, Ctrl+letter as its control character); a shell idle handler (shellRegisterIdle) injects one per idle frame with platformInjectKey, so each is read with its own modifiers, and releases them (platformInjectModifiers(0)) after the last SysSendKey queues (up to 64) keyCode + shift as the BIOS stores the keystroke (platformBiosScanCode for combinations with codes of their own, KEY_EXT_FLAG keys by scan code, Ctrl+letter as its control character); a shell idle handler (shellRegisterIdle) injects one per idle frame with platformInjectKey, so each is read with its own modifiers, and releases them (platformInjectModifiers(0)) after the last
SysScreenshot dvxScreenshot (BMP for .bmp, else PNG) SysScreenshot dvxScreenshot (BMP for .bmp, else PNG)
SysMemoryTotalKb / FreeKb platformGetMemoryInfo; -1 when unknown</pre> SysMemoryTotalKb / FreeKb platformGetMemoryInfo; -1 when unknown
SysLibraryLoaded dvxLibraryLoaded (the module's ABI stamp, by its base name in any case)</pre>
<p>There is no binding for platformInjectMouse: on DOS it replaces the real mouse until the next call and has no way back to it, so a synthesized click would leave the pointer stuck. A program moves the pointer with SysSetMousePos and &quot;clicks&quot; a control by calling its event procedure or setting its value.</p> <p>There is no binding for platformInjectMouse: on DOS it replaces the real mouse until the next call and has no way back to it, so a synthesized click would leave the pointer stuck. A program moves the pointer with SysSetMousePos and &quot;clicks&quot; a control by calling its event procedure or setting its value.</p>
<p>system.bas also holds MOUSE_WHEEL_STEP_MIN / MAX / DEFAULT, MOUSE_DBLCLICK_DEFAULT_MS, and MOUSE_SPEED_DEFAULT, and SYS_VIDEO_DEFAULT_WIDTH / HEIGHT / BPP (DVX_DEFAULT_VIDEO_W / H / BPP, the mode prefsGetVideoMode and safe mode fall back to), as CONSTs; the basdev test suite (caseIncludeConsts) checks each against dvxTypes.h.</p> <p>system.bas also holds MOUSE_WHEEL_STEP_MIN / MAX / DEFAULT, MOUSE_DBLCLICK_DEFAULT_MS, and MOUSE_SPEED_DEFAULT, and SYS_VIDEO_DEFAULT_WIDTH / HEIGHT / BPP (DVX_DEFAULT_VIDEO_W / H / BPP, the mode prefsGetVideoMode and safe mode fall back to), as CONSTs; the basdev test suite (caseIncludeConsts) checks each against dvxTypes.h.</p>
<p>The Store / Load routines are the ones the shell uses at start (dvxMouseFromPrefs, dvxColorsFromPrefs, dvxWallpaperFromPrefs on DVX.INI) and Control Panel uses for OK and for its Cancel snapshot (an in-memory prefsCreate handle), so the INI keys are written in one place (dvxApp.c).</p> <p>The Store / Load routines are the ones the shell uses at start (dvxMouseFromPrefs, dvxColorsFromPrefs, dvxWallpaperFromPrefs on DVX.INI) and Control Panel uses for OK and for its Cancel snapshot (an in-memory prefsCreate handle), so the INI keys are written in one place (dvxApp.c).</p>
@ -9542,13 +9561,13 @@ End Sub</code></pre>
---- -------- ---- --------
newProject.sh Creates a project from a template newProject.sh Creates a project from a template
sdk.mk Build rules every project Makefile includes sdk.mk Build rules every project Makefile includes
bin/ dvxres (resources), dvxhlpc (help compiler), bascomp (BASIC compiler), mkfont (fonts a program carries), dxeGen.sh (runs dxe3gen) bin/ dvxres (resources), dvxhlpc (help compiler), bascomp (BASIC compiler), mkfont (fonts: see Making Fonts), dxeGen.sh (runs dxe3gen)
include/ Public C headers, one directory per library, plus include/basic for BASIC declaration files include/ Public C headers, one directory per library, plus include/basic for BASIC declaration files
templates/ The project templates templates/ The project templates
samples/basic/ Example BASIC projects</pre> samples/basic/ Example BASIC projects</pre>
<h2>Requirements</h2> <h2>Requirements</h2>
<ul> <ul>
<li>A Linux host (the tools in bin/ are Linux programs; on DVX itself they are SYSTEM/DVXRES.EXE, SYSTEM/DVXHLPC.EXE, and SYSTEM/BASCOMP.EXE).</li> <li>A Linux host (the tools in bin/ are Linux programs; on DVX itself they are SYSTEM/BASCOMP.EXE, which comes with DVX BASIC, and SYSTEM/DVXRES.EXE and SYSTEM/DVXHLPC.EXE, which come with Developer Tools).</li>
<li>The DJGPP cross compiler (i586-pc-msdosdjgpp-gcc and dxe3gen). Projects find it through DJGPP_PREFIX, from the environment or the make command line. Without it they use toolchains/djgpp of the DVX source tree the SDK sits in (SDK_DIR/../../toolchains/djgpp), which ./installToolchain.sh sets up.</li> <li>The DJGPP cross compiler (i586-pc-msdosdjgpp-gcc and dxe3gen). Projects find it through DJGPP_PREFIX, from the environment or the make command line. Without it they use toolchains/djgpp of the DVX source tree the SDK sits in (SDK_DIR/../../toolchains/djgpp), which ./installToolchain.sh sets up.</li>
</ul> </ul>
<h2>Creating a Project</h2> <h2>Creating a Project</h2>
@ -9602,6 +9621,7 @@ End Sub</code></pre>
<p><a href="#sdk.debug">Debugging: the Log and Crash Reports</a></p> <p><a href="#sdk.debug">Debugging: the Log and Crash Reports</a></p>
<p><a href="#sdk.abi">Binary Interface Rules</a></p> <p><a href="#sdk.abi">Binary Interface Rules</a></p>
<p><a href="#sdk.packaging">Packaging and Installing</a></p> <p><a href="#sdk.packaging">Packaging and Installing</a></p>
<p><a href="#sdk.fonts">Making Fonts</a></p>
<p><a href="#games.intro">Writing Games for DVX</a></p> <p><a href="#games.intro">Writing Games for DVX</a></p>
</div> </div>
<div class="topic" id="sdk.firstapp"> <div class="topic" id="sdk.firstapp">
@ -9623,7 +9643,7 @@ End Sub</code></pre>
<p>DVX calls appMain(DxeAppContextT *ctx) once. The template is a callback-only program (hasMainLoop = false): appMain creates a window with a File and Help menu, a label, and a button, and returns 0. From then on DVX calls the window's onClose and onMenu callbacks and the button's onClick. Destroying the program's last window ends it. A program that needs to keep working between events sets hasMainLoop = true, loops in appMain, and calls tsYield() often (see the Clock program's source for an example).</p> <p>DVX calls appMain(DxeAppContextT *ctx) once. The template is a callback-only program (hasMainLoop = false): appMain creates a window with a File and Help menu, a label, and a button, and returns 0. From then on DVX calls the window's onClose and onMenu callbacks and the button's onClick. Destroying the program's last window ends it. A program that needs to keep working between events sets hasMainLoop = true, loops in appMain, and calls tsYield() often (see the Clock program's source for an example).</p>
<p>ctx gives the program its paths: appPath (the .app file, used to read its own resources with dvxResOpen and dvxResRead), appDir, userDir (its folder in the user folder, for its settings and the files it saves: shellEnsureUserDir makes it, shellUserPath names a file there), and helpFile (preset to hello.hlp beside hello.app). The files it ships are in the DATA folder beside it (shellDataPath), which DVX never writes.</p> <p>ctx gives the program its paths: appPath (the .app file, used to read its own resources with dvxResOpen and dvxResRead), appDir, userDir (its folder in the user folder, for its settings and the files it saves: shellEnsureUserDir makes it, shellUserPath names a file there), and helpFile (preset to hello.hlp beside hello.app). The files it ships are in the DATA folder beside it (shellDataPath), which DVX never writes.</p>
<p>A program writes only in its user folder, and never writes or installs anything into DVX's SHARED folder (DVX's own fonts, sounds, themes, and wallpapers): its own files stay with it, in its DATA folder or as resources in the .app, under its vendor and program folder, so two programs' files never collide.</p> <p>A program writes only in its user folder, and never writes or installs anything into DVX's SHARED folder (DVX's own fonts, sounds, themes, and wallpapers): its own files stay with it, in its DATA folder or as resources in the .app, under its vendor and program folder, so two programs' files never collide.</p>
<p>A program can carry fonts of its own as font resources, so its text looks the same whatever fonts were installed: add a line such as &quot;title font TITLE.DFN&quot; to hello.res (dvxres checks that the file is a DVX font). DVX adds the program's fonts when it starts and forgets them when it ends; other programs never see them, and where a family is installed too, the program's sizes and styles come first (dvxText.h, Fonts a Program Carries). Make a .DFN with bin/mkfont from a TrueType, Type 1, or bitmap font -- its manifest names the sizes, whether they are smoothed too, and the characters to keep (mkfont.c's header documents every key; one size and only the characters the program shows keep the file small) -- or copy one from DVX's SHARED\FONTS folder. A .DFN carries the notice and licence of the font it was made from.</p> <p>A program can carry fonts of its own as font resources, so its text looks the same whatever fonts were installed: add a line such as &quot;title font TITLE.DFN&quot; to hello.res (dvxres checks that the file is a DVX font). DVX adds the program's fonts when it starts and forgets them when it ends; other programs never see them, and where a family is installed too, the program's sizes and styles come first (dvxText.h, Fonts a Program Carries). Make a .DFN with bin/mkfont from a TrueType, Type 1, or bitmap font (see Making Fonts; one size and only the characters the program shows keep the file small), or copy one from DVX's SHARED\FONTS folder. A .DFN carries the notice and licence of the font it was made from.</p>
<h2>Run</h2> <h2>Run</h2>
<pre><code> make install DVX_DIR=/path/to/dvx</code></pre> <pre><code> make install DVX_DIR=/path/to/dvx</code></pre>
<p>This copies hello.app and hello.hlp to APPS/LOCAL/HELLO/ in the DVX directory. Start DVX and run the program from Program Manager (File &gt; Run), or add an icon for it. After a change, rebuild and install again; close the running copy first.</p> <p>This copies hello.app and hello.hlp to APPS/LOCAL/HELLO/ in the DVX directory. Start DVX and run the program from Program Manager (File &gt; Run), or add an icon for it. After a change, rebuild and install again; close the running copy first.</p>
@ -9826,7 +9846,8 @@ End Sub</code></pre>
---- --------- ----- ---- --------- -----
Program APPS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.app, NAME.hlp, DATA/ with the DATA files (if any) Program APPS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.app, NAME.hlp, DATA/ with the DATA files (if any)
Widget WIDGETS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.wgt, NAME.DHS, NAME.BHS, NAME.dep (if any) Widget WIDGETS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.wgt, NAME.DHS, NAME.BHS, NAME.dep (if any)
Library LIBS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.lib, NAME.DHS, NAME.dep (if any)</pre> Library LIBS/&lt;VENDOR&gt;/&lt;NAME&gt;/ NAME.lib, NAME.DHS, NAME.dep (if any)
Any SYSTEM/ A program for the DOS prompt that goes with it (not in SYSTEM/KEYS or SYSTEM/PACKAGES)</pre>
<ul> <ul>
<li>Programs carry their compiled help. Widgets and libraries carry help sources, which DVX compiles into its system help when the set of installed modules changes.</li> <li>Programs carry their compiled help. Widgets and libraries carry help sources, which DVX compiles into its system help when the set of installed modules changes.</li>
<li>.dep files are written with DOS line endings.</li> <li>.dep files are written with DOS line endings.</li>
@ -9848,12 +9869,105 @@ End Sub</code></pre>
make package PKG_KEY=acme.SEC PKG_VERSION=1.1.0 make package PKG_KEY=acme.SEC PKG_VERSION=1.1.0
bin/dvxpkg info NAME.dpk # what the package says</code></pre> bin/dvxpkg info NAME.dpk # what the package says</code></pre>
<p>Give acme.KEY to the people who install your packages (Software, File &gt; Trust a Publisher's Key) and keep acme.SEC private and backed up: anyone who has it can sign as you, and an update must be signed with the key that signed the version installed. bin/dvxpkg also signs and checks packages and lists their contents; on DVX, SYSTEM/DVXPKG.EXE does the same, and installs and removes packages. The package library and its file format are described under Package Library.</p> <p>Give acme.KEY to the people who install your packages (Software, File &gt; Trust a Publisher's Key) and keep acme.SEC private and backed up: anyone who has it can sign as you, and an update must be signed with the key that signed the version installed. bin/dvxpkg also signs and checks packages and lists their contents; on DVX, SYSTEM/DVXPKG.EXE does the same, and installs and removes packages. The package library and its file format are described under Package Library.</p>
<h2>DVX's Own Packages and Optional Parts</h2>
<p>DVX is packages too: kpunch.dvx (the loader, SYSTEM, the shell, the core libraries and widgets, and the everyday programs), kpunch.basefont (the base fonts), and the optional parts Setup's &quot;What to install&quot; page offers. Each part is a bundle (kind bundle: a package with no files of its own that needs its members) and each member is one module in its own package: kpunch.basic (dvxbasic, basdev), kpunch.data (dvxsql, datactrl, dbgrid), kpunch.net (dvxnet, http, pkgnet), kpunch.comm (terminal, conn, xfer; it needs kpunch.net), kpunch.media (player, recorder), kpunch.devtools (iconed, resedit, helpedit, pkgbuild, widshow), and kpunch.demos (dvxdemo, basdemo). src/packages.ini lists them. The build (src/installer/mkPackages.py) works out what each member needs from the modules its code imports, the libraries its BASIC program declares, and the manifest's uses (a module reached by name), and stops when DVX itself, or a part, would need a part it does not name. A member's files outside its folder are its paths: the DOS tools in SYSTEM go with the part they serve (BASCOMP.EXE with kpunch.basdev, DVXRES.EXE with kpunch.resedit, and DVXHLPC.EXE with kpunch.helpedit, the Help Editor); DVXPKG.EXE stays in DVX itself, to install and remove packages at the DOS prompt.</p>
<p>A module of yours that cannot work without a part's library names the library's package in PKG_NEEDS (PKG_NEEDS=&quot;kpunch.dvxnet=1.0.0&quot;): Software then installs it only where that part is. One that can do without it does not import it: it asks dvxLibraryLoaded (BASIC: SysLibraryLoaded, system.bas) and reaches the library by name only when it is there, as Software does with pkgnet. BASIC's SQL functions do nothing without the Databases part (SQLOpen returns 0).</p>
<h2>Publishing on the Package Server</h2> <h2>Publishing on the Package Server</h2>
<p>Software's Available and Updates pages list the packages on the DVX package server. To publish one there, make an account on the server (POST /v1/account/register, then the link in the mail), give its email and password in Software's File &gt; Package Server, and choose File &gt; Publish a Package; Software's Published page shows each version's review. From the build machine, sign in (POST /v1/account/login gives a session token) and upload the package with it:</p> <p>Software's Available and Updates pages list the packages on the DVX package server. To publish one there, make an account on the server (POST /v1/account/register, then the link in the mail), give its email and password in Software's File &gt; Package Server, and choose File &gt; Publish a Package; Software's Published page shows each version's review. From the build machine, sign in (POST /v1/account/login gives a session token) and upload the package with it:</p>
<pre><code>curl -H &quot;Authorization: Bearer TOKEN&quot; -H &quot;Content-Type: application/octet-stream&quot; \ <pre><code>curl -H &quot;Authorization: Bearer TOKEN&quot; -H &quot;Content-Type: application/octet-stream&quot; \
--data-binary @NAME.dpk http://SERVER/v1/upload</code></pre> --data-binary @NAME.dpk http://SERVER/v1/upload</code></pre>
<p>The server checks the package as DVX does before installing it and holds it for review; GET /v1/mine shows its state, and the note when it is turned down. Once the server's operator approves it, it is signed with DVX's repository key and listed, and every DVX that has an older version is offered the update. An id belongs to the account that first uploaded it, so later versions must come from the same account; ids of the vendor kpunch are DVX's own. The server's API and its rules are in server/README.md in the DVX source tree.</p> <p>The server checks the package as DVX does before installing it and holds it for review; GET /v1/mine shows its state, and the note when it is turned down. Once the server's operator approves it, it is signed with DVX's repository key and listed, and every DVX that has an older version is offered the update. An id belongs to the account that first uploaded it, so later versions must come from the same account; ids of the vendor kpunch are DVX's own. The server's API and its rules are in server/README.md in the DVX source tree.</p>
</div> </div>
<div class="topic" id="sdk.fonts">
<h1>Making Fonts</h1>
<p>DVX never draws an outline: every size it draws or prints is made beforehand by mkfont, from a TrueType, OpenType, Type 1, BDF, or PCF font, into a .DFN file. One file holds one family in one style (regular, bold, italic, or bold italic) at every size it comes in: the sizes for the screen, their smoothed copies, and the sizes for printing, all made from the same source in the same run, so the screen and the paper never show two versions of a font. When DVX starts it reads only each file's header and size list; a size's glyphs load when something draws or prints at that size, so sizes cost disk space, not memory.</p>
<h2>Three Kinds of Size</h2>
<pre> Kind Manifest key What it is for
---- ------------ --------------
Screen sizes The pixel sizes text is drawn at (8 to 24 for text faces); &quot;native&quot; for a bitmap face, which has its own
Smoothed smooth Screen sizes also made anti-aliased (2 bits per pixel), drawn when text is smoothed (screens of more than 256 colors); about twice the room of the 1-bit size, and best from 12 pixels
Print print Sizes made 1-bit for printing (25 and up); none of them a screen size, and never smoothed</pre>
<p>A size is in pixels, which on paper are printer dots: a size in points is points x dpi / 72 dots, so 12 points is 50 dots at 300 dpi and 30 at 180. Printing picks the face's smallest size at least as large as the text in dots and scales it down a little; without one it scales the largest up, smoothed but softer. PostScript printers draw with their own faces. The base set's print sizes cover the usual point sizes at both resolutions:</p>
<pre> Pixels Points at 300 dpi Points at 180 dpi
------ ----------------- -----------------
25 6 10
29 7 11.6
33 8 13.2
38 9 15.2
42 10 16.8
50 12 20
58 14 23.2
67 16 26.8
75 18 30
83 20 33.2
100 24 40</pre>
<p>A file holds at most 64 strikes: its screen sizes, smoothed sizes, and print sizes together (DejaVu Sans has 12, 8, and 11, so 31). A size is at most 127 pixels. Every size also shows in the Font dialog and can be drawn on the screen, so a program can use the large ones for headings.</p>
<h2>The Manifest</h2>
<p>mkfont works from a manifest, an INI file: [fonts] lists the files to make (8.3 base name = family name), [licences] names each licence and the text files it is made of, and each font has a section of its own. src/fonts/fonts.ini is DVX's; src/tools/mkfont.c's header documents every key.</p>
<pre><code>[fonts]
ACMESANS = Acme Sans
ACMESANB = Acme Sans
[licences]
ACME = acme/OFL.txt
[ACMESANS]
style = regular
licence = ACME
source = acme/AcmeSans-Regular.ttf
sizes = 8 9 10 11 12 13 14 15 16 18 20 24
smooth = 12 13 14 15 16 18 20 24
print = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[ACMESANB]
style = bold
licence = ACME
source = acme/AcmeSans-Bold.ttf
sizes = 8 9 10 11 12 13 14 15 16 18 20 24
smooth = 12 13 14 15 16 18 20 24
print = 25 29 33 38 42 50 58 67 75 83 100
hinting = native</code></pre>
<pre> Key Meaning
--- -------
style regular, bold, italic, or bolditalic
licence A key of [licences]: the text every file carries
source The font file, under the source folder; source1, source2 ... more files for other sizes, each with its own sizes1, smooth1 ...
sizes Screen sizes, or native
smooth Sizes (or all) also made smoothed
print Sizes made for printing
hinting native (the font's own), auto (FreeType's), or none; italics often look better with auto
graycut Sizes whose 1-bit glyphs are cut from the smoothed rendering, for a face whose 1-bit hinting draws it too light
boxdraw true: DVX draws the box, block, and shade characters itself
chars Only these characters (hex codes and ranges), the rest marked missing
weight The weight of a variable font to make
encoding cp437 for a font that numbers its glyphs in code page 437
set DVX's own fonts only: base or more (where the file ships)</pre>
<h2>Names and Licences</h2>
<ul>
<li>A file's 8.3 base name is the family's short form plus B (bold), I (italic), or Z (bold italic): ACMESANS, ACMESANB, ACMESANI, ACMESANZ. The four files of a family share its family name (at most 31 characters).</li>
<li>Ship only fonts whose licence lets them be converted and given away (the SIL Open Font Licence, Apache, MIT, the Bitstream Vera licence, public domain), and read what it says about the font's name in a converted copy: some keep the name for the original. DVX's X11 bitmap faces ship under neutral names (Swiss, Roman, Schoolbook, Typewriter) because their own names are trademarks.</li>
<li>Every .DFN carries its notice (the family, style, and the files it was made from, with their copyright notices) and its licence text, so the licence goes wherever the font does; the Font dialog's Licence button shows it.</li>
</ul>
<h2>Building and Checking</h2>
<p>In the SDK, bin/mkfont MANIFEST SOURCEDIR OUTDIR makes every font the manifest lists, and stops with a message naming the font for any mistake: a bad size, a size listed twice, more than 64 strikes, a missing licence text. It prints a line per font with the characters the font lacks (DVX fills those in from DejaVu Sans or the system font when it draws). bin/mkfont -p FONT.DFN SHEET.BMP draws every size of a font into a picture, with the characters it lacks marked in red: look at it before shipping a font.</p>
<p>In the DVX source tree, src/fonts/fonts.ini lists every font DVX ships, and the build makes them into bin/shared/fonts/kpunch (DVX's vendor folder) from sources src/fonts/installFonts.sh downloads (pinned versions). Each font names its set: base, the DVX Fonts package (kpunch.basefont, src/fonts/PACKAGE.INI), which Setup installs with DVX unless told to install no fonts and which the package server can update; or more, the More Fonts add-on. mkfont stops when a font names no set, and when a font of the base set has no print sizes, so neither a font nor its print sizes can be left out.</p>
<h2>Where Fonts Go</h2>
<ul>
<li>In the FONTS folder, for every program: as an add-on package of kind font, its files under SHARED/FONTS/VENDOR/ (see Packaging and Installing), installed with Software. A face may come in several files of the same family and style (up to four), each adding the sizes the others lack, but one file per face is the way to ship: its sizes cannot drift apart.</li>
<li>In a program, for it alone: as font resources (a .res line &quot;name font FILE.DFN&quot;, or a BASIC project's Fonts). The program's sizes and styles come first and the installed family fills in the rest.</li>
</ul>
<h2>Checklist</h2>
<ul>
<li>The licence allows converting and giving the font away, and its full text is in [licences].</li>
<li>Each style the family has is made; a missing bold or italic is made by DVX, thickened or slanted.</li>
<li>Screen sizes from 8 to 24 pixels for a text face, smoothed from 12.</li>
<li>Print sizes from 25 to 100 pixels for any face meant for documents (a base-set font must have them).</li>
<li>At most 64 strikes a file; 8.3 file names; family names of 31 characters at most.</li>
<li>The missing-character line and the mkfont -p picture of each font looked at.</li>
<li>As an add-on: kind = font, files under SHARED/FONTS/VENDOR/, a higher version for every change, signed.</li>
</ul>
</div>
<div class="topic" id="libtasks"> <div class="topic" id="libtasks">
<h1>libtasks -- Cooperative Task Switching</h1> <h1>libtasks -- Cooperative Task Switching</h1>
<p>Credit-based cooperative (non-preemptive) multitasking library for DOS protected mode (DJGPP/DPMI). Each task receives (priority + 1) credits per scheduling round. Tasks run round-robin, consuming one credit per turn. When all credits are exhausted, every ready task is refilled. Higher-priority tasks run proportionally more often but never starve lower ones.</p> <p>Credit-based cooperative (non-preemptive) multitasking library for DOS protected mode (DJGPP/DPMI). Each task receives (priority + 1) credits per scheduling round. Tasks run round-robin, consuming one credit per turn. When all credits are exhausted, every ready task is refilled. Higher-priority tasks run proportionally more often but never starve lower ones.</p>
@ -10317,7 +10431,7 @@ if (rc != MUSIC_OK) {
softwave the SoundFont software synthesizer (below); else the software synthesizer</pre> softwave the SoundFont software synthesizer (below); else the software synthesizer</pre>
<p>On the FM chip and the MPU-401 port the song is played by the timer service (500 times a second), so it keeps time however busy the programs are. On the FM chip every note takes a voice from audio.lib's shared pool; when none is free the note plays on the software synthesizer instead, which then runs beside the chip (its stream is always open for that). The software synthesizer runs in the stream's fill function (the shell's idle time), 64 frames between event checks, 150 ms ahead of what is heard; a program that keeps the desktop busy every frame should call audioPump once a frame, as for any stream.</p> <p>On the FM chip and the MPU-401 port the song is played by the timer service (500 times a second), so it keeps time however busy the programs are. On the FM chip every note takes a voice from audio.lib's shared pool; when none is free the note plays on the software synthesizer instead, which then runs beside the chip (its stream is always open for that). The software synthesizer runs in the stream's fill function (the shell's idle time), 64 frames between event checks, 150 ms ahead of what is heard; a program that keeps the desktop busy every frame should call audioPump once a frame, as for any stream.</p>
<h2>General MIDI on FM</h2> <h2>General MIDI on FM</h2>
<p>Instruments come from an OP2 bank (the DMX &quot;GENMIDI&quot; format: 128 melodic instruments and 47 percussion instruments for notes 35 to 81, each one or two two-operator voices, with a note offset, a fixed note for percussion, and a detune for the second voice). DVX ships Freedoom's GENMIDI bank (see Licences below); DVX.INI [audio] midiBank (MUSIC_INI_BANK) names another OP2 file instead: a bank in SHARED\BANKS or the user's BANKS folder by its name (an add-on package's as VENDOR\NAME), or any OP2 file by its path from the DVX folder, for example a bank made with an OPL editor, or another freely licensed bank such as DMXOPL. Control Panel's Sounds page lists the banks to choose from; DVX's own add-ons offer DMXOPL and DMXOPL3 (MIT, by ConSiGno and Sneakernets) through Software. A bank that is not there falls back to the bundled one (MUSIC_BANK_DEFAULT). DVX.INI's choice is read as each MIDI music starts, so a new choice reaches the next one; a music keeps the bank it started with, and a bank is freed with the last music playing on it.</p> <p>Instruments come from an OP2 bank (the DMX &quot;GENMIDI&quot; format: 128 melodic instruments and 47 percussion instruments for notes 35 to 81, each one or two two-operator voices, with a note offset, a fixed note for percussion, and a detune for the second voice). DVX ships Freedoom's GENMIDI bank (see Licences below); DVX.INI [audio] midiBank (MUSIC_INI_BANK) names another OP2 file instead: a bank in SHARED\BANKS or the user's BANKS folder by its name (an add-on package's as VENDOR\NAME), or any OP2 file by its path from the DVX folder, for example a bank made with an OPL editor. DVX also ships DMXOPL and DMXOPL3 (MIT, by ConSiGno and Sneakernets) in SHARED\BANKS, made to sound like a Roland Sound Canvas. Control Panel's Sounds page lists the banks to choose from. A bank that is not there falls back to the bundled one (MUSIC_BANK_DEFAULT). DVX.INI's choice is read as each MIDI music starts, so a new choice reaches the next one; a music keeps the bank it started with, and a bank is freed with the last music playing on it.</p>
<p>What is played: note on / off, velocity, program change, channel volume (CC7), expression (CC11), pan (CC10: left, both, or right on an OPL3 and the software synthesizer), sustain pedal (CC64), pitch bend with the bend range from RPN 0 (default 2 semitones), all notes off (CC123, CC120), reset controllers (CC121), and General MIDI System On (a reset). Channel 10 plays percussion. Loudness is velocity x volume x expression x the music's volume on a 40 log10 curve, added as attenuation to the voice's level. OP2 banks are tuned for DMX, which sounds note n where MIDI has note n + 12, so notes are played an octave up from the bank's offsets. Not played: modulation (CC1), aftertouch, the FM chip's own rhythm mode, four-operator voices.</p> <p>What is played: note on / off, velocity, program change, channel volume (CC7), expression (CC11), pan (CC10: left, both, or right on an OPL3 and the software synthesizer), sustain pedal (CC64), pitch bend with the bend range from RPN 0 (default 2 semitones), all notes off (CC123, CC120), reset controllers (CC121), and General MIDI System On (a reset). Channel 10 plays percussion. Loudness is velocity x volume x expression x the music's volume on a 40 log10 curve, added as attenuation to the voice's level. OP2 banks are tuned for DMX, which sounds note n where MIDI has note n + 12, so notes are played an octave up from the bank's offsets. Not played: modulation (CC1), aftertouch, the FM chip's own rhythm mode, four-operator voices.</p>
<h2>The Software Synthesizer</h2> <h2>The Software Synthesizer</h2>
<p>When there is no FM chip (or it is busy), MIDI plays on DVX's own software FM synthesizer: an integer two-operator FM chip modelled on the OPL2 (the same log-sine and exponential tables, waveforms 0 to 3, feedback, the chip's envelope rates and key scaling, key scale level, tremolo, and vibrato) with 24 voices, rendering at the device's rate into a stream. It is driven with the same bank and the same register values as the chip, so music sounds alike on both. The host tests compare it with emu8950, an accurate OPL2 emulator, for several patches: pitch, loudness over time, and harmonics agree closely. Cost on a 486: roughly 1 to 2 percent of a 486DX2-66 per sounding voice at 22,050 Hz.</p> <p>When there is no FM chip (or it is busy), MIDI plays on DVX's own software FM synthesizer: an integer two-operator FM chip modelled on the OPL2 (the same log-sine and exponential tables, waveforms 0 to 3, feedback, the chip's envelope rates and key scaling, key scale level, tremolo, and vibrato) with 24 voices, rendering at the device's rate into a stream. It is driven with the same bank and the same register values as the chip, so music sounds alike on both. The host tests compare it with emu8950, an accurate OPL2 emulator, for several patches: pitch, loudness over time, and harmonics agree closely. Cost on a 486: roughly 1 to 2 percent of a 486DX2-66 per sounding voice at 22,050 Hz.</p>
@ -10377,6 +10491,7 @@ musicMmlPlay(tune, &quot;MB T140 O3 L8 CDEC CDEC EFG4 EFG4&quot;);</code></pre>
<p>libxmp-lite (Extended Module Player Lite), (C) 1996-2026 Claudio Matsuoka and Hipolito Carraro Jr, MIT licence:</p> <p>libxmp-lite (Extended Module Player Lite), (C) 1996-2026 Claudio Matsuoka and Hipolito Carraro Jr, MIT licence:</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<p>The DVX General MIDI SoundFont add-on (DVXGM.SF2) is made from FluidR3_GM by Frank Wen (MIT licence); its notice is installed beside it (SHARED\BANKS\KPUNCH\DVXGM.TXT).</p> <p>The DVX General MIDI SoundFont add-on (DVXGM.SF2) is made from FluidR3_GM by Frank Wen (MIT licence); its notice is installed beside it (SHARED\BANKS\KPUNCH\DVXGM.TXT).</p>
<p>The DMXOPL 1.11 instrument bank is by ConSiGno, and DMXOPL3 by Sneakernets (MIT licence); each one's licence and credits are installed beside it (SHARED\BANKS\DMXOPL.TXT and DMXOPL3.TXT).</p>
<p>The GENMIDI instrument bank is from Freedoom 0.13.0, Copyright (C) 2001-2024 Contributors to the Freedoom project. All rights reserved. BSD 3-clause licence:</p> <p>The GENMIDI instrument bank is from Freedoom 0.13.0, Copyright (C) 2001-2024 Contributors to the Freedoom project. All rights reserved. BSD 3-clause licence:</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Freedoom project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> <p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Freedoom project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
</div> </div>
@ -10458,6 +10573,7 @@ APPS/ACME/CHESS/CHESS.APP = 61234 &lt;SHA-256, 64 hex digits&gt;</code></pre>
saver SHARED/SAVERS/VENDOR (a screen saver: a program, so it needs abi) saver SHARED/SAVERS/VENDOR (a screen saver: a program, so it needs abi)
bundle no files: a set of packages, its dependencies bundle no files: a set of packages, its dependencies
system DVX itself (kpunch.dvx): anywhere but the user folder</pre> system DVX itself (kpunch.dvx): anywhere but the user folder</pre>
<p>Every kind but bundle may also add files to SYSTEM (a DOS program run at the prompt, say), but not to SYSTEM/KEYS (the keys DVX trusts) or SYSTEM/PACKAGES (the package records, PKG_DB_DIR), which only DVX itself writes. A file there that another package has is refused when the package is installed, as anywhere (pkgPlanInstall), so an add-on still cannot replace one of DVX's.</p>
<h2>Manifests (pkgManifest.h)</h2> <h2>Manifests (pkgManifest.h)</h2>
<pre> Function Description <pre> Function Description
-------- ----------- -------- -----------
@ -10513,8 +10629,10 @@ dvxpkg verify NAME.DPK [-s NAME.SIG] [KEY.KEY ...]
dvxpkg info NAME.DPK dvxpkg info NAME.DPK
dvxpkg keygen &quot;Key name&quot; BASE dvxpkg keygen &quot;Key name&quot; BASE
dvxpkg install NAME.DPK [-r DVXDIR] [-y] dvxpkg install NAME.DPK [-r DVXDIR] [-y]
dvxpkg record NAME.DPK DVXDIR [-n]
dvxpkg remove VENDOR.NAME [-r DVXDIR] [-f] dvxpkg remove VENDOR.NAME [-r DVXDIR] [-f]
dvxpkg list [-r DVXDIR]</code></pre> dvxpkg list [-r DVXDIR]</code></pre>
<p>record writes a package's installed record into a DVX folder whose files came another way, and prints the record's name; with -n the package is recorded as needed by another (it goes when nothing needs it any more), not chosen. The release build records every package of DVX's in Setup's package that way (DVX itself, the base fonts, the optional bundles and their members: src/packages.ini), every file with its size and SHA-256, so an update from the package server replaces them as it would any package's, removing the files the new version dropped.</p>
<p>On DOS, DVXPKG remove is the way out when an add-on keeps DVX from starting (DVX /SAFE, or holding Shift, also starts DVX without add-ons). The SDK's make package builds NAME.dpk from a project (sdk.mk's PKG_* settings), and the IDE's File &gt; Make Package from a BASIC project.</p> <p>On DOS, DVXPKG remove is the way out when an add-on keeps DVX from starting (DVX /SAFE, or holding Shift, also starts DVX without add-ons). The SDK's make package builds NAME.dpk from a project (sdk.mk's PKG_* settings), and the IDE's File &gt; Make Package from a BASIC project.</p>
</div> </div>
<div class="topic" id="lib.print"> <div class="topic" id="lib.print">
@ -10616,8 +10734,8 @@ if (doc) {
<p>A fill (PrintFillE) is solid or a hatch of lines one dot wide every PRINT_HATCH_DOTS (8) dots, horizontal, vertical, either diagonal, or crossed, lined up across the page as BASIC's FillStyle hatches are. The pen (its color, width, and dashes) and the font are sent only when they change, and each of the printer's faces is made Latin-1 the first time the document uses it.</p> <p>A fill (PrintFillE) is solid or a hatch of lines one dot wide every PRINT_HATCH_DOTS (8) dots, horizontal, vertical, either diagonal, or crossed, lined up across the page as BASIC's FillStyle hatches are. The pen (its color, width, and dashes) and the font are sent only when they change, and each of the printer's faces is made Latin-1 the first time the document uses it.</p>
<p>A font opened for a vector page (printFontOpen with page.vector set) is the printer's own Helvetica, Times, or Courier in the style asked for (FONT_STYLE_BOLD, FONT_STYLE_ITALIC): Courier for a fixed-pitch family or one with Mono or Courier in its name, Times for one with Serif, Times, Roman, Tinos, or Ledger in it (but not Sans), else Helvetica. It is exactly the size asked for, and printFontWidth, printFontHeight (1.2 times the size), and printFontAscent measure the printer's letters by Adobe's published widths, so text placed with them lines up as it prints. It draws only with printVecText (printFontSpans and printFontDraw draw nothing with it); for DVX's own letters drawn in bands on a PostScript printer, open the font with vector cleared in a copy of the page.</p> <p>A font opened for a vector page (printFontOpen with page.vector set) is the printer's own Helvetica, Times, or Courier in the style asked for (FONT_STYLE_BOLD, FONT_STYLE_ITALIC): Courier for a fixed-pitch family or one with Mono or Courier in its name, Times for one with Serif, Times, Roman, Tinos, or Ledger in it (but not Sans), else Helvetica. It is exactly the size asked for, and printFontWidth, printFontHeight (1.2 times the size), and printFontAscent measure the printer's letters by Adobe's published widths, so text placed with them lines up as it prints. It draws only with printVecText (printFontSpans and printFontDraw draw nothing with it); for DVX's own letters drawn in bands on a PostScript printer, open the font with vector cleared in a copy of the page.</p>
<h2>Text on a Page</h2> <h2>Text on a Page</h2>
<p>A page a program draws can carry text in any font family (dvxText.h) at a size in points. printFontOpen(&amp;page, family, decipoints, style) gives a PrintFontT for a page's resolution (its PrintPageInfoT): the size is in tenths of a point (120 for 12 points), the style any FONT_STYLE_ bits, underline and strike-through included. The font is the family's smallest strike at least as large as the size in printer dots (12 points is 50 dots at 300 dpi, 30 at 180), else its largest, scaled to the size across and down apart, since a 9-pin printer's dots are not square. Scaling is nearest pixel; scaling down, every pixel row and column of the strike still marks a dot, so thin strokes stay.</p> <p>A page a program draws can carry text in any font family (dvxText.h) at a size in points. printFontOpen(&amp;page, family, decipoints, style) gives a PrintFontT for a page's resolution (its PrintPageInfoT): the size is in tenths of a point (120 for 12 points), the style any FONT_STYLE_ bits, underline and strike-through included. The font is the family's smallest strike at least as large as the size in printer dots (12 points is 50 dots at 300 dpi, 30 at 180), else its largest, scaled to the size across and down apart, since a 9-pin printer's dots are not square. Scaled down (or up one way only), a strike pixel becomes the dots it covers, and every pixel row and column of the strike still marks a dot, so thin strokes stay. Scaled up both ways, each dot is sampled between the four strike pixels around its centre and drawn when at least half covered, so edges come out smooth rather than in steps.</p>
<p>The base set's sizes go up to 24 pixels, so most printed sizes are scaled up from it and look blocky at 300 dpi. The Printer Fonts add-on (kpunch.prfonts) gives DejaVu Sans, Serif, and Sans Mono in every style at 25 to 100 pixels, about 6 to 24 points at 300 dpi and 10 to 40 at 180: installed, those families print crisp at those sizes with no change to the program.</p> <p>The base set's files carry print sizes beside their screen sizes (mkfont's print key; see Making Fonts): DejaVu Sans, Serif, and Sans Mono in every style at 25 to 100 pixels, about 6 to 24 points at 300 dpi and 10 to 40 at 180, so those families print crisp at those sizes. Other families, and larger text, are scaled up from their largest size.</p>
<pre> Function Description <pre> Function Description
-------- ----------- -------- -----------
printFontOpen(&amp;page, family, decipoints, style) The font; NULL when out of memory or for a size of 0 or less. printFontClose gives it up. printFontOpen(&amp;page, family, decipoints, style) The font; NULL when out of memory or for a size of 0 or less. printFontClose gives it up.

BIN
screenshots/86box/apps-welcome.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/f1-h-format.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/f1-h-welcom.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/firstrun-fr-open.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/instadd-add-font.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-add-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-copy.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-done.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-fold.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-lic.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-start.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-unin.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instadd-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/install-in-welc.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/install-su-fold.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/install-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instbase-su-fold.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/instbase-su-lic.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/instbase-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instcore-co-desk.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instcore-co-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/instcore-co-welc.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/upgdrop-ud-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/upgdrop-ud-welc.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/upgrade-su-upgr.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/upgrade-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/86box/welcome-wl-help.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/welcome-wl-open.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/welcome-wl-tour.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/86box/welcome-wl-tour2.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/apps-welcome.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/f1-h-format.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/f1-h-welcom.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/firstrun-fr-open.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/instadd-add-font.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-add-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-copy.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-done.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-fold.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-lic.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-start.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-unin.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instadd-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/install-in-welc.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/install-su-disk.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/install-su-fold.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/install-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/install-su-wrong.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/instbase-su-fold.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/instbase-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instcore-co-desk.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instcore-co-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/instcore-co-welc.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/upgdrop-ud-sw.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/upgdrop-ud-welc.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/upgrade-su-upgr.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/upgrade-su-what.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
screenshots/dosbox/welcome-wl-help.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/welcome-wl-open.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/welcome-wl-tour.png (Stored with Git LFS)

Binary file not shown.

BIN
screenshots/dosbox/welcome-wl-tour2.png (Stored with Git LFS)

Binary file not shown.

View file

@ -0,0 +1,4 @@
# Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line
202 346 176 16
# Blinking text caret after C:\DVX in the folder box
123 189 3 18

View file

@ -0,0 +1,2 @@
# Blinking text caret at the start of the licence text
77 210 3 18

View file

@ -0,0 +1,2 @@
# Blinking text caret after C:\DVX in the folder box
123 189 3 18

View file

@ -1,4 +1,6 @@
# Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line # Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line:
# from floppies (DOSBox), and from the CD (86Box), where the add-ons push it down
202 301 176 16 202 301 176 16
202 346 176 16
# Blinking text caret after C:\DVX in the folder box # Blinking text caret after C:\DVX in the folder box
123 189 3 18 123 189 3 18

View file

@ -1,4 +1,4 @@
# Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line # Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line
202 301 176 16 202 346 176 16
# Blinking text caret after C:\DVX in the folder box # Blinking text caret after C:\DVX in the folder box
123 189 3 18 123 189 3 18

View file

@ -0,0 +1,2 @@
# Blinking text caret at the start of the licence text
77 210 3 18

View file

@ -0,0 +1,2 @@
# Blinking text caret at the start of the licence text
77 210 3 18

View file

@ -1,4 +1,4 @@
# Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line # Setup's "DVX needs about N MB" figure (grows with the package) and the rest of that line
202 301 176 16 202 346 176 16
# Blinking text caret after C:\DVX in the folder box # Blinking text caret after C:\DVX in the folder box
123 189 3 18 123 189 3 18

View file

@ -109,7 +109,8 @@ and put it back.
## Publishing DVX itself ## Publishing DVX itself
`make` in the DVX tree writes `dist/DVXUPD.DPK`: DVX itself as the package `kpunch.dvx` (kind `make` in the DVX tree writes `dist/DVXUPD.DPK`: DVX itself as the package `kpunch.dvx` (kind
`system`), every file of the release but the optional fonts, at this DVX's version and ABI. Packages `system`), every file of the release but the optional fonts and DVX's optional parts, at this DVX's
version and ABI. Packages
of the vendor `kpunch` are the operator's, so it is uploaded with the console token and approved of the vendor `kpunch` are the operator's, so it is uploaded with the console token and approved
like any other: like any other:
@ -119,17 +120,43 @@ like any other:
Software then lists it first on its Updates page. DVX installs it only when the repository's Software then lists it first on its Updates page. DVX installs it only when the repository's
signature checks against the key in its own `SYSTEM\KEYS`, and names the add-ons a new ABI would signature checks against the key in its own `SYSTEM\KEYS`, and names the add-ons a new ABI would
leave unable to load before anything is installed. leave unable to load before anything is installed. Setup installed DVX with its record listing every
file (the release build writes it into Setup's package), so the update also removes the files the
new version dropped.
The same build writes DVX's own add-ons to `dist/addons/` (`src/addons/README.md`): instrument The base set of fonts is a package too, `kpunch.basefont` ("DVX Fonts", `src/fonts/PACKAGE.INI`):
banks for MIDI music, kept out of the base install. They are uploaded and approved the same way: `make` writes it as `dist/BASEFONT.DPK`, at DVX's version. Setup installs and records it with DVX
unless told to install no fonts, so publishing a newer one updates every DVX that has the fonts,
and offers them to those that do not:
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/octet-stream" \
--data-binary @dist/BASEFONT.DPK https://packages.example.com/v1/upload
calog tools/review.lua -- review.conf approve kpunch.basefont 1.0.1
DVX's optional parts (`src/packages.ini`: DVX BASIC, Databases, Networking, Communications, Media,
Developer Tools, and Demos) are packages as well, one per module, each part a bundle that needs its
members. `make` writes them all to `dist/packages/` (`BASIC.DPK`, `DVXBASIC.DPK`, `BASDEV.DPK`, ...),
at DVX's version. Setup installs and records the parts chosen, so publishing newer ones updates
every DVX that has them, and offers the parts to those that do not; publish them with the DVX they
were built with:
for dpk in dist/packages/*.DPK; do
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/octet-stream" \
--data-binary @"$dpk" https://packages.example.com/v1/upload
done
calog tools/review.lua -- review.conf approve kpunch.basic 1.0.1 # and each of the others
The same build writes DVX's own add-ons to `dist/addons/` (`src/addons/README.md`): More Fonts and
the General MIDI SoundFont, kept out of the base install (the CD carries them too, signed when the
media are signed: with `DVX_SIGN_KEY=KEY.SEC`, else `~/.ssh/KPUNCH.SEC` when it is there). They are
uploaded and approved the same way:
for dpk in dist/addons/*.DPK; do for dpk in dist/addons/*.DPK; do
curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/octet-stream" \ curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/octet-stream" \
--data-binary @"$dpk" https://packages.example.com/v1/upload --data-binary @"$dpk" https://packages.example.com/v1/upload
done done
calog tools/review.lua -- review.conf approve kpunch.dmxopl 1.11.0 calog tools/review.lua -- review.conf approve kpunch.morefont 1.0.0
calog tools/review.lua -- review.conf approve kpunch.dmxopl3 2.11.0 calog tools/review.lua -- review.conf approve kpunch.dvxgm 1.0.0
## Configuration ## Configuration

View file

@ -1,24 +1,42 @@
# DVX's own add-ons # DVX's own add-ons
Add-on packages that DVX's operator publishes on the package server, kept Add-on packages DVX offers beside its base install: on the CD (its
out of the base install to keep it small. Each folder `KIND/NAME` holds a `ADDONS` folder, where Setup offers them) and on the package server. Each
package template (`PACKAGE.INI`, without `[files]`) and the files the folder `KIND/NAME` holds a package template (`PACKAGE.INI`, without
package installs, laid out as they go into the DVX folder. Every build `[files]`) and the files the package installs, laid out as they go into
(`src/installer/mkDist.sh`, run by `make`) packs each one into the DVX folder. Every build (`src/installer/mkDist.sh`, run by `make`)
`dist/addons/NAME.DPK`; they are uploaded and approved like any other packs each one into `dist/addons/NAME.DPK` and copies it to the CD;
package (`server/README.md`). mkDist signs them (`NAME.SIG` beside each) with the secret key
`DVX_SIGN_KEY` names, else `~/.ssh/KPUNCH.SEC` when it is there; a
release's must be signed: DVX installs a `kpunch.*` package only when
signed by a key in its `SYSTEM\KEYS`, so Setup offers no unsigned ones.
On the server they are uploaded and approved like any other package
(`server/README.md`).
Third-party content is kept unchanged, with its origin (the commit it came Third-party content is kept unchanged, with its origin (the commit it came
from and its SHA-256) in the comments of `PACKAGE.INI` and its licence in a from and its SHA-256) in the comments of `PACKAGE.INI` and its licence in a
text file the package installs beside it. text file the package installs beside it.
A folder with a `fonts.ini` instead holds a font manifest (as An add-on whose files the build makes has them in `obj/addons/NAME`
`src/fonts/fonts.ini`): the build makes its `.DFN` files with mkfont into (`src/tools/Makefile`), which mkDist packs instead of the folder:
`obj/addons/NAME/SHARED/FONTS/KPUNCH`, and mkDist packs that folder. Each
`.DFN` carries its licence text. * More Fonts: the fonts of `src/fonts/fonts.ini`'s "more" set, copied
from the build's fonts. Every font DVX makes is listed in that one
manifest (`set = base` for the DVX Fonts package, kpunch.basefont,
which Setup installs with DVX: `src/fonts/PACKAGE.INI`; `set = more`
for this add-on), so a font and its print sizes cannot be left out or
drift apart; the SDK guide's Making Fonts says how to add one.
* A folder with a `soundfont.ini`: the SoundFont mksf makes from the
pinned source, with the folder's own files.
`version = dvx` in a template stands for DVX's own version (mkDist fills
it in): More Fonts is made from the same manifest as the base set, so
each DVX release carries its own.
| Folder | Package | What it is | | Folder | Package | What it is |
|---|---|---| |---|---|---|
| `banks/dmxopl` | `kpunch.dmxopl` | DMXOPL 1.11, a General MIDI instrument bank by ConSiGno (MIT) | | `banks/dvxgm` | `kpunch.dvxgm` | DVX General MIDI: a General MIDI SoundFont for wavetable cards (Gravis UltraSound, Sound Blaster AWE32 and AWE64), cut down from FluidR3_GM by Frank Wen (MIT); about 4 MB installed |
| `banks/dmxopl3` | `kpunch.dmxopl3` | DMXOPL3, its OPL3 successor, by Sneakernets (MIT) | | `fonts/morefont` | `kpunch.morefont` | More Fonts: every font DVX makes beyond the base set (condensed DejaVu, Arimo, Tinos, Cousine, display faces, and pixel fonts), each with its licence; about 7 MB installed |
| `fonts/prfonts` | `kpunch.prfonts` | Printer Fonts: DejaVu Sans, Serif, and Sans Mono in every style at 25 to 100 pixels, for crisp printed text (about 6 MB installed) |
DMXOPL and DMXOPL3, the FM instrument banks, were add-ons once; at 12 KB
together they ship in the base install (`config/banks`).

View file

@ -1,20 +0,0 @@
; DMXOPL 1.11 as an add-on package: a General MIDI instrument bank for
; MIDI music on the FM chip and DVX's FM software synthesizer. mkDist
; builds it into dist/addons/DMXOPL.DPK for the package server.
;
; From https://github.com/sneakernets/DMXOPL, branch master, commit
; 63bd4821c6adaff29074f1f6486261961c2014b4 (2017-08-22, "V1.11 Release"):
; GENMIDI.op2, unchanged, as SHARED\BANKS\KPUNCH\DMXOPL.OP2 (SHA-256
; d3feb807e5102d7de3075c2351cced7e853ba2da8708eff98cc1c8ef8f240ce2).
; MIT licence; DMXOPL.TXT beside it carries the licence and the credits.
[package]
format = 1
id = kpunch.dmxopl
name = DMXOPL
version = 1.11
kind = bank
summary = General MIDI instruments for FM music, made to sound like a Roland Sound Canvas.
publisher = Kangaroo Punch Studios
author = ConSiGno
licence = MIT
homepage = https://github.com/sneakernets/DMXOPL

View file

@ -1,23 +0,0 @@
; DMXOPL3 as an add-on package: a General MIDI instrument bank for MIDI
; music on the FM chip and DVX's FM software synthesizer. mkDist builds
; it into dist/addons/DMXOPL3.DPK for the package server.
;
; From https://github.com/sneakernets/DMXOPL, branch DMXOPL3, commit
; e83c144a2e6d3c283e20f9d16d011126931892f5 (2018-07-13, after the v2.11d
; release): GENMIDI.op2, unchanged, as SHARED\BANKS\KPUNCH\DMXOPL3.OP2
; (SHA-256 92fc03c7734c45b1ece2bfad1f79d1abbd2b27ec6b45fbfb1c5a74f5ce0138c9).
; Made for the OPL3: DVX plays its OPL3-only waveforms as the OPL2's four,
; as it does for every bank. MIT licence; DMXOPL3.TXT beside it carries
; the licence and the credits ("DMXOPL3 by Sneakernets", as the author
; asks).
[package]
format = 1
id = kpunch.dmxopl3
name = DMXOPL3
version = 2.11
kind = bank
summary = General MIDI instruments for FM music, the OPL3 successor to DMXOPL.
publisher = Kangaroo Punch Studios
author = Sneakernets
licence = MIT
homepage = https://github.com/sneakernets/DMXOPL

View file

@ -0,0 +1,19 @@
; More Fonts as an add-on package: every font DVX makes but the base set
; (src/fonts/fonts.ini, set = more): the condensed DejaVu faces, Arimo,
; Tinos, Cousine, and the other outline, display, and pixel faces. The
; build copies their .DFN files (src/tools/Makefile) into
; obj/addons/morefont/SHARED/FONTS/KPUNCH, and mkDist packs them into
; dist/addons/MOREFONT.DPK, for the CD's ADDONS folder and the package
; server. Each file carries its own licence text. version = dvx: the
; fonts are made from the same manifest as the base set, so the add-on
; takes DVX's version (mkDist fills it in).
[package]
format = 1
id = kpunch.morefont
name = More Fonts
version = dvx
kind = font
summary = More typefaces for documents, programs, and games: condensed DejaVu, Arimo, Tinos, Cousine, display faces, and pixel fonts.
publisher = Kangaroo Punch Studios
author = The fonts' designers (each font names its own)
licence = Open font licences (each font carries its own)

View file

@ -1,18 +0,0 @@
; Printer Fonts as an add-on package: the DejaVu Sans, Serif, and Sans
; Mono faces DVX ships, in every style, at the large sizes text is
; printed at (25 to 100 pixels), so printed text is crisp instead of
; scaled up from the screen sizes. The build makes the .DFN files from
; fonts.ini beside this file (mkfont, src/tools/Makefile) into
; obj/addons/prfonts, and mkDist packs them into dist/addons/PRFONTS.DPK
; for the package server. Each file carries the DejaVu licence text.
[package]
format = 1
id = kpunch.prfonts
name = Printer Fonts
version = 2.37
kind = font
summary = Large sizes of the DejaVu fonts, for sharp printed text.
publisher = Kangaroo Punch Studios
author = DejaVu fonts team
licence = Bitstream Vera and Arev (DejaVu changes public domain)
homepage = https://dejavu-fonts.github.io

View file

@ -1,126 +0,0 @@
; fonts.ini -- the printer-fonts add-on (kpunch.prfonts): the DejaVu
; Sans, Serif, and Sans Mono faces DVX ships, at the large sizes text is
; printed at, made by mkfont (src/tools/mkfont.c documents every key)
; into SHARED\FONTS\KPUNCH. Each file adds its sizes to the face of the
; same family and style in the base set, so printing finds a strike near
; the size in printer dots (12 points is 50 dots at 300 dpi, 30 at 180)
; and scales it only a little; without the add-on it scales the base
; set's largest (24 pixels). Sizes: 25 to 100 pixels, about 6 to 24
; points at 300 dpi and 10 to 40 at 180. Nothing smoothed: printers
; take dots.
;
; Names: P (printer), the family's short form (SANS, SERF, MONO), then
; B, I, or Z as in the base set.
[fonts]
PSANS = DejaVu Sans
PSANSB = DejaVu Sans
PSANSI = DejaVu Sans
PSANSZ = DejaVu Sans
PSERF = DejaVu Serif
PSERFB = DejaVu Serif
PSERFI = DejaVu Serif
PSERFZ = DejaVu Serif
PMONO = DejaVu Sans Mono
PMONOB = DejaVu Sans Mono
PMONOI = DejaVu Sans Mono
PMONOZ = DejaVu Sans Mono
[licences]
DEJAVU = dejavu/dejavu-fonts-ttf-2.37/LICENSE
[PSANS]
style = regular
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSans.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PSANSB]
style = bold
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSans-Bold.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PSANSI]
style = italic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSans-Oblique.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto
[PSANSZ]
style = bolditalic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSans-BoldOblique.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto
[PSERF]
style = regular
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSerif.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PSERFB]
style = bold
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSerif-Bold.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PSERFI]
style = italic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSerif-Italic.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto
[PSERFZ]
style = bolditalic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSerif-BoldItalic.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto
[PMONO]
style = regular
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PMONOB]
style = bold
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-Bold.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = native
[PMONOI]
style = italic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-Oblique.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto
[PMONOZ]
style = bolditalic
licence = DEJAVU
boxdraw = true
source = dejavu/dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-BoldOblique.ttf
sizes = 25 29 33 38 42 50 58 67 75 83 100
hinting = auto

View file

@ -44,29 +44,23 @@ C_APPS = $(sort $(foreach f,$(C_APP_MAINS),$(if $(filter $(notdir $(basenam
BASCOMP = ../../../bin/host/bascomp BASCOMP = ../../../bin/host/bascomp
# BASIC apps: each is a .dbp project. An entry is the project's directory, # BASIC apps: each is a .dbp project, <app>/<app>.dbp, built into
# or dir:out when the program goes into another program's folder (the Help # bin/apps/kpunch/<app>/<app>.app (a folder of its own: each program is a
# Editor, dvxhelp/helpedit, installs beside the Help Viewer in dvxhelp). # package of its own, src/packages.ini).
# The program is bin/apps/kpunch/<out>/<name>.app, <name> being the last BASIC_APPS = iconed notepad imgview helpedit resedit basdemo widshow clock welcome fileMgr terminal software pkgbuild player recorder
# part of the directory.
BASIC_APPS = iconed notepad imgview dvxhelp/helpedit:dvxhelp resedit basdemo widshow clock welcome fileMgr terminal software pkgbuild player recorder
basicDir = $(firstword $(subst :, ,$(1))) basicApp = $(BINDIR)/kpunch/$(1)/$(1).app
basicName = $(notdir $(call basicDir,$(1)))
basicOut = $(or $(word 2,$(subst :, ,$(1))),$(call basicName,$(1)))
basicApp = $(BINDIR)/kpunch/$(call basicOut,$(1))/$(call basicName,$(1)).app
# Everything a project is built from: the files in its directory and the # Everything a project is built from: the files in its directory and the
# modules its .dbp names (include libraries elsewhere). # modules its .dbp names (include libraries elsewhere).
basicDeps = $(wildcard $(1)/*.dbp $(1)/*.frm $(1)/*.bas $(1)/*.cls $(1)/*.BMP) \ basicDeps = $(wildcard $(1)/*.dbp $(1)/*.frm $(1)/*.bas $(1)/*.cls $(1)/*.BMP) \
$(addprefix $(1)/,$(shell sed -n 's/^File[0-9]* *= *\(.*\.bas\)\r*$$/\1/p' $(1)/$(notdir $(1)).dbp)) $(addprefix $(1)/,$(shell sed -n 's/^File[0-9]* *= *\(.*\.bas\)\r*$$/\1/p' $(1)/$(1).dbp))
BASIC_TARGETS = $(foreach a,$(BASIC_APPS),$(call basicName,$(a))) BASIC_OUTS = $(foreach a,$(BASIC_APPS),$(call basicApp,$(a)))
BASIC_OUTS = $(foreach a,$(BASIC_APPS),$(call basicApp,$(a)))
.PHONY: all clean $(C_APPS) dvxbasic $(BASIC_TARGETS) .PHONY: all clean $(C_APPS) dvxbasic $(BASIC_APPS)
all: $(C_APPS) dvxbasic $(BASIC_TARGETS) all: $(C_APPS) dvxbasic $(BASIC_APPS)
dvxbasic: dvxbasic:
$(MAKE) -C dvxbasic $(MAKE) -C dvxbasic
@ -91,24 +85,22 @@ appFonts = $(if $(call appFontIni,$(1)),$(OBJDIR)/$(1)/fonts.stamp)
appDeps = $(call appRes,$(1)) $(if $(call appRes,$(1)),$(wildcard $(1)/*.bmp)) $(call appFonts,$(1)) appDeps = $(call appRes,$(1)) $(if $(call appRes,$(1)),$(wildcard $(1)/*.bmp)) $(call appFonts,$(1))
# Data files a program installs beside itself, C or BASIC alike: # Data files a program installs beside itself, C or BASIC alike:
# APP_DATA_<name> lists them (<name> being the last part of the program's # APP_DATA_<app> lists them (relative to its source directory); they are
# source directory, the files relative to it); they are copied into the # copied into the program's folder under bin/apps/kpunch.
# program's folder under bin/apps/kpunch.
APP_DATA_dvxdemo = logo.bmp new.bmp open.bmp sample.bmp save.bmp APP_DATA_dvxdemo = logo.bmp new.bmp open.bmp sample.bmp save.bmp
appDataOut = $(addprefix $(BINDIR)/kpunch/$(2)/,$(APP_DATA_$(notdir $(1)))) appDataOut = $(addprefix $(BINDIR)/kpunch/$(1)/,$(APP_DATA_$(1)))
# $(1) = source directory, $(2) = output folder under bin/apps/kpunch, # $(1) = app directory name (also its make target and output folder).
# $(3) = the program's make target.
define APP_DATA_RULES define APP_DATA_RULES
$(3): $(call appDataOut,$(1),$(2)) $(1): $(call appDataOut,$(1))
$(call appDataOut,$(1),$(2)): $(BINDIR)/kpunch/$(2)/%: $(1)/% $(call appDataOut,$(1)): $(BINDIR)/kpunch/$(1)/%: $(1)/%
@mkdir -p $$(dir $$@) @mkdir -p $$(dir $$@)
cp $$< $$@ cp $$< $$@
endef endef
APP_DATA_OUTS = $(foreach a,$(C_APPS),$(call appDataOut,$(a),$(a))) $(foreach a,$(BASIC_APPS),$(call appDataOut,$(call basicDir,$(a)),$(call basicOut,$(a)))) APP_DATA_OUTS = $(foreach a,$(C_APPS) $(BASIC_APPS),$(call appDataOut,$(a)))
# $(1) = app directory name. # $(1) = app directory name.
define C_APP_RULES define C_APP_RULES
@ -135,7 +127,7 @@ endef
$(foreach a,$(C_APPS),$(eval $(call C_APP_RULES,$(a)))) $(foreach a,$(C_APPS),$(eval $(call C_APP_RULES,$(a))))
$(foreach a,$(C_APPS),$(if $(call appFontIni,$(a)),$(eval $(call APP_FONT_RULES,$(a))))) $(foreach a,$(C_APPS),$(if $(call appFontIni,$(a)),$(eval $(call APP_FONT_RULES,$(a)))))
$(foreach a,$(C_APPS),$(if $(APP_DATA_$(a)),$(eval $(call APP_DATA_RULES,$(a),$(a),$(a))))) $(foreach a,$(C_APPS),$(if $(APP_DATA_$(a)),$(eval $(call APP_DATA_RULES,$(a)))))
C_APP_OBJS = $(foreach a,$(C_APPS),$(call appObjs,$(a))) C_APP_OBJS = $(foreach a,$(C_APPS),$(call appObjs,$(a)))
@ -145,18 +137,18 @@ C_APP_OBJS = $(foreach a,$(C_APPS),$(call appObjs,$(a)))
# F1 needs no resource: the shell presets an app's help file to <name>.hlp # F1 needs no resource: the shell presets an app's help file to <name>.hlp
# beside the .app (compiled there from <dir>/<name>.dhs by compile-help). # beside the .app (compiled there from <dir>/<name>.dhs by compile-help).
# $(1) = BASIC_APPS entry. # $(1) = BASIC_APPS entry (the project's directory).
define BASIC_APP_RULES define BASIC_APP_RULES
$(call basicName,$(1)): $(call basicApp,$(1)) $(1): $(call basicApp,$(1))
$(call basicApp,$(1)): $(call basicDeps,$(call basicDir,$(1))) $(call appFonts,$(call basicDir,$(1))) $$(BASCOMP) | dvxbasic $(call basicApp,$(1)): $(call basicDeps,$(1)) $(call appFonts,$(1)) $$(BASCOMP) | dvxbasic
@mkdir -p $$(dir $$@) @mkdir -p $$(dir $$@)
$$(BASCOMP) $(call basicDir,$(1))/$(call basicName,$(1)).dbp -o $$@ -release $$(BASCOMP) $(1)/$(1).dbp -o $$@ -release
endef endef
$(foreach a,$(BASIC_APPS),$(eval $(call BASIC_APP_RULES,$(a)))) $(foreach a,$(BASIC_APPS),$(eval $(call BASIC_APP_RULES,$(a))))
$(foreach a,$(BASIC_APPS),$(if $(call appFontIni,$(call basicDir,$(a))),$(eval $(call APP_FONT_RULES,$(call basicDir,$(a)))))) $(foreach a,$(BASIC_APPS),$(if $(call appFontIni,$(a)),$(eval $(call APP_FONT_RULES,$(a)))))
$(foreach a,$(BASIC_APPS),$(if $(APP_DATA_$(call basicName,$(a))),$(eval $(call APP_DATA_RULES,$(call basicDir,$(a)),$(call basicOut,$(a)),$(call basicName,$(a)))))) $(foreach a,$(BASIC_APPS),$(if $(APP_DATA_$(a)),$(eval $(call APP_DATA_RULES,$(a)))))
# Native host build (test harness): each C app becomes a plain ELF shared # Native host build (test harness): each C app becomes a plain ELF shared
# object under obj/host/apps/<name>.so with its resources appended by # object under obj/host/apps/<name>.so with its resources appended by

View file

@ -15,7 +15,7 @@ the BASIC-based sample apps. Two flavours of app live side by side:
host-side `bascomp`. The compiler links the BASIC bytecode into a host-side `bascomp`. The compiler links the BASIC bytecode into a
copy of `basstub.app`, which acts as the runtime host. See copy of `basstub.app`, which acts as the runtime host. See
`iconed/`, `notepad/`, `imgview/`, `basdemo/`, `resedit/`, `iconed/`, `notepad/`, `imgview/`, `basdemo/`, `resedit/`,
`widshow/`, `dvxhelp/helpedit/`, `clock/`, `welcome/`, `fileMgr/`, `widshow/`, `helpedit/`, `clock/`, `welcome/`, `fileMgr/`,
`terminal/`, `player/`, `recorder/`. `terminal/`, `player/`, `recorder/`.
The rest of this document covers writing a C app against the SDK. The rest of this document covers writing a C app against the SDK.
@ -450,7 +450,7 @@ PNG (or BMP by extension) save.
| | | | | |
|---|---| |---|---|
| File | `apps/kpunch/dvxhelp/helpedit.app` | | File | `apps/kpunch/helpedit/helpedit.app` |
| Type | BASIC (main-loop via basstub) | | Type | BASIC (main-loop via basstub) |
| Multi-instance | No | | Multi-instance | No |
@ -458,7 +458,9 @@ Editor for `.dhs` help source files with syntax highlighting. Build >
Compile writes `<name>.hlp` next to the source; Build > Preview Compile writes `<name>.hlp` next to the source; Build > Preview
compiles and opens the result in the help viewer. Its own help is compiles and opens the result in the help viewer. Its own help is
`helpedit.hlp`; Help > Help File Format opens the format reference in `helpedit.hlp`; Help > Help File Format opens the format reference in
the viewer's `dvxhelp.hlp`. the viewer's `dvxhelp.hlp` (by its path under the programs folder: the
editor has a folder of its own, a package of Developer Tools with
`SYSTEM\DVXHLPC.EXE`).
### Resource Editor (resedit, BASIC) ### Resource Editor (resedit, BASIC)
@ -633,16 +635,17 @@ apps/kpunch/
help.dhs source for the dvxhelp app's own help help.dhs source for the dvxhelp app's own help
sample.dhs small sample source sample.dhs small sample source
icon32.bmp icon32.bmp
helpedit/ BASIC project: help editor
helpedit.dbp
helpedit.frm
ICON32.BMP
# BASIC apps # BASIC apps
iconed/ iconed/
iconed.dbp iconed.dbp
iconed.frm iconed.frm
ICON32.BMP ICON32.BMP
helpedit/ help editor (Developer Tools)
helpedit.dbp
helpedit.frm
helpedit.dhs
ICON32.BMP
notepad/ notepad/
notepad.dbp notepad.dbp
notepad.frm notepad.frm

View file

@ -96,6 +96,7 @@ DVX_ABI_STAMP(basrt);
#define BAS_ERR_TITLE "BASIC Runtime Error" #define BAS_ERR_TITLE "BASIC Runtime Error"
#define BAS_ERR_SUMMARY "Runtime error" // when the error names none #define BAS_ERR_SUMMARY "Runtime error" // when the error names none
#define BAS_ERR_UNKNOWN "Unknown error" #define BAS_ERR_UNKNOWN "Unknown error"
#define BAS_SQL_MISSING "Databases are not installed: add the Databases part of DVX with Setup (Upgrade or repair)." // SQLError$ without SQLite
// dlsym name buffer: DVX_SYM_PREFIX + the longest BASIC identifier. // dlsym name buffer: DVX_SYM_PREFIX + the longest BASIC identifier.
#define BAS_MANGLED_NAME_LEN (BAS_MAX_IDENT + 2) #define BAS_MANGLED_NAME_LEN (BAS_MAX_IDENT + 2)
@ -9925,7 +9926,7 @@ const char *SQLError(int32_t db) {
const BasSqlCallbacksT *api = sqlApi(); const BasSqlCallbacksT *api = sqlApi();
if (!api->sqlError) { if (!api->sqlError) {
return ""; return BAS_SQL_MISSING;
} }
const char *err = api->sqlError(db); const char *err = api->sqlError(db);

View file

@ -4002,6 +4002,8 @@ Through a variable declared As Collection the members are checked when the progr
DVX BASIC includes SQLite database support through the sql.bas include library. Add sql.bas to your project to gain access to these functions. All functions use database handles and result-set handles (Long integers) returned by SQLOpen and SQLQuery. Numeric parameters and results are Long, so row counts and integer column values keep their full 32-bit range. DVX BASIC includes SQLite database support through the sql.bas include library. Add sql.bas to your project to gain access to these functions. All functions use database handles and result-set handles (Long integers) returned by SQLOpen and SQLQuery. Numeric parameters and results are Long, so row counts and integer column values keep their full 32-bit range.
SQLite is in the Databases part of DVX, which can be left out when DVX is installed. Without it the SQL functions do nothing: SQLOpen returns 0, and SQLError$ says that Databases are not installed. SysLibraryLoaded("dvxsql") (system.bas) tells beforehand.
.h2 Opening and Closing Databases .h2 Opening and Closing Databases
.h3 SQLOpen .h3 SQLOpen
@ -4284,7 +4286,7 @@ A page is 8 by 10 inches. Its coordinates are twips (1440 an inch) until ScaleMo
CurrentX, CurrentY Where the next drawing starts. CurrentX, CurrentY Where the next drawing starts.
ForeColor, FillColor, FillStyle, DrawWidth, DrawStyle As on a PictureBox (black, transparent fills, a solid pen 1 dot wide to start). ForeColor, FillColor, FillStyle, DrawWidth, DrawStyle As on a PictureBox (black, transparent fills, a solid pen 1 dot wide to start).
ScaleMode, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight The scale (vbTwips to start). ScaleMode, ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight The scale (vbTwips to start).
FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikethru The font of Print's text; FontSize is in points (12 to start, in DejaVu Sans). Text prints crisp where the font has large sizes (the Printer Fonts add-on gives DejaVu Sans, Serif, and Sans Mono them), and blockier where a screen size is enlarged. FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikethru The font of Print's text; FontSize is in points (12 to start, in DejaVu Sans). Text prints crisp where the font has sizes made for printing (DejaVu Sans, Serif, and Sans Mono have them from 6 to 24 points at 300 dpi), and a little softer where a smaller size is enlarged.
Copies How many times each page prints (1 to 99); as PrintChoose chose when it is not set. Copies How many times each page prints (1 to 99); as PrintChoose chose when it is not set.
Page The page being drawn (1 first). Read only. Page The page being drawn (1 first). Read only.
Width, Height The page's size in twips (11520 by 14400). Read only. Width, Height The page's size in twips (11520 by 14400). Read only.
@ -5195,6 +5197,7 @@ Colors in the form RGB makes (&HBBGGRR, see Color Functions), as in Visual Basic
.index SendKeys .index SendKeys
.index SysMemoryTotalKb .index SysMemoryTotalKb
.index SysMemoryFreeKb .index SysMemoryFreeKb
.index SysLibraryLoaded
.index SYS_VIDEO_DEFAULT_WIDTH .index SYS_VIDEO_DEFAULT_WIDTH
.index PrefsKeyName$ .index PrefsKeyName$
.index PrefsVideoWidth .index PrefsVideoWidth
@ -5278,7 +5281,7 @@ DVX ships a set of BASIC include files (.bas) in the sdk/include/basic directory
sound.bas Sound: play WAV and VOC files, tones and noise, set the volume (PlayWave, PlayTone, StopWave, SoundInfo$, ...); sounds loaded once and played with volume, pan, and pitch, sound made by the program as it goes, recording from a microphone or line input (RecordStart, RecordStop, RecordLevel, ...), the FM synthesizer chip, a wavetable card's voices and memory (SoundLoad, SoundPlay, SoundSetPitch, SoundCreate, SoundStreamOpen, SoundStreamWrite, FmAlloc, FmWrite, WtAlloc, WtStart, ...); DVX's own event sounds (SoundPlayEvent), master volume, sound driver, and MIDI settings (SoundEventFile$, SoundSetMasterVolume, SoundSettingsStore, ...) sound.bas Sound: play WAV and VOC files, tones and noise, set the volume (PlayWave, PlayTone, StopWave, SoundInfo$, ...); sounds loaded once and played with volume, pan, and pitch, sound made by the program as it goes, recording from a microphone or line input (RecordStart, RecordStop, RecordLevel, ...), the FM synthesizer chip, a wavetable card's voices and memory (SoundLoad, SoundPlay, SoundSetPitch, SoundCreate, SoundStreamOpen, SoundStreamWrite, FmAlloc, FmWrite, WtAlloc, WtStart, ...); DVX's own event sounds (SoundPlayEvent), master volume, sound driver, and MIDI settings (SoundEventFile$, SoundSetMasterVolume, SoundSettingsStore, ...)
music.bas Music: play MOD, S3M, XM, IT, MIDI, WAV, and VOC files, and play notes yourself (MusicLoad, MusicPlay, MusicStop, MusicNoteOn, MusicInfo$, ...); instruments from banks and SoundFonts, a sound card's own (MusicSetBank, MusicPatchSet$, MusicRomBank$); raw bytes to the MIDI port (MidiAcquire, MidiPut, MidiRelease, MidiPortInfo$); what a MIDI keyboard plays, heard as it comes and recorded into MIDI files (MidiInOpen, MidiInMessage, MusicMidiSend, MidiRecordNew, MidiRecordSave, ...) music.bas Music: play MOD, S3M, XM, IT, MIDI, WAV, and VOC files, and play notes yourself (MusicLoad, MusicPlay, MusicStop, MusicNoteOn, MusicInfo$, ...); instruments from banks and SoundFonts, a sound card's own (MusicSetBank, MusicPatchSet$, MusicRomBank$); raw bytes to the MIDI port (MidiAcquire, MidiPut, MidiRelease, MidiPortInfo$); what a MIDI keyboard plays, heard as it comes and recorded into MIDI files (MidiInOpen, MidiInMessage, MusicMidiSend, MidiRecordNew, MidiRecordSave, ...)
fileops.bas Files and folders: folder listings for a file list, paths and names, the file dialogs' filter rule, attributes and the time a file was changed, sizes, free space and disk sizes, drive kinds, whether a folder can be written, the folder for scratch files, making a folder path, and copying, moving, and deleting whole folders at once or as a job with progress, Cancel, and questions (FileOpsList, FileOpsListRows$, FileOpsFilterMatch, FileOpsSetModified, FileOpsDriveType, FileOpsIsWritable, FileOpsMakePath, FileOpsJobCreate, FileOpsJobRunFor, ...) fileops.bas Files and folders: folder listings for a file list, paths and names, the file dialogs' filter rule, attributes and the time a file was changed, sizes, free space and disk sizes, drive kinds, whether a folder can be written, the folder for scratch files, making a folder path, and copying, moving, and deleting whole folders at once or as a job with progress, Cancel, and questions (FileOpsList, FileOpsListRows$, FileOpsFilterMatch, FileOpsSetModified, FileOpsDriveType, FileOpsIsWritable, FileOpsMakePath, FileOpsJobCreate, FileOpsJobRunFor, ...)
system.bas What Control Panel changes, at once for the whole desktop: the screen mode, the system colors and themes, the wallpaper, text smoothing, and the mouse (with DVX's limits and defaults, MOUSE_* and SYS_VIDEO_DEFAULT_*), and storing them in DVX's settings; the system font's character pictures; the mouse pointer and the Shift, Ctrl, and Alt keys anywhere on the screen, moving the pointer, typing keys into the window in front, a picture of the whole screen, and the memory (SysSetVideoMode, SysSetColor, SysLoadTheme, SysSetWallpaper, SysSetTextSmoothing, SysSetMouse, SysColorsStore, SysFontGlyphRow, SysMouseX, SysSendKey, SysScreenshot, SysMemoryFreeKb, ...) system.bas What Control Panel changes, at once for the whole desktop: the screen mode, the system colors and themes, the wallpaper, text smoothing, and the mouse (with DVX's limits and defaults, MOUSE_* and SYS_VIDEO_DEFAULT_*), and storing them in DVX's settings; the system font's character pictures; the mouse pointer and the Shift, Ctrl, and Alt keys anywhere on the screen, moving the pointer, typing keys into the window in front, a picture of the whole screen, the memory, and whether a library is installed (SysSetVideoMode, SysSetColor, SysLoadTheme, SysSetWallpaper, SysSetTextSmoothing, SysSetMouse, SysColorsStore, SysFontGlyphRow, SysMouseX, SysSendKey, SysScreenshot, SysMemoryFreeKb, SysLibraryLoaded, ...)
font.bas Fonts: the font families DVX has, the sizes each comes in, whether one is fixed-pitch, and how wide text and how tall a line is in a font (FontFamilyCount, FontFamilyName$, FontFamilyFixed, FontSizeCount, FontSizeAt, FontNearestSize, FontTextWidth, FontLineHeight, FontAscent, FontRescan) font.bas Fonts: the font families DVX has, the sizes each comes in, whether one is fixed-pitch, and how wide text and how tall a line is in a font (FontFamilyCount, FontFamilyName$, FontFamilyFixed, FontSizeCount, FontSizeAt, FontNearestSize, FontTextWidth, FontLineHeight, FontAscent, FontRescan)
richtext.bas RTF without a control: an RTF document as plain text and plain text as RTF (RtfToText$, TextToRtf$); a RichEdit control reads and writes RTF itself (TextRTF, SelRTF, LoadFile, SaveFile) richtext.bas RTF without a control: an RTF document as plain text and plain text as RTF (RtfToText$, TextToRtf$); a RichEdit control reads and writes RTF itself (TextRTF, SelRTF, LoadFile, SaveFile)
layout.bas Control sizes in characters or in percent of the container instead of pixels (SizeChars, SizePercent) layout.bas Control sizes in characters or in percent of the container instead of pixels (SizeChars, SizePercent)
@ -5672,7 +5675,7 @@ End Sub
With pkg.bas in the project, a program installs, removes, and makes add-on packages -- the .DPK files Software installs -- the way Software and Package Builder (both written in BASIC) do. PkgOpen() starts a session (a number; PkgClose ends it), and PkgError$(session) says why the last call that failed did. Lists come back as rows for a ListView's SetRows: cells separated by TAB, each row ending in a line feed. With pkg.bas in the project, a program installs, removes, and makes add-on packages -- the .DPK files Software installs -- the way Software and Package Builder (both written in BASIC) do. PkgOpen() starts a session (a number; PkgClose ends it), and PkgError$(session) says why the last call that failed did. Lists come back as rows for a ListView's SetRows: cells separated by TAB, each row ending in a line feed.
What is installed. PkgInstalledRows$ lists every installed package (DVX itself is kpunch.dvx): id, name, version, kind, and summary. A package is named by its id, vendor.name (acme.chess). PkgField$(s, id, field) gives one detail (PKG_FIELD_NAME, PKG_FIELD_VERSION, PKG_FIELD_PUBLISHER, PKG_FIELD_SIGNER_NAME, ...); PkgFilesRows$, PkgDependsRows$, and PkgNeededBy$ its files, what it needs, and what needs it. PkgFileOwner$(s, fileName) is the other way: the id of the package that put a file there (its name from the DVX folder, such as "SHARED\BANKS\KPUNCH\DMXOPL.OP2"; "" when none did). What is installed. PkgInstalledRows$ lists every installed package (DVX itself is kpunch.dvx): id, name, version, kind, and summary. A package is named by its id, vendor.name (acme.chess). PkgField$(s, id, field) gives one detail (PKG_FIELD_NAME, PKG_FIELD_VERSION, PKG_FIELD_PUBLISHER, PKG_FIELD_SIGNER_NAME, ...); PkgFilesRows$, PkgDependsRows$, and PkgNeededBy$ its files, what it needs, and what needs it. PkgFileOwner$(s, fileName) is the other way: the id of the package that put a file there (its name from the DVX folder, such as "SHARED\FONTS\KPUNCH\ARIMO.DFN"; "" when none did).
Installing. PkgOfferFile(s, path) reads a package file and every package beside it (what it may need) as offers, numbered from 0, and returns the number of the one at path (-1 when it cannot be read). PkgOfferField$ and PkgOfferFilesRows$ describe an offer before it is installed; PKG_FIELD_TRUST says whether DVX trusts who signed it. PkgPlan(s, "0") plans installing it with everything it needs, checked against this DVX and the packages installed (False, with PkgError$ saying why, when it cannot be installed); PkgPlanRows$ lists what will go in, PkgPlanBytes the disk space, and PkgPlanRestart whether libraries or widgets are among them (they work from the next time DVX starts). PkgInstallStart(s) then starts the job, and PkgRunFor(s, milliseconds) runs it a little at a time, returning PKG_RUN_BUSY until it is PKG_RUN_DONE or PKG_RUN_FAILED (PkgRunMessage$ says why); PkgRunPercent and PkgRunCurrent$ show how far it is. Installing. PkgOfferFile(s, path) reads a package file and every package beside it (what it may need) as offers, numbered from 0, and returns the number of the one at path (-1 when it cannot be read). PkgOfferField$ and PkgOfferFilesRows$ describe an offer before it is installed; PKG_FIELD_TRUST says whether DVX trusts who signed it. PkgPlan(s, "0") plans installing it with everything it needs, checked against this DVX and the packages installed (False, with PkgError$ saying why, when it cannot be installed); PkgPlanRows$ lists what will go in, PkgPlanBytes the disk space, and PkgPlanRestart whether libraries or widgets are among them (they work from the next time DVX starts). PkgInstallStart(s) then starts the job, and PkgRunFor(s, milliseconds) runs it a little at a time, returning PKG_RUN_BUSY until it is PKG_RUN_DONE or PKG_RUN_FAILED (PkgRunMessage$ says why); PkgRunPercent and PkgRunCurrent$ show how far it is.
@ -5763,6 +5766,16 @@ The pointer and the keyboard: SysMouseX() and SysMouseY() are where the mouse po
Memory: SysMemoryTotalKb() is the computer's memory in KB and SysMemoryFreeKb() how much of it is free (-1 when it cannot be told). Memory: SysMemoryTotalKb() is the computer's memory in KB and SysMemoryFreeKb() how much of it is free (-1 when it cannot be told).
Libraries: some parts of DVX are optional (Setup's "What to install" page; Software lists each as one package), and so are their libraries: Networking has dvxnet, http, and pkgnet (net.bas, http.bas, pkgnet.bas), Databases has dvxsql (sql.bas), and Communications has conn and xfer (conn.bas, xfer.bas). SysLibraryLoaded(libName) is True when the library a DECLARE LIBRARY line names (any case) is installed and was started with DVX. A program that can do without such a library asks first and leaves out what needs it: calling a function of a library that is not there stops the program with "External function not found". Software, for one, keeps its package server pages off without pkgnet.
.code
If SysLibraryLoaded("pkgnet") Then
handle = PkgNetOpen("")
Else
lblStatus.Caption = "The package server needs DVX's Networking part."
End If
.endcode
System font: SysFontWidth() and SysFontHeight() are the size of every character of the system font in pixels, and SysFontFirstChar() to SysFontFirstChar() + SysFontCharCount() - 1 the character codes it has. SysFontGlyphRow(code, row) is one row of a character's picture: a bit per pixel, &H80 the leftmost -- for drawing text dot by dot, enlarged or in a font editor of your own. System font: SysFontWidth() and SysFontHeight() are the size of every character of the system font in pixels, and SysFontFirstChar() to SysFontFirstChar() + SysFontCharCount() - 1 the character codes it has. SysFontGlyphRow(code, row) is one row of a character's picture: a bit per pixel, &H80 the leftmost -- for drawing text dot by dot, enlarged or in a font editor of your own.
Saving: SysColorsStore, SysWallpaperStore, SysScreenSaverStore, SysFontsStore, and SysMouseStore write the colors, the wallpaper, the screen saver, text smoothing, and the mouse setup into a prefs.bas handle, in the sections DVX reads when it starts; PrefsSetVideoMode does the same for a screen mode. Store them in PrefsLoad(PrefsDvxIni$()) and save it, and DVX starts with them next time. SysColorsLoad, SysWallpaperLoad, SysScreenSaverLoad, SysFontsLoad, and SysMouseLoad apply what a handle holds. A PrefsCreate handle filled with the Store calls is a snapshot in memory: load it again to undo every change, the way Cancel works in Control Panel. Saving: SysColorsStore, SysWallpaperStore, SysScreenSaverStore, SysFontsStore, and SysMouseStore write the colors, the wallpaper, the screen saver, text smoothing, and the mouse setup into a prefs.bas handle, in the sections DVX reads when it starts; PrefsSetVideoMode does the same for a screen mode. Store them in PrefsLoad(PrefsDvxIni$()) and save it, and DVX starts with them next time. SysColorsLoad, SysWallpaperLoad, SysScreenSaverLoad, SysFontsLoad, and SysMouseLoad apply what a handle holds. A PrefsCreate handle filled with the Store calls is a snapshot in memory: load it again to undo every change, the way Cancel works in Control Panel.
@ -5844,7 +5857,7 @@ If FontAddFile(App.Path + "\TITLE.DFN") Then
End If End If
.endcode .endcode
Every control and every form can have a font of its own, set with the properties FontName, FontSize (in pixels), FontBold, FontItalic, FontUnderline, and FontStrikethru, as in Visual Basic; they need no include file. A control that is given no font uses the font of the control it is in (a Frame, for example), else its form's, so setting a form's font changes every control on it that has none. Reading one of the properties gives the font the object draws with: a FontSize the family does not come in reads back as the nearest size it has, and a FontName DVX does not have reads back as "System". Setting one changes only that part of the font. Controls that edit text in columns (TextBox, TextArea, ComboBox, SpinButton, and Terminal) take only fixed-pitch families and show the System font in place of a proportional one. Print, TextWidth, TextHeight, PrintAccel, and TextWidthAccel on forms and picture boxes use the object's font. In the form designer, the Font row of the Properties window sets the six properties at once, and they are saved in the .frm file; DlgFont (see Font Dialog) lets the user choose a font while the program runs. Every control and every form can have a font of its own, set with the properties FontName, FontSize (in pixels), FontBold, FontItalic, FontUnderline, and FontStrikethru, as in Visual Basic; they need no include file. A control that is given no font uses the font of the control it is in (a Frame, for example), else its form's, so setting a form's font changes every control on it that has none. Reading one of the properties gives the font the object draws with: a FontSize the family does not come in reads back as the nearest size it has, and a FontName DVX does not have reads back as "System". Setting one changes only that part of the font, keeping the size the font has: where a family's styles come in different sizes (a font the program carries in bold only, say), set FontBold and FontItalic before FontSize, so the size is picked from the style's own sizes. Controls that edit text in columns (TextBox, TextArea, ComboBox, SpinButton, and Terminal) take only fixed-pitch families and show the System font in place of a proportional one. Print, TextWidth, TextHeight, PrintAccel, and TextWidthAccel on forms and picture boxes use the object's font. In the form designer, the Font row of the Properties window sets the six properties at once, and they are saved in the .frm file; DlgFont (see Font Dialog) lets the user choose a font while the program runs.
.code .code
Sub Form1_Load () Sub Form1_Load ()
@ -6008,7 +6021,7 @@ MusicLoadMacro(macro) makes a music from a music macro string, the kind PLAY tak
.code .code
tune = MusicLoadMacro("T150 I41 O4 L8 CEG>C4") tune = MusicLoadMacro("T150 I41 O4 L8 CEG>C4")
MusicSetBank tune, "KPUNCH\DMXOPL.OP2" MusicSetBank tune, "DMXOPL.OP2"
MusicPlay tune, False MusicPlay tune, False
.endcode .endcode

View file

@ -191,7 +191,7 @@ Use warning notes for important cautions the reader should be aware of.
.h1 Help Compiler (dvxhlpc) .h1 Help Compiler (dvxhlpc)
The dvxhlpc tool runs on the host (Linux) and compiles .dhs source files into binary .hlp files for the viewer, and optionally into self-contained HTML. The dvxhlpc tool runs on the host (Linux) and compiles .dhs source files into binary .hlp files for the viewer, and optionally into self-contained HTML. On DVX it is DVXHLPC.EXE in the SYSTEM folder, for the DOS prompt, which comes with the Help Editor in Developer Tools (the Help Editor compiles help itself, and DVX compiles the help of its libraries and widgets when it starts).
.h2 Usage .h2 Usage

View file

@ -8,9 +8,10 @@ Description = DVX Help source editor with syntax highlighting and preview
Icon = ICON32.BMP Icon = ICON32.BMP
[Modules] [Modules]
File0 = ../../../../include/basic/commdlg.bas File0 = ../../../include/basic/commdlg.bas
File1 = ../../../../include/basic/help.bas File1 = ../../../include/basic/help.bas
Count = 2 File2 = ../../../include/basic/shell.bas
Count = 3
[Forms] [Forms]
File0 = helpedit.frm File0 = helpedit.frm

View file

@ -22,8 +22,8 @@
# Help Editor help. Compiled to helpedit.hlp next to helpedit.app; F1 # Help Editor help. Compiled to helpedit.hlp next to helpedit.app; F1
# and Help > Contents in the Help Editor open it. The help source # and Help > Contents in the Help Editor open it. The help source
# format itself is documented in the help viewer's own help (help.dhs), # format itself is documented in the help viewer's own help
# which Help > Help File Format opens. # (dvxhelp/help.dhs), which Help > Help File Format opens.
.topic helpedit.overview .topic helpedit.overview
.title Help Editor .title Help Editor

View file

@ -93,12 +93,13 @@ End
' IN THE SOFTWARE. ' IN THE SOFTWARE.
' Help Editor's own help, and the help source format reference in the ' Help Editor's own help, and the help source format reference: a topic
' help viewer's help ("file topic", opened at that topic). ' of the Help Viewer's help, in its folder under the programs folder
CONST HELP_FILE = "helpedit.hlp" CONST HELP_FILE = "helpedit.hlp"
CONST FORMAT_HELP = "dvxhelp.hlp help.format" CONST VIEWER_HELP = "\kpunch\dvxhelp\dvxhelp.hlp"
CONST HASH_MUL = 31 CONST FORMAT_TOPIC = "help.format"
CONST HASH_MOD = 16777213 CONST HASH_MUL = 31
CONST HASH_MOD = 16777213
DIM SHARED currentFile AS STRING DIM SHARED currentFile AS STRING
DIM SHARED hlpFile AS STRING DIM SHARED hlpFile AS STRING
@ -371,7 +372,7 @@ END SUB
SUB mnuHelpFormat_Click SUB mnuHelpFormat_Click
HelpView FORMAT_HELP HelpViewTopic ShellProgramsFolder$() + VIEWER_HELP, FORMAT_TOPIC
END SUB END SUB

View file

@ -98,7 +98,7 @@ Choose the folder whose files go into the package (Browse), and say how it is la
.list .list
.item The folder holds this package's own files: everything in the folder (and in the folders inside it) goes into the package's own folder in DVX, which depends on its kind and package name. The page shows where, and lists each file. .item The folder holds this package's own files: everything in the folder (and in the folders inside it) goes into the package's own folder in DVX, which depends on its kind and package name. The page shows where, and lists each file.
.item The folder is laid out like the DVX folder: each file goes in the same place in DVX as it has in the folder. Use this when the package puts files in more than one place, for example a program with its help in another folder. .item The folder is laid out like the DVX folder: each file goes in the same place in DVX as it has in the folder. Use this when the package puts files in more than one place, for example a program with its help in another folder, or with a program for the DOS prompt in DVX's SYSTEM folder.
.endlist .endlist
Where each kind of package keeps its files, for a package named acme.chess: Where each kind of package keeps its files, for a package named acme.chess:
@ -117,7 +117,7 @@ Where each kind of package keeps its files, for a package named acme.chess:
saver SHARED\SAVERS\ACME saver SHARED\SAVERS\ACME
.endtable .endtable
A package may put files only in its own kind's folder, so it cannot change DVX or another publisher's files. Build Package says so when a file is somewhere else. A file named PACKAGE.INI or PACKAGE.SIG at the top of the folder is left out. A package may put files only in its own kind's folder and in DVX's SYSTEM folder (but not in SYSTEM's KEYS and PACKAGES folders), and Software will not install one that has a file another package already has, so it cannot change DVX or another publisher's files. Build Package says so when a file is somewhere else. A file named PACKAGE.INI or PACKAGE.SIG at the top of the folder is left out.
.topic pkgbuild.signing .topic pkgbuild.signing
.title Signing a Package .title Signing a Package

View file

@ -546,7 +546,7 @@ File > Page Setup... chooses how text is laid out on paper: the margins, how man
Pictures print as large as fits on the page: in color on a color printer (one with a color ribbon or cartridge), and in shades of grey on the others. Printing pictures needs your printer's model to be set (see Changing Settings); with the setting for text only, a program tells you so. Pictures print as large as fits on the page: in color on a color printer (one with a color ribbon or cartridge), and in shades of grey on the others. Printing pictures needs your printer's model to be set (see Changing Settings); with the setting for text only, a program tells you so.
Some programs draw whole pages of their own, such as reports with charts. On a PostScript printer the printer draws those pages itself, as sharp as it can print. On other printers their text prints crisper with the Printer Fonts add-on installed (see Adding and Removing Software). Some programs draw whole pages of their own, such as reports with charts. On a PostScript printer the printer draws those pages itself, as sharp as it can print. On other printers their text is made from DVX's fonts: DejaVu Sans, Sans Mono, and Serif have sizes made for printing, so they print crisp from 6 to 24 points; other fonts, and larger text, are enlarged and smoothed, a little softer.
.topic user.programs .topic user.programs
.title Running Programs .title Running Programs
@ -920,11 +920,15 @@ When a program tries to read a drive that has no disk in it, or to write to a wr
.h2 Installing, upgrading, and removing DVX .h2 Installing, upgrading, and removing DVX
DVX is installed with SETUP, from the DVX CD or from Disk 1 of the DVX floppy disks: change to that drive and type SETUP. After the licence, Setup asks what you would like to do: Install DVX, Upgrade or repair DVX, or Remove DVX. Click the picture or the button of your choice. To install, choose the folder for DVX (type it, or click Browse... to pick it; a folder that does not exist yet is made) and which fonts to install. Setup checks that there is room and unpacks DVX there, asking for each floppy disk it needs in turn. It can also make DVX start when the computer starts (it shows the line it adds to AUTOEXEC.BAT and keeps a copy of the old file as AUTOEXEC.DVX). Setup never writes to the CD or the floppy disks. DVX is installed with SETUP, from the DVX CD or from Disk 1 of the DVX floppy disks: change to that drive and type SETUP. After the licence, Setup asks what you would like to do: Install DVX, Upgrade or repair DVX, or Remove DVX. Click the picture or the button of your choice. To install, choose the folder for DVX (type it, or click Browse... to pick it; a folder that does not exist yet is made), then Next: what to install, that is the fonts, the parts of DVX, and the add-ons you want. Setup checks that there is room and unpacks DVX there, asking for each floppy disk it needs in turn. It can also make DVX start when the computer starts (it shows the line it adds to AUTOEXEC.BAT and keeps a copy of the old file as AUTOEXEC.DVX). Setup never writes to the CD or the floppy disks.
The fonts are up to you. None keeps DVX to its own font; the base set adds DejaVu Sans, Sans Mono, and Serif in all their styles (about 2 MB); and All adds every font that comes with DVX (about 8 MB). A program that asks for a font you did not install shows its text in DVX's own font instead, unless it carries that font itself (some programs do, such as Welcome and the DVX Demo). Every font file holds its own licence: the Licence button of the Font dialog shows it. With None or the base set, Setup does not ask for the last floppy disks, which hold only fonts. The fonts are up to you. None keeps DVX to its own font; the base set adds DejaVu Sans, Sans Mono, and Serif in all their styles, in sizes for the screen and for printing (about 8 MB). A program that asks for a font you did not install shows its text in DVX's own font instead, unless it carries that font itself (some programs do, such as Welcome and the DVX Demo). Every font file holds its own licence: the Licence button of the Font dialog shows it. With None, Setup does not ask for the last floppy disks, which hold only fonts; you can add the base set later from the package server in Software (as DVX Fonts), or by running Setup again. Software lists DVX and DVX Fonts among the installed software, and offers updates to them as they are published.
To upgrade or repair DVX, run Setup again and choose Upgrade or repair DVX, with the folder DVX is in. (When DVX is in the usual folder, such as C:\DVX, Setup says so and suggests this choice.) Your settings and saved files (the USER folder) are kept, unless you tick Start over to remove them. Setup starts with the fonts that folder already has; choose others to add fonts or remove them. If you choose Install DVX for a folder that already has DVX, Setup offers to upgrade it instead. DVX comes in parts. The desktop and the everyday programs (Program Manager, File Manager, Notepad, Clock, the Image Viewer, the Help Viewer, Control Panel, and Software) are always installed; the other parts each have a box to tick: DVX BASIC (for writing your own programs, with BASCOMP to build them at the DOS prompt), Databases (for BASIC programs that keep their data in a database), Networking (network cards, the web, and the package server), Communications (the Terminal; it needs Networking), Media (the Media Player and the Sound Recorder), Developer Tools (the Icon Editor, the Resource Editor, the Help Editor, the Package Builder, and the Widget Showcase, with DVXRES and DVXHLPC for the DOS prompt), and Demos (the DVX Demo and the BASIC Demo). Point at one to see what it holds. A part you leave out takes no disk space and leaves more memory for your programs. To add or remove parts later, run Setup again. Software lists each part as one package, whose details name what it holds; without Networking, Software installs packages from files only.
The CD also has add-ons, which Setup offers with a box to tick for each: More Fonts (more than forty more typefaces, about 8 MB) and DVX General MIDI (instruments for MIDI music on a Gravis UltraSound or a Sound Blaster AWE32 or AWE64, about 4 MB). They are installed like any other add-on, so Software lists them and can remove them; to add one later, choose Install from File in Software and open it from the ADDONS folder of the CD. The floppy disks have no add-ons: get them from the package server in Software instead.
To upgrade or repair DVX, run Setup again and choose Upgrade or repair DVX, with the folder DVX is in. (When DVX is in the usual folder, such as C:\DVX, Setup says so and suggests this choice.) Your settings and saved files (the USER folder) are kept, unless you tick Start over to remove them. Setup starts with the fonts, parts, and add-ons that folder already has; choose others to add or remove them. A part you untick is removed, unless other software in the folder needs it (Setup then tells you it keeps it). If you choose Install DVX for a folder that already has DVX, Setup offers to upgrade it instead.
To remove DVX, run Setup and choose Remove DVX, with the folder DVX is in. The SETUP in the DVX folder (for example C:\DVX\SETUP) can remove DVX too, from its own folder only. Files you added to the folder yourself are not removed, and the USER folder is only removed if you ask. To remove DVX, run Setup and choose Remove DVX, with the folder DVX is in. The SETUP in the DVX folder (for example C:\DVX\SETUP) can remove DVX too, from its own folder only. Files you added to the folder yourself are not removed, and the USER folder is only removed if you ask.

View file

@ -30,7 +30,9 @@
' it: swNet for the catalogue and fetching, swUpd for the updates, swMine ' it: swNet for the catalogue and fetching, swUpd for the updates, swMine
' for publishing and the account's list, so each list keeps its own ' for publishing and the account's list, so each list keeps its own
' answer; all three are opened again when the server's settings change ' answer; all three are opened again when the server's settings change
' (swServer.frm, which leaves swServerChanged True). Installing asks first (swPlan.frm, ' (swServer.frm, which leaves swServerChanged True). The server's
' library is in DVX's optional Networking part: without it (swOnline
' False) none is opened and nothing calls the library. Installing asks first (swPlan.frm,
' which leaves its answer in swPlanAccepted) and removing asks about what ' which leaves its answer in swPlanAccepted) and removing asks about what
' needs the packages and what only they needed; both run as a job ' needs the packages and what only they needed; both run as a job
' SwRunJob runs a slice at a time while the progress window (swProg.frm) ' SwRunJob runs a slice at a time while the progress window (swProg.frm)
@ -39,14 +41,17 @@
OPTION EXPLICIT OPTION EXPLICIT
CONST SW_TITLE = "Software" CONST SW_TITLE = "Software"
CONST SW_TAB = CHR$(9) ' between the cells of a pkg.bas row CONST SW_TAB = CHR$(9) ' between the cells of a pkg.bas row
CONST SW_EOL = CHR$(10) ' after each row CONST SW_EOL = CHR$(10) ' after each row
CONST SW_DVX_ID = "kpunch.dvx" ' DVX itself: removed with Setup CONST SW_DVX_ID = "kpunch.dvx" ' DVX itself: removed with Setup
CONST SW_FILTER = "Packages (*.dpk)|All Files (*.*)" CONST SW_NET_LIB = "pkgnet" ' the package server's library (pkgnet.bas)
CONST SW_KEY_FILTER = "Publisher Keys (*.key)|All Files (*.*)" CONST SW_KIND_BUNDLE = "bundle" ' a package that stands for the packages it needs
CONST SW_LIST_LEAD = " " ' before each name in a message's list CONST SW_OFFLINE = "The package server needs DVX's Networking part. To add it, run Setup from DVX's CD or Disk 1 and choose Upgrade or repair."
CONST SW_SLICE_MS = 60 ' job work between screen updates CONST SW_FILTER = "Packages (*.dpk)|All Files (*.*)"
CONST SW_KEY_FILTER = "Publisher Keys (*.key)|All Files (*.*)"
CONST SW_LIST_LEAD = " " ' before each name in a message's list
CONST SW_SLICE_MS = 60 ' job work between screen updates
' The job the progress window shows (swJob) ' The job the progress window shows (swJob)
CONST SW_JOB_NONE = 0 CONST SW_JOB_NONE = 0
@ -60,6 +65,7 @@ DIM SHARED swNet AS LONG
DIM SHARED swUpd AS LONG DIM SHARED swUpd AS LONG
DIM SHARED swMine AS LONG DIM SHARED swMine AS LONG
DIM SHARED swServerChanged AS BOOLEAN DIM SHARED swServerChanged AS BOOLEAN
DIM SHARED swOnline AS BOOLEAN
' The install question's answer, the job running, the server's handle ' The install question's answer, the job running, the server's handle
' it is on, and whether its Cancel was pressed ' it is on, and whether its Cancel was pressed

View file

@ -15,8 +15,9 @@ File3 = ../../../include/basic/help.bas
File4 = ../../../include/basic/pkg.bas File4 = ../../../include/basic/pkg.bas
File5 = ../../../include/basic/pkgnet.bas File5 = ../../../include/basic/pkgnet.bas
File6 = ../../../include/basic/shell.bas File6 = ../../../include/basic/shell.bas
File7 = software.bas File7 = ../../../include/basic/system.bas
Count = 8 File8 = software.bas
Count = 9
[Forms] [Forms]
File0 = software.frm File0 = software.frm

View file

@ -51,6 +51,8 @@ Software has four pages: Installed (what is in DVX), Available (what the package
The Installed list shows every package in DVX, DVX itself included. Each row has the package's name, version, kind, a short description, and its package name (such as acme.chess), which tells two packages with the same name apart. Click a column's heading to sort the list by it. The Installed list shows every package in DVX, DVX itself included. Each row has the package's name, version, kind, a short description, and its package name (such as acme.chess), which tells two packages with the same name apart. Click a column's heading to sort the list by it.
A bundle is a package that stands for a group of others, such as each part of DVX that Setup installed (DVX BASIC, Networking, Media, and so on). The list shows the bundle as one row; its details name the packages it holds, and removing it removes them.
.topic software.install .topic software.install
.title Installing a Package .title Installing a Package
.toc 1 Installing .toc 1 Installing
@ -94,7 +96,7 @@ Software tells you why, for example:
.h1 Removing a Package .h1 Removing a Package
Choose the package in the list, then Remove. If other packages need it, Software names them: they are removed with it, or nothing is removed. Packages that were installed only because the removed ones needed them are offered for removal too. Choose the package in the list, then Remove. If other packages need it, Software names them: they are removed with it, or nothing is removed. Packages that were installed only because the removed ones needed them are offered for removal too, such as the programs and libraries of a part of DVX when you remove the part. Setup puts a part back (run it again and choose Upgrade or repair DVX).
Files you changed after the package was installed (a data file you edited, say) are left in place, and Software asks whether to delete them as well. Folders the package made are removed when they end up empty. Files you changed after the package was installed (a data file you edited, say) are left in place, and Software asks whether to delete them as well. Folders the package made are removed when they end up empty.
@ -121,6 +123,8 @@ For a package on the Available or Updates page, Details shows what the package s
.h1 Packages from the Package Server .h1 Packages from the Package Server
The package server needs the Networking part of DVX. Without it, the Available, Updates, and Published pages say so and their buttons are off; Software still installs packages from files. To add Networking, run Setup again and choose Upgrade or repair DVX.
The Available page lists every package the package server offers: its name, version, kind, a short description, and the version you have, if any. The list is read from the server the first time you open the page; Refresh reads it again. Type in the Find box to show only the packages whose name or description has those words. The Available page lists every package the package server offers: its name, version, kind, a short description, and the version you have, if any. The list is read from the server the first time you open the page; Refresh reads it again. Type in the Find box to show only the packages whose name or description has those words.
Choose a package and Install. Software fetches it from the server with any packages it needs that you do not have, then shows what will be installed and installs it exactly as for a file (see Installing a Package). A fetch that is stopped, or cut off by the network, goes on from where it stopped the next time. Choose a package and Install. Software fetches it from the server with any packages it needs that you do not have, then shows what will be installed and installs it exactly as for a file (see Installing a Package). A fetch that is stopped, or cut off by the network, goes on from where it stopped the next time.

Some files were not shown because too many files have changed in this diff Show more