Commit graph

251 commits

Author SHA1 Message Date
Marcus Rowe
5a5b3db110 Use QRgb instead of uint32_t for rgb color data 2017-10-28 14:30:50 +10:00
devinacker
2713cfbaa0 fix superfx trace logging
(and also fix a boneheaded copy/paste mistake with the superfx trace
mask)
2017-09-30 03:45:55 -04:00
devinacker
e99e45fdbf formatting cleanup 2017-08-29 19:40:00 -04:00
Marcus Rowe
9271b7f2e7 Fix CgramWidget selected outline
Previously the CgramWidget would render the selected color outline as a
17% white, 83% black dashed line on Qt5 with a QT_SCALE_FACTOR of 2.

This commit changes the CgramWidget so that the selected color outline
is drawn as a 50% white, 50% black dashed line, independent of the
device pixel ratio.
2017-06-06 17:57:43 +10:00
Marcus Rowe
75bfb8ba7f Correctly draw selected cell border in ImageGridWidget
This commit also fixes a glitch in Qt5 where the outline of some
selected TilemapViewer cells were not rendered correctly if the zoom was
set to a prime number.
2017-06-06 17:44:32 +10:00
Marcus Rowe
9965d45a4e Use cosmetic QPen in ImageGridWidget
This is the proper method of drawing lines with a constant width that is
independent of the QPainter transformation.
2017-06-06 17:43:27 +10:00
devinacker
88217f4c6c fix buggy/unsafe breakpoint string split when loading 2017-05-14 03:16:48 -04:00
devinacker
90026a5103 force debug window visible on debugger events 2017-04-24 23:56:31 -04:00
devinacker
e4c125b1c8 allow saving/reloading breakpoints between sessions 2017-04-24 23:53:53 -04:00
devinacker
28a0bed5d1 tweaking command line breakpoint syntax
(allows specifying a data value as well as an empty mode string for
disabled breakpoints)
2017-04-23 15:58:47 -04:00
Marcus Rowe
0351da7b31 Fix grid pen width in ImageGridWidget for Qt5
Qt5's default pen width is 1.0 and therefore the grid line thickness
increases when zooming in.

This commit changes the grid pen width to the inverse of zoom so it is
rendered same thickness independent of the zoom setting.
2017-03-18 18:21:35 +10:00
Marcus Rowe
6faffa76f6 Fix drawSelectedCell for hi-dpi displays
Optiroc has mentioned that the selected tile box's position and size is
multiplied by two on his Mac. This is caused by either
`painter->combinedTransform()` returning the wrong value for hi-dpi
displays or `painter->resetTransform()` not working as expected on
hi-dpi displays.

The new code does not call `painter->resetTransform()` but instead sets
the pen width and cell adjust to the inverse of the zoom, which cancels
out the transform and should render as one pixel to the user.
2017-03-17 23:30:46 +10:00
Marcus Rowe
62b4b4aff9 Add tile properties for selected tile in Tilemap Viewer 2017-03-16 21:42:56 +10:00
Marcus Rowe
9b146b4235 Add grid cell selection to ImageGridWidget 2017-03-16 20:41:47 +10:00
Marcus Rowe
f13c9a894f Add optional grid to Tilemap Viewer 2017-03-16 20:16:52 +10:00
Marcus Rowe
485669e73d Disable TilemapViewer addr/size textboxes when in Mode 7 2017-03-16 19:02:06 +10:00
Marcus Rowe
113da8ea29 Simplify code for TilemapViewer sidebar 2017-03-16 19:00:40 +10:00
ARM9
1575fc0303 Fix cgram-viewer RGB display values
Used to display color values shifted right by 3, now displays the correct
5-bit values.
2017-01-08 19:14:35 +01:00
devinacker
8cead80154 don't mistakenly enable trace mask automatically 2016-12-14 21:01:11 -05:00
devinacker
e35e2509f2 make SA1/superfx trace masks the correct size
fixes #91; i'm shocked it took two years for this copy/paste mistake to
get noticed by anyone
2016-12-13 00:14:46 -05:00
devinacker
68ada568c3 fix funky wrapping bug in memory search
fixes #56
2016-11-20 01:33:56 -05:00
devinacker
f8b36f4e55 reset emulation speed when breakpoints occur 2016-11-19 22:22:02 -05:00
devinacker
58e8474fa8 show instruction when a PPU breakpoint occurs 2016-11-19 16:07:36 -05:00
devinacker
758363b890 small cleanup 2016-11-19 00:04:53 -05:00
Marcus Rowe
9eabab41ac Add Mode0 palette offset to TilemapRenderer 2016-11-17 23:35:55 -05:00
Marcus Rowe
baa6721a70 Load data from PPU interface into TilemapRenderer 2016-11-17 23:35:55 -05:00
Marcus Rowe
f1e7f42ac3 Add Mode 7 to Tilemap Viewer 2016-11-17 23:35:55 -05:00
Marcus Rowe
d2e6efd105 Fix 16px tile bug in TilemapRenderer 2016-11-17 23:35:54 -05:00
devinacker
b63f50f3cd Revert "get tilemap viewer info from PPU interface"
This reverts commit c50526eb66.
2016-11-17 23:35:54 -05:00
devinacker
c50526eb66 get tilemap viewer info from PPU interface 2016-11-16 23:54:31 -05:00
Marcus Rowe
71976a62f7 Rewrite TilemapRenderer to draw one tile at a time 2016-11-17 04:05:06 +10:00
Marcus Rowe
2afe07b663 Add Tilemap Viewer Window 2016-11-16 17:39:11 +10:00
Devin Acker
2db8f57542 Merge pull request #79 from undisbeliever/update-debugger
Fix typo that prevented OamCanvas from auto-updating
2016-11-15 08:39:34 -05:00
Marcus Rowe
0af335c739 Fix typo that prevented OamCanvas from auto-updating 2016-11-15 16:27:02 +10:00
devinacker
701e7fd218 view actual SMP bus instead of APU RAM 2016-11-15 00:22:19 -05:00
Marcus Rowe
273600d5c3 Allow the user to sort the Sprite Viewer columns
Decided to move the OAM name table bit into the "Char" column so it will
be included in the sort.

