Skip to content

Commit ee3115e

Browse files
authored
Feat/doom (#101)
* wip doom * wip * add doom which compiles * fleshing out * wip audio video * working gfx display * fix inputs * wip moving doom over to shared memory * wip moving more into shared memory * add boxart * add doom ultimate boxart * update to latest tool * continue moving doom to shared memory * move more into shared memory * wip * reduce sd card overhead and allow palette access. * abort if error * WIP shared memory actually working again * fix sizeof issue * more WIP and working shared memory * increase shared memory again * enable doom * moving more and more into shared memory * move lcd struct and bgdup into shared memory for gbc * fix gbc * update to better work across multiple emulators * fix ppu issue with palette * ensure doom cart frees memory * bump shared memory back to 150k for Genesis emulator * 145k for shared memory * wip using pool allocator for better memory performance accross emulators without having to (re-)allocate the romdata which can fail. update to use menu mutex and to make images spans instead of vectors for better memory performance * update log * update readme * update espp * ignore prboom in sa * fix audio memset issue * fix sound emulation in doom; update to pause sound when doom is paused; update to have menu / game perform better (doom) by adding appropriate sleeps in the main loop and audio task; update pool to be able to query if pointer is in pool or not * better reliability and working save/load game in box-emu menu * update readme and improve sound a little; also make it so the game saves/loads while still in menu
1 parent 43bb9b6 commit ee3115e

File tree

225 files changed

+86623
-486
lines changed

Some content is hidden

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

225 files changed

+86623
-486
lines changed

.github/workflows/static_analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
esp_idf_version: release/v5.4
3030

3131
# (Optional) cppcheck args
32-
cppcheck_args: -i$GITHUB_WORKSPACE/components/gbc/gnuboy -i$GITHUB_WORKSPACE/components/nes/nofrendo -i$GITHUB_WORKSPACE/components/msx/fmsx -i$GITHUB_WORKSPACE/components/sms/smsplus -i$GITHUB_WORKSPACE/components/genesis/gwenesis -i$GITHUB_WORKSPACE/components/gui/generated -i$GITHUB_WORKSPACE/components/menu/generated -i$GITHUB_WORKSPACE/components/jpegdec --check-level=exhaustive --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
32+
cppcheck_args: -i$GITHUB_WORKSPACE/components/gbc/gnuboy -i$GITHUB_WORKSPACE/components/nes/nofrendo -i$GITHUB_WORKSPACE/components/msx/fmsx -i$GITHUB_WORKSPACE/components/doom/prboom -i$GITHUB_WORKSPACE/components/sms/smsplus -i$GITHUB_WORKSPACE/components/genesis/gwenesis -i$GITHUB_WORKSPACE/components/gui/generated -i$GITHUB_WORKSPACE/components/menu/generated -i$GITHUB_WORKSPACE/components/jpegdec --check-level=exhaustive --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ set(GBC_COMPONENTS "gbc")
2121
### SMS ###
2222
set(SMS_COMPONENTS "sms")
2323

24-
### SNES ###
25-
# set(SNES_COMPONENTS "snes")
26-
2724
### MSX ###
2825
set(MSX_COMPONENTS "msx")
2926

3027
### GENESIS ###
3128
set(GENESIS_COMPONENTS "genesis")
3229

3330
### DOOM ###
34-
# set(DOOM_COMPONENTS "doom")
31+
set(DOOM_COMPONENTS "doom")
32+
33+
### SNES ###
34+
# set(SNES_COMPONENTS "snes")
3535

3636
add_compile_definitions(BOARD_HAS_PSRAM)
3737

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@
77
</tr>
88
</table>
99

10+
![image](https://github.com/user-attachments/assets/209ed9aa-22f0-4ee0-9868-65abb1b64bbc)
11+
12+
https://github.com/user-attachments/assets/2d3da6ea-2e80-42c3-bbd6-5a2c59601201
13+
14+
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
15+
**Table of Contents**
16+
17+
- [esp-box-emu](#esp-box-emu)
18+
- [Overview](#overview)
19+
- [Images and Videos](#images-and-videos)
20+
- [Parts](#parts)
21+
- [Features](#features)
22+
- [Cloning](#cloning)
23+
- [Build and Flash](#build-and-flash)
24+
- [Rom Setup and Configuration (uSD Card)](#rom-setup-and-configuration-usd-card)
25+
- [ROM Images](#rom-images)
26+
- [Metadata.csv format](#metadatacsv-format)
27+
- [References and Inspiration:](#references-and-inspiration)
28+
- [Other NES Emulators](#other-nes-emulators)
29+
- [Other Genesis Emulators](#other-genesis-emulators)
30+
- [Useful Background / Information](#useful-background--information)
31+
32+
<!-- markdown-toc end -->
33+
34+
## Overview
35+
1036
The ESP-BOX-EMU is a gameboy-inspired add-on for the ESP32-S3-BOX and
1137
ESP32-S3-BOX-3 which provides:
1238
- Game Controller (gamepad input with a/b/x/y, start/select, d-pad)
@@ -30,16 +56,27 @@ ESP32-S3-BOX-3 which provides:
3056
- Unlocked mode (fastest execution), toggled with the X button
3157
- Genesis emulator (gwenesis) - full speed / buttery smooth when muted; unmuted it runs a little slower but has nice sound
3258
- Regular Controls (D-Pad/A/B/C/Start/Select) (note: A is mapped to B, B is mapped to A, and C is mapped to Y)
59+
- Doom engine (prboom) - full speed with audio and control inputs. A is fire/enter, B is strafe/backspace, X is use, Y is weapontoggle, START is escape, and SELECT is map.
3360
- LVGL main menu with rom select (including boxart display) and settings page
3461
(all generated from Squareline Studio)
3562
- LVGL emulation paused menu with save slot select, save slot image display,
3663
and configuration (sound, brightness, display, etc.). (all generated from
3764
Squareline Studio)
3865

66+
## Images and Videos
67+
68+
![image](https://github.com/user-attachments/assets/d867d5fa-4c22-42e3-b04f-1edd5288c5d2)
69+
![image](https://github.com/user-attachments/assets/ad892905-37d4-4e16-8d5f-a7ff8d2a2c52)
70+
![image](https://github.com/user-attachments/assets/b141daab-2cda-481c-98c2-980b012f177e)
71+
72+
![image](https://github.com/user-attachments/assets/d23659b6-10d4-4375-8017-675e156a1a4b)
73+
3974
https://github.com/esp-cpp/esp-box-emu/assets/213467/3b77f6bd-4c42-417a-9eb7-a648f31b4008
4075

4176
https://github.com/esp-cpp/esp-box-emu/assets/213467/a3d18d03-c6a1-4911-89d1-e18119e8cc03
4277

78+
## Parts
79+
4380
This project is designed to be in the same form factor as the Gameboy Color and
4481
to reuse the same button plastics and membranes for a good play feel.
4582

@@ -84,8 +121,9 @@ This project has the following features (still WIP):
84121
- [x] Sega Master System (SMS) / GameGear (GG) emulator
85122
- [x] MSX emulator
86123
- [x] Sega Mega Drive / Genesis emulator
124+
- [x] Doom
125+
- [ ] Dark Forces (WIP)
87126
- [ ] SNES emulator (WIP)
88-
- [ ] Doom (WIP)
89127
- [x] uSD card (FAT) filesystem over SPI
90128
- [x] TinyUSB MSC device for optionally exposing the uSD to the attached USB host
91129
- [x] Memory mapping of selected rom data from storage into raw data partition

boxart/doom_2_boxart.jpg

5.01 KB
Loading

boxart/doom_boxart.jpg

5.7 KB
Loading

boxart/doom_ultimate_boxart.jpg

11.7 KB
Loading

boxart/source/doom_2_boxart.jpg

63.5 KB
Loading

boxart/source/doom_boxart.jpg

1000 KB
Loading
47 KB
Loading

boxart/source/resize.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
find . -maxdepth 1 -iname "*.jpg" | xargs -L1 -I{} convert -resize 100x "{}" ../"{}"
2+
find . -maxdepth 1 -iname "*.jpg" | xargs -L1 -I{} magick -quiet "{}" -resize 100x ../"{}"

0 commit comments

Comments
 (0)