_tcscat(tmp2, _T(","));
_tcscat(tmp2 + _tcslen(tmp2), _T("noautoswitch"));
}
+ if (rbc->initial_active) {
+ if (tmp2)
+ _tcscat(tmp2, _T(","));
+ _tcscat(tmp2 + _tcslen(tmp2), _T("initial"));
+ }
if (tmp2[0]) {
if (i > 0)
_stprintf(tmp, _T("gfxcard%d_options"), i + 1);
xfree(s);
}
rbc->autoswitch = !cfgfile_option_find(value, _T("noautoswitch"));
+ rbc->initial_active = cfgfile_option_find(value, _T("initial"));
if (cfgfile_option_find(value, _T("autoswitch"))) {
rbc->autoswitch = true;
}
static struct rtggfxboard *only_gfx_board;
static int rtg_visible[MAX_AMIGADISPLAYS];
static int rtg_initial[MAX_AMIGADISPLAYS];
+static int initial_done;
static int total_active_gfx_boards;
static int vram_ram_a8;
static DisplaySurface fakesurface;
pcemglue_hsync();
}
+static void init_initial(struct rtggfxboard *gb)
+{
+ if (initial_done) {
+ return;
+ }
+ if (gb->vram && gb->rbc->initial_active && rtg_visible[gb->monitor_id] < 0 && rtg_initial[gb->monitor_id] >= 0) {
+ int init = rtg_initial[gb->monitor_id];
+ if (gfxboard_toggle(gb->monitor_id, 0, 0) >= 0) {
+ initial_done = 1;
+ } else {
+ rtg_initial[gb->monitor_id] = init;
+ }
+ }
+}
+
static void reinit_vram(struct rtggfxboard *gb, uaecptr vram, bool direct)
{
if (vram == gb->gfxmem_bank->start)
struct amigadisplay *ad = &adisplays[gb->monitor_id];
struct picasso96_state_struct *state = &picasso96_state[gb->monitor_id];
+ init_initial(gb);
+
if (gb->func) {
if (gb->userdata) {
}
}
+void gfxboard_reset_init(void)
+{
+ initial_done = 1;
+ for (int i = 0; i < MAX_RTG_BOARDS; i++) {
+ struct rtgboardconfig *rbc = &currprefs.rtgboards[i];
+ if (rbc->initial_active) {
+ rtg_initial[rbc->monitor_id] = i;
+ if (rbc->monitor_id == 0) {
+ struct amigadisplay *ad = &adisplays[0];
+ ad->picasso_on = 1;
+ ad->picasso_requested_on = 1;
+ initial_done = 0;
+ }
+ }
+ }
+}
+
static uae_u32 REGPARAM2 gfxboards_lget_regs (uaecptr addr)
{
struct rtggfxboard *gb = getgfxboard(addr);
extern int gfxboard_get_id_from_index(int);
extern bool gfxboard_switch_away(int monid);
extern int gfxboard_monitor_visible(int monid);
+extern void gfxboard_reset_init(void);
extern bool gfxboard_allocate_slot(int, int);
extern void gfxboard_free_slot(int);
int device_order;
int monitor_id;
bool autoswitch;
+ bool initial_active;
};
struct boardloadfile
{
}
#endif
+ bool initial_monitor = false;
for (int i = 0; i < MAX_RTG_BOARDS; i++) {
struct rtgboardconfig *rbc = &p->rtgboards[i];
+ if (rbc->initial_active) {
+ if (initial_monitor) {
+ rbc->initial_active = false;
+ error_log(_T("Only one graphics card can be initial active."));
+ }
+ initial_monitor = true;
+ }
if (rbc->monitor_id > 0 && p->monitoremu_mon == rbc->monitor_id) {
error_log(_T("Video port monitor %d was allocated for graphics card %d."), rbc->monitor_id + 1, i + 1);
p->monitoremu_mon = 0;
struct amigadisplay *ad = &adisplays[i];
ad->picasso_requested_on = false;
}
+ gfxboard_reset_init();
unlockrtg();
}
#define IDC_INPUTMAPOUTM 1802
#define IDC_RTG_SWITCHER 1802
#define IDC_INFOBOX_TEXT1 1803
+#define IDC_RTG_INITIAL_MONITOR 1803
#define IDC_INFOBOX_TEXT3 1804
#define IDC_CD_EJECT 1804
#define IDC_CD_TEXT 1805
CTEXT "Aspect ratio:",IDC_STATIC,282,212,83,10,SS_CENTERIMAGE
COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,282,227,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
CONTROL "Native/RTG autoswitch",IDC_RTG_SWITCHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,195,130,95,10
- COMBOBOX IDC_MONITOREMU_ACTIVEMON,312,62,65,65,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- LTEXT "Active output:",IDC_STATIC,245,62,62,10,NOT WS_VISIBLE,WS_EX_RIGHT
+ COMBOBOX IDC_MONITOREMU_ACTIVEMON,316,37,65,65,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Active output:",IDC_STATIC,249,37,62,10,NOT WS_VISIBLE,WS_EX_RIGHT
+ CONTROL "Override initial native chipset display",IDC_RTG_INITIAL_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,249,63,131,10
END
IDD_INPUTMAP DIALOGEX 0, 0, 421, 293
ew(hDlg, IDC_RTG_VBINTERRUPT, rtg3);
ew(hDlg, IDC_RTG_THREAD, rtg3 && en);
ew(hDlg, IDC_RTG_HWSPRITE, rtg3);
+ ew(hDlg, IDC_RTG_INITIAL_MONITOR, rtg5);
+ if (!rtg5) {
+ CheckDlgButton(hDlg, IDC_RTG_INITIAL_MONITOR, FALSE);
+ rbc->initial_active = false;
+ }
ew(hDlg, IDC_RTG_SWITCHER, rbc->rtgmem_size > 0 && !gfxboard_get_switcher(rbc));
}
CheckDlgButton(hDlg, IDC_RTG_HWSPRITE, workprefs.rtg_hardwaresprite);
CheckDlgButton(hDlg, IDC_RTG_THREAD, workprefs.rtg_multithread);
CheckDlgButton(hDlg, IDC_RTG_SWITCHER, rbc->rtgmem_size > 0 && (rbc->autoswitch || gfxboard_get_switcher(rbc) || rbc->rtgmem_type < GFXBOARD_HARDWARE));
+ CheckDlgButton(hDlg, IDC_RTG_INITIAL_MONITOR, rbc->rtgmem_size > 0 && rbc->initial_active);
xSendDlgItemMessage(hDlg, IDC_RTG_SCALE_ASPECTRATIO, CB_SETCURSEL,
(workprefs.win32_rtgscaleaspectratio == 0) ? 0 :
}
xSendDlgItemMessage(hDlg, IDC_MONITOREMU_MON, CB_RESETCONTENT, 0, 0);
-#if 0
- xSendDlgItemMessage(hDlg, IDC_MONITOREMU_ACTIVEMON, CB_RESETCONTENT, 0, 0);
for (int i = 0; i < MAX_AMIGAMONITORS; i++) {
_stprintf(tmp, _T("%d"), i + 1);
xSendDlgItemMessage(hDlg, IDC_MONITOREMU_MON, CB_ADDSTRING, 0, (LPARAM)tmp);
}
+#if 0
+ xSendDlgItemMessage(hDlg, IDC_MONITOREMU_ACTIVEMON, CB_RESETCONTENT, 0, 0);
xSendDlgItemMessage(hDlg, IDC_MONITOREMU_ACTIVEMON, CB_ADDSTRING, 0, _T("Chipset"));
xSendDlgItemMessage(hDlg, IDC_MONITOREMU_ACTIVEMON, CB_ADDSTRING, 0, _T("RTG #1"));
xSendDlgItemMessage(hDlg, IDC_MONITOREMU_ACTIVEMON, CB_ADDSTRING, 0, _T("RTG #2"));
rbc->autoswitch = ischecked(hDlg, IDC_RTG_SWITCHER);
break;
}
+ case IDC_RTG_INITIAL_MONITOR:
+ {
+ struct rtgboardconfig *rbc = &workprefs.rtgboards[gui_rtg_index];
+ bool checked = ischecked(hDlg, IDC_RTG_INITIAL_MONITOR);
+ if (checked) {
+ for (int i = 0; i < MAX_RTG_BOARDS; i++) {
+ workprefs.rtgboards[i].initial_active = false;
+ }
+ }
+ rbc->initial_active = checked;
+ break;
+ }
}
if (HIWORD (wParam) == CBN_SELENDOK || HIWORD (wParam) == CBN_KILLFOCUS || HIWORD (wParam) == CBN_EDITCHANGE) {
uae_u32 mask = workprefs.picasso96_modeflags;