Browse Source

atari/midi: Add a message to set a new midi output file

master
Hampa Hug 2 years ago
parent
commit
5aab70e4b7
3 changed files with 14 additions and 1 deletions
  1. 4
    0
      doc/messages.txt
  2. 2
    0
      src/arch/atarist/cmd.c
  3. 8
    1
      src/arch/atarist/msg.c

+ 4
- 0
doc/messages.txt View File

@@ -47,6 +47,10 @@ emu.disk.insert <drive>:<fname>
47 47
 emu.exit
48 48
 	Terminate the emulator immediately.
49 49
 
50
+emu.midi.file <filename>
51
+	Set a new MIDI output file. If <filename> is the empty string, no
52
+	more MIDI output is saved.
53
+
50 54
 emu.pause "0" | "1"
51 55
 	Resume or pause the emulator.
52 56
 

+ 2
- 0
src/arch/atarist/cmd.c View File

@@ -836,6 +836,8 @@ void st_cmd_hm (cmd_t *cmd)
836 836
 		"emu.disk.eject       <drive>\n"
837 837
 		"emu.disk.insert      <drive>:<fname>\n"
838 838
 		"\n"
839
+		"emu.midi.file        <fname>\n"
840
+		"\n"
839 841
 		"emu.fdc.ro           <drive>\n"
840 842
 		"emu.fdc.rw           <drive>\n"
841 843
 		"\n"

+ 8
- 1
src/arch/atarist/msg.c View File

@@ -5,7 +5,7 @@
5 5
 /*****************************************************************************
6 6
  * File name:   src/arch/atarist/msg.c                                       *
7 7
  * Created:     2011-03-17 by Hampa Hug <hampa@hampa.ch>                     *
8
- * Copyright:   (C) 2011-2015 Hampa Hug <hampa@hampa.ch>                     *
8
+ * Copyright:   (C) 2011-2016 Hampa Hug <hampa@hampa.ch>                     *
9 9
  *****************************************************************************/
10 10
 
11 11
 /*****************************************************************************
@@ -279,6 +279,12 @@ int st_set_msg_emu_fdc_rw (atari_st_t *sim, const char *msg, const char *val)
279 279
 	return (set_fdc_ro_rw (sim, msg, val, 0));
280 280
 }
281 281
 
282
+static
283
+int st_set_msg_emu_midi_file (atari_st_t *sim, const char *msg, const char *val)
284
+{
285
+	return (st_smf_set_file (&sim->smf, val));
286
+}
287
+
282 288
 static
283 289
 int st_set_msg_emu_par_driver (atari_st_t *sim, const char *msg, const char *val)
284 290
 {
@@ -509,6 +515,7 @@ static st_msg_list_t set_msg_list[] = {
509 515
 	{ "emu.exit", st_set_msg_emu_exit },
510 516
 	{ "emu.fdc.ro", st_set_msg_emu_fdc_ro },
511 517
 	{ "emu.fdc.rw", st_set_msg_emu_fdc_rw },
518
+	{ "emu.midi.file", st_set_msg_emu_midi_file },
512 519
 	{ "emu.par.driver", st_set_msg_emu_par_driver },
513 520
 	{ "emu.par.file", st_set_msg_emu_par_file },
514 521
 	{ "emu.pause", st_set_msg_emu_pause },

Loading…
Cancel
Save