esp32 nes code segmentation error

timl12332
Posts: 27
Joined: Wed May 10, 2017 3:05 pm

Re: esp32 nes code segmentation error

Postby timl12332 » Fri May 12, 2017 7:58 pm

Nice,
Will try tomorrow.

timl12332
Posts: 27
Joined: Wed May 10, 2017 3:05 pm

Re: esp32 nes code segmentation error

Postby timl12332 » Fri May 19, 2017 5:09 am

hmm, dont seem to be getting any analog audio out of pin26 when connected to amplified speakers.
Some work needed?

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32 nes code segmentation error

Postby ESP_Sprite » Fri May 19, 2017 10:56 am

I can't say much more than 'works here'. I get bits & boops out of that pin. Are you sure the NES game you have makes sound at the point you have it? That was my initial problem: Super Mario 3 does not have sound on its startup screen and I didn't have a gamepad connected to start the game.

timl12332
Posts: 27
Joined: Wed May 10, 2017 3:05 pm

Re: esp32 nes code segmentation error

Postby timl12332 » Fri May 19, 2017 11:31 am

ESP_Sprite wrote:I can't say much more than 'works here'. I get bits & boops out of that pin. Are you sure the NES game you have makes sound at the point you have it? That was my initial problem: Super Mario 3 does not have sound on its startup screen and I didn't have a gamepad connected to start the game.
well, that is my problem then.
I am doing exactly that.(running the game without constroller, just watching startscreen)
I am wondering what function in the code sends a button press as i dont have a controller and want to controll it with buttons connected to the gpio' s.
Could you tell me the function to use for sending a keypress?

thanks in advance

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32 nes code segmentation error

Postby ESP_Sprite » Fri May 19, 2017 11:37 am

I *think* you can do an

Code: Select all

event_t evh=event_get(event_joypad1_start);
evh(INP_STATE_MAKE);
and a few frames later

Code: Select all

event_t evh=event_get(event_joypad1_start);
evh(INP_STATE_BREAK);
Alternatively, try to find a ROM that makes sound even without pressing a button.

tiermann
Posts: 3
Joined: Fri Oct 13, 2017 2:45 am

Re: esp32 nes code segmentation error

Postby tiermann » Fri Oct 13, 2017 2:50 am

Hi. I have the same exact issue as the opening post. It gets to line 84 of bitmap.c and reboots after running out of memory.

I saw that it was fixed, but maybe I'm in the wrong Github? The last changes were even May 11, same date you had made the change.

I've been using this code:
https://github.com/espressif/esp32-nesemu

And trying to compile it on an Adafruit Huzzah32 Feather.

tiermann
Posts: 3
Joined: Fri Oct 13, 2017 2:45 am

Re: esp32 nes code segmentation error

Postby tiermann » Sat Oct 14, 2017 3:39 pm

Hi. I'm having he same issue as the opening post. Everything compiles fine, but it seems to run out of memory when it's setting up the main display buffer.

Code: Select all

Malloc: 57347 at C:/msys32/esp-idf/examples/esp32-nesemu-master/components/nofrendo/bitmap.c:84
ASSERT: line 269 of C:/msys32/esp-idf/examples/esp32-nesemu-master/components/nofrendo/memguard.c, malloc: out of memory at line 84 of C:/msys32/esp-idf/examples/esp32-nesemu-master/components/nofrendo/bitmap.c.  block size: 57347
I'm using an ESP32 board from Adafruit, the Huzzah32 Feather (same 512k SRAM), and I have that connected to their TFT Featherwing which uses a ili9341 controller (as well as an SD card). I've set up the menuconfig as Custom Hardware for the pin changes, and it works fine with other code for ili9341.

It looks like the issue was resolved on May 11th, and the code from Github shows changes on that date, but is it possible the rest of the libraries are using more RAM again?

tiermann
Posts: 3
Joined: Fri Oct 13, 2017 2:45 am

Re: esp32 nes code segmentation error

Postby tiermann » Fri Oct 27, 2017 2:54 am

The latest update seems to have fixed the memory problem. Thanks!

I can get the screen to initialize using the Adafruit or Loboris libraries, and then I get the "NES Powered On" message in a loop on the TFT Featherwing. It won't initialize otherwise. I'll have to wait to get any troubleshooting done because make monitor crashes after the Win 10 64 Fall Creator's Update. Putty and Arduino IDE's serial monitor work, but I can't read the trace without make monitor.

Helder
Posts: 2
Joined: Fri Mar 30, 2018 9:38 pm

Re: esp32 nes code segmentation error

Postby Helder » Fri Mar 30, 2018 9:43 pm

Does anyone know how to use the I2S audio amps instead of the ESP32 build in DAC? I'm using the MAX98357A mono I2S amp.

Who is online

Users browsing this forum: No registered users and 441 guests