Chip8Emu | Chip8 emulator written in C with wxWidgets | Hacking library
kandi X-RAY | Chip8Emu Summary
kandi X-RAY | Chip8Emu Summary
Chip8Emu is a simple CHIP-8 emulator with build possible on Windows and Linux.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Chip8Emu
Chip8Emu Key Features
Chip8Emu Examples and Code Snippets
Community Discussions
Trending Discussions on Chip8Emu
QUESTION
I am writing a CHIP-8 interpreter in C++ with SDL2. The source code is at https://github.com/robbie0630/Chip8Emu. There is a problem where it gets a segmentation fault with this ROM. I tried to debug the problem with GDB, but when I type bt
, it displays an incomplete stack trace, only showing the top two functions, making me unable to effectively diagnose the problem. How do I get a full and useful stack trace?
EDIT: When I run bt
, GDB displays this:
ANSWER
Answered 2017-May-22 at 12:39After a few months, I finally identified the problem. Some nasty CHIP-8 programs make illegal memory accesses to the graphics memory that are outside of the bounds of the array and corrupt properties of the CPU (such as GfxDraw
). I fixed this problem by accessing the graphics memory with at
and ignoring std::out_of_range
errors. It seems to work for now, so I'm declaring it the solution.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Chip8Emu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page