Commit Graph

174 Commits

Author SHA1 Message Date
Brandon Wright
abb4b4c39f Use Snes9x aliases instead of stdint types here. 2018-07-28 15:59:15 -05:00
Brandon Wright
e91f14744b Break a specific SMP opcode into cycles. Fixes Little Magic. 2018-06-19 18:15:24 -05:00
Brandon Wright
83480765f1 Sanity check input rate better. 2018-06-07 15:49:41 -05:00
Dwedit
412c655432 Backport Hermite Resampler bypass code from Libretro version 2018-06-06 19:45:52 -05:00
Brandon Wright
cb7226d071 Remove forced alignment on landing buffer. 2018-06-04 16:14:59 -05:00
qwertymodo
15f76f7eca Ensure all MSU-1 reads are stereo channel aligned 2018-05-26 20:02:16 -07:00
Brandon Wright
20bd60a3c6 Update copyright dates. 2018-05-25 15:44:52 -05:00
Brandon Wright
dfff94200c Add some APU debugging capabilities. 2018-05-16 17:46:28 -05:00
Brandon Wright
30a924fa48 Revert "Fix Secret of Evermore PAL version."
This reverts commit 6ee21af0cf.
2018-05-15 18:27:56 -05:00
Brandon Wright
6ee21af0cf Fix Secret of Evermore PAL version. 2018-05-15 17:25:50 -05:00
Brandon Wright
97f4067cd8 Inline a couple functions. Add some spacing to the Gtk preferences dialog. 2018-04-21 18:44:40 -05:00
Brandon Wright
287fab5f1b Small optimizations to DSP. 2018-04-13 11:56:06 -05:00
Brandon Wright
f8a7f23a4b Revert "Add threaded APU option."
This reverts commit 045f68bb26.
2018-04-13 10:25:26 -05:00
Brandon Wright
551e527784 Revert "Add a wait for threads when we hand away control. Probably not needed due to all the extra processing during end-of-frame."
This reverts commit e1a4ef93b6.
2018-04-13 10:25:25 -05:00
Brandon Wright
f422730808 Revert "Attempt at Windows threads."
This reverts commit 970905b83b.
2018-04-13 10:25:24 -05:00
Brandon Wright
71f64d3a60 Revert "Add missing #ifdef guard."
This reverts commit a817eff105.
2018-04-13 10:25:23 -05:00
Brandon Wright
49ab4c3f28 Revert "Use semaphores on Windows for backward compatibility."
This reverts commit 4ede4b7447.
2018-04-13 10:25:22 -05:00
Brandon Wright
60c6d3e802 Revert "Close semaphore handles."
This reverts commit 2426c2412f.
2018-04-13 10:25:16 -05:00
Brandon Wright
085e7c05f2 Revert "Allow thread reinitialization."
This reverts commit 8b99749aba.
2018-04-13 10:25:07 -05:00
Brandon Wright
8b99749aba Allow thread reinitialization. 2018-04-13 09:25:18 -05:00
Brandon Wright
2426c2412f Close semaphore handles. 2018-04-12 19:15:10 -05:00
Brandon Wright
4ede4b7447 Use semaphores on Windows for backward compatibility. 2018-04-12 19:10:58 -05:00
Brandon Wright
a817eff105 Add missing #ifdef guard. 2018-04-12 17:20:30 -05:00
Brandon Wright
970905b83b Attempt at Windows threads. 2018-04-12 17:17:40 -05:00
Brandon Wright
e1a4ef93b6 Add a wait for threads when we hand away control. Probably not needed due to all the extra processing during end-of-frame. 2018-04-12 16:51:00 -05:00
Brandon Wright
045f68bb26 Add threaded APU option. 2018-04-12 16:26:10 -05:00
Brandon Wright
e2277ff55b Clean up compiler warnings. 2017-12-06 19:00:19 -06:00
Brandon Wright
94f9f6ff25 Fix missing break in pseudo-cycle SMP. 2017-12-06 18:04:15 -06:00
OV2
3b4801d35a Do not define NDEBUG if _DEBUG is defined 2017-11-28 20:54:30 +01:00
Brandon Wright
1369d724f7 Update config variable and sanitize input. 2017-11-24 13:03:24 -06:00
Brandon Wright
618519457b Optimize rate control formula and remove placeholder copy-paste. 2017-11-24 08:19:05 -06:00
Brandon Wright
a34dbef0b9 Remove debugging printfs. 2017-11-22 18:18:33 -06:00
Brandon Wright
39f05664cd Add dynamic rate control for audio, based on Retroarch/Themaister's paper
Adds support to alsa and oss sound drivers on GTK+ port.
2017-11-20 12:07:54 -06:00
Brandon Wright
7a2ca6dc2a Update copyrights. 2017-11-17 16:00:58 -06:00
OV2
a66b88b276 Release msu data and audio streams on exit, use unzClose when closing file 2017-10-14 00:32:38 +02:00
OV2
17b3a81419 Fix some on-exit memory leaks 2017-10-13 22:38:37 +02:00
OV2
a95d69c051 Make DEBUGGER compile again (without APU debugger) 2017-10-10 20:04:22 +02:00
OV2
a65fa26627 Do not define NDEBUG for DEBUGGER 2017-10-01 14:49:48 +02:00
OV2
bfc326fc19 Use same spc buffer size in all cases 2017-10-01 14:31:31 +02:00
Ari Sundholm
d7394bc7b9 Fix some build warnings generated by g++ 2017-09-11 00:45:26 +03:00
Ari Sundholm
60aabb91d7 Fix some undefined behavior
The destructor of Resampler needs to be virtual, as it is subclassed
and pointers to objects subclassed from it are being deleted.

