Merge branch 'dev'
This commit is contained in:
commit
5c5a8ad341
7 changed files with 90 additions and 38 deletions
|
@ -1119,6 +1119,9 @@ static uae_u8 ReadCIAA (unsigned int addr, uae_u32 *flags)
|
|||
else
|
||||
return getciatod(ciaatod) >> 24;
|
||||
}
|
||||
else {
|
||||
return 0xff;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
#if KB_DEBUG
|
||||
|
@ -1234,6 +1237,9 @@ static uae_u8 ReadCIAB (unsigned int addr, uae_u32 *flags)
|
|||
else
|
||||
return getciatod(ciabtod) >> 24;
|
||||
}
|
||||
else {
|
||||
return 0xff;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
return ciabsdr;
|
||||
|
@ -1597,7 +1603,7 @@ void CIA_reset (void)
|
|||
ciaapra = 0; ciaadra = 0;
|
||||
ciaatod = ciabtod = 0; ciaatodon = ciabtodon = 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;
|
||||
ciaaalarm = ciabalarm = 0;
|
||||
ciabpra = 0x8C; ciabdra = 0;
|
||||
|
|
|
@ -2043,15 +2043,32 @@ static void init_ham_decoding (void)
|
|||
}
|
||||
#endif
|
||||
} else {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (unpainted_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel++];
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[pv] & 0xfff; break;
|
||||
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (pv & 0xF); break;
|
||||
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (pv & 0xF) << 8; break;
|
||||
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
if (!bpldualpf) {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (unpainted_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel++];
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[pv] & 0xfff; break;
|
||||
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (pv & 0xF); break;
|
||||
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (pv & 0xF) << 8; break;
|
||||
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2106,17 +2123,35 @@ static void decode_ham (int pix, int stoppos, int blank)
|
|||
}
|
||||
#endif
|
||||
} else {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (todraw_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel];
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[pv] & 0xfff; break;
|
||||
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (pv & 0xF); break;
|
||||
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (pv & 0xF) << 8; break;
|
||||
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
if (!bpldualpf) {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (todraw_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel];
|
||||
switch (pv & 0x30)
|
||||
{
|
||||
case 0x00: ham_lastcolor = colors_for_drawing.color_regs_ecs[pv] & 0xfff; break;
|
||||
case 0x10: ham_lastcolor &= 0xFF0; ham_lastcolor |= (pv & 0xF); break;
|
||||
case 0x20: ham_lastcolor &= 0x0FF; ham_lastcolor |= (pv & 0xF) << 8; break;
|
||||
case 0x30: ham_lastcolor &= 0xF0F; ham_lastcolor |= (pv & 0xF) << 4; break;
|
||||
}
|
||||
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;
|
||||
}
|
||||
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#include "uae.h"
|
||||
#include "memory.h"
|
||||
#include "custom.h"
|
||||
#include "events.h"
|
||||
#include "newcpu.h"
|
||||
#include "filesys.h"
|
||||
#include "autoconf.h"
|
||||
#include "fsusage.h"
|
||||
|
@ -700,7 +702,7 @@ static void fixcharset (TCHAR *s)
|
|||
if (!s)
|
||||
return;
|
||||
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)
|
||||
|
@ -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
|
||||
* 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
|
||||
|
||||
|
@ -6810,6 +6812,7 @@ static int filesys_iteration(UnitInfo *ui)
|
|||
/* The message is sent by our interrupt handler, so make sure an interrupt happens. */
|
||||
do_uae_int_requested();
|
||||
|
||||
trap_background_set_complete(ctx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -8637,7 +8640,7 @@ void filesys_vsync (void)
|
|||
return;
|
||||
|
||||
if (heartbeat_task & 1) {
|
||||
setsystime_vblank();
|
||||
setsystime_vblank ();
|
||||
heartbeat_task &= ~1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -394,17 +394,16 @@ int graphics_setup(void)
|
|||
write_log("Trying to get Current Video Driver...\n");
|
||||
sdl_video_driver = SDL_GetCurrentVideoDriver();
|
||||
|
||||
SDL_DisplayMode current_mode;
|
||||
const auto should_be_zero = SDL_GetCurrentDisplayMode(0, ¤t_mode);
|
||||
const auto should_be_zero = SDL_GetCurrentDisplayMode(0, &sdlMode);
|
||||
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);
|
||||
host_hz = 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 = sdlMode.refresh_rate;
|
||||
}
|
||||
|
||||
Uint32 sdl_window_mode;
|
||||
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
|
||||
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;
|
||||
display_depth = 32;
|
||||
pixel_format = SDL_PIXELFORMAT_RGBA32;
|
||||
const auto width = display_width * 2 >> p->gfx_resolution;
|
||||
const auto height = display_height * 2 >> p->gfx_vresolution;
|
||||
int width, height;
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -623,11 +623,6 @@ void RefreshPanelDisplay()
|
|||
chkBlackerThanBlack->setSelected(changed_prefs.gfx_blackerthanblack);
|
||||
|
||||
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);
|
||||
|
||||
if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_WINDOW)
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#define GETBDM(x) (((x) - (((x) / 10000) * 10000)) / 100)
|
||||
#define GETBDD(x) ((x) % 100)
|
||||
|
||||
#define AMIBERRYVERSION _T("Amiberry v3.2.1 (2020-09-06)")
|
||||
#define AMIBERRYDATE MAKEBD(2020, 9, 6)
|
||||
#define AMIBERRYVERSION _T("Amiberry v3.3 (2020-09-17)")
|
||||
#define AMIBERRYDATE MAKEBD(2020, 9, 17)
|
||||
|
||||
#define IHF_WINDOWHIDDEN 6
|
||||
|
||||
|
|
|
@ -45,7 +45,11 @@ STATIC_INLINE void uae_set_thread_priority(uae_thread_id* id, int pri)
|
|||
|
||||
STATIC_INLINE void uae_end_thread(uae_thread_id* tid)
|
||||
{
|
||||
SDL_WaitThread(*tid, static_cast<int*>(nullptr));
|
||||
if (tid)
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue