aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-11-15 01:02:38 -0500
committerB. Watson <urchlay@slackware.uk>2022-11-15 01:02:38 -0500
commit9f730b984c58d76733e79d53ff653232c158f0d8 (patch)
tree0af7f604fe46621af41bf3fcf3d7d656054cf9f7
parentfafd442b6ece11583a0e07da4f96fd5ab20fcee1 (diff)
downloaddla-asm-9f730b984c58d76733e79d53ff653232c158f0d8.tar.gz
dla.xex: add Quit to Save/Redo/New menu.
-rw-r--r--README.txt35
-rw-r--r--dla.s17
-rw-r--r--dla.xexbin4953 -> 4953 bytes
-rw-r--r--dla2csv.c3
4 files changed, 39 insertions, 16 deletions
diff --git a/README.txt b/README.txt
index a7a744e..900c621 100644
--- a/README.txt
+++ b/README.txt
@@ -81,8 +81,11 @@ The bottom line shows a menu, from which you can choose to:
- New: Start the program over, so you can enter different settings.
-The only way to exit the program (for now) is to press Reset or power
-cycle the Atari.
+- Quit: Exit the program. You'll be asked "Exit program[y/N]?".
+ Answering Y here returns you to DOS. N starts the program over.
+
+You can also exit the program by entering Q at the "How many
+particles?" prompt, or pressing the Reset key at any time.
Using dla2csv.xex (or just dla2csv)
-----------------------------------
@@ -108,18 +111,24 @@ as a percentage. When it's finished, the output CSV file has been
written. On the Atari, you can press Ctrl-C during the conversion to
abort the process (and delete the partial CSV file).
+At the end of conversion, you'll be shown the number of particles.
+This includes the seed particles, so e.g. if you used the single-dot
+seed and entered 1000 particles, you'll see "1001 particles" here.
+
Last, you're asked whether to convert another file. Answering N here
-will exit the program. On the Atari, you should be returned to the DOS
-menu or prompt, but your mileage may vary (it works on DOS 2.0S, at
-least). Answering Y (or just pressing Return) starts the whole process
-over at the input filename prompt.
-
-[*] On the Atari, if you don't include a drive specifier (e.g. D: or D2:)
- in the filename, drive 1 (D:) is assumed. Also, when you're asked
- for the input or output filename, you can enter a number (a single
- digit) to see a directory of that drive number. If you're using an
- emulator that supports the H: (host drive) device, you can enter 0
- to see the directory of H:.
+will exit the program. On the Atari, you'll be returned to the DOS
+menu or prompt. Answering Y (or just pressing Return) starts the whole
+process over at the input filename prompt.
+
+[*] If you just press Enter (Return on the Atari) when asked for
+ a filename, you'll be asked whether you want to exit the program.
+
+ On the Atari, if you don't include a drive specifier (e.g. D: or
+ D2:) in the filename, drive 1 (D:) is assumed. Also, when you're
+ asked for the input or output filename, you can enter a number (a
+ single digit) to see a directory of that drive number. If you're
+ using an emulator that supports the H: (host drive) device, you
+ can enter 0 to see the directory of H:.
Using dla2img.sh
----------------
diff --git a/dla.s b/dla.s
index 6cea1b7..aa5b83d 100644
--- a/dla.s
+++ b/dla.s
@@ -342,8 +342,18 @@ notredo:
cmp #'S' ; Save
beq saveimage
cmp #'N' ; New
- bne waitkey ; ignore any other keystroke
+ bne notnew
jmp getargs
+notnew:
+ cmp #'Q' ; Quit
+ bne waitkey ; ignore any other keystroke, get another
+
+ jsr restore_gr0 ; need the GR.0 screen to show the quit prompt
+ lda #$7d ; clear screen
+ jsr printchr
+ jsr confirm_quit ; this doesn't return if the user says Y
+ jmp getargs ; if he said N, start over (same as New)
+
;;; End of generate()
;;; Subroutine: saveimage
@@ -797,10 +807,11 @@ retrymsg:
; printing to a 32-byte buffer (which we told the OS was the
; start of a GR.0 screen, but that was designated "a lie").
menumsg:
- .byte " "
+ .byte " "
.byte ' ','S'|$80,"ave"
.byte ' ','R'|$80,"edo"
- .byte ' ','N'|$80,"ew? "
+ .byte ' ','N'|$80,"ew"
+ .byte ' ','Q'|$80,"uit?"
.byte 0
exit_prog_msg:
diff --git a/dla.xex b/dla.xex
index ea0c083..b6598eb 100644
--- a/dla.xex
+++ b/dla.xex
Binary files differ
diff --git a/dla2csv.c b/dla2csv.c
index 8377af7..32e673b 100644
--- a/dla2csv.c
+++ b/dla2csv.c
@@ -165,6 +165,9 @@ void print_id(void) {
the Atari by jumping directly to DOS (do not call the exit stuff from
cc65's runtime, do not pass Go, do not collect $200). This seems to
work reliably, but I hesistate to document "Press Ctrl-3 to exit"...
+
+ ...and it turns out that on SpartaDOS X, even this doesn't prevent
+ the atari from locking up if the user presses ^3. Sigh.
*/
#define exit_eof_stdin() (*(OS.dosvec))()