From ac55efaa3ce2219ac09bdea281f3ec52495e8c0b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 2 Dec 2019 20:49:50 +0200 Subject: [PATCH] 4300b6 --- custom.cpp | 2 +- expansion.cpp | 39 +++++++++++++++++++++++++++++++-------- gfxboard.cpp | 4 ++-- memory.cpp | 2 ++ od-win32/win32.cpp | 23 +++++++++++++---------- od-win32/win32.h | 4 ++-- od-win32/win32gui.cpp | 12 ++++++------ 7 files changed, 57 insertions(+), 29 deletions(-) diff --git a/custom.cpp b/custom.cpp index 6ec64208..fac372f4 100644 --- a/custom.cpp +++ b/custom.cpp @@ -2187,7 +2187,7 @@ static int flush_plane_data_n(int fm) toscr_1(32 - out_nbits, fm); } - for (int j = 0; j < (fmode == 2 ? 3 : 1); j++) { + for (int j = 0; j < (fm == 2 ? 3 : 1); j++) { if (out_offs >= MAX_WORDS_PER_LINE / 4 - 1) break; i += 32; diff --git a/expansion.cpp b/expansion.cpp index ae860ddd..60e8c290 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -52,6 +52,7 @@ #define CARD_FLAG_CAN_Z3 1 #define CARD_FLAG_CHILD 8 +#define CARD_FLAG_UAEROM 16 // More information in first revision HRM Appendix_G #define BOARD_PROTOAUTOCONFIG 1 @@ -3556,21 +3557,21 @@ static void expansion_add_autoconfig(struct uae_prefs *p) #ifdef FILESYS if (do_mount && p->uaeboard >= 0 && p->uaeboard < 2) { - cards_set[cardno].flags = 0; + cards_set[cardno].flags = CARD_FLAG_UAEROM; cards_set[cardno].name = _T("UAEFS"); cards_set[cardno].zorro = 2; cards_set[cardno].initnum = expamem_init_filesys; cards_set[cardno++].map = expamem_map_filesys; } if (p->uaeboard > 0) { - cards_set[cardno].flags = 0; + cards_set[cardno].flags = CARD_FLAG_UAEROM; cards_set[cardno].name = _T("UAEBOARD"); cards_set[cardno].zorro = 2; cards_set[cardno].initnum = expamem_init_uaeboard; cards_set[cardno++].map = expamem_map_uaeboard; } if (do_mount && p->uaeboard < 2) { - cards_set[cardno].flags = 0; + cards_set[cardno].flags = CARD_FLAG_UAEROM; cards_set[cardno].name = _T("UAEBOOTROM"); cards_set[cardno].zorro = BOARD_NONAUTOCONFIG_BEFORE; cards_set[cardno].initnum = expamem_rtarea_init; @@ -3985,6 +3986,9 @@ uae_u8 *restore_expansion_boards(uae_u8 *src) { if (!src) { restore_cardno = 0; +#if 0 + currprefs.uaeboard = changed_prefs.uaeboard = -1; +#endif return NULL; } TCHAR *s; @@ -4005,7 +4009,23 @@ uae_u8 *restore_expansion_boards(uae_u8 *src) for (int j = 0; j < 16; j++) { ec->aci.autoconfig_bytes[j] = restore_u8(); } - +#if 0 + if (ec->flags & CARD_FLAG_UAEROM) { + if (ec->base >= 0xe90000 && ec->base < 0xf00000) { + if (ec->size > 65536) { + currprefs.uaeboard = changed_prefs.uaeboard = 2; + } else { + if (currprefs.uaeboard < 0) { + currprefs.uaeboard = changed_prefs.uaeboard = 0; + } else { + currprefs.uaeboard = changed_prefs.uaeboard = 1; + } + } + } else { + currprefs.uaeboard = changed_prefs.uaeboard = 0; + } + } +#endif uae_u32 dev_num = 0; uae_u32 romtype = restore_u32(); if (romtype != 0xffffffff) { @@ -4101,12 +4121,15 @@ void restore_expansion_finish(void) struct card_data *ec = &cards_set[i]; cards[i] = ec; struct romconfig *rc = ec->rc; + expamem_board_pointer = ec->base; // Handle only IO boards, RAM boards are handled differently + ec->aci.doinit = false; + ec->aci.start = ec->base; + ec->aci.size = ec->size; + ec->aci.prefs = &currprefs; + ec->aci.ert = ec->ert; + ec->aci.rc = rc; if (rc && ec->ert) { - ec->aci.doinit = false; - ec->aci.start = ec->base; - ec->aci.size = ec->size; - ec->aci.prefs = &currprefs; _tcscpy(ec->aci.name, ec->ert->friendlyname); if (ec->ert->init) { if (ec->ert->init(&ec->aci)) { diff --git a/gfxboard.cpp b/gfxboard.cpp index a98b4526..254dc55f 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -140,7 +140,7 @@ static const struct gfxboard boards[] = { _T("Piccolo SD64 Zorro III"), _T("Ingenieurbüro Helfrich"), _T("PiccoloSD64_Z3"), BOARD_MANUFACTURER_PICCOLO, BOARD_MODEL_MEMORY_PICCOLO64, BOARD_MODEL_REGISTERS_PICCOLO64, - 0x00000000, 0x00200000, 0x00400000, 0x04000000, CIRRUS_ID_CLGD5434, 3, 6, true + 0x00000000, 0x00200000, 0x00400000, 0x01000000, CIRRUS_ID_CLGD5434, 3, 6, true }, { _T("Spectrum 28/24 Zorro II"), _T("Great Valley Products"), _T("Spectrum28/24_Z2"), @@ -162,7 +162,7 @@ static const struct gfxboard boards[] = // REG:00600000 IO:00200000 VRAM:01000000 _T("Picasso IV Zorro III"), _T("Village Tronic"), _T("PicassoIV_Z3"), BOARD_MANUFACTURER_PICASSO, BOARD_MODEL_MEMORY_PICASSOIV, 0, - 0x00000000, 0x00400000, 0x00400000, 0x04000000, CIRRUS_ID_CLGD5446, 3, 2, false, + 0x00000000, 0x00400000, 0x00400000, 0x02000000, CIRRUS_ID_CLGD5446, 3, 2, false, ROMTYPE_PICASSOIV }, { diff --git a/memory.cpp b/memory.cpp index 487d83ad..18d0c757 100644 --- a/memory.cpp +++ b/memory.cpp @@ -2344,6 +2344,8 @@ static void allocate_memory (void) if (savestate_state == STATE_RESTORE) { if (bootrom_filepos) { + if (currprefs.uaeboard <= 0) + currprefs.uaeboard = 1; protect_roms (false); restore_ram (bootrom_filepos, rtarea_bank.baseaddr); protect_roms (true); diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 31a6f9f1..0db5ee89 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -5521,16 +5521,19 @@ static void WIN32_HandleRegistryStuff (void) size = sizeof (version) / sizeof (TCHAR); if (regquerystr (NULL, _T("Version"), version, &size)) { int ver = 0; - if (checkversion (version, &ver)) - regsetstr (NULL, _T("Version"), VersionStr); - // Reset GUI setting if pre-4.3.0 - if (ver > 0x030000 && ver < 0x040300) { - regdelete(NULL, _T("GUISizeX")); - regdelete(NULL, _T("GUISizeY")); - regdelete(NULL, _T("GUISizeFWX")); - regdelete(NULL, _T("GUISizeFWY")); - regdelete(NULL, _T("GUISizeFSX")); - regdelete(NULL, _T("GUISizeFSY")); + if (checkversion(version, &ver)) { + regsetstr(NULL, _T("Version"), VersionStr); + // Reset GUI setting if pre-4.3.0 + if (ver > 0x030000 && ver < 0x040300) { + regdelete(NULL, _T("GUISizeX")); + regdelete(NULL, _T("GUISizeY")); + regdelete(NULL, _T("GUISizeFWX")); + regdelete(NULL, _T("GUISizeFWY")); + regdelete(NULL, _T("GUISizeFSX")); + regdelete(NULL, _T("GUISizeFSY")); + regdelete(NULL, _T("GUIFont")); + regdelete(NULL, _T("GUIListFont")); + } } } else { regsetstr (NULL, _T("Version"), VersionStr); diff --git a/od-win32/win32.h b/od-win32/win32.h index 500b2334..477e088c 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("5") +#define WINUAEBETA _T("6") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2019, 11, 16) +#define WINUAEDATE MAKEBD(2019, 12, 2) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index af5237f9..e53d96bb 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -12202,16 +12202,16 @@ static void saveguisize(void) static void getstoredguisize(void) { if (full_property_sheet || isfullscreen () == 0) { - regqueryint (NULL, _T("GUISizeX"), &gui_width); - regqueryint (NULL, _T("GUISizeY"), &gui_height); + regqueryint(NULL, _T("GUISizeX"), &gui_width); + regqueryint(NULL, _T("GUISizeY"), &gui_height); scaleresource_init(gui_fullscreen ? _T("GFS") : _T(""), gui_fullscreen); } else if (isfullscreen () < 0) { - regqueryint (NULL, _T("GUISizeFWX"), &gui_width); - regqueryint (NULL, _T("GUISizeFWY"), &gui_height); + regqueryint(NULL, _T("GUISizeFWX"), &gui_width); + regqueryint(NULL, _T("GUISizeFWY"), &gui_height); scaleresource_init(gui_fullscreen ? _T("FW_GFS") : _T("FW"), gui_fullscreen); } else if (isfullscreen () > 0) { - regqueryint (NULL, _T("GUISizeFSX"), &gui_width); - regqueryint (NULL, _T("GUISizeFSY"), &gui_height); + regqueryint(NULL, _T("GUISizeFSX"), &gui_width); + regqueryint(NULL, _T("GUISizeFSY"), &gui_height); scaleresource_init(gui_fullscreen ? _T("FS_GFS") : _T("FS"), gui_fullscreen); } } -- 2.47.3