Commit graph

380 commits

Author SHA1 Message Date
Matthew Berry
d864b27e35 turn off slice bounds checking in release mode
This change removes bounds checking for Slices, which represents most
indexable storage in the emulator. Removing these checks makes the
emulator less safe, without a doubt. However, it amounts a roughly 5%
improvement in the games tested. Most of the checks today occur in
fixed-length arrays where the index cannot be out of bounds, so I'm
chosing to make this tradeoff.
2022-10-30 13:56:11 -07:00
Matthew Berry
e0ef57d9e6 prefer Slice to Array in most cases
This change updates most uses of Array to Slice in order to avoid an
extra object on the heap and an extra reference to follow when indexing
into these objects. This amounts to a roughly 5% performance improvement
in the games tested.

This change also updates the GBC palette writing code to not allocate
new arrays when new palettes are written.
2022-10-30 13:47:22 -07:00
Matthew Berry
1523742e12 tighten address type restrictions from int to uint32 2022-10-30 11:30:36 -07:00
Matthew Berry
afcd4b667e various minor changes suggested by ameba 2022-10-28 16:59:46 -07:00
Matthew Berry
eafe5455f6 remove unused variables 2022-10-28 16:46:39 -07:00
Matthew Berry
30f6597676 patch up additional registers that don't read open bus
this makes all mgba suite io tests pass
2022-10-27 09:10:37 -07:00
Matthew Berry
2fe794edba add hints to bios selection 2022-10-22 12:53:02 -07:00
Matthew Berry
e37ca13dd5 update bios.bin to the version that doesn't corrupt the audio 2022-10-22 12:14:03 -07:00
Matthew Berry
83bb9d29e3 the start to a proper config editor 2022-10-06 23:51:18 -07:00
Matthew Berry
5e9720f9b0 remove erroneous conditional block 2022-10-04 22:35:07 -07:00
Matthew Berry
5383a1b57b minor file dialog refactor 2022-10-01 18:37:36 -07:00
Matthew Berry
e79d8528a9 properly ignore libcimgui.dylib 2022-09-28 17:37:31 -07:00
Matthew Berry
b052a6d130 move to imgui 1.88 and utilize new crystal-imgui semantics 2022-09-28 17:37:11 -07:00
Matthew Berry
4551104192 hide cursor when ui times out 2022-09-25 01:02:32 -07:00
Matthew Berry
8704417243 clear bus cycle counter before running scheduler 2022-09-25 00:06:13 -07:00
Matthew Berry
432bfb962c move register methods below fields 2022-09-11 17:42:18 -07:00
Matthew Berry
242cedcb63 bump required compiler version to 1.5.1
This compiler version contains a patch allowing the ImGui bindings to work on macOS
2022-09-09 08:41:38 -07:00
Matthew Berry
e5cbf18eaf remove dead code 2022-09-02 17:59:03 -07:00
Matthew Berry
cd97745c09 stop printing for lack of stop mode 2022-09-02 17:56:02 -07:00
Matthew Berry
7543c401a8 remove console debugger 2022-09-02 17:32:23 -07:00
Matthew Berry
be65ef2703 super minor flash code change 2022-08-31 18:27:39 -07:00
Matthew Berry
c2af1e50ca flip order all bitfield registers for recent update
i updated the bitfield library to order fields low to high, which more closely resembles other languages as well as gba documentation
2022-08-31 18:27:35 -07:00
Matthew Berry
7001db8c90 update mmio from chained conditionals to case statement 2022-08-21 15:47:11 -07:00
Matthew Berry
e36b633522 support open bus for io registers 2022-08-19 21:50:12 -07:00
Matthew Berry
004ff2c197 bump BitField library to 0.1.5 and make DMAXCNT_H reads respect
read/write-only bits
2022-08-17 17:11:18 -07:00
Matthew Berry
73712b10ba make io register byte accesses respect non-writable bits (FIX SUPERSTAR SAGA)
The fact that this fixes Supestar Saga is both happy and sad for me. I spent so
much time trying to fix that game before, but I didn't even mean to fix it this
time. Either way, it works now. Finally.
2022-08-17 17:06:57 -07:00
Matthew Berry
7c45654b16 update dma unmapped reads 2022-08-16 14:18:42 -07:00
Matthew Berry
4505072049 update default soundbias value 2022-08-16 14:17:56 -07:00
Matthew Berry
01cb35398c removed to_s reg implementations since they exist by default now 2022-08-16 14:17:30 -07:00
Matthew Berry
a353dce7f3 rewrite blending routine to match all tonc bld_demo cases
minor perf regression in emerald title screen (~205fps -> ~200fps)
2022-08-11 22:24:36 -07:00
Matthew Berry
4cfd5b6fa7 add event types where they were missing 2022-08-10 10:07:07 -07:00
Matthew Berry
2024c9f1bf bump to latest bitfields version 2022-08-05 17:27:08 -07:00
Matthew Berry
b663bf2f6c bump imgui to v1.87 2022-07-31 10:43:11 -07:00
Matthew Berry
6ae942943d bump imgui backends shard to version that supports m1 macs 2022-07-18 20:00:06 -07:00
Matthew Berry
94ba13b024 ci: add macos 12, add ubuntu 22.04/18.04
Currently macos-latest maps to macos-11 and ubuntu-latest maps to
ubuntu-20.04
2022-07-18 17:55:26 -07:00
Matthew Berry
6b3f2e8415 minor sprite render refactoring for readability 2022-07-18 17:48:48 -07:00
Matthew Berry
6604a4800e GBA RTC implemented :)
Works in RTC test roms, Pokemon Emerald, and Sennen Kazoku
2022-07-16 17:58:02 -07:00
Matthew Berry
5f6a3310a1 rename methods and paths of audio classes to increase gb/gba similarity
maybe this will help merge them someday
2022-07-14 19:48:05 -07:00
Matthew Berry
dfdd319ca9 rename value to other in SoundChannel#=== 2022-07-13 19:05:59 -07:00
Matthew Berry
1a40e281ed try adding blocks around the imgui api to make it a little easier to work with
hopefully this means I won't forget to close groups or pop styles anymore
2022-06-26 14:28:22 -07:00
Matthew Berry
61b21b4233 temporarily patch rcnt to return 0x8000 so that sonic advance boots 2022-06-24 23:06:25 -07:00
Matthew Berry
ed1a8214c6 use Slice#unsafe_slice_of for reading sprites from oam 2022-06-15 20:41:57 -07:00
Matthew Berry
b06c4f87ed remove mmio wrapping
not sure why I added this to begin with since it doesn't happen on hardware
2022-04-22 18:53:04 -07:00
Matthew Berry
9ce8710aca remove debugging __FILE__ arg to switch_mode 2022-04-03 11:46:47 -07:00
Matthew Berry
515d12aaa2 prevent scheduler window from crashing the emulator when minimized 2022-03-26 14:19:10 -07:00
Matthew Berry
0f21ea6aea adjust address limit for vram u8 writes based on display mode (fix OpenLara) 2022-03-26 13:58:18 -07:00
Matthew Berry
020aafd156 reset vblank flag at line 227 2022-03-14 17:25:45 -07:00
Matthew Berry
a2af5771d7 Bump imgui-backends version to support build on fedora 2022-03-06 17:15:29 -08:00
Matthew Berry
bbfdd90fb8 rough pass at access timing to improve performance 2022-03-04 12:26:29 -08:00
Matthew Berry
94aa84d53b Force scanline in mooneye and non-fifo acid tests 2022-01-11 21:48:01 -08:00