Commit Graph

18 Commits

Author SHA1 Message Date
transistor
03561f1427 Fixed a bug in the frequency setting code for ym2612
It was previously only updating the frequency if the A0 registers
were written last, but now it works the way the rate code does, using
the cached register values to set the frequency whenever a register
is written to.  It also stores the fnumber and block in the operator
which I guess would be needed eventually if I want to save and restore
state.
2023-04-24 23:04:11 -07:00
transistor
dcc3c97dd6 Additional ym2612 improvements 2023-04-24 21:29:42 -07:00
transistor
31faf70d97 Fixed many bugs in ym2612, and switched to square wave
- The envelope generator wasn't working as it should have, minor issues
  with the limits and whether to use 10-bit or 12-bit values (more to come)
- fixed issues with sustain level where it was always set to 0
- fixed release rate and levels to make them 5-bit and 10-bit numbers
  respectively, so they match the others
- switched from SineWave to SquareWave and this alone made it go from
  terrible and muddy to not that far off.  I probably need to completely
  change the output

- also included an attempt at removing HostData, still needed for an
  interrupt that is triggered by user input
2023-04-24 20:47:52 -07:00
transistor
69c94fa3af Removed cpu timer and moved audio wave generators to libraries 2023-04-23 19:52:19 -07:00
transistor
86eb73f78a Added clock argument to addressable operations 2023-04-23 18:49:40 -07:00
transistor
cd5336bc23 Minor fixes to clock code 2023-04-23 16:17:07 -07:00
transistor
07a675fab5 Added new clock types similar to Duration 2023-04-23 15:46:47 -07:00
transistor
1447ca1048 More fixes for the ym2612, even though it's still no were near right 2023-04-23 12:22:20 -07:00
transistor
5740550c95 Non-working implementation of the ym2612 envelope
It does something, but doesn't work as it should.  It could be a few
things including the on/off signal being too slow due to how time
works in the sample generation, but I wanted to at least commit what
I have.  It seems to work roughly right according to the forum post
that describes the chip's operation in detail, but there could still
be some glaring bugs
2023-04-23 10:38:33 -07:00
transistor
10ef61784a Added ym2612 total level and start of envelope implementation 2023-04-09 13:11:45 -07:00
transistor
7bdd63bc76 Fixed all clippy warnings 2023-03-05 20:19:49 -08:00
transistor
0b27ac04e7 Minor fixes to audio 2022-10-11 10:28:59 -07:00
transistor
925a4e0750 Added log crate 2022-10-09 09:40:20 -07:00
transistor
43f655cdb4 Removed averaging of samples in ym2612 operators 2022-10-08 21:33:48 -07:00
transistor
d58bae77ea Fixed the biasing of DAC data in ym2612
It was using the DAC value as a positive offset, which makes a slight
click at the start and end of the SEGA voice at the start of a game.
 now subtracts half the value and amplifies it a bit so that it
crosses the 0 value
2022-10-08 16:21:41 -07:00
transistor
e4cd3dcd63 Sort of working audio using queues 2022-10-08 13:26:17 -07:00
transistor
a9d51fb919 Added DAC to ym2612 and changed mixing method 2022-10-02 10:29:34 -07:00
transistor
083f3607ba Major reorganization into crates
I wanted to make this a bit more modular, so it's easier in theory to
write external crates that can reuse bits, and selectively compile in
bits, such as adding new systems or new cpu implementations
2022-09-24 23:14:03 -07:00