Matthew Berry
c584c29fd6
support halting + fast-forwarding the scheduler on halt
...
this improves performance dramatically in games that utilize halting, including pokemon ruby and golden sun. in both games, framerate was doubled or trippled in many cases
2021-04-29 23:50:48 -07:00
Matthew Berry
b8c64fa69d
pull out repetitive logic from scanline loops, saving some fps
2021-04-29 23:40:54 -07:00
Matthew Berry
d92d37e875
add vdma
2021-04-22 22:14:54 -07:00
Matthew Berry
c57bb1e4bf
abort on swap halfword transfers
2021-04-01 23:18:58 -07:00
Matthew Berry
6f7f10d292
add optional interframe blending with m key
2021-03-31 00:26:10 -07:00
Matthew Berry
09481ae54d
clean up affine screen entry logic
2021-03-12 00:34:05 -08:00
Matthew Berry
a2ccafefa2
emulate internal ref point regs (fix mario kart & tonc m7_ex)
2021-03-10 23:01:42 -08:00
Matthew Berry
f3e049b7d7
don't crash on unmapped apu reads
2021-03-02 00:01:08 -08:00
Matthew Berry
c56a26994e
allow dma that overflows to bios
2021-03-01 22:27:41 -08:00
Matthew Berry
dd2bbc20c1
stop crashing on attempted open bus reads
2021-02-28 17:46:30 -08:00
Matthew Berry
893ab68622
ignore serial r/w (make Emerald stop dumping thousands of lines to the console)
2021-02-27 13:02:44 -08:00
Matthew Berry
8c66c9200c
stop printing unmapped ppu writes
2021-02-27 12:45:58 -08:00
Matthew Berry
e753ebe18a
fix bug that doubled size of rom on Po2 sizes
2021-02-26 21:52:00 -08:00
Matthew Berry
a26a170284
sram word and halfword reads
2021-02-26 21:39:49 -08:00
Matthew Berry
625b79fc35
update sprite priority behavior to make golden sun work (not documented in gbatek or tonc)
2021-02-26 20:17:55 -08:00
Matthew Berry
fb3354521c
8-bit writes to video memory
2021-02-26 18:29:21 -08:00
Matthew Berry
b9c360f229
never clear flags in IF directly
2021-02-25 00:59:30 -08:00
Matthew Berry
a5dd6ba394
implement direct writes in bus
2021-02-24 23:18:24 -08:00
Matthew Berry
832f05521f
pad non Po2 roms with 0 to next Po2 (passing gba-suite/unsafe)
2021-02-24 00:02:26 -08:00
Matthew Berry
f4a5564639
moved save mirroring to each save impl
2021-02-23 00:01:08 -08:00
Matthew Berry
7679e985d6
save memory 0x0F mirroring, default sram to 0xFF, less restrictive save type search
2021-02-22 23:24:47 -08:00
Matthew Berry
7444832159
move step_arm ldm/stm logic back to post-instruction, fix golden sun issues
...
This was causing battles and entering the overworld to fail. I saw a
`stmdb r1, {r0, r2, r3, r4, r5, r6, r7, r8, sb, sl, fp, ip}` while r1
was `03000380` and the currently executing instruction was `03000348`.
This means that the store would write over `03000350`, which is the
instruction being read. Because I had incremented r15 _ahead_ of the
instruction, this caused the pipeline to store the wrong values when the
write near r15 was detected. This changes moves the stepping logic back
to _after_ the instruction, and handles the r15 +12 case directly
2021-02-20 21:11:28 -08:00
Matthew Berry
2950d0d0a3
ldm/stm rewrite & always write incrementing, passing gba-suite/nes
2021-02-20 19:49:50 -08:00
Matthew Berry
33979013c3
dma irqs: got rhythm tongoku working
2021-02-20 18:44:55 -08:00
Matthew Berry
3c13802653
get timers working for tonc tmr_demo and krom timer demo
2021-02-20 10:37:14 -08:00
Matthew Berry
f26fe9faf0
make register rotates take explicit register shift enable
2021-02-20 09:41:10 -08:00
Matthew Berry
02b596943e
more precise fps in window title
2021-02-14 00:03:09 -08:00
Matthew Berry
f03c90a13b
fix fake pipeline: actually read words in arm pipeline, read correct regs
2021-02-12 00:42:38 -08:00
Matthew Berry
b4af85523e
removed repetitive logic from thumb add_subtract
2021-02-11 00:01:07 -08:00
Matthew Berry
c986673e68
fill pipeline if necessary (gba-suite nes.gba #1 )
2021-02-10 22:58:41 -08:00
Matthew Berry
eeff849ec0
move to a fake pipeline, 25% perf gain in Emerald and Golden Sun, 400% in wait loops
2021-02-10 22:45:20 -08:00
Matthew Berry
6c575089b1
fix timer off-by-one (stop kirby audio clicking)
2021-02-08 00:07:46 -08:00
Matthew Berry
ed6d42b2e2
fixed golden sun saves (return 64k flash id for 64k chips)
2021-02-07 11:52:28 -08:00
Matthew Berry
01eadfd5a6
properly disable vsync
2021-02-06 01:51:34 -08:00
Matthew Berry
bc35157dca
long overdue readme update
2021-02-04 01:11:51 -08:00
Matthew Berry
08cc652722
brightness effects for sprites, allows official bios to render properly
2021-02-04 00:09:58 -08:00
Matthew Berry
0e30f3558b
fix object window, basic mode 2, mostly accurate rendering of official bios
2021-02-03 20:01:19 -08:00
Matthew Berry
805e860726
sprite blending overrides effects being disabled, fixes emerald cave/fog/underwater
2021-02-03 00:03:35 -08:00
Matthew Berry
26b521a37f
don't render object window objects (fix Emerald logo shine)
2021-02-02 00:35:18 -08:00
Matthew Berry
c2e46e2f68
brightness increase / decrease effects
2021-02-01 00:00:50 -08:00
Matthew Berry
686e53ed73
basic windowing, passing tonc window demo
2021-01-31 22:57:38 -08:00
Matthew Berry
88405ff36c
fix sprite blending for tonc's demo, minor refactoring
2021-01-31 17:49:33 -08:00
Matthew Berry
057913aace
respect dispcnt{display_obj}, don't render disabled sprites, ppu refactoring to support windows
...
- respect @dispcnt.screen_display_obj
- don't render disabled sprites
- render all sprites to a single buffer rather than 4
- required some additional logic to check priority
- adds fields for priority and whether pixel is an obj_window sprite
- calculate where objects with obj_window flag exist on each scanline
2021-01-31 17:22:54 -08:00
Matthew Berry
8e9eac5b6f
removed outdated rendering methods
2021-01-31 15:32:57 -08:00
Matthew Berry
0ba9da018e
fix flags on thumb alu neg
2021-01-31 14:49:36 -08:00
Matthew Berry
b4e30b9164
fixed sprites clipped on left and bottom (broken since introduction of affine sprites)
2021-01-31 00:58:09 -08:00
Matthew Berry
6e71ee30b8
fix multiple accumulate when destination is accumulate reg
2021-01-31 00:16:09 -08:00
Matthew Berry
24a186da3c
properly disable apu channels, allow access to correct regs while disabled
2021-01-30 22:03:27 -08:00
Matthew Berry
190ce42ea6
direct reads of words / halfwords, improves fps ~25%
2021-01-30 17:21:49 -08:00
Matthew Berry
79ed746d6c
proper DMA/PSG balance, use soundbias, remove offset for silence
2021-01-30 00:26:02 -08:00