Git Product home page Git Product logo

nesemu's Issues

Crash after I2S fix

I am trying to get this project working on a LOLIN D32 with an ILI9341 display and a MAX98357A I2S DAC.

I had it working without sound for some time but since I changed the settings from direct DAC to I2S it stops working whenever I start a ROM.

in video_audio.c I disabled the build in DAC

		.mode = I2S_MODE_MASTER | I2S_MODE_TX,
//		.mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN,

an I added the pin configuration to what I am using in my other projects:

static const i2s_pin_config_t pin_config = {
	.bck_io_num = 27,
	.ws_io_num = 26,
	.data_out_num = 25,
	.data_in_num = 0 // I2S_PIN_NO_CHANGE
};	
i2s_set_pin(I2S_DEVICE_ID, &pin_config);

I don't hear any sound in the menu (don't know if this is normal) but when I start some ROM it get this messages and the system freezes (no display updates, menu button not working, ...):

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
Game controller initalizing
GPIO Control initated
Init SPI bus
Init SPI bus completed
Adding screen device
Adding screen completed
LCD ILI9341 initialization.
LCD initialization complete.
Start boot menu init
Reading rom list
ROM[1] icon[$] name[Super Mario Bros] file[smb.nes]
ROM[2] icon[;] name[Tetris] file[tetris.nes]
ROM[3] icon[+] name[Duck Tales] file[dtales.nes]
Found 3 ROMs
Finished boot menu init
No errors, carry on
Showing boot menu
Menu selection is /spiffs/smb.nes
NoFrendo start!
Starting main loop with file: /spiffs/smb.nes
Finished initializing sound
free heap after sound init: 234896
Game controller initalizing
GPIO Control initated
free heap after input init: 232472
video driver: Simple DirectMedia Layer at 486555958x240
vid_init done
vid_init done
PPU memory allocated and cleared
partition type = 0.
partition subtype = 17.
partition starting address = 150000.
partition size = 140000.
partition label = app1.
partition encrypted = 0.
Reading rom from /spiffs/smb.nes
Loaded/Verified 40976 ROM bytes mapped on EEPROM area
Initialized. ROM @ 0x3f410000
Head: 0x3f410000 (4e 45 53 1a)
SRAM Present
created memory mapper: None
setting up mapper 0
reset memory mapper
Timer install 60Hz
Game controller initalizing
GPIO Control initated
Init SPI bus
Init SPI bus completed
Adding screen device
Adding screen completed
LCD ILI9341 initialization.
LCD initialization complete.
Start boot menu init
Reading rom list
ROM[1] icon[$] name[Super Mario Bros] file[smb.nes]
ROM[2] icon[;] name[Tetris] file[tetris.nes]
ROM[3] icon[+] name[Duck Tales] file[dtales.nes]
Found 3 ROMs
Finished boot menu init
No errors, carry on
Showing boot menu
Menu selection is /spiffs/smb.nes
NoFrendo start!
Starting main loop with file: /spiffs/smb.nes
Finished initializing sound
free heap after sound init: 234896
Game controller initalizing
GPIO Control initated
free heap after input init: 232472
video driver: Simple DirectMedia Layer at 486555958x240
vid_init done
vid_init done
PPU memory allocated and cleared
partition type = 0.
partition subtype = 17.
partition starting address = 150000.
partition size = 140000.
partition label = app1.
partition encrypted = 0.
Reading rom from /spiffs/smb.nes
Loaded/Verified 40976 ROM bytes mapped on EEPROM area
Initialized. ROM @ 0x3f410000
Head: 0x3f410000 (4e 45 53 1a)
SRAM Present
created memory mapper: None
setting up mapper 0
reset memory mapper
Timer install 60Hz

Also I can't get the micro sd card reader to work with this project. It works in a stand alone project without changing the connections, but with nesemu it does not. But as long as I can use the SPIFFS this is no big deal for me.

Any ideas what I did wrong with the I2S configuration ?

UPDATE: I thought it's just a brownout because of the MAX98357 consuming too much power from the LOLIN D32 but even with the I2S DAC removed it hangs after "Timer install 60 Hz". But if I change i2s_set_pin(I2S_DEVICE_ID, &pin_config); back to i2s_set_pin(I2S_DEVICE_ID, NULL); it works without sound (but I can play Super Mario)

frequency

Hello
Why(NES Games) it works in low frequency on the main console 6502 on 3 MHz
But Why should the frequency be high for the simulator? by Atmega and ESP32 ?
thanks

Couldn't find rom partition!

Please help how to solve this issue. Thanks!

01:36:03.587 -> Showing boot menu
01:36:03.775 -> Menu selection is /spiffs/tetris.nes
01:36:03.775 -> NoFrendo start!
01:36:03.775 -> Starting main loop with file: /spiffs/tetris.nes
01:36:03.775 -> free heap after sound init: 4444584
01:36:03.822 -> Game controller initalizing
01:36:03.822 -> NES Control initated
01:36:03.822 -> free heap after input init: 4442148
01:36:03.822 -> video driver: Simple DirectMedia Layer at 486555958x240
01:36:03.822 -> vid_init done
01:36:03.822 -> vid_init done
01:36:03.916 -> PPU memory allocated and cleared
01:36:03.916 -> Couldn't find rom partition!
01:36:03.916 -> abort() was called at PC 0x401054f2 on core 1
01:36:03.916 ->
01:36:03.916 -> ELF file SHA256: 0000000000000000
01:36:03.916 ->
01:36:03.916 -> Backtrace: 0x4008e000:0x3ffb1de0 0x4008e279:0x3ffb1e00 0x401054f2:0x3ffb1e20 0x400e57cf:0x3ffb1e40 0x400e1686:0x3ffb1e60 0x400e1a5f:0x3ffb1e90 0x400d76ba:0x3ffb1ee0 0x400e296b:0x3ffb1f10 0x400e29e3:0x3ffb1f50 0x400e28b9:0x3ffb1f70 0x400d1d77:0x3ffb1f90 0x400e3ea1:0x3ffb1fb0 0x4008f24e:0x3ffb1fd0
01:36:03.916 ->
01:36:03.916 -> Rebooting...

Having issues compiling

I have been having issue after issue getting your NES emulator to compile.

I'm using an ESP32-S3 and compiling with the Arduino IDE. It has dozens of errors ranging from missing libraries to the use of the RTC to set the speed of the CPU. I'm wondering how you got it to compile and upload.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.