Commit Graph

37 Commits

Author SHA1 Message Date
transistor fet 7dac32d844
Added github actions for PRs (#3)
* Added github actions for PRs

* Added some rustfmt::skip attributes

* Applied formatting

* Added rustfmt component in action

* Configured to use rustfmt version 2 which fixes some comment formatting

* Removed ready_for_review condition for github actions

Since it has the synchronize condition, it will update after each
commit, whether in draft or not, so I think this should be alright
2024-03-17 11:03:52 -07:00
transistor d0037c8125 Fixed tests and clippy warnings 2024-03-16 13:15:34 -07:00
transistor 55efc4f406 Split some parts of moa-core into libraries/ 2024-03-01 21:17:09 -08:00
transistor a161dcda8a Renamed modules to use kebab case 2024-02-24 19:26:28 -08:00
transistor 671517aab7 Modified to use crates.io version of femtos 2024-02-24 19:16:46 -08:00
transistor 9ff431ebc6 Split clocks into `femtos` crate 2024-02-24 13:02:09 -08:00
transistor e3861f33b5 Fixed tests and clippy warnings 2023-06-10 17:39:20 -07:00
transistor 3db52cbef6 Changed the Addressable trait's len() to size()
This is to avoid the need for the clippy override
2023-06-07 19:56:00 -07:00
transistor 8c1a89a1fe Refactored memory access a bit to try to isolate it 2023-05-21 23:14:26 -07:00
transistor 5e228c377e Fixed tests after ClockTime and Frequency changes
And also removed HostData
2023-05-07 20:42:55 -07:00
transistor 6389fa0482 Connected the web ui controller inputs to sim 2023-05-07 14:57:45 -07:00
transistor 527f65c69b Refactored audio to use ClockedQueue
It now actually checks the clock and tries to mix the audio in sync
relative to the clock, but the cpal output doesn't yet try to sync
to the StreamInstant time.  Sound seems a lot better on chrome in
wasm, but and kind of better on firefox despite frame skipping not
being supported yet, but it's way slower for some reason (12fps)
2023-05-07 10:03:25 -07:00
transistor 112bd8219b Replaced controller/key/mouse updaters with event queues 2023-05-06 10:04:44 -07:00
transistor 3471eb4e8c Removed WindowUpdater and BlitableSurface 2023-05-03 22:42:24 -07:00
transistor 074d29c023 Modified ym2612 to use 16 bit signed number a bit sooner 2023-04-30 16:48:40 -07:00
transistor 71cd47466b Getting closer on the ym2612 implementation
It now sort of sounds like the main instrument, but the drums and bass
aren't there, and I'm not sure why.  I'm pretty sure the envelope and
phase generators are working, and there is feedback although it might
not be correct.  There's no LFO but that isn't used by Sonic 1 from
the register writes at least.
2023-04-29 22:10:34 -07:00
transistor a6e236a762 Added detune to ym2612, and channel enable, even though it's still only mono 2023-04-29 12:24:21 -07:00
transistor b243aa9910 Added a not-yet-properly-working version of the phase generator 2023-04-28 20:22:33 -07:00
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 9be996d2a1 More clippy fixes after updating rustc 2023-03-05 20:34:30 -08: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