Commit Graph

49 Commits

Author SHA1 Message Date
scawful
9ffb7803f5 refactor(emulator): enhance input handling and audio resampling features
- Renamed `turbo_mode()` to `is_turbo_mode()` for clarity in the Emulator class.
- Improved input handling in the Snes class by adding button state management and ensuring proper initialization of input controllers.
- Implemented multiple audio resampling methods (linear, cosine, cubic) in the Dsp class, allowing for enhanced audio quality during playback.
- Updated the user interface to include options for selecting audio interpolation methods and added keyboard shortcuts for emulator controls.

Benefits:
- Improved code readability and maintainability through clearer method naming and structured input management.
- Enhanced audio playback quality with new resampling techniques.
- Streamlined user experience with added UI features for audio settings and keyboard shortcuts.
2025-10-11 13:56:49 -04:00
scawful
3125ff4b76 feat: Implement audio backend and APU debugging features
- Introduced a new audio backend system with SDL2 support, allowing for flexible audio management and improved performance.
- Added APU handshake tracking capabilities to monitor CPU-APU communication during audio program uploads, enhancing debugging and transfer diagnostics.
- Updated the Emulator class to integrate the new audio backend, ensuring compatibility with existing audio handling.
- Implemented an APU Debugger UI for real-time monitoring of handshake status, port activity, and transfer progress, improving user experience for debugging audio issues.
- Refactored audio-related code to streamline audio sample queuing and management, enhancing overall emulator performance.
2025-10-08 20:57:43 -04:00
scawful
e41ea0df46 Update emu guide and set emu logs to debug 2025-10-06 19:36:22 -04:00
scawful
293ece69aa refactor: Improve Emulator Initialization and Resource Management
- Refactored SDL initialization process to enhance clarity and error handling, ensuring proper setup of video, audio, and event subsystems.
- Utilized RAII smart pointers for window and renderer management, improving resource cleanup during shutdown.
- Updated audio buffer allocation to use unique_ptr for automatic memory management.
- Enhanced logging for emulator state and initialization, providing better insights during execution.
- Streamlined timing management and frame processing logic for improved performance and maintainability.
2025-10-06 19:16:26 -04:00
scawful
a5d4722d13 fix: Reduce Logging Limits to Prevent Crashes During Emulator Execution
- Decreased logging limits in Snes, Apu, and Spc700 classes to prevent overflow crashes during execution.
- Updated comments in the APU boot ROM for clarity regarding the hardware dump and critical fixes.
- Enhanced logging to provide better insights while maintaining system stability.
2025-10-06 16:14:32 -04:00
scawful
84726dad98 feat: Enhance Emulator with State Management and Command-Line Options
- Added command-line flags for ROM loading, GUI toggling, state loading, and dumping, improving emulator flexibility.
- Implemented state management in the Snes class with loadState and saveState methods for saving and restoring emulator state.
- Updated the main emulator loop to handle frame counting and logging, providing better insights during execution.
- Refactored CMake configuration to streamline build options for the emulator application.
2025-10-06 13:07:49 -04:00
scawful
a881c0f8e1 feat: Refactor Emulator to Accept ROM Parameter and Enhance Logging
- Updated Emulator::Run method to accept a Rom* parameter, improving flexibility in ROM handling.
- Refactored texture creation and ROM data initialization to utilize the new parameter.
- Enhanced logging in Snes class to provide detailed information during initialization, reset, and frame processing, aiding in debugging and performance monitoring.
- Introduced cycle tracking in Apu and Spc700 classes for accurate synchronization and debugging.
- Added unit tests for APU DSP functionality and IPL ROM handshake to ensure reliability and correctness of audio processing.
2025-10-06 11:41:33 -04:00
scawful
d2a6169914 Refactor SNES class: rename to Snes for consistency, update method names, and clean up includes 2024-12-30 07:50:30 -05:00
scawful
e05e7c35db remove app namespace 2024-12-28 21:28:51 -05:00
scawful
3340066415 Refactor CPU and memory components: remove logging dependencies and restructure DMA channel definitions 2024-11-08 21:09:04 -05:00
scawful
40d7a899ac set int delay on write to 0x4200 2024-04-25 20:57:13 -04:00
scawful
5aa17d96d4 use access time for cycle count in cpu write callback 2024-04-25 20:56:51 -04:00
scawful
d76525201f match cpu registers on reset to hardware, cleanup 2024-04-25 00:50:39 -04:00
scawful
c3379d8adc cleanup SNES 2024-04-24 23:34:43 -04:00
scawful
96fbe066ab update cycle mgmt for vblank hblank, access time for routines 2024-04-24 15:41:00 -04:00
scawful
aaf9724531 Move Apu cycling from SNES to Apu class 2024-04-24 12:32:09 -04:00
scawful
bd6fc2e8f1 Play audio in emulator class, update class references from the SNES 2024-04-24 10:08:05 -04:00
scawful
de49d59070 Change callbacks from using this to & for lambda 2024-04-23 14:01:07 -04:00
scawful
a2e9813ed6 Update rom and sram init 2024-04-22 19:29:08 -04:00
scawful
917cd26a6e Add SNES BBus, registers, input, nmi/irq, joypad handling, frame timing, cpu callbacks, etc 2024-04-22 15:53:17 -04:00
scawful
541e045c46 Call Dsp::GetSamples from SNES SetSamples 2024-04-20 08:10:18 -04:00
scawful
2de3b283cd Add SNES::SetSamples and accessors for snes object 2024-04-20 07:40:27 -04:00
scawful
c906da46a0 Consolidate SNES::Init 2024-04-19 17:54:26 -04:00
scawful
5fecbc6939 Remove SNES::StartApuDataTransfer 2024-04-19 16:52:56 -04:00
scawful
7e46cf1c64 Rename ROM class to Rom 2024-04-14 14:47:17 -05:00
scawful
f653517026 add memory namespace, update comments 2024-04-13 23:56:41 -05:00
scawful
ca076164ce Rename CPU to Cpu 2024-04-13 23:33:35 -05:00
scawful
ad08d998b5 Add audio namespace inside of emu 2024-04-13 23:32:30 -05:00
scawful
3effd03f1f Rename APU to Apu 2024-04-13 23:25:41 -05:00
scawful
87db938963 cleanup spc700 and add todos 2023-12-06 01:32:59 -05:00
scawful
d0c9229093 Reorganize emu cpu directory 2023-12-05 21:16:16 -05:00
scawful
dad4a38f59 Add step mode to snes emulator 2023-12-05 03:47:06 -05:00
scawful
a0019ab7fb Add all 65816 instruction tests
Separate CPU class into instructions and addressing files
2023-12-03 05:13:25 -05:00
scawful
446734321c SNES, CPU, Emulator + tests updated 2023-11-30 02:12:11 -05:00
scawful
1633955177 Emulator housekeeping 2023-11-26 16:48:49 -05:00
scawful
59e7dcc7f0 GUI Updates
Add DisplaySettings, replace ImGui style editor
Update Debugger interface with memory viewer
Decompose SNES initialization routines
Update DungeonObjectRenderer plan
Add DrawObjectRenderer UI mockup fofr DungeonEditor
2023-11-21 11:07:04 -05:00
scawful
ed7204b127 Emulator debugger GUI updates 2023-11-18 00:03:49 -05:00
scawful
df6327078d Add DMA to SNES 2023-10-17 17:06:36 -04:00
scawful
5a4ecc5b20 PPU upgrades, move Memory to own dir 2023-08-27 15:24:27 -04:00
scawful
559c2e4830 Add SignalReady to APU init 2023-08-26 04:51:50 -04:00
scawful
a2de3c2ffe SPC700 to get notified when ports are written 2023-08-26 02:33:19 -04:00
scawful
3d793c452d Reorganize emu folder, update S-SMP system infra 2023-08-26 01:59:57 -04:00
scawful
453a2575f4 Inject SPC700 to APU, add APU and PPU observers 2023-08-24 22:54:52 -04:00
scawful
2ec43cfb3f Update Clock class for cycle accurate components 2023-08-20 22:30:06 -04:00
scawful
8fb55b64bc Get ROM header and execute at Reset Vector 2023-08-20 20:10:41 -04:00
scawful
ac7d8b6af9 Add BackgroundLayer to PPU, Create Loggable class 2023-08-20 16:15:18 -04:00
scawful
7448f80119 Add CMP, COP, DEC, EOR, update SNES and Memory 2023-08-20 15:39:22 -04:00
scawful
bc7accfe9e Add DMA and SNES Init, VBlank, NMI, etc 2023-08-20 11:48:51 -04:00
scawful
f0d0d9abc6 Create SNES skeleton 2023-08-19 14:12:45 -04:00