Commit graph

24 commits

Author SHA1 Message Date
Simon Eriksson fe81d08ca2 Remove unused global bus pointer variables 2020-05-15 21:28:24 +02:00
queueRAM d7339013a6 Don't make any OpenAL calls if -noaudio option is used.
Also returns error if some OpenAL initialization fails
during ai_context_create().

Fixes #68
2017-05-17 11:54:07 -05:00
Tyler J. Stachecki 82c2424c44 Fix macOS builds. 2017-03-18 22:11:42 -04:00
Tyler J. Stachecki 304d711414 ai: Fix regression in previous commit. 2016-07-10 15:39:42 -04:00
Tyler J. Stachecki 5f5a0005a6 ai: Revamp the audio system.
This is sloppy patchwork, but it's better sloppy patchwork
than the previous sloppy patchwork! Will need to resample
the audio and work with flucutations in subframe timing to
solve the rest of the popping.
2016-07-10 14:23:20 -04:00
Tyler J. Stachecki ec475c6874 openal: Kill audio if ai_init fails. 2016-06-26 17:20:32 -04:00
Mike Ryan 73f4420a4c fix all build warnings, does not affect functionality 2016-06-16 20:40:51 -07:00
Tyler J. Stachecki d163ff83a9 More audio optimizations from izy. 2016-02-27 18:24:19 -05:00
Tyler J. Stachecki 6a701096c1 Implement izy's SSE audio processing idea.
izy noticed that the audio buffers are usually >= 64 bytes
in size and aligned to 16 bytes. This makes them a very good
candidate for SSE (instead of swapping a word at a time).
2016-02-27 18:06:18 -05:00
Tyler J. Stachecki e2e72821e2 Try to reduce component cycle overheads.
Oftentimes, many of our countrollers are just doing a
simple countdown and don't perform any real work for the
cycle. Pull those parts out into headers so that the
compiler can 'see' that and optimize accordingly.
2016-01-30 14:58:31 -05:00
Tyler J. Stachecki b4a68338e1 ai: Fix some bugs and optimize just a little. 2016-01-27 01:44:35 -05:00
Tyler J. Stachecki 15b4998b85 ai: Fire interrupts at proper time with -noaudio. 2016-01-27 01:00:12 -05:00
Tyler J. Stachecki 357fb92862 ai: Channels were backwards, swap them.
krom noticed that the channels were swapped. Good ear.

  Data comes off the RSP as:
  LH LL RH RL

  bswap 32 results in:
  RL RH LL LH

  Need to flip again to get:
  LL LH RL RH
2016-01-26 00:23:10 -05:00
Tyler J. Stachecki 5b2bb550fd OpenAL: Try to dynamically adjust frequency.
Most carts only seem to use one frequency. Add a dirty
hack to change the frequency on the fly so things sound
less horrendous.
2016-01-25 03:37:01 -05:00
Tyler J. Stachecki cdd3c44aea Add a subsystem for detecting carts. 2016-01-24 19:01:51 -05:00
Tyler J. Stachecki f255fc94c3 Restore -nointerface functionality.
-nointerface was horribly broken when the device model was
refactored a few months ago. This commit unbreaks it and
restores functionality.
2016-01-24 16:13:43 -05:00
Derek "Turtle" Roe 8b89df2fdc See long description
Replaced all references to simulation with emulation
Updated copyright year
Updated .gitignore to reduce chances of random files being uploaded to
the repo
Added .gitattributes to normalize all text files, and to ignore binary
files (which includes the logo and the NEC PDF)
2015-07-01 18:44:21 -05:00
Derek "Turtle" Roe 8868fd4854 Update registers.md 2015-07-01 16:45:48 -05:00
Tyler J. Stachecki 653bd0d5b6 Add (initial) audio support.
"It's a meeee, Mario!"

There's no resampler as of yet, so we just tell OpenAL
that everything is 44.1KHz for the time being. In the
future, a resampler thread will be created and things
won't sound as bad as they do in this commit.
2015-05-23 22:00:20 -04:00
Tyler Stachecki e89f054674 Optimize extremely aggressively.
Tell GCC to optimize cold functions for size and stash them away in
a separate part of the binary. Put the simulate core, meanwhile, on
the hot path. Also, bump optimization to -O3 as we can now "afford"
to do so.
2014-11-05 08:39:47 -05:00
Tyler Stachecki dfb4af315e Hack: Return audio buffer full/busy all the time. 2014-07-26 13:44:16 -04:00
Tyler Stachecki 25a6ae8431 Mask bus writes to requested type, etc. 2014-04-18 13:34:23 -04:00
Tyler Stachecki d114038a2b Add option for debugging MMIO register access. 2014-04-18 12:44:57 -04:00
Tyler Stachecki 4560adf7a7 Populate with interfaces and devices. 2014-04-18 11:24:43 -04:00