Commit Graph

435 Commits

Author SHA1 Message Date
Rekai Nyangadzayi Musuka 352a65b705 chore(apu): update spsc depenency 2021-10-07 15:27:51 -03:00
Rekai Nyangadzayi Musuka 64230973f1 chore: suggest inline for hot code 2021-09-24 16:16:14 -03:00
Rekai Nyangadzayi Musuka dbbf87af52 chore: add a creative-commons boot rom for compat 2021-09-24 16:15:55 -03:00
Rekai Nyangadzayi Musuka 9964b49ce1 fix(ppu): improve accuracy of timer 2021-09-21 12:50:31 -03:00
Rekai Nyangadzayi Musuka 142231d355 chore(ppu): remoe unnecessary brackets 2021-09-21 12:13:55 -03:00
Rekai Nyangadzayi Musuka 227928e8ca Revert "fix(ppu): explicity choose to use sign extension"
This reverts commit 1001b0b124.
2021-09-21 12:09:35 -03:00
Rekai Nyangadzayi Musuka 1001b0b124 fix(ppu): explicity choose to use sign extension 2021-09-21 09:52:12 -03:00
Rekai Nyangadzayi Musuka 71ce3f43e0 chore: satisfy clippy 2021-09-20 04:15:05 -03:00
Rekai Nyangadzayi Musuka ce121864d2 feat: implement cartridge saving
Implemented for MBC1, MBC2, MBC3 and MBC5
2021-09-20 04:13:25 -03:00
Rekai Nyangadzayi Musuka e1fe00ab64 fix: have start and select keybinds match other emulators 2021-09-20 03:26:06 -03:00
Rekai Nyangadzayi Musuka 5882678bc5 chore: inline some functions
continuous-integration/drone/push Build was killed Details
2021-09-20 01:34:41 -03:00
Rekai Nyangadzayi Musuka bcd67cb317 chore: begin refactor of public api 2021-09-20 01:34:21 -03:00
Rekai Nyangadzayi Musuka 4516ca8477 chore: run cargo fix
continuous-integration/drone/push Build is passing Details
2021-09-12 04:56:39 -03:00
Rekai Nyangadzayi Musuka 6087e3b20b chore: remove Cycle struct and begin scheduler design 2021-09-12 04:56:34 -03:00
Rekai Nyangadzayi Musuka 10ac579c40 fix(main): Use LogicalSize and PhysicalSize properly 2021-09-11 22:56:40 -03:00
Rekai Nyangadzayi Musuka 318a6e0386 fix(emu): remove GAMEPAD_ENABLED const flag
continuous-integration/drone/push Build is passing Details
2021-09-09 11:12:50 -03:00
Rekai Nyangadzayi Musuka db012c7f4b fix(main): remove code unrelated to audio sync
continuous-integration/drone/push Build is passing Details
2021-09-07 02:09:02 -03:00
Rekai Nyangadzayi Musuka e42c87aeb7 fix(apu): quiet gameboy APU 2021-09-07 01:52:02 -03:00
Rekai Nyangadzayi Musuka 9113e95fa0 fix(apu): pass blargg apu sweep tests 2021-09-07 01:17:01 -03:00
Rekai Nyangadzayi Musuka 9973dc8714 fix(cartridge): don't read from RAM that doesn't exist
continuous-integration/drone/push Build is passing Details
2021-09-06 23:45:04 -03:00
Rekai Nyangadzayi Musuka e128025208 fix(cartridge): improve accuracy of MBC1 with large file sizes 2021-09-06 23:37:55 -03:00
Rekai Nyangadzayi Musuka 44ac0c8ebd feat(cartridge): implement MBC2
continuous-integration/drone/push Build is passing Details
2021-09-06 18:13:34 -03:00
Rekai Nyangadzayi Musuka 01064bab69 chore(cpu): comment out blargg-specific code
continuous-integration/drone/push Build is passing Details
2021-08-22 01:49:01 -05:00
Rekai Nyangadzayi Musuka 634bc2d2c0 fix(apu): remove redundant code 2021-08-22 01:48:34 -05:00
Rekai Nyangadzayi Musuka d794a94b68 fix(timer): increase accuracy of timer
continuous-integration/drone/push Build is passing Details
2021-08-20 00:17:28 -05:00
Rekai Nyangadzayi Musuka b87e31d3f4 fix(cartridge): remove unnecessary dbg statement 2021-08-20 00:17:05 -05:00
Rekai Nyangadzayi Musuka 3c2456611e fix(cartridge): trim whitespace from cartridge title
continuous-integration/drone/push Build is passing Details
2021-08-19 21:56:07 -05:00
Rekai Nyangadzayi Musuka b829f05a34 chore(cartridge): clean-up code
continuous-integration/drone/push Build is passing Details
2021-08-19 20:39:04 -05:00
Rekai Nyangadzayi Musuka afd2d16371 chore(cartridge): re-rename RamInfo and RomRinfo 2021-08-19 20:05:48 -05:00
Rekai Nyangadzayi Musuka c6fbb79189 chore(cartridge): reognanize code 2021-08-19 16:10:39 -05:00
Rekai Nyangadzayi Musuka 8b78b2943e fix(cartridge): specify intentional overflow in MBC5
continuous-integration/drone/push Build is passing Details
2021-08-19 16:09:58 -05:00
Rekai Nyangadzayi Musuka 0af95a1dd3 feat(cartridge): implement MBC5 and cleanup code
continuous-integration/drone/push Build is passing Details
2021-08-18 22:40:15 -05:00
Rekai Nyangadzayi Musuka 9fa40f8584 fix(main): do not drop output stream 2021-08-18 22:39:55 -05:00
Rekai Nyangadzayi Musuka b10bc7b4fd chore(main): add flag that enables audio 2021-08-18 16:34:26 -05:00
Rekai Nyangadzayi Musuka 4658a0d106 fix(apu): ch4 set_len should set timer to 64 - len
continuous-integration/drone/push Build is passing Details
2021-08-18 02:32:48 -05:00
Rekai Nyangadzayi Musuka f92b9d61ef chore(apu_gen): cosmetic changes to sample generation
continuous-integration/drone/push Build is passing Details
2021-08-18 01:43:38 -05:00
Rekai Nyangadzayi Musuka 360a9a7b65 chore(apu): improve code organization
continuous-integration/drone/push Build is passing Details
2021-08-18 00:04:27 -05:00
Rekai Nyangadzayi Musuka 5d64e539a7 fix(apu): resolve off-by-one error 2021-08-17 23:14:56 -05:00
Rekai Nyangadzayi Musuka 22f96a10e7 fix(apu): increase accuracy of apu emulation
Reintroduce the Frame Sequencer and it's state enum (needed so that we
can reset the FS on NR52 enable)
2021-08-17 22:18:40 -05:00
Rekai Nyangadzayi Musuka 8fea8eb1ff fix(apu): better emulate behaviour of apu channel DACs 2021-08-17 21:26:22 -05:00
Rekai Nyangadzayi Musuka 9b2c91445a chore: enable audio by default
even if it sounds really bad right now
2021-08-17 21:25:55 -05:00
Rekai Nyangadzayi Musuka b9046bceba fix(apu): disable channel if DAC is disabled 2021-08-17 20:42:41 -05:00
Rekai Nyangadzayi Musuka aa22e93049 chore: clean up TODO messages
continuous-integration/drone/push Build is passing Details
2021-08-15 23:31:27 -05:00
Rekai Nyangadzayi Musuka 6215eccb2f chore(cpu): merge halted and state properties 2021-08-15 23:26:01 -05:00
Rekai Nyangadzayi Musuka a77d0a0f62 fix(apu): clock frame sequencer at correct Hz
continuous-integration/drone/push Build is passing Details
2021-08-15 02:46:20 -05:00
Rekai Nyangadzayi Musuka c2f2e2194b chore(ppu): improve accuracy of pixel fifo 2021-08-14 23:47:16 -05:00
Rekai Nyangadzayi Musuka d68257bb29 fix(ppu): improve accuracy of SCX discard 2021-08-14 22:03:01 -05:00
Rekai Nyangadzayi Musuka e27d6dc25b chore(ppu): rename discriminants of fetcher state 2021-08-14 22:02:41 -05:00
Rekai Nyangadzayi Musuka 1acb5de19d fix(main): GB frametime should be 59.73 Hz 2021-08-14 17:59:59 -05:00
Rekai Nyangadzayi Musuka 1b78b248a3 chore: minor edits to documentation 2021-08-14 17:51:09 -05:00
Rekai Nyangadzayi Musuka 5d6df46a2d fix(cpu): reimplement instruction handling
continuous-integration/drone/push Build is passing Details
2021-08-14 17:23:45 -05:00
Rekai Nyangadzayi Musuka 7e65d82fef chore(cpu): document fetch, decode, execute 2021-08-14 16:42:38 -05:00
Rekai Nyangadzayi Musuka 8c9567b610 chore(cpu): rename discriminants of ImeState enum 2021-08-14 16:42:15 -05:00
Rekai Nyangadzayi Musuka 53dfaf0de2 fix(apu): increase size of the audio buffer
continuous-integration/drone/push Build is passing Details
2021-08-14 15:29:35 -05:00
Rekai Nyangadzayi Musuka 16c2dd81fc fix(bus): remove dead code 2021-08-14 15:02:25 -05:00
Rekai Nyangadzayi Musuka 79be38a1e6 fix(main): rename constant SCALE to WINDOW_SCALE
continuous-integration/drone/push Build is passing Details
2021-08-14 01:02:18 -05:00
Rekai Nyangadzayi Musuka 8625bec059 feat: clock bus on instruction read-write
continuous-integration/drone/push Build is failing Details
Commit also includes general work towards passing mem-timings.

