Merge branch 'dev'

This commit is contained in:
Dimitris Panokostas 2020-09-17 12:07:42 +02:00
commit 5c5a8ad341
7 changed files with 90 additions and 38 deletions

View file

@ -1119,6 +1119,9 @@ static uae_u8 ReadCIAA (unsigned int addr, uae_u32 *flags)
else else
return getciatod(ciaatod) >> 24; return getciatod(ciaatod) >> 24;
} }
else {
return 0xff;
}
break; break;
case 12: case 12:
#if KB_DEBUG #if KB_DEBUG
@ -1234,6 +1237,9 @@ static uae_u8 ReadCIAB (unsigned int addr, uae_u32 *flags)
else else
return getciatod(ciabtod) >> 24; return getciatod(ciabtod) >> 24;
} }
else {
return 0xff;
}
break; break;
case 12: case 12:
return ciabsdr; return ciabsdr;
@ -1597,7 +1603,7 @@ void CIA_reset (void)
ciaapra = 0; ciaadra = 0; ciaapra = 0; ciaadra = 0;
ciaatod = ciabtod = 0; ciaatodon = ciabtodon = 0; ciaatod = ciabtod = 0; ciaatodon = ciabtodon = 0;
ciaaicr = ciabicr = ciaaimask = ciabimask = 0; ciaaicr = ciabicr = ciaaimask = ciabimask = 0;
ciaacra = ciaacrb = ciabcra = ciabcrb = 0x4; /* outmode = toggle; */ ciaacra = ciaacrb = ciabcra = ciabcrb = 0;
ciaala = ciaalb = ciabla = ciablb = ciaata = ciaatb = ciabta = ciabtb = 0xFFFF; ciaala = ciaalb = ciabla = ciablb = ciaata = ciaatb = ciabta = ciabtb = 0xFFFF;
ciaaalarm = ciabalarm = 0; ciaaalarm = ciabalarm = 0;
ciabpra = 0x8C; ciabdra = 0; ciabpra = 0x8C; ciabdra = 0;

View file

@ -2043,6 +2043,7 @@ static void init_ham_decoding (void)
} }
#endif #endif
} else { } else {
if (!bpldualpf) {
/* OCS/ECS mode HAM6 */ /* OCS/ECS mode HAM6 */
while (unpainted_amiga-- > 0) { while (unpainted_amiga-- > 0) {
int pv = pixdata.apixels[ham_decode_pixel++]; int pv = pixdata.apixels[ham_decode_pixel++];
@ -2055,6 +2056,22 @@ static void init_ham_decoding (void)
} }
} }
} }
else {
/* OCS/ECS mode HAM6 + DPF */
while (unpainted_amiga-- > 0) {
int pv = pixdata.apixels[ham_decode_pixel++];
int* lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
int idx = lookup[pv];
switch (pv & 0x30)
{
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[idx] & 0xfff; break;
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (idx & 0xF); break;
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (idx & 0xF) << 8; break;
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (idx & 0xF) << 4; break;
}
}
}
}
} }
static void decode_ham (int pix, int stoppos, int blank) static void decode_ham (int pix, int stoppos, int blank)
@ -2106,6 +2123,7 @@ static void decode_ham (int pix, int stoppos, int blank)
} }
#endif #endif
} else { } else {
if (!bpldualpf) {
/* OCS/ECS mode HAM6 */ /* OCS/ECS mode HAM6 */
while (todraw_amiga-- > 0) { while (todraw_amiga-- > 0) {
int pv = pixdata.apixels[ham_decode_pixel]; int pv = pixdata.apixels[ham_decode_pixel];
@ -2119,6 +2137,23 @@ static void decode_ham (int pix, int stoppos, int blank)
ham_linebuf[ham_decode_pixel++] = ham_lastcolor; ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
} }
} }
else {
/* OCS/ECS mode HAM6 + DPF */
while (todraw_amiga-- > 0) {
int pv = pixdata.apixels[ham_decode_pixel];
int* lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
int idx = lookup[pv];
switch (pv & 0x30)
{
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[idx] & 0xfff; break;
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (idx & 0xF); break;
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (idx & 0xF) << 8; break;
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (idx & 0xF) << 4; break;
}
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
}
}
}
} }
static void erase_ham_right_border(int pix, int stoppos, bool blank) static void erase_ham_right_border(int pix, int stoppos, bool blank)

View file

@ -31,6 +31,8 @@
#include "uae.h" #include "uae.h"
#include "memory.h" #include "memory.h"
#include "custom.h" #include "custom.h"
#include "events.h"
#include "newcpu.h"
#include "filesys.h" #include "filesys.h"
#include "autoconf.h" #include "autoconf.h"
#include "fsusage.h" #include "fsusage.h"
@ -700,7 +702,7 @@ static void fixcharset (TCHAR *s)
if (!s) if (!s)
return; return;
ua_fs_copy (tmp, MAX_DPATH, s, '_'); ua_fs_copy (tmp, MAX_DPATH, s, '_');
au_fs_copy (s, int(strlen (tmp)) + 1, tmp); au_fs_copy (s, strlen (tmp) + 1, tmp);
} }
TCHAR *validatevolumename (TCHAR *s, const TCHAR *def) TCHAR *validatevolumename (TCHAR *s, const TCHAR *def)
@ -6447,7 +6449,7 @@ static void action_free_record64(TrapContext *ctx, Unit *unit, dpacket *packet)
/* We don't want multiple interrupts to be active at the same time. I don't /* We don't want multiple interrupts to be active at the same time. I don't
* know whether AmigaOS takes care of that, but this does. */ * know whether AmigaOS takes care of that, but this does. */
static uae_sem_t singlethread_int_sem = 0; static uae_sem_t singlethread_int_sem;
#define SHELLEXEC_MAX_CMD_LEN 512 #define SHELLEXEC_MAX_CMD_LEN 512
@ -6810,6 +6812,7 @@ static int filesys_iteration(UnitInfo *ui)
/* The message is sent by our interrupt handler, so make sure an interrupt happens. */ /* The message is sent by our interrupt handler, so make sure an interrupt happens. */
do_uae_int_requested(); do_uae_int_requested();
trap_background_set_complete(ctx);
return 1; return 1;
} }

