Commit Graph

26 Commits

Author SHA1 Message Date
transistor
8b30750924 Changed package names to not conflict with binary names 2023-04-30 21:32:33 -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
941c793523 Added pixel encoding, requested by frontend
The hope was that this would reduce the amount of copying and bit
shifting required by the frontend to get the data on screen, but
it doesn't seem to offer much advantage, surprisingly.  I'll leave
it in though.  There are a few other minor tweaks included here to
try to improve the performance a bit
2023-03-25 10:51:46 -07:00
transistor
e6614f3e15 Refactored to allow dummy audio for console frontend 2023-03-14 20:05:29 -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
ea2fc95905 Cleanup 2022-10-13 20:22:29 -07:00
transistor
cd89a4c57d Minor tweaks to the update loop to keep it more realtime 2022-10-11 22:36:49 -07:00
transistor
d26e80ffaa Refactored pixels web frontend to separate sim run
It will now run the sim on a separate loop powered by setTimeout
instead of trying to do it inline with the frame updating
2022-10-11 14:40:12 -07: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
258fd684e7 Cleanup 2022-10-08 21:32:59 -07:00
transistor
0876d85626 Fixed giltching from audio frame assembly from queue
It wasn't copying the frame data from the sources to the output frame
correctly, and there was a small period of zeros at the start of the
frame.

I also converted to using a vec of tuples for the two channels to
make it easier to reason about, since some of the issues were related
to the differences sizes calculated from the clock based on the sample
rate
2022-10-08 16:17:17 -07:00
transistor
e4cd3dcd63 Sort of working audio using queues 2022-10-08 13:26:17 -07:00
transistor
9ee9d00ca6 Added work-in-progress on pixels frontend 2022-10-02 21:20:44 -07:00
transistor
a9b8633531 Added mouse support, but it's not used yet 2022-10-02 20:39:02 -07:00
transistor
4cb423d85a Fixed minifb frame updater to allow slower framerates
If the sim is running slower than 60Hz, it was using the frame limiter
to not apply because no frame was drawn, and so it would end up running
at full speed.  Minifb can save the last frame without cloning it, and
redraw the same frame if no new frame is ready, which allows the limiter
to still delay the next frame, so slower speeds work.  This was also
preventing things that didn't update the screen from allowing inputs
including escape to have any effect
2022-10-02 13:07:15 -07:00
transistor
a9d51fb919 Added DAC to ym2612 and changed mixing method 2022-10-02 10:29:34 -07:00
transistor
7c279613cc Moved AddressRepeater to core, and renamed AddressAdapter
AddressRepeater now takes the range it should repeat over, which only
really affects its reported size.

AddressAdapter is now AddressRightShifter, which is literally the operation
it performs, where the input is still the bits to shift the address right by
2022-10-01 21:01:56 -07:00
transistor
2d6044084d Modified how frames are updated
It turns out to not be too much of a performance issue to allocate
a new frame each time one is produced, so to reduce lock contention
I added a queue where frames are added to and taken from without
locking the frame for the whole update.  I'm hoping this will give
more flexibility to frontend implementations, which can simply
skip or repeat frames if needed.
2022-10-01 12:12:25 -07:00
transistor
5278c301ef Added .smd file decoding 2022-09-30 11:24:11 -07:00
transistor
82644db3fc Added dummy audio device to disable audio while still simulating the devices 2022-09-29 19:55:12 -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