1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* Copyright (C) 2002-2021 The DOSBox Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "programs.h"
#include "program_attrib.h"
#include "program_autotype.h"
#include "program_boot.h"
#include "program_choice.h"
#include "program_help.h"
#include "program_imgmount.h"
#include "program_intro.h"
#include "program_keyb.h"
#include "program_loadfix.h"
#include "program_loadrom.h"
#include "program_ls.h"
#include "program_mem.h"
#include "program_mount.h"
#include "program_mousectl.h"
#include "program_placeholder.h"
#include "program_rescan.h"
#include "program_serial.h"
#if C_DEBUG
#include "program_biostest.h"
#endif
extern uint32_t floppytype;
extern char autoexec_data[autoexec_maxsize];
std::unique_ptr<Program> CONFIG_ProgramCreate();
std::unique_ptr<Program> MIXER_ProgramCreate();
std::unique_ptr<Program> SHELL_ProgramCreate();
void VFILE_GetPathZDrive(std::string &path, const std::string &dirname);
void VFILE_RegisterZDrive(const std_fs::path &z_drive_path);
void Add_VFiles(const bool add_autoexec)
{
const std::string dirname = "drivez";
std::string path = ".";
path += CROSS_FILESPLIT;
path += dirname;
VFILE_GetPathZDrive(path, dirname);
VFILE_RegisterZDrive(path);
PROGRAMS_MakeFile("ATTRIB.COM", ProgramCreate<ATTRIB>);
PROGRAMS_MakeFile("AUTOTYPE.COM", ProgramCreate<AUTOTYPE>);
#if C_DEBUG
PROGRAMS_MakeFile("BIOSTEST.COM", ProgramCreate<BIOSTEST>);
#endif
PROGRAMS_MakeFile("BOOT.COM", ProgramCreate<BOOT>);
PROGRAMS_MakeFile("CHOICE.COM", ProgramCreate<CHOICE>);
PROGRAMS_MakeFile("HELP.COM", ProgramCreate<HELP>);
PROGRAMS_MakeFile("IMGMOUNT.COM", ProgramCreate<IMGMOUNT>);
PROGRAMS_MakeFile("INTRO.COM", ProgramCreate<INTRO>);
PROGRAMS_MakeFile("KEYB.COM", ProgramCreate<KEYB>);
PROGRAMS_MakeFile("LOADFIX.COM", ProgramCreate<LOADFIX>);
PROGRAMS_MakeFile("LOADROM.COM", ProgramCreate<LOADROM>);
PROGRAMS_MakeFile("LS.COM", ProgramCreate<LS>);
PROGRAMS_MakeFile("MEM.COM", ProgramCreate<MEM>);
PROGRAMS_MakeFile("MOUNT.COM", ProgramCreate<MOUNT>);
PROGRAMS_MakeFile("MOUSECTL.COM", ProgramCreate<MOUSECTL>);
PROGRAMS_MakeFile("RESCAN.COM", ProgramCreate<RESCAN>);
PROGRAMS_MakeFile("MIXER.COM", MIXER_ProgramCreate);
PROGRAMS_MakeFile("CONFIG.COM", CONFIG_ProgramCreate);
PROGRAMS_MakeFile("SERIAL.COM", ProgramCreate<SERIAL>);
PROGRAMS_MakeFile("COMMAND.COM", SHELL_ProgramCreate);
if (add_autoexec)
VFILE_Register("AUTOEXEC.BAT", (uint8_t *)autoexec_data, (uint32_t)strlen(autoexec_data));
}
void DOS_SetupPrograms(void)
{
/*Add misc messages */
MSG_Add("WIKI_ADD_UTILITIES_ARTICLE", WIKI_ADD_UTILITIES_ARTICLE);
MSG_Add("WIKI_URL", WIKI_URL);
const auto add_autoexec = false;
Add_VFiles(add_autoexec);
}
|