}
s[_tcslen (s) - 1] = 0;
}
- if (i == CHIPSET_REFRESH_PAL)
- cfgfile_dwrite (f, _T("displaydata_pal"), tmp);
- else if (i == CHIPSET_REFRESH_NTSC)
- cfgfile_dwrite (f, _T("displaydata_ntsc"), tmp);
- else
+ if (i == CHIPSET_REFRESH_PAL) {
+ if (cr->locked)
+ cfgfile_dwrite (f, _T("displaydata_pal"), tmp);
+ } else if (i == CHIPSET_REFRESH_NTSC) {
+ if (cr->locked)
+ cfgfile_dwrite (f, _T("displaydata_ntsc"), tmp);
+ } else {
cfgfile_dwrite (f, _T("displaydata"), tmp);
+ }
}
cfgfile_write_str (f, _T("collision_level"), collmode[p->collision_level]);
if (_tcscmp (option, _T("displaydata_pal")) == 0) {
i = CHIPSET_REFRESH_PAL;
cr = &p->cr[i];
- cr->rate = -1;
+ cr->inuse = false;
_tcscpy (label, _T("PAL"));
} else if (_tcscmp (option, _T("displaydata_ntsc")) == 0) {
i = CHIPSET_REFRESH_NTSC;
cr = &p->cr[i];
- cr->rate = -1;
+ cr->inuse = false;
_tcscpy (label, _T("NTSC"));
}
if (!cr->inuse) {
/* check special case where last fetch wraps to next line
* this makes totally corrupted and flickering display on
* real hardware due to refresh cycle conflicts
+ * Exception: AGA + 64 bit fetch: glitch free overrun is possible.
*/
static void maybe_finish_last_fetch (int pos, int fm)
{
if (plf_state > plf_passed_stop2 || plf_state < plf_passed_stop || (fetch_state != fetch_started && fetch_state != fetch_started_first) || !dmaen (DMA_BITPLANE)) {
finish_last_fetch (pos, fm, true);
} else {
- bitplane_overrun_fetch_cycle = fetch_cycle;
+ bitplane_overrun_fetch_cycle = fetch_cycle - 1;
int cycle_start = bitplane_overrun_fetch_cycle & fetchstart_mask;
int left = fetchunit - cycle_start;
if (plf_state == plf_passed_stop_act) {
}
break;
}
+
#if 0
if (bpl0) {
+ bpl1dat_written = true;
+ bpl1dat_written_at_least_once = true;
+ if (thisline_decision.plfleft < 0)
+ reset_bpl_vars();
maybe_first_bpl1dat(pos);
beginning_of_plane_block(pos, fm);
}
}
if (toscr_nbits == 16)
flush_display(fm);
- if (bpl0) {
- bpl1dat_written = true;
- bpl1dat_written_at_least_once = true;
- reset_bpl_vars();
- beginning_of_plane_block(pos, fetchmode);
- }
#endif
if ((bitplane_overrun_fetch_cycle & fetchunit_mask) == 0) {
}
}
}
+ if (regs.halted < 0)
+ reset_cpu_idle();
cpu_last_stop_vpos = 0;
cpu_stopped_lines = 0;
#endif
maybe_process_pull_audio();
}
}
- if (vpos + 1 < maxvpos + lof_store && vpos >= nextwaitvpos && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
- nextwaitvpos += maxvpos_display * 1 / 4;
+ if (vpos + 1 < maxvpos + lof_store && vpos >= nextwaitvpos && vpos < maxvpos - (maxvpos / 3) && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
+ nextwaitvpos += maxvpos_display * 1 / 3;
vsyncmintime += vsynctimeperline;
if (!vsync_isdone () && !currprefs.turbo_emulation) {
frame_time_t rpt = read_processor_time ();
{
int j;
struct netdriverdata *nd;
+ gui_flicker_led(LED_NET, 0, 0);
if (name) {
netmode = 0;
*nddp = NULL;
if (index < 0 || index >= cardno)
return false;
struct card_data *cd = cards[index];
+ if (cd->aci.parent_of_previous)
+ return false;
int order1 = get_order(p, cd);
if (order1 < 0 || order1 >= EXPANSION_ORDER_MAX - 1)
return false;
write_log(_T("END\n"));
}
-int expansion_autoconfig_move(struct uae_prefs *p, int index, int dir)
+int expansion_autoconfig_move(struct uae_prefs *p, int index, int dir, bool test)
{
if (index < 0 || index >= cardno)
return -1;
}
dir += dir < 0 ? -1 : 1;
}
+ if (test) {
+ return 0;
+ }
set_order(p, cd1, order2);
set_order(p, cd2, order1);
if (p != &currprefs)
write_log(_T("GFXBOARD %d ACTIVE=%d\n"), i, gb->monswitch_current);
if (gb->monswitch_current) {
if (!gfxboard_rtg_enable_initial(i)) {
- // Nothing visible and RTG on? Re-enable our display.
- if (rtg_visible < 0 && picasso_on) {
+ // Nothing visible? Re-enable our display.
+ if (rtg_visible < 0) {
gfxboard_toggle(i, 0);
}
}
extern struct autoconfig_info *expansion_get_autoconfig_data(struct uae_prefs *p, int index);
extern struct autoconfig_info *expansion_get_autoconfig_by_address(struct uae_prefs *p, uaecptr addr);
extern void expansion_set_autoconfig_sort(struct uae_prefs *p);
-extern int expansion_autoconfig_move(struct uae_prefs *p, int index, int direction);
+extern int expansion_autoconfig_move(struct uae_prefs *p, int index, int direction, bool test);
extern bool expansion_can_move(struct uae_prefs *p, int index);
extern bool alloc_expansion_bank(addrbank *bank, struct autoconfig_info *aci);
extern void free_expansion_bank(addrbank *bank);
memset (&gui_data, 0, sizeof gui_data);
gui_data.cd = -1;
gui_data.hd = -1;
+ gui_data.net = -1;
gui_data.md = (currprefs.cs_cd32nvram || currprefs.cs_cdtvram) ? 0 : -1;
logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded
a config using the cmd-line. This case handles loads through the GUI. */
static bool rtg_render (void)
{
bool flushed = false;
- bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+ bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE && currprefs.rtgboards[0].rtgmem_size;
if (doskip () && p96skipmode == 0) {
;
int vsync = isvsync_rtg();
int mult;
bool rendered = false;
- bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+ bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
int state = picasso_state_change;
if (state & PICASSO_STATE_SETDAC) {
if (!picasso_on)
return;
- if (uaegfx)
+ if (uaegfx && rtg_index == 0)
mouseupdate();
if (thisisvsync) {
}
if (uaegfx) {
- if (setupcursor_needed)
+ if (setupcursor_needed && rtg_index == 0)
setupcursor();
if (thisisvsync)
picasso_trigger_vblank();
void picasso_handle_vsync(void)
{
- if (rtg_index < 0)
- return;
-
- bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+ bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
- if (currprefs.rtgboards[rtg_index].rtgmem_size == 0)
+ if (currprefs.rtgboards[0].rtgmem_size == 0)
return;
if (!picasso_on && uaegfx) {
- createwindowscursor(0, 0, 0, 0, 0, 1);
+ if (rtg_index == 0) {
+ createwindowscursor(0, 0, 0, 0, 0, 1);
+ }
picasso_trigger_vblank();
return;
}
void picasso_handle_hsync(void)
{
- if (rtg_index < 0)
- return;
-
- bool uaegfx = currprefs.rtgboards[rtg_index].rtgmem_type < GFXBOARD_HARDWARE;
+ bool uaegfx = currprefs.rtgboards[0].rtgmem_type < GFXBOARD_HARDWARE;
- if (currprefs.rtgboards[rtg_index].rtgmem_size == 0)
+ if (currprefs.rtgboards[0].rtgmem_size == 0)
return;
int vsync = isvsync_rtg();
if (p96hsync >= p96syncrate) {
if (!picasso_on) {
if (uaegfx) {
- createwindowscursor(0, 0, 0, 0, 0, 1);
+ if (rtg_index == 0) {
+ createwindowscursor(0, 0, 0, 0, 0, 1);
+ }
picasso_trigger_vblank();
}
} else {
uae_u16 count = trap_get_dreg (ctx, 1);
uaecptr boardinfo = trap_get_areg (ctx, 0);
uaecptr clut = boardinfo + PSSO_BoardInfo_CLUT;
- if (start > 256 || start + count > 256)
+ if (start > 256 || count > 256 || start + count > 256)
return 0;
if (updateclut(ctx, clut, start, count))
full_refresh = 1;
#define LANG_DLL_FULL_VERSION_MATCH 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("2")
+#define WINUAEBETA _T("3")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2016, 8, 24)
+#define WINUAEDATE MAKEBD(2016, 8, 28)
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
{
}
+static void BoardsEnable(HWND hDlg, int selected)
+{
+ bool move_up = expansion_can_move(&workprefs, selected);
+ bool move_down = move_up;
+ if (move_up) {
+ if (expansion_autoconfig_move(&workprefs, selected, -1, true) < 0)
+ move_up = false;
+ }
+ if (move_down) {
+ if (expansion_autoconfig_move(&workprefs, selected, 1, true) < 0)
+ move_down = false;
+ }
+ ew(hDlg, IDC_BOARDS_UP, move_up);
+ ew(hDlg, IDC_BOARDS_DOWN, move_down);
+}
+
static INT_PTR CALLBACK BoardsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
case IDC_BOARDS_UP:
case IDC_BOARDS_DOWN:
if (selected >= 0) {
- int newpos = expansion_autoconfig_move(&workprefs, selected, LOWORD(wParam) == IDC_BOARDS_UP ? -1 : 1);
+ int newpos = expansion_autoconfig_move(&workprefs, selected, LOWORD(wParam) == IDC_BOARDS_UP ? -1 : 1, false);
if (newpos >= 0) {
selected = newpos;
-
-
+ BoardsEnable(hDlg, selected);
InitializeListView(hDlg);
-
-
ListView_SetItemState(cachedlist, selected, LVIS_SELECTED, LVIS_SELECTED);
-
}
}
break;
HWND list = nmlistview->hdr.hwndFrom;
int entry = listview_entry_from_click(list, &column);
if (entry >= 0) {
- bool move = expansion_can_move(&workprefs, entry);
selected = entry;
- ew(hDlg, IDC_BOARDS_UP, move);
- ew(hDlg, IDC_BOARDS_DOWN, move);
+ BoardsEnable(hDlg, selected);
}
}
break;
if (led < 0) {
gui_flicker_led2(LED_HD, 0, 0);
gui_flicker_led2(LED_CD, 0, 0);
- gui_flicker_led2(LED_NET, 0, 0);
+ if (gui_data.net >= 0)
+ gui_flicker_led2(LED_NET, 0, 0);
if (gui_data.md >= 0)
gui_flicker_led2(LED_MD, 0, 0);
} else {
\r
+Beta 3:\r
+\r
+- PCI ES1370 fixed.\r
+- (Missed from b1 log): CPU Idle logic has been completely changed, now it only has two states, inactive and active.\r
+ Active state changes internal CPU speed state to approximate and active equals fastest possible mode.\r
+ Old logic was never good enough. CPU usage was never low enough and it didn't prevent audio glitches.\r
+- Another b1 missed log entry: conditional register breakpoints, break when any CPU register matches\r
+ (equals, smaller, larger, range). More information in debugger help.\r
+- Do not use new CPU Idle mode in PPC-only configs.\r
+- Low latency vsync really fixed. Can also fix other CPU usage related problems in other modes.\r
+- Hardware info panel up/down button disable logic improved.\r
+- Bitplane DMA overrun 1 cycle adjustment, now it matches real A1200 100%. Possible Disk/Audio/Sprite\r
+ DMA slot conflicts are not yet emulated. (Causes graphics glitches on real hardware)\r
+- uaegfx vblank interrupt hang fixed.\r
+- Network OSD led was invisible.\r
+\r
Beta 2:\r
\r
- Needed natmem space also included IO only Z3 boards but only RAM and VRAM boards should count.\r
} else {
write_log(_T("pci_read_dma invalid address %08x, size %d\n"), addr, size);
while (size > 0) {
- *p++ = uaerand();
+ *p++ = uaerand() >> 4;
addr++;
size--;
}
pci_board_add(pcib, &ne2000_pci_board, slot++, 0);
}
- if (is_device_rom(&currprefs, ROMTYPE_FM801, 0) > 0) {
+ if (is_device_rom(&currprefs, ROMTYPE_FM801, 0) >= 0) {
pci_board_add(pcib, &fm801_pci_board, slot, 0);
pci_board_add(pcib, &fm801_pci_board_func1, slot, 1);
slot++;
}
- if (is_device_rom(&currprefs, ROMTYPE_ES1370, 0) > 0) {
+ if (is_device_rom(&currprefs, ROMTYPE_ES1370, 0) >= 0) {
pci_board_add(pcib, &es1370_pci_board, slot++, 0);
}
static bool es1370_init(struct pci_board_state *pcibs)
{
init(pcibs);
- es1370_reset(&es1370state);
es1370state.irq_callback = pcibs->irq_callback;
+ es1370_reset(&es1370state);
return true;
}
sw->samplebuf_index = 0;
sw->samplebuf_total = 0;
calculate_volume_qemu();
- sw->streamid = audio_enable_stream(sw->active, -1, 2);
+ audio_enable_stream(false, sw->streamid, 2);
+ sw->streamid = 0;
+ if (on) {
+ sw->streamid = audio_enable_stream(true, -1, 2);
+ }
}
void AUD_set_active_in(SWVoiceIn *sw, int on)
{
void AUD_close_out(QEMUSoundCard *card, SWVoiceOut *sw)
{
qemu_voice_out = NULL;
- audio_enable_stream(false, sw->streamid, 0);
- sw->streamid = 0;
- xfree(sw);
+ if (sw) {
+ audio_enable_stream(false, sw->streamid, 0);
+ sw->streamid = 0;
+ xfree(sw);
+ }
}
SWVoiceIn *AUD_open_in(
QEMUSoundCard *card,
num3 = -1;
} else if (led == LED_NET) {
pos = 6;
- on = gui_data.net;
- on_rgb = 0;
- if (on & 1)
- on_rgb |= 0x00cc00;
- if (on & 2)
- on_rgb |= 0xcc0000;
- off_rgb = 0x000000;
- num1 = -1;
- num2 = -1;
- num3 = 17;
- am = 1;
+ if (gui_data.net >= 0) {
+ on = gui_data.net;
+ on_rgb = 0;
+ if (on & 1)
+ on_rgb |= 0x00cc00;
+ if (on & 2)
+ on_rgb |= 0xcc0000;
+ off_rgb = 0x000000;
+ num1 = -1;
+ num2 = -1;
+ num3 = 17;
+ am = 1;
+ }
} else {
- return;
+ continue;
}
on_rgb |= 0x33000000;
off_rgb |= 0x33000000;