The issue in controls.cpp is that the loop ends up reading past the
end of an array. The small rewrite of the loop also makes it more
readable.

In memmap.cpp, there is an assignment statement of the following form:
	a[i++] = b[i];
It is undefined what i's value should be in b[i], so this was made
explicit.
2017-09-11 00:42:36 +03:00
qwertymodo
158b509bbb Merge branch 'msu1-zip' 2017-09-03 14:56:32 -07:00
OV2
27fa8ecb97 msu1: generate even if muted 2017-09-03 21:13:01 +02:00
OV2
75037ef380 msu1: drop samples equal to dsp dropped samples 2017-09-03 20:15:45 +02:00
OV2
49ed2ca631 msu1: fix desync with turbo mode 2017-09-02 22:17:57 +02:00
qwertymodo
b230e50ec5 Fix MSU-1 audio memory leak 2017-08-30 17:59:39 -07:00
qwertymodo
32f70fa38e MSU-1 pop/skip fixes 2017-07-05 17:01:07 -07:00
qwertymodo
fe6047213b Fix a byte-masking error in byuu's APU causing issues in Dark Law, Haisei Mahjongg, and Super Pinball 2017-06-27 16:25:25 -07:00
OV2
0df033d3b7 Fix MSU1 audio 2017-06-12 21:50:02 +02:00
Brandon Wright
cf846e0c56 Use 32040hz with more consistency. 2016-12-09 17:50:50 -06:00
Brandon Wright
27e6bc1b01 Merge branch 'msu1' 2016-11-14 13:12:00 -06:00
OV2
42f751da4a Assert on uneven sample count 2016-11-06 22:05:54 +01:00
Brandon Wright
38e8717ef3 Add back time ratio change. Buffer levels are stable, so this is mathematically correct. 2016-11-04 14:39:30 -05:00
qwertymodo
07ce784c1b Fix looping and (partly) resume. 2016-11-03 19:14:45 -07:00
qwertymodo
024d92086a Merge branch 'msu1' of https://github.com/snes9xgit/snes9x into msu1 2016-11-03 15:33:14 -07:00
qwertymodo
0e6b86d00e Fix MSU-1 audio file read loop 2016-11-03 14:56:46 -07:00
Brandon Wright
8dd1ef0047 Merge branch 'msu1' of github.com:snes9xgit/snes9x into msu1 2016-11-03 15:48:14 -05:00
Brandon Wright
91790a5e08 Generate sample example. 2016-11-03 15:47:33 -05:00
qwertymodo
f1d07c7572 Actually mix MSU sample instead of adding the DSP twice. 2016-11-03 13:17:12 -07:00
qwertymodo
f13676cfd3 Fix MSU-1 sample buffer size 2016-11-03 13:10:01 -07:00
Brandon Wright
1f7926c48b Loop over sample size, not buffer size. 2016-11-03 14:55:57 -05:00
Brandon Wright
782bdeb2eb Whoops. shrink_buffer_size is undefined unless 8-bit or Mono is used. 2016-11-03 14:53:13 -05:00
Brandon Wright
add3a16f25 Increase buffer size. Don't use sizeof on heap buffer (returns pointer size). 2016-11-03 14:45:20 -05:00
qwertymodo
3c0f6bfdee Begin adding MSU-1 support. Data streaming is working in Windows, audio streaming is not. 2016-11-03 11:40:47 -07:00
Brandon Wright
1661fc838c Add copyrights. 2016-10-15 11:31:26 -05:00
Brandon Wright
ddb1527236 Bump OV2 Windows port copyright. 2016-10-07 12:53:18 -05:00
Brandon Wright
006fc22ebb Add byuu copyright for his S-SMP 2016-10-07 12:47:07 -05:00
Brandon Wright
91aebfe759 Update some copyrights, bump version number. 2016-10-01 20:03:03 -05:00
Brandon Wright
026f9eaa1e Fix some possible problems from cppcheck. Everything else looks fine. 2016-09-27 15:25:37 -05:00
Alcaro
d81afb2383 Fix uninitialized value warning from Valgrind. 2014-02-18 22:34:23 +01:00
OV2
ba634f195c Align struct name with rest of core 2013-05-18 22:28:21 +02:00
twinaphex
055aeb5b7a (Libretro) Fix Clang build - anonymous structs is illegal for ISO
C++
2013-05-18 20:19:16 +02:00
Brandon Wright
53defb5b11 Go back to floating point hermite resampler.
16-bit fixed point doesn't have enough accuracy for a decent SNR with hermite.
2012-04-07 16:49:55 -05:00
bl0ckeduser
f699d21d12 Fix header paths in apu/bapu/snes/snes.hpp 2012-02-03 17:44:58 -05:00
bl0ckeduser
ef41a96c57 Fix header path in apu/apu.cpp 2012-02-03 17:43:32 -05:00
Brandon Wright
1aeb1c8f3e Fix warning about operation order. 2012-02-02 15:57:42 -06:00
Brandon Wright
8db1c467ac Adjust fixed-point hermite resampler. Use signed arithmetic. 2012-02-02 15:48:17 -06:00
Brandon Wright
93cf0a77b9 Revert "Revert "Change hermite resampler to use fixed-point arithmetic for speed on""
This reverts commit 986289a96c.
2012-02-02 15:47:44 -06:00
Brandon Wright
986289a96c Revert "Change hermite resampler to use fixed-point arithmetic for speed on"
This reverts commit 2411daa2e7.
2012-02-01 14:45:31 -06:00
Brandon Wright
b66f00d6f4 Change type of temporary vars to properly clip. Fixes SMT problem. 2012-02-01 09:33:04 -06:00
Brandon Wright
2411daa2e7 Change hermite resampler to use fixed-point arithmetic for speed on
slower FPU systems.
2012-01-30 15:59:19 -06:00
Brandon Wright
f6c9ea8de3 Don't call hermite twice per sample for clamping. Adjust so compiler
auto-SIMDs.
2012-01-30 13:29:01 -06:00
Brandon Wright
05bc106f55 Merge branch 'byuuapu' of github.com:snes9xgit/snes9x into byuuapu 2012-01-26 13:47:21 -06:00
Brandon Wright
804d419b39 Inline some functions to avoid vtable lookups. 2012-01-26 13:42:27 -06:00
OV2
a66f10d9e4 Convert old savestates for new smp 2012-01-20 04:24:36 +01:00
Brandon Wright
2337ab3ed0 Optimize hermite resampler slightly. The vtable lookup on read probably still hurts fine-granularity sound systems like OSS. 2011-12-14 02:47:44 -06:00
Brandon Wright
13c55b9260 Allow switching between 3 SMP cores at compile-time. 2011-10-18 13:10:06 -05:00
Brandon Wright
70159fd939 Pair opcode read with first instruction cycle. Remove opcode_cycle switching from unneeded cases. 2011-09-19 15:15:19 -05:00
Brandon Wright
b97e56d64d Group some MOV opcode cycles together. 2011-09-14 17:12:03 -05:00
Brandon Wright
6b9d6caf54 Remove extra case bracker from 2-cycle MOV opcodes. 2011-09-14 17:02:26 -05:00
Brandon Wright
d6e2f1c8e6 More pseudo-cycle modifications. 2011-09-14 16:20:14 -05:00
Brandon Wright
a50f6989ef Finish converting opcycle_misc/opcycle_rmw to pseudo-cycle. 2011-09-14 15:45:18 -05:00
Brandon Wright
a19395ee3c Start converting some opcodes to cycle-based. 2011-09-14 12:54:51 -05:00
Brandon Wright
4668ae5850 Fix save state error. 2011-09-07 11:46:52 -05:00
Brandon Wright
4fdc7af7da Set the output buffer after loading state so the first set of samples
isn't excluded.
2011-07-06 09:20:31 -05:00
Brandon Wright
baa4de3713 Save a few more mmapped registers to SPC files. Fix key-on trigger. 2011-07-05 14:05:36 -05:00
Brandon Wright
2b5a54b401 Inline ticks. This should fix speed issues. 2011-07-05 06:23:24 -05:00
Brandon Wright
63b0a6d45e Add DSP clock remainder to save state. 2011-07-04 17:33:09 -05:00
Brandon Wright
e3788c39e4 Zero clock at appropriate times. 2011-06-27 16:28:45 -05:00
Brandon Wright
91e69af029 Loosen SMP<->DSP synchronization. 2011-06-27 15:41:17 -05:00