diff --git a/.gitignore b/.gitignore index 302a40ec..78895914 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ just-stuff/ dvx.log claudeDocs/ toolchains/ +dist/ diff --git a/Makefile b/Makefile index 18a6b20a..84f4dab9 100644 --- a/Makefile +++ b/Makefile @@ -39,9 +39,9 @@ LIBS = $(sort $(notdir $(patsubst %/Makefile,%,$(wildcard src/libs/kpunch/*/Makefile)))) CORE_LIBS = libdvx libtasks -.PHONY: all clean $(LIBS) loader widgets apps tools deploy-helpsrc compile-help deploy-sdk test test-quick test-asan test-host test-samples coverage +.PHONY: all clean $(LIBS) loader widgets apps tools installer dist deploy-helpsrc compile-help deploy-sdk test test-quick test-asan test-host test-samples coverage -all: $(LIBS) loader tools widgets apps deploy-helpsrc compile-help deploy-sdk +all: $(LIBS) loader tools widgets apps installer deploy-helpsrc compile-help deploy-sdk $(LIBS): $(MAKE) -C src/libs/kpunch/$@ @@ -60,6 +60,17 @@ widgets: libdvx libtasks texthelp listhelp tools tools: $(MAKE) -C src/tools +# SETUP.EXE (bin/setup.exe, a static build of the core it needs) and the +# package tool bin/host/dvxpkg. +installer: + $(MAKE) -C src/installer + +# Release media in dist/: the CD image and floppy images (FLOPPY=360K, +# 720K, 1.2M, 1.44M (default), 2.88M or a number of bytes per disk). +# See src/installer/mkDist.sh. +dist: all + src/installer/mkDist.sh $(or $(FLOPPY),1.44M) + apps: libdvx libtasks dvxshell tools $(MAKE) -C src/apps/kpunch @@ -172,7 +183,7 @@ deploy-sdk: tools apps @echo "Building SDK..." @# Start from an empty tree so a header dropped from the lists goes away. rm -rf $(SDKDIR) - @mkdir -p $(SDKDIR)/bin $(SDKDIR)/include/core $(SDKDIR)/include/shell $(SDKDIR)/include/tasks $(SDKDIR)/include/sql $(SDKDIR)/include/texthelp $(SDKDIR)/include/listhelp $(SDKDIR)/include/fileops $(SDKDIR)/include/xfer $(SDKDIR)/include/conn $(SDKDIR)/include/print $(SDKDIR)/include/net $(SDKDIR)/include/basic $(SDKDIR)/samples/basic/basdemo $(SDKDIR)/samples/basic/widshow + @mkdir -p $(SDKDIR)/bin $(SDKDIR)/include/core $(SDKDIR)/include/shell $(SDKDIR)/include/tasks $(SDKDIR)/include/sql $(SDKDIR)/include/texthelp $(SDKDIR)/include/listhelp $(SDKDIR)/include/fileops $(SDKDIR)/include/xfer $(SDKDIR)/include/conn $(SDKDIR)/include/print $(SDKDIR)/include/game $(SDKDIR)/include/joystick $(SDKDIR)/include/audio $(SDKDIR)/include/music $(SDKDIR)/include/net $(SDKDIR)/include/basic $(SDKDIR)/samples/basic/basdemo $(SDKDIR)/samples/basic/widshow cp $(SDK_CORE_H) $(SDKDIR)/include/core/ cp $(SDK_SHELL_H) $(SDKDIR)/include/shell/ cp $(SDK_TASKS_H) $(SDKDIR)/include/tasks/ @@ -183,6 +194,10 @@ deploy-sdk: tools apps cp $(SDK_XFER_H) $(SDKDIR)/include/xfer/ cp $(SDK_CONN_H) $(SDKDIR)/include/conn/ cp $(SDK_PRINT_H) $(SDKDIR)/include/print/ + cp $(SDK_GAME_H) $(SDKDIR)/include/game/ + cp $(SDK_JOYSTICK_H) $(SDKDIR)/include/joystick/ + cp $(SDK_AUDIO_H) $(SDKDIR)/include/audio/ + cp $(SDK_MUSIC_H) $(SDKDIR)/include/music/ @# Networking: dvxNet.h and the standard socket headers, which keep their @# subdirectories (sys/, netinet/, arpa/); sdk.mk adds include/net only @# for programs that set NET = 1. @@ -225,6 +240,7 @@ clean: $(MAKE) -C src/apps/kpunch clean $(MAKE) -C src/tools clean $(MAKE) -C src/tools/proxy clean - rm -rf obj bin/host bin/test bin/system + $(MAKE) -C src/installer clean + rm -rf obj bin/host bin/test bin/system dist rm -rf bin/config bin/widgets bin/libs bin/sdk rm -f docs/*.html diff --git a/README.md b/README.md index 263e1925..936e2a20 100644 --- a/README.md +++ b/README.md @@ -89,12 +89,16 @@ DOSBox Staging instead (much faster); `SCRIPTS="boot apps"` runs a subset. The emulators never touch your home directory. See `src/test/dos/runDos.sh --help`. -`./mkcd.sh` builds everything, then wraps `bin/` into an ISO 9660 -image for use with an emulator or for burning to physical media. On -the target machine, change to the CD drive and type `INSTALL`: DVX -starts from the CD with its Setup program, which copies DVX to a -hard-disk folder (and can add it to AUTOEXEC.BAT). Holding Shift while -DVX starts (or `DVX /SAFE`) starts it in 640x480 safe video mode. +`make dist` builds the release media in `dist/`: a CD image +(`DVX.ISO`: `SETUP.EXE` with the DVX package appended, and +`README.TXT`) and a set of floppy images (`make dist FLOPPY=720K`; +360K, 720K, 1.2M, 1.44M (default), 2.88M or a number of bytes per +disk). On the target machine, type `SETUP` on the CD or Disk 1: Setup +installs DVX in a hard-disk folder (and can add it to AUTOEXEC.BAT); +the `SETUP.EXE` it leaves in that folder uninstalls. `./mkcd.sh` wraps +`bin/` as it is into an ISO image, for running DVX straight from a CD +in an emulator. Holding Shift while DVX starts (or `DVX /SAFE`) starts +it in 640x480 safe video mode. ## Directory Layout @@ -104,6 +108,7 @@ dvxgui/ assets/ logo and splash artwork bin/ build output (runtime tree; mirrors what ships) config/ shipped INI, themes, wallpapers + dist/ release media from `make dist` (not in git) docs/ HTML exports of the built-in help content LICENSE.txt MIT license installToolchain.sh fetches the toolchain and test tools into toolchains/ @@ -112,6 +117,7 @@ dvxgui/ src/ apps/ bundled applications include/ shared include files (BASIC library declarations) + installer/ SETUP.EXE, the package tool and make dist libs/ core libraries (GUI, tasks, shell, helpers, serial, SQL) loader/ bootstrap executable sdk/ SDK project templates, build rules and newProject.sh diff --git a/config/dvx.ini b/config/dvx.ini index cdff7fb8..d56d0dc5 100644 --- a/config/dvx.ini +++ b/config/dvx.ini @@ -75,3 +75,58 @@ tabWidth = 8 wrap = true header = &f footer = Page &p + +; Sound settings. +; driver: auto (find the sound hardware), sb (Sound Blaster family), +; speaker (PC speaker) or null (no sound) +; rate: mixing rate in Hz (4000-48000, default 22050); the sound card may +; run slightly faster or slower +; bits, channels: 0 = the best the sound card can do, or 8 / 16 bits and +; 1 (mono) / 2 (stereo) to save work on a slow computer +; voices: sounds mixed at once (1-32, default 16); when more are started +; the quietest stops +; volume: master volume in percent (0-100) +; speakerPcm: true = play sampled sound on the PC speaker (takes a lot of +; the computer's time); false = tones only +; fmTones: true = square and triangle tones play on the music synthesizer +; chip when there is one; false = always mixed +; midi: where MIDI music plays: auto (the synthesizer chip, else a +; built-in synthesizer), mpu401 (an external synthesizer on the +; MIDI port), fm (the chip) or software (the built-in synthesizer) +; mpuMode: what is on the MIDI port: gm (a General MIDI synthesizer), +; mt32 (a Roland MT-32) or raw (send music unchanged) +; Optional: oplPort (default 388) and mpuPort (default 330), in hex; +; midiBank = the instrument bank file for MIDI music (OP2 format, path +; from the DVX folder; default libs\kpunch\music\genmidi.op2) +; The Sound Blaster's port, IRQ and DMA come from the BLASTER setting (for +; example SET BLASTER=A220 I5 D1 H5 in AUTOEXEC.BAT). + +[audio] +driver = auto +rate = 22050 +bits = 0 +channels = 0 +voices = 16 +volume = 100 +speakerPcm = false +fmTones = true +midi = auto +mpuMode = gm + +; Desktop sounds (Control Panel's Sounds page): the sound file (WAV or VOC, +; path from the DVX folder) played for each event; empty = no sound. +; default: the default beep (also message boxes without an icon) +; startup, exit: DVX starting and ending +; error, warning, question, information: message boxes of that kind +; windowOpen, windowClose: a window opening or closing (not dialogs) + +[sounds] +default = config/sounds/beep.wav +startup = config/sounds/startup.wav +exit = config/sounds/exit.wav +error = config/sounds/error.wav +warning = config/sounds/warning.wav +question = config/sounds/question.wav +information = config/sounds/info.wav +windowOpen = +windowClose = diff --git a/docs/dvx_basic_reference.html b/docs/dvx_basic_reference.html index 0ae484ea..b969b73e 100644 --- a/docs/dvx_basic_reference.html +++ b/docs/dvx_basic_reference.html @@ -77,6 +77,7 @@ img { max-width: 100%; }
  • Flow Control
  • Input/Output
  • Miscellaneous Statements
  • +
  • Sound, Joysticks and Frames
  • File I/O
  • @@ -170,6 +171,7 @@ img { max-width: 100%; }
  • Auto-indent
  • AutoIndent
  • AutoSize
  • +
  • BEEP
  • BMP
  • Boolean
  • Breakpoints
  • @@ -315,10 +317,14 @@ img { max-width: 100%; }
  • Form File
  • FORMAT$
  • Frame
  • +
  • Frame rate
  • +
  • FRAMEWAIT
  • FREEFILE
  • FRM
  • FUNCTION
  • Function Dropdown
  • +
  • game.bas
  • +
  • GameKeyDown
  • GET
  • GETATTR
  • GOSUB
  • @@ -356,6 +362,14 @@ img { max-width: 100%; }
  • INT
  • Integer
  • Interval
  • +
  • JoyAxis
  • +
  • JoyButton
  • +
  • JoyCount
  • +
  • JoyHat
  • +
  • Joystick
  • +
  • joystick.bas
  • +
  • JoyX
  • +
  • JoyY
  • Keyboard Shortcuts
  • KILL
  • Label
  • @@ -385,12 +399,15 @@ img { max-width: 100%; }
  • LTRIM$
  • Master-Detail
  • Max
  • +
  • MB
  • Me
  • Menu
  • Menu Bar
  • Menu Editor
  • Methods
  • +
  • MF
  • MID$
  • +
  • MIDI
  • Migration
  • Min
  • MKDIR
  • @@ -400,6 +417,27 @@ img { max-width: 100%; }
  • MsgBox
  • MSGBOX
  • Multi-Column List
  • +
  • Music
  • +
  • Music macro language
  • +
  • music.bas
  • +
  • MusicControl
  • +
  • MusicError$
  • +
  • MusicFree
  • +
  • MusicLength
  • +
  • MusicLoad
  • +
  • MusicMidiOpen
  • +
  • MusicNoteOff
  • +
  • MusicNoteOn
  • +
  • MusicPause
  • +
  • MusicPitchBend
  • +
  • MusicPlay
  • +
  • MusicPlaying
  • +
  • MusicPosition
  • +
  • MusicProgram
  • +
  • MusicResume
  • +
  • MusicSeek
  • +
  • MusicStop
  • +
  • MusicVolume
  • NAME
  • net.bas
  • New Project
  • @@ -426,6 +464,12 @@ img { max-width: 100%; }
  • Paste
  • Picture
  • PictureBox
  • +
  • PLAY
  • +
  • PLAY function
  • +
  • PlayNoise
  • +
  • PlayTone
  • +
  • PlayWave
  • +
  • PlayWaveLoop
  • Precedence
  • Predefined Constants
  • Preferences
  • @@ -512,6 +556,13 @@ img { max-width: 100%; }
  • Single
  • SLEEP
  • Slider
  • +
  • SOUND
  • +
  • Sound
  • +
  • sound.bas
  • +
  • SoundError$
  • +
  • SoundInfo$
  • +
  • SoundPlaying
  • +
  • SoundVolume
  • Source Map
  • SPACE$
  • Spacer
  • @@ -548,9 +599,13 @@ img { max-width: 100%; }
  • Step Out
  • Step Over
  • Stepping
  • +
  • STICK
  • Stop
  • Stop
  • +
  • StopAllSounds
  • +
  • StopWave
  • STR$
  • +
  • STRIG
  • String
  • STRING$
  • SUB
  • @@ -1255,6 +1310,16 @@ img { max-width: 100%; }
  • A SUB or FUNCTION may use at most 64 local slots (parameters, local variables and hidden temporaries). More is a compile error "Too many local variables in X (n, limit is 64)" instead of a runtime error 9; READ and INPUT # into many array elements no longer use a slot per target.
  • SHARED naming a variable that does not exist at module level creates it there; in a form's code it becomes a variable of that form, not a program-wide one.
  • +

    Sound, Joysticks and Frames

    + +

    See: Sound, Joysticks and Frames

    Runtime