Restore CPSR from SPSR for ARM TST/TEQ/CMP/CMN with unused Rd=15 when the current mode has an SPSR. Preserve sequential PC and nominal timing; use normal ALU flags in User/System. Keep ordinary result-writing PC return validation unchanged. Reproduced independent jsmolka/gba-tests ARM failure 234 before this fix. Original regressions cover flags, masks, bank restoration, operand forms, conditions, timing, and atomic errors. The public ROM progresses to a separate unsupported load/writeback alias at test 360; no full public-suite pass is claimed.
10 KiB
References
External sources consulted while implementing the emulator. Add new sources here, or in a "References" section of the matching docs/hardware/ file when a link explains one specific behavior.
Hardware references used for the core:
-
GBATEK GBA system control and WAITCNT, including HALTCNT power-mode selection.
-
GBATEK BIOS reset functions, for SoftReset state and restart selection, plus RegisterRamReset flags, RAM bounds, and forced blank.
-
GBATEK BIOS halt functions, for wait contracts, STOP clock gating, allowed wake sources, and the clock-off IF note.
-
GBATEK BIOS rotation/scaling services, for record layouts, angle units, and output strides.
-
VisualBoyAdvance-M BIOS services, reviewed for integer affine rounding, signed matrix intermediates, and SoftReset status handling. Our sine table is generated mathematically.
-
GBATEK BIOS decompression services, including BitUnPack descriptor fields, differential-filter headers, Huffman tree layout, and width constraints.
-
mGBA BIOS service implementation, reviewed for RegisterRamReset register defaults, angle-polynomial coefficients and quadrant conventions, BitUnPack ordering/offsets, and Huffman tree layout and packing.
-
HALTCNT hardware-access tests, for BIOS-only writes and halfword access.
-
mGBA display implementation, used to cross-check hidden-line HBlank IRQs and comparison-write edges.
-
NanoBoyAdvance background implementation, reviewed for internal origins, line-end increments, and affine mosaic behavior.
-
mGBA text-background renderer, reviewed for out-of-range fetch behavior.
-
mGBA sprite preprocessing and row preparation, reviewed for inspection costs and aggregate work limits.
-
mGBA sprite renderer, reviewed for tile alignment and wrapping.
-
NanoBoyAdvance text sampling, reviewed for vertical counter subtraction.
-
NanoBoyAdvance mosaic registers, reviewed for phase-preserving size writes and documented timing uncertainties.
-
Horizontal sprite mosaic hardware findings, for latch transitions and transparent metadata.
-
NanoBoyAdvance sprite pipeline, reviewed for one-row-ahead preparation, mosaic phase, priority updates, and OBJ-window exclusions.
-
NanoBoyAdvance display scheduling, reviewed for cycle40 sprite initialization, line227 preparation, and vertical window comparisons on hidden lines.
-
NanoBoyAdvance composition, reviewed for palette lookup and horizontal mosaic after sprite preparation.
-
mGBA window renderer, reviewed for inverted bounds and vertical edge flags.
-
NanoBoyAdvance window implementation, reviewed for persistent vertical flags, four-cycle horizontal comparisons, offscreen columns, and end-edge precedence.
-
GBATEK keypad input, for KEYINPUT/KEYCNT fields and selected-button OR/AND matching.
-
mGBA keypad sampling and control writes, reviewed for repeated OR requests, AND snapshot suppression, and newly selected held keys.
-
NanoBoyAdvance keypad implementation, compared for control access widths; its AND/retrigger behavior differs from the chosen polling model.
-
mGBA keypad timing issue, for frontend frame-based input timing limits.
-
Tonc hardware interrupts, for keypad source enable and IF/IE bit 12.
-
mGBA DMA implementation, used to cross-check masks, repeat behavior, and Game Pak source increments.
-
GBATEK ARM data processing, including R15/status notes. Its legacy
{P}description alone does not establish ARM7 behavior. -
mGBA ARM instruction implementation, reviewed for Rd=15 test/compare SPSR restoration, User/System fallback, and no result write/refill.
-
jsmolka/gba-tests, pinned for independent ARM testing. Reviewed its MIT license, startup, result macros, compare/status tests, and load/writeback alias tests.
-
armwrestler-gba-fixed and arm7wrestler, considered as test sources; not integrated.
-
SingleStepTests ARM7TDMI, considered as an experimental, emulator-generated test source; not integrated.
Use GBATEK and ARM7TDMI documentation for further hardware work.
Only use game ROMs that you may lawfully use. Do not commit game ROMs, BIOS files, or game assets.
The ignore file excludes roms/, common game ROM extensions, and save files.