Sanitized reset handling and removed excess logging from postcard.c.

This commit is contained in:
OBattler
2020-05-31 04:49:23 +02:00
parent df05daca51
commit 228e3f999c
4 changed files with 4 additions and 28 deletions

View File

@@ -171,7 +171,6 @@ extern void pc_close(void *threadid);
extern void pc_reset_hard_close(void);
extern void pc_reset_hard_init(void);
extern void pc_reset_hard(void);
extern void pc_reset(int hard);
extern void pc_full_speed(void);
extern void pc_speed_changed(void);
extern void pc_send_cad(void);

View File

@@ -819,26 +819,6 @@ pc_reset_hard(void)
}
void
pc_reset(int hard)
{
plat_pause(1);
plat_delay_ms(100);
nvr_save();
config_save();
if (hard)
pc_reset_hard();
else
pc_send_cad();
plat_pause(0);
}
void
pc_close(thread_t *ptr)
{

View File

@@ -99,9 +99,6 @@ postcard_write(uint16_t port, uint8_t val, void *priv)
if (postcard_written && val == postcard_code)
return;
if (val == 0x13)
pclog("[%04X:%08X] POST 13\n", CS, cpu_state.pc);
postcard_prev_code = postcard_code;
postcard_code = val;
if (postcard_written < 2)

View File

@@ -314,12 +314,12 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
win_notify_dlg_open();
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112);
if (i == 0)
pc_reset(1);
pc_reset_hard();
win_notify_dlg_closed();
break;
case IDM_ACTION_RESET_CAD:
pc_reset(0);
pc_send_cad();
break;
case IDM_ACTION_EXIT:
@@ -733,7 +733,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
win_notify_dlg_open();
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112);
if (i == 0)
pc_reset(1);
pc_reset_hard();
win_notify_dlg_closed();
break;
@@ -757,7 +757,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (manager_wm)
break;
manager_wm = 1;
pc_reset(0);
pc_send_cad();
manager_wm = 0;
break;