Note: while cpu_instrs.gb passes, instr_timing.gb and mem_timing.gb both
are stuck in infinite loops (Currently, it seems like a timing issue).
This is a major regression that hopefully shouldn't last for too long.
2021-08-14 00:10:51 -05:00
Rekai Nyangadzayi Musuka 0637b771e3 chore(instr): implement copy and clone on instruction enum
continuous-integration/drone/push Build is failing Details
2021-08-05 20:04:39 -05:00
Rekai Nyangadzayi Musuka 0107fa04c9 chore(apu): remove implemtation of register that always returns 0xFF 2021-08-05 16:39:04 -05:00
Rekai Nyangadzayi Musuka 6265c8af04 chore(joypad): poll input every frame instead of every instruction
continuous-integration/drone/push Build is failing Details
2021-08-03 20:36:55 -05:00
Rekai Nyangadzayi Musuka 5482a8e75f fix(apu): fix out of bounds error with channel 3 wave ram 2021-08-03 20:35:22 -05:00
Rekai Nyangadzayi Musuka 002dae6826 fix(joypad): improve handling of keyboard input 2021-08-03 20:23:43 -05:00
Rekai Nyangadzayi Musuka c863dc835c fix(apu): fix index out of bounds error on channel 3 write 2021-08-03 20:23:08 -05:00
Rekai Nyangadzayi Musuka d4407cf849 fix(apu): implement NR50 volume controls 2021-08-03 19:33:27 -05:00
Rekai Nyangadzayi Musuka de0d147685 fix(cartridge): put a bit more detail into the MBC3 RTC stub
continuous-integration/drone/push Build is failing Details
2021-08-03 15:19:08 -05:00
Rekai Nyangadzayi Musuka dd8339e8de chore(cartridge): consistently capitalize MBC 2021-08-03 15:06:06 -05:00
Rekai Nyangadzayi Musuka 05d6475015 fix(cartridge): Use default title instead of empty string 2021-08-03 14:53:30 -05:00
Rekai Nyangadzayi Musuka 32b597a328 fix(apu): incremental improvements to APU accuracy
continuous-integration/drone/push Build is failing Details
2021-08-03 14:10:08 -05:00
Rekai Nyangadzayi Musuka 33be2e0e83 fix(main): tie emulation to 60Hz on host machine 2021-08-03 14:09:16 -05:00
Rekai Nyangadzayi Musuka 832e1b7633 fix(apu): implement WAVE RAM blocking 2021-08-02 22:38:00 -05:00
Rekai Nyangadzayi Musuka a549b9feef chore(bus): suppress warning 2021-08-02 21:55:07 -05:00
Rekai Nyangadzayi Musuka 4d6fc95130 chore: remove premature optimizations 2021-08-02 21:52:12 -05:00
Rekai Nyangadzayi Musuka 7112cd15e3 chore(cpu): refactor SM83 implementation
continuous-integration/drone/push Build is passing Details
Instruction::decode no longer requires mutable access to the CPU
2021-07-31 20:29:13 -05:00
Rekai Nyangadzayi Musuka 2af673d7c5 chore: remove various warnings
continuous-integration/drone/push Build is passing Details
2021-07-28 16:25:29 -05:00
Rekai Nyangadzayi Musuka e43cac8041 fix(apu): don't spin if ringbuf is full 2021-07-28 16:23:31 -05:00
Rekai Nyangadzayi Musuka 8724da824e chore: inline some methods 2021-07-28 14:53:52 -05:00
Rekai Nyangadzayi Musuka 903cfacad3 fix(apu): replace mpsc with spsc ringbuffer
continuous-integration/drone/push Build is passing Details
2021-07-28 02:01:04 -05:00
Rekai Nyangadzayi Musuka 9d0e099a97 chore: remove unnecessary derivations from structs 2021-07-28 00:09:07 -05:00
Rekai Nyangadzayi Musuka 1a4546f4a4 chore: remove egui from project
I want to re-implement this later.
2021-07-27 22:38:21 -05:00
Rekai Nyangadzayi Musuka 31abd6dc5c chore(apu): change default sample rate
continuous-integration/drone/push Build is passing Details
2021-07-25 18:29:19 -05:00
Rekai Nyangadzayi Musuka c7e3cb5b35 fix(apu): abstract Apu read/write using BusIO trait
continuous-integration/drone/push Build is passing Details
2021-07-25 18:19:27 -05:00
Rekai Nyangadzayi Musuka e4d77d66ba fix(apu): abstract wave RAM behind BusIO trait 2021-07-25 18:03:11 -05:00
Rekai Nyangadzayi Musuka 9e36e86c14 fix(apu): increase accuracy of apu
continuous-integration/drone/push Build is passing Details
Due to this, not all instruments work. This is a regression and will be
fixed in a later commit when presumably the implementation of the APU is
a bit more correct
2021-07-25 17:42:09 -05:00
Rekai Nyangadzayi Musuka 6f6c308d84 fix(apu): implement write guards for Ch1 & Ch1 when disabled 2021-07-18 22:10:32 -05:00
Rekai Nyangadzayi Musuka f429d72882 chore(bus): remove panics in IO bus read/write failures with stderr msgs 2021-07-18 21:52:22 -05:00
Rekai Nyangadzayi Musuka 4fda7587ce chore(main): disable vsync 2021-07-18 21:33:52 -05:00
Rekai Nyangadzayi Musuka 3fb182b9cb fix(apu): have send_samples block main thraed
continuous-integration/drone/push Build is passing Details
2021-07-18 21:18:04 -05:00
Rekai Nyangadzayi Musuka c1430594cf chore(apu): change access modifiers of some methods 2021-07-18 20:58:02 -05:00
Rekai Nyangadzayi Musuka 8e2ef58b81 chore(main): remove rodio sink 2021-07-18 20:42:36 -05:00
Rekai Nyangadzayi Musuka b4b84d0cc5 fix(main): Allow emu to work on windows and linux
continuous-integration/drone/push Build is passing Details
2021-07-16 21:07:00 -05:00
Rekai Nyangadzayi Musuka 1d8fb8d32a fix(ppu): delay ppu by one cycle on scx fifo discard
continuous-integration/drone/push Build is passing Details
2021-07-16 21:01:52 -05:00
Rekai Nyangadzayi Musuka cc0cb0dd8a chore(apu): satisfy clippy
continuous-integration/drone/push Build is passing Details
2021-07-15 22:58:23 -05:00
Rekai Nyangadzayi Musuka fd9a5b51ba chore(ppu): reimplement background/window/sprite priority 2021-07-15 22:29:51 -05:00
Rekai Nyangadzayi Musuka a1eadc0bc4 chore(apu): rename sound/snd to apu
continuous-integration/drone/push Build is passing Details
2021-07-14 23:45:01 -05:00
Rekai Nyangadzayi Musuka ea53f97312 chore(snd): refactor APU implementation 2021-07-14 23:34:00 -05:00
Rekai Nyangadzayi Musuka 08bd33b4d4 fix(snd): replace Audio Sync solution with a faster one
continuous-integration/drone/push Build is passing Details
2021-07-14 22:35:37 -05:00
Rekai Nyangadzayi Musuka 2b5926e533 chore(snd): Make AudioReceiver and AudioSender structs generic 2021-07-14 22:34:57 -05:00
Rekai Nyangadzayi Musuka 1e27875dc3 fix(cpu): fix timing issue involving when the bus is clocked 2021-07-14 21:15:52 -05:00
Rekai Nyangadzayi Musuka 1566d60fd4 fix(ppu): add fifo delay when BG fifo is not empty 2021-07-14 21:11:31 -05:00
Rekai Nyangadzayi Musuka ab99e24f64 chore: modify commented out debug statement 2021-07-14 21:10:44 -05:00