Skip to content

Commit b0cdcc1

Browse files
committed
Compilable and working code with IDF5.1
1 parent 693e378 commit b0cdcc1

23 files changed

+1760
-202
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# For more information about build system see
2+
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
3+
# The following five lines of boilerplate have to be in your project's
4+
# CMakeLists in this exact order for cmake to work correctly
5+
cmake_minimum_required(VERSION 3.5)
6+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
7+
project(nesemu)

Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
file(GLOB_RECURSE T_SOURCES *.c)
2+
3+
idf_component_register(SRCS ${T_SOURCES} INCLUDE_DIRS "." REQUIRES "driver" "nofrendo")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: "1.0.0"
2+
description: Nofredo-esp
3+
dependencies:
4+
idf: ">=5.0"

components/nofrendo-esp32/osd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
#include <sys/types.h>
2121
#include <unistd.h>
2222

23-
#include <noftypes.h>
24-
#include <nofconfig.h>
25-
#include <log.h>
26-
#include <osd.h>
27-
#include <nofrendo.h>
23+
#include "noftypes.h"
24+
#include "nofconfig.h"
25+
#include "log.h"
26+
#include "osd.h"
27+
#include "nofrendo.h"
2828

29-
#include <version.h>
29+
#include "version.h"
3030

3131
char configfilename[]="na";
3232

components/nofrendo-esp32/video_audio.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@
2424

2525
#include <math.h>
2626
#include <string.h>
27-
#include <noftypes.h>
28-
#include <bitmap.h>
29-
#include <nofconfig.h>
30-
#include <event.h>
31-
#include <gui.h>
32-
#include <log.h>
33-
#include <nes.h>
34-
#include <nes_pal.h>
35-
#include <nesinput.h>
36-
#include <osd.h>
3727
#include <stdint.h>
28+
#include "noftypes.h"
29+
#include "bitmap.h"
30+
#include "nofconfig.h"
31+
#include "event.h"
32+
#include "gui.h"
33+
#include "log.h"
34+
#include "nes.h"
35+
#include "nes_pal.h"
36+
#include "nesinput.h"
37+
#include "osd.h"
3838
#include "driver/i2s.h"
3939
#include "sdkconfig.h"
40-
#include <spi_lcd.h>
40+
#include "spi_lcd.h"
4141

4242
#include <psxcontroller.h>
4343

components/nofrendo/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file(GLOB_RECURSE T_SOURCES *.c)
2+
file(GLOB_RECURSE CPU_SOURCES cpu/*.c)
3+
file(GLOB_RECURSE NSS_SOURCES libsnss/*.c)
4+
file(GLOB_RECURSE NES_SOURCES nes/*.c)
5+
file(GLOB_RECURSE SNDHRDW_SOURCES sndhrdw/*.c)
6+
file(GLOB_RECURSE MAP_SOURCES mappers/*.c)
7+
8+
idf_component_register(SRCS ${T_SOURCES} ${CPU_SOURCES} ${NSS_SOURCES} ${NES_SOURCES} ${SNDHRDW_SOURCES} ${MAP_SOURCES} INCLUDE_DIRS "cpu" "libsnss" "nes" "sndhrdw" ".")

components/nofrendo/config.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static int load_config(char *filename)
207207
do
208208
{
209209
/* eat up whitespace */
210-
while (isspace(*s))
210+
while (isspace((int)*s))
211211
s++;
212212

213213
switch (*s)
@@ -255,13 +255,13 @@ static int load_config(char *filename)
255255
*s++ = '\0';
256256
}
257257

258-
while (strlen(key) && isspace(key[strlen(key) - 1]))
258+
while (strlen(key) && isspace((int)key[strlen(key) - 1]))
259259
key[strlen(key) - 1] = '\0';
260260

261-
while (isspace(*s))
261+
while (isspace((int)*s))
262262
s++;
263263

264-
while (strlen(s) && isspace(s[strlen(s) - 1]))
264+
while (strlen(s) && isspace((int)s[strlen(s) - 1]))
265265
s[strlen(s) - 1]='\0';
266266

267267
{

components/nofrendo/cpu/nes6502.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com)
33
**
44
**
@@ -24,7 +24,7 @@
2424
*/
2525

2626

27-
#include <noftypes.h>
27+
#include "noftypes.h"
2828
#include "nes6502.h"
2929
#include "dis6502.h"
3030

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: "1.0.0"
2+
description: Nofredo
3+
dependencies:
4+
idf: ">=5.0"

0 commit comments

Comments
 (0)