Skip to content

Commit ca66ce1

Browse files
committed
update readme and improve sound a little; also make it so the game saves/loads while still in menu
1 parent 7a41159 commit ca66ce1

File tree

5 files changed

+42
-3
lines changed

5 files changed

+42
-3
lines changed

README.md

Lines changed: 36 additions & 0 deletions
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)
@@ -37,10 +63,20 @@ ESP32-S3-BOX-3 which provides:
3763
and configuration (sound, brightness, display, etc.). (all generated from
3864
Squareline Studio)
3965

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+
4074
https://github.com/esp-cpp/esp-box-emu/assets/213467/3b77f6bd-4c42-417a-9eb7-a648f31b4008
4175

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

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

components/doom/prboom/g_game.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ int defaultskill; //note 1-based
253253
int bodyqueslot, bodyquesize; // killough 2/8/98
254254
mobj_t **bodyque = 0; // phares 8/10/98
255255

256-
static void G_DoSaveGame (boolean menu);
257256
static const byte* G_ReadDemoHeader(const byte* demo_p, size_t size, boolean failonerror);
258257

259258
//
@@ -1706,7 +1705,7 @@ void G_SaveGameName(char *name, size_t size, int slot)
17061705
snprintf(name, size, "%s/sav%d-%d.dsg", basesavegame, gamemission, slot);
17071706
}
17081707

1709-
static void G_DoSaveGame (boolean menu)
1708+
void G_DoSaveGame (boolean menu)
17101709
{
17111710
lprintf(LO_INFO, "G_DoSaveGame... \n");
17121711

components/doom/prboom/g_game.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void G_LoadGame(int slot, boolean is_command); // killough 5/15/98
5757
void G_ForcedLoadGame(void); // killough 5/15/98: forced loadgames
5858
void G_DoLoadGame(void);
5959
void G_SaveGame(int slot, char *description); // Called by M_Responder.
60+
void G_DoSaveGame(boolean menu);
6061
void G_BeginRecording(void);
6162
// CPhipps - const on these string params
6263
void G_RecordDemo(const char *name); // Only called by startup code.

components/doom/prboom/z_zone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ void (Z_ChangeTag)(void *ptr, int tag DA(const char *file, int line))
363363
{
364364
memblock_t *block = (memblock_t *)((char *) ptr - HEADER_SIZE);
365365

366-
if (!ptr || tag == block->tag)
366+
if (!ptr || !block || tag == block->tag)
367367
return;
368368

369369
#ifdef INSTRUMENTED

components/doom/src/doom.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ static bool unlock = false;
1515

1616
static uint16_t doom_palette[256];
1717

18+
// Range is [0, 15]
1819
static constexpr int DEFAULT_AUDIO_VOLUME = 15;
1920
static std::unique_ptr<espp::Task> audio_task;
2021

@@ -522,6 +523,7 @@ void load_doom(std::string_view save_path, int save_slot) {
522523
// load the game
523524
bool command = false;
524525
G_LoadGame(save_slot, command);
526+
G_DoLoadGame();
525527
}
526528
}
527529

@@ -532,6 +534,7 @@ void save_doom(std::string_view save_path, int save_slot) {
532534
// save the game
533535
auto description = fmt::format("Save Slot {}", save_slot);
534536
G_SaveGame(save_slot, const_cast<char*>(description.c_str()));
537+
G_DoSaveGame(true);
535538
}
536539
}
537540

0 commit comments

Comments
 (0)