Added remaining config parameters for Qt PPU Viewer.

This commit is contained in:
mjbudd77 2021-07-27 06:08:01 -04:00
parent c8686e222e
commit 212dab2c58
3 changed files with 22 additions and 0 deletions

View File

@ -542,6 +542,8 @@ ppuNameTableViewerDialog_t::ppuNameTableViewerDialog_t(QWidget *parent)
hbox = new QHBoxLayout();
g_config->getOption("SDL.NT_ViewScanLine", &NTViewScanline);
scanLineEdit = new QSpinBox();
scanLineEdit->setRange( 0, 255 );
scanLineEdit->setValue( NTViewScanline );
@ -833,6 +835,7 @@ void ppuNameTableViewerDialog_t::scanLineChanged(int val)
{
NTViewScanline = val;
//printf("ScanLine: %i\n", NTViewScanline );
g_config->setOption("SDL.NT_ViewScanLine", NTViewScanline);
}
//----------------------------------------------------
void ppuNameTableViewerDialog_t::menuScrollLinesChanged(bool checked)

View File

@ -700,9 +700,14 @@ InitConfig()
config->addOption("SDL.OAM_TileFocusPolicy", 0);
config->addOption("SDL.PPU_MaskUnused", 0);
config->addOption("SDL.PPU_InvertMask", 0);
config->addOption("SDL.PPU_View1_8x16", 0);
config->addOption("SDL.PPU_View2_8x16", 0);
config->addOption("SDL.PPU_ViewScanLine", 0);
config->addOption("SDL.PPU_ViewRefreshFrames", 1);
config->addOption("SDL.NT_TileSelColor", "#FFFFFF");
config->addOption("SDL.NT_TileGridColor", "#FF0000");
config->addOption("SDL.NT_AttrGridColor", "#0000FF");
config->addOption("SDL.NT_ViewScanLine", 0);
config->addOption("SDL.NT_DrawScrollLines", 1);
config->addOption("SDL.NT_DrawTileGridLines", 1);
config->addOption("SDL.NT_DrawAttrGridLines", 0);

View File

@ -245,6 +245,9 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
tileLabel[0] = new QLabel( tr("Tile:") );
tileLabel[1] = new QLabel( tr("Tile:") );
g_config->getOption("SDL.PPU_View1_8x16", &PPUView_sprite16Mode[0]);
g_config->getOption("SDL.PPU_View2_8x16", &PPUView_sprite16Mode[1]);
sprite8x16Cbox[0]->setChecked( PPUView_sprite16Mode[0] );
sprite8x16Cbox[1]->setChecked( PPUView_sprite16Mode[1] );
@ -328,11 +331,15 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
patternView[0]->setTileLabel( tileLabel[0] );
patternView[1]->setTileLabel( tileLabel[1] );
g_config->getOption("SDL.PPU_ViewScanLine", &PPUViewScanline);
scanLineEdit->setRange( 0, 255 );
scanLineEdit->setValue( PPUViewScanline );
connect( scanLineEdit, SIGNAL(valueChanged(int)), this, SLOT(scanLineChanged(int)));
g_config->getOption("SDL.PPU_ViewRefreshFrames", &PPUViewRefresh);
refreshSlider->setMinimum( 0);
refreshSlider->setMaximum(25);
refreshSlider->setValue(PPUViewRefresh);
@ -501,6 +508,7 @@ void ppuViewerDialog_t::scanLineChanged(int value)
{
PPUViewScanline = value;
//printf("ScanLine: %i\n", PPUViewScanline );
g_config->setOption("SDL.PPU_ViewScanLine", PPUViewScanline);
}
//----------------------------------------------------
void ppuViewerDialog_t::invertMaskChanged(int state)
@ -520,16 +528,22 @@ void ppuViewerDialog_t::maskUnusedGraphicsChanged(int state)
void ppuViewerDialog_t::sprite8x16Changed0(int state)
{
PPUView_sprite16Mode[0] = (state == Qt::Unchecked) ? 0 : 1;
g_config->setOption("SDL.PPU_View1_8x16", PPUView_sprite16Mode[0]);
}
//----------------------------------------------------
void ppuViewerDialog_t::sprite8x16Changed1(int state)
{
PPUView_sprite16Mode[1] = (state == Qt::Unchecked) ? 0 : 1;
g_config->setOption("SDL.PPU_View2_8x16", PPUView_sprite16Mode[1]);
}
//----------------------------------------------------
void ppuViewerDialog_t::refreshSliderChanged(int value)
{
PPUViewRefresh = value;
g_config->setOption("SDL.PPU_ViewRefreshFrames", PPUViewRefresh);
}
//----------------------------------------------------
void ppuViewerDialog_t::setClickFocus(void)