Skip to content

Commit 368a621

Browse files
committed
squashed rp2040-doom changes
1 parent 660cad3 commit 368a621

File tree

329 files changed

+53204
-10467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+53204
-10467
lines changed

.github/CONTRIBUTING.md

-101
This file was deleted.

.github/ISSUE_TEMPLATE.md

-28
This file was deleted.

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ aclocal.m4
77
autom4te.cache
88
autotools
99
bin
10-
config.h
10+
/config.h
1111
config.hin
1212
config.log
1313
config.status
@@ -52,3 +52,8 @@ GPATH
5252
GRTAGS
5353
GTAGS
5454
/HTML/
55+
*.midx
56+
*.midx.z
57+
*.wad
58+
*.whd
59+
/cmake-*/

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "3rdparty/tinyusb"]
2+
path = 3rdparty/tinyusb
3+
url = git@github.com:liamfraser/tinyusb.git

3rdparty/tinyusb

Submodule tinyusb added at 900f937

CMakeLists.txt

+45-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
22

3-
cmake_minimum_required(VERSION 3.7.2)
4-
project("Chocolate Doom" VERSION 3.0.0 LANGUAGES C)
3+
cmake_minimum_required(VERSION 3.13)
4+
5+
# We use PICO_SDK_PATH being set as an indicator that we're doing a Pico BUILD
6+
if (PICO_SDK_PATH)
7+
include(pico_sdk_import.cmake)
8+
include(pico_extras_import.cmake)
9+
endif()
10+
11+
project("Chocolate Doom" VERSION 3.0.0 LANGUAGES C CXX)
12+
enable_language(CXX)
13+
set(CMAKE_CXX_STANDARD 14)
14+
15+
if (PICO_SDK_PATH)
16+
# we are using git@github.com:liamfraser/tinyusb.git as it has some RP2040 fixes that aren't upstreamed yet
17+
set(PICO_TINYUSB_PATH ${CMAKE_CURRENT_LIST_DIR}/3rdparty/tinyusb)
18+
# this only affects device builds device, but we want to use zone for malloc in this case so we don't have two separate elastic spaces and can fit more in
19+
set(SKIP_PICO_MALLOC 1)
20+
pico_sdk_init()
21+
if (PICO_ON_DEVICE AND NOT CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
22+
message(WARNING "You should do a MinSizeRel build when targeting the RP2040
23+
(with -DCMAKE_BUILD_TYPE=MinSizeRel)")
24+
endif()
25+
endif()
26+
27+
set(CMAKE_C_STANDARD 11)
528

629
# Autotools variables
730
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
@@ -24,26 +47,30 @@ if(MSVC)
2447
add_definitions("/D_CRT_SECURE_NO_WARNINGS" "/D_CRT_SECURE_NO_DEPRECATE"
2548
"/D_CRT_NONSTDC_NO_DEPRECATE")
2649
else()
27-
add_compile_options("-Wall" "-Wdeclaration-after-statement"
28-
"-Wredundant-decls")
29-
endif()
30-
31-
find_package(SDL2 2.0.1)
32-
find_package(SDL2_mixer 2.0.0)
33-
find_package(SDL2_net 2.0.0)
34-
35-
# Check for libsamplerate.
36-
find_package(samplerate)
37-
if(SAMPLERATE_FOUND)
38-
set(HAVE_LIBSAMPLERATE TRUE)
50+
#add_compile_options("-Wall" "-Wdeclaration-after-statement" "-Wredundant-decls")
51+
add_compile_options("-Wall" "-Wredundant-decls")
3952
endif()
4053

41-
# Check for libpng.
42-
find_package(PNG)
43-
if(PNG_FOUND)
44-
set(HAVE_LIBPNG TRUE)
54+
# Note PICO_SDK path is set by the SDK initialization if it occurs above
55+
if (NOT PICO_SDK)
56+
find_package(SDL2 2.0.1 REQUIRED)
57+
find_package(SDL2_mixer 2.0.0 REQUIRED)
58+
find_package(SDL2_net 2.0.0 REQUIRED)
59+
60+
# Check for libsamplerate.
61+
find_package(samplerate)
62+
if(SAMPLERATE_FOUND)
63+
set(HAVE_LIBSAMPLERATE TRUE)
64+
endif()
65+
66+
# Check for libpng.
67+
find_package(PNG)
68+
if(PNG_FOUND)
69+
set(HAVE_LIBPNG TRUE)
70+
endif()
4571
endif()
4672

73+
set(HAVE_MMAP 1)
4774
find_package(m)
4875

4976
include(CheckSymbolExists)

README-chocolate.md

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Chocolate Doom
2+
3+
Chocolate Doom aims to accurately reproduce the original DOS version of
4+
Doom and other games based on the Doom engine in a form that can be
5+
run on modern computers.
6+
7+
Originally, Chocolate Doom was only a Doom source port. The project
8+
now includes ports of Heretic and Hexen, and Strife.
9+
10+
Chocolate Doom’s aims are:
11+
12+
* To always be 100% Free and Open Source software.
13+
* Portability to as many different operating systems as possible.
14+
* Accurate reproduction of the original DOS versions of the games,
15+
including bugs.
16+
* Compatibility with the DOS demo, configuration and savegame files.
17+
* To provide an accurate retro “feel” (display and input should
18+
behave the same).
19+
20+
More information about the philosophy and design behind Chocolate Doom
21+
can be found in the PHILOSOPHY file distributed with the source code.
22+
23+
## Setting up gameplay
24+
25+
For instructions on how to set up Chocolate Doom for play, see the
26+
INSTALL file.
27+
28+
## Configuration File
29+
30+
Chocolate Doom is compatible with the DOS Doom configuration file
31+
(normally named `default.cfg`). Existing configuration files for DOS
32+
Doom should therefore simply work out of the box. However, Chocolate
33+
Doom also provides some extra settings. These are stored in a
34+
separate file named `chocolate-doom.cfg`.
35+
36+
The configuration can be edited using the chocolate-setup tool.
37+
38+
## Command line options
39+
40+
Chocolate Doom supports a number of command line parameters, including
41+
some extras that were not originally suported by the DOS versions. For
42+
binary distributions, see the CMDLINE file included with your
43+
download; more information is also available on the Chocolate Doom
44+
website.
45+
46+
## Playing TCs
47+
48+
With Vanilla Doom there is no way to include sprites in PWAD files.
49+
Chocolate Doom’s ‘-file’ command line option behaves exactly the same
50+
as Vanilla Doom, and trying to play TCs by adding the WAD files using
51+
‘-file’ will not work.
52+
53+
Many Total Conversions (TCs) are distributed as a PWAD file which must
54+
be merged into the main IWAD. Typically a copy of DEUSF.EXE is
55+
included which performs this merge. Chocolate Doom includes a new
56+
option, ‘-merge’, which will simulate this merge. Essentially, the
57+
WAD directory is merged in memory, removing the need to modify the
58+
IWAD on disk.
59+
60+
To play TCs using Chocolate Doom, run like this:
61+
62+
```
63+
chocolate-doom -merge thetc.wad
64+
```
65+
66+
Here are some examples:
67+
68+
```
69+
chocolate-doom -merge batman.wad -deh batman.deh vbatman.deh (Batman Doom)
70+
chocolate-doom -merge aoddoom1.wad -deh aoddoom1.deh (Army of Darkness Doom)
71+
```
72+
73+
## Other information
74+
75+
* Chocolate Doom includes a number of different options for music
76+
playback. See the README.Music file for more details.
77+
78+
* More information, including information about how to play various
79+
classic TCs, is available on the Chocolate Doom website:
80+
81+
https://www.chocolate-doom.org/
82+
83+
You are encouraged to sign up and contribute any useful information
84+
you may have regarding the port!
85+
86+
* Chocolate Doom is not perfect. Although it aims to accurately
87+
emulate and reproduce the DOS executables, some behavior can be very
88+
difficult to reproduce. Because of the nature of the project, you
89+
may also encounter Vanilla Doom bugs; these are intentionally
90+
present; see the NOT-BUGS file for more information.
91+
92+
New bug reports can be submitted to the issue tracker on Github:
93+
94+
https://github.com/chocolate-doom/chocolate-doom/issues
95+
96+
* Source code patches are welcome, but please follow the style
97+
guidelines - see the file named HACKING included with the source
98+
distribution.
99+
100+
* Chocolate Doom is distributed under the GNU GPL. See the COPYING
101+
file for more information.
102+
103+
* Please send any feedback, questions or suggestions to
104+
chocolate-doom-dev-list@chocolate-doom.org. Thanks!

0 commit comments

Comments
 (0)