Commit graph

81 commits

Author SHA1 Message Date
Marcel Hellwig
c9f8f40a6c replace deprecated qt api with recommended functions 2021-02-18 08:13:39 +01:00
Devin Acker
445078fc76 don't update OAM viewer when system is powered off 2020-08-16 23:59:49 -04:00
Devin Acker
c20901e328 fix typo in an OamGraphicsScene member function 2020-08-16 23:47:19 -04:00
devinacker
eab55199b3 Merge branch 'sgbdebug' 2020-02-10 18:41:47 -05:00
devinacker
2f344d27fe properly display hires tilemaps for mode 5/6 in the tilemap viewer 2020-02-09 23:00:34 -05:00
devinacker
95c8b63da6 don't autoupdate debug windows that aren't currently visible 2020-01-04 12:04:18 -05:00
devinacker
9734526de2 don't display 17-bit VRAM addresses in PPU debuggers if expansion is supported but disabled 2019-10-10 19:06:26 -04:00
devinacker
c9eae6a047 add VRAM expansion support to PPU debugging tools 2019-10-09 22:08:35 -04:00
Devin Acker
57b1d3ea3a
Merge pull request #209 from undisbeliever/tilemap-character-address
Tilemap character address
2019-01-19 16:44:33 -05:00
Marcus Rowe
85a5f963b3 Increment selected tile address if in mode 7
This will make the Tile Viewer selected tile address match the Tilemap
Viewer character address.
2018-12-22 21:27:49 +10:00
Marcus Rowe
f4dc571699 Add 0x prefix to selected tile address 2018-12-22 21:24:19 +10:00
Marcus Rowe
8fd0301299 Show character address in the Tilemap Viewer 2018-12-22 21:18:09 +10:00
Marcus Rowe
3107ef54d0 Rename BG_TRANSPARENT to TRANSPARENT_BG
This commit will make the `*_BG` constants in the BackgroundType enum
have a consistent name.
2018-12-19 09:07:07 +10:00
Marcus Rowe
e94be79714 Fix compilation error in Windows
wingdi.h contains the following line:

    #define TRANSPARENT 1

which prevents OamGraphicsScene from being compiled.

This commit renames TRANSPARENT to BG_TRANSPARENT so the class can be
successfully compiled on Windows.
2018-12-18 12:12:41 +10:00
Marcus Rowe
b612abe57d Add first sprite support to Sprite Viewer 2018-12-05 21:46:24 +10:00
Marcus Rowe
1d6fb0282c Adjust screen outline height based on overscan register 2018-12-05 18:07:27 +10:00
Marcus Rowe
102c3a543e Show/Hide objects in the Sprite Viewer 2018-12-05 17:57:15 +10:00
Marcus Rowe
24b564fdcb Add selection to OamGraphicsScene 2018-12-01 21:34:57 +10:00
Marcus Rowe
650d46251e Add export button to OamViewer 2018-11-18 19:55:33 +10:00
Marcus Rowe
132e71842b Add screen outline and background to OamGraphicsScene 2018-11-18 19:55:33 +10:00
Marcus Rowe
2d8e2e8077 Add Y axis wrapped objects to OamGraphicsScene 2018-11-18 19:55:33 +10:00
Marcus Rowe
b822c8ef20 Add zoom settings to Oam Viewer 2018-11-18 19:55:33 +10:00
Marcus Rowe
8854429f09 Add OamGraphicsScene 2018-11-18 19:55:33 +10:00
Marcus Rowe
782a2e2688 Fix OamObject hFlip/vFlip 2018-11-18 19:55:33 +10:00
Marcus Rowe
61a4d594a7 Refactor Sprite Viewer table into a new OamDataModel class 2018-11-18 19:55:33 +10:00
devinacker
15ed6bc5d4 use more native-looking save dialogs for VRAM views 2018-07-28 16:17:33 -04:00
devinacker
2200b08506 merge new tile viewer window (closes #145, #62) 2018-05-09 22:01:02 -04:00
Marcus Rowe
0752089351 Add more sources to the Tile Viewer 2018-05-07 20:13:42 +10:00
Marcus Rowe
3baf50c689 Fix form not updating when cartridge is not loaded 2018-05-07 18:33:12 +10:00
Marcus Rowe
8c66734c11 Add Mode 7 EXTBG format to the PPU Debugger 2018-05-07 18:21:53 +10:00
Marcus Rowe
6acb760664 Fix missing size check on selectedFiles list
(selectedFiles should always contain one element, but it is better to be
safe then sorry)
2017-11-02 15:00:45 +10:00
Marcus Rowe
e121885aea Add next/prev address buttons to Tile Viewer 2017-10-30 23:49:52 +10:00
Marcus Rowe
7e70c87487 Add address offset to VRAM source in the Tile Viewer 2017-10-30 23:03:38 +10:00
Marcus Rowe
d4a3dba81e Tile Viewer goto buttons now set bit depth
The goto buttons do not set the Bit Depth in mode 7 as the game could be
changing the screen modes mid frame.
2017-10-30 22:08:34 +10:00
Marcus Rowe
a0ad336236 Optimize Tile/Tilemap Viewer sidebar signals
This commit reduces the number of times the refresh() slot is called in
the Tile Viewer and the Tilemap Viewer.

The `inUpdateFormCall` flag is still required because the QSpinBox and
CgramWidget does not have any "user edited value" signals.
2017-10-30 21:56:43 +10:00
Marcus Rowe
003e54e113 Disable refresh when the export dialog is open 2017-10-30 20:46:01 +10:00
Marcus Rowe
cc38bdf81a Add CPU Bus to the Tile Viewer 2017-10-30 14:36:41 +10:00
Marcus Rowe
d937289a1c Add Tile Viewer Window 2017-10-29 21:22:42 +10:00
Marcus Rowe
47cb9d9b29 Move low-level functions from TilemapRenderer into a base class 2017-10-29 19:23:23 +10:00
Marcus Rowe
bdd9db21c8 Override the background color in the Tilemap Viewer 2017-10-29 16:06:25 +10:00
Marcus Rowe
76938fecbe Add export tilemap button to TilemapViewer 2017-10-28 15:14:54 +10:00
Marcus Rowe
ee89171d53 Keep QImage in TilemapRenderer when drawing tilemap
This commit will allow the image created by drawTilemap() to be
accessed multiple times.

It will also save a memory allocation if the image size does not change
in-between two drawTilemap() calls.

The low-level tile drawing functions keep wordsPerScanline as a function
argument in order to save 1024 function calls per map drawn (16K calls
for a mode7 map).
2017-10-28 14:53:17 +10:00
Marcus Rowe
5a5b3db110 Use QRgb instead of uint32_t for rgb color data 2017-10-28 14:30:50 +10: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
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