Also decided that refresh() should not change the user selected row.
This required me remember the selected row so it could be re-selected
after QTreeWidget has sorted the model. Unfortunately this can lead to
the occasional infinite signal call loop, necessitating the
inRefreshCall test to ensure refresh() is only called once.
2016-11-15 08:49:57 +10:00
Marcus Rowe
6148b37070 Improve column spacing in Sprite Viewer 2016-11-14 22:56:13 +10:00
Marcus Rowe
d4122d2d5b Display selected object in Sprite Viewer 2016-11-14 22:37:37 +10:00
Marcus Rowe
c87a589cc8 Only scale the vram canvas once.
On my system this dramatically reduces cpu usage from 18.5% to 4.6%
when quickly scrolling the VRAM viewer scrollbar[1].

[1]: Tested on a i5-3317U 1.70GHz CPU and no ROM loaded in the emulator.
2016-11-14 21:03:07 +10:00
devinacker
7fe51690ec add some info to the PPUDebugger interface (WIP) 2016-11-13 19:02:07 -05:00
devinacker
074326b45d add option to show hdot or hcounter in log 2016-11-06 19:55:45 -05:00
devinacker
57de710dea only open debug log files at cart load time 2016-11-06 19:13:47 -05:00
David Lindecrantz
6c027c8aa8 vram debugger: draw image/palette with nearest neighbour interpolation 2016-11-01 12:48:19 +01:00
David Lindecrantz
ccd8d1df52 vram debugger: minor logic error fix 2016-11-01 12:48:06 +01:00
Marcus Rowe
bc6f2c3ead Create breakpoints using the command line arguments
This allows me to use a script to automatically fill the bsnes debugger
with breakpoints. For instance, the following bash line:

    bsnes --show-debugger `grep BREAKPOINT "$symfile" | awk '{print "-b " $1 ":x"}'` "$romfile"

Will open the debugger window and create a CPUBus execute breakpoint
for all symbols containing BREAKPOINT in the symbol file.

See `bsnes --help` or `Application::printArguments` for the format of
the breakpoint string.
2016-10-27 05:47:56 +10:00
Marcus Rowe
64890654be Select VramViewer palette using a cgram widget
Also updated CgramViewer so that it uses the CgramWidget.
2016-10-23 22:09:06 +10:00
Marcus Rowe
94cf77d65a Render the VramCanvas using CGRAM palette data 2016-10-22 20:42:25 +10:00
Marcus Rowe
658468d60c Indent register property names in Properties Table 2016-10-22 18:36:55 +10:00
Marcus Rowe
12d2dc1ff4 Add OAM Second Name Table Address to PPUDebugger and VramViewer 2016-10-22 17:51:40 +10:00
Marcus Rowe
1e0837b873 Fix the width of the run / break button 2016-10-22 02:53:27 +10:00