View file

@ -394,17 +394,16 @@ int graphics_setup(void)
write_log("Trying to get Current Video Driver...\n"); write_log("Trying to get Current Video Driver...\n");
sdl_video_driver = SDL_GetCurrentVideoDriver(); sdl_video_driver = SDL_GetCurrentVideoDriver();
SDL_DisplayMode current_mode; const auto should_be_zero = SDL_GetCurrentDisplayMode(0, &sdlMode);
const auto should_be_zero = SDL_GetCurrentDisplayMode(0, &current_mode);
if (should_be_zero == 0) if (should_be_zero == 0)
{ {
write_log("Current Display mode: bpp %i\t%s\t%i x %i\t%iHz\n", SDL_BITSPERPIXEL(current_mode.format), SDL_GetPixelFormatName(current_mode.format), current_mode.w, current_mode.h, current_mode.refresh_rate); write_log("Current Display mode: bpp %i\t%s\t%i x %i\t%iHz\n", SDL_BITSPERPIXEL(sdlMode.format), SDL_GetPixelFormatName(sdlMode.format), sdlMode.w, sdlMode.h, sdlMode.refresh_rate);
host_hz = current_mode.refresh_rate; host_hz = sdlMode.refresh_rate;
} }
Uint32 sdl_window_mode; Uint32 sdl_window_mode;
if (sdl_video_driver != nullptr && strcmp(sdl_video_driver,"x11") == 0 if (sdl_video_driver != nullptr && strcmp(sdl_video_driver,"x11") == 0
&& current_mode.w >= 800 && current_mode.h >= 600) && sdlMode.w >= 800 && sdlMode.h >= 600)
{ {
// Only enable Windowed mode if we're running under x11 and the resolution is at least 800x600 // Only enable Windowed mode if we're running under x11 and the resolution is at least 800x600
sdl_window_mode = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE; sdl_window_mode = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE;
@ -825,8 +824,18 @@ static void open_screen(struct uae_prefs* p)
//pixel_format = SDL_PIXELFORMAT_RGB565; //pixel_format = SDL_PIXELFORMAT_RGB565;
display_depth = 32; display_depth = 32;
pixel_format = SDL_PIXELFORMAT_RGBA32; pixel_format = SDL_PIXELFORMAT_RGBA32;
const auto width = display_width * 2 >> p->gfx_resolution; int width, height;
const auto height = display_height * 2 >> p->gfx_vresolution;
if (changed_prefs.gfx_correct_aspect == 0)
{
width = sdlMode.w;
height = sdlMode.h;
}
else
{
width = display_width * 2 >> p->gfx_resolution;
height = display_height * 2 >> p->gfx_vresolution;
}
if (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180) if (amiberry_options.rotation_angle == 0 || amiberry_options.rotation_angle == 180)
{ {

View file

@ -623,11 +623,6 @@ void RefreshPanelDisplay()
chkBlackerThanBlack->setSelected(changed_prefs.gfx_blackerthanblack); chkBlackerThanBlack->setSelected(changed_prefs.gfx_blackerthanblack);
chkAspect->setSelected(changed_prefs.gfx_correct_aspect); chkAspect->setSelected(changed_prefs.gfx_correct_aspect);
#ifdef USE_DISPMANX
chkAspect->setEnabled(true);
#else
chkAspect->setEnabled(false);
#endif
chkFilterLowRes->setSelected(changed_prefs.gfx_lores_mode); chkFilterLowRes->setSelected(changed_prefs.gfx_lores_mode);
if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_WINDOW) if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_WINDOW)

View file

@ -22,8 +22,8 @@
#define GETBDM(x) (((x) - (((x) / 10000) * 10000)) / 100) #define GETBDM(x) (((x) - (((x) / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100) #define GETBDD(x) ((x) % 100)
#define AMIBERRYVERSION _T("Amiberry v3.2.1 (2020-09-06)") #define AMIBERRYVERSION _T("Amiberry v3.3 (2020-09-17)")
#define AMIBERRYDATE MAKEBD(2020, 9, 6) #define AMIBERRYDATE MAKEBD(2020, 9, 17)
#define IHF_WINDOWHIDDEN 6 #define IHF_WINDOWHIDDEN 6

View file

@ -44,8 +44,12 @@ STATIC_INLINE void uae_set_thread_priority(uae_thread_id* id, int pri)
} }
STATIC_INLINE void uae_end_thread(uae_thread_id* tid) STATIC_INLINE void uae_end_thread(uae_thread_id* tid)
{
if (tid)
{ {
SDL_WaitThread(*tid, static_cast<int*>(nullptr)); SDL_WaitThread(*tid, static_cast<int*>(nullptr));
*tid = NULL;
}
} }
STATIC_INLINE long uae_start_thread(const TCHAR* name, int (*f)(void*), void* arg, uae_thread_id* foo) STATIC_INLINE long uae_start_thread(const TCHAR* name, int (*f)(void*), void* arg, uae_thread_id* foo)