Commit e84908e6 authored by GnoStiC's avatar GnoStiC

puae 2.3.3

parent 65b99a5c
......@@ -373,7 +373,7 @@ static uae_u32 akiko_c2p_read (int offset)
static int subcodecounter;
#define MAX_SUBCODEBUFFER 20
#define MAX_SUBCODEBUFFER 36
static volatile int subcodebufferoffset, subcodebufferoffsetw;
static uae_u8 subcodebufferinuse[MAX_SUBCODEBUFFER];
static uae_u8 subcodebuffer[MAX_SUBCODEBUFFER * SUB_CHANNEL_SIZE];
......
......@@ -28,7 +28,7 @@
#define scsi_log write_log
#define CDDA_BUFFERS 6
#define CDDA_BUFFERS 12
enum audenc { AUDENC_NONE, AUDENC_PCM, AUDENC_MP3, AUDENC_FLAC };
......
......@@ -55,7 +55,7 @@
#define MODEL_NAME "MATSHITA0.96"
/* also MATSHITA0.97 exists but is apparently rare */
#define MAX_SUBCODEBUFFER 16
#define MAX_SUBCODEBUFFER 36
static volatile int subcodebufferoffset, subcodebufferoffsetw, subcodeoffset;
static uae_u8 subcodebufferinuse[MAX_SUBCODEBUFFER];
static uae_u8 subcodebuffer[MAX_SUBCODEBUFFER * SUB_CHANNEL_SIZE];
......
......@@ -157,9 +157,10 @@ static const TCHAR *kbleds[] = { "none", "POWER", "DF0", "DF1", "DF2", "DF3", "H
static const TCHAR *onscreenleds[] = { "false", "true", "rtg", "both", 0 };
static const TCHAR *soundfiltermode1[] = { "off", "emulated", "on", 0 };
static const TCHAR *soundfiltermode2[] = { "standard", "enhanced", 0 };
static const TCHAR *lorestype1[] = { "lores", "hires", "superhires" };
static const TCHAR *lorestype2[] = { "true", "false" };
static const TCHAR *lorestype1[] = { "lores", "hires", "superhires", 0 };
static const TCHAR *lorestype2[] = { "true", "false", 0 };
static const TCHAR *loresmode[] = { "normal", "filtered", 0 };
static const TCHAR *vertmode[] = { "single", "double", "quadruple", 0 };
#ifdef GFXFILTER
static const TCHAR *filtermode2[] = { "1x", "2x", "3x", "4x", 0 };
#endif
......@@ -842,6 +843,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
cfgfile_write (f, "gfx_height_fullscreen", "%d", p->gfx_size_fs.height);
cfgfile_write (f, "gfx_refreshrate", "%d", p->gfx_refreshrate);
cfgfile_write_bool (f, "gfx_autoresolution", p->gfx_autoresolution);
cfgfile_dwrite (f, "gfx_autoresolution_min_vertical", lorestype1[p->gfx_autoresolution_minv]);
cfgfile_dwrite (f, "gfx_autoresolution_min_horizontal", vertmode[p->gfx_autoresolution_minh]);
cfgfile_write (f, "gfx_backbuffers", "%d", p->gfx_backbuffers);
cfgfile_write_str (f, "gfx_vsync", vsyncmodes[p->gfx_avsync]);
cfgfile_write_str (f, "gfx_vsyncmode", vsyncmodes2[p->gfx_avsyncmode]);
......@@ -1540,6 +1544,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|| cfgfile_intval (option, value, "gfx_height_fullscreen", &p->gfx_size_fs.height, 1)
|| cfgfile_intval (option, value, "gfx_refreshrate", &p->gfx_refreshrate, 1)
|| cfgfile_yesno (option, value, "gfx_autoresolution", &p->gfx_autoresolution)
|| cfgfile_strval (option, value, "gfx_autoresolution_min_vertical", &p->gfx_autoresolution_minv, lorestype1, 0)
|| cfgfile_strval (option, value, "gfx_autoresolution_min_horizontal", &p->gfx_autoresolution_minh, vertmode, 0)
|| cfgfile_intval (option, value, "gfx_backbuffers", &p->gfx_backbuffers, 1)
|| cfgfile_intval (option, value, "gfx_center_horizontal_position", &p->gfx_xcenter_pos, 1)
......
......@@ -2498,7 +2498,7 @@ STATIC_INLINE int sprites_differ (struct draw_info *dip, struct draw_info *dip_o
return 1;
}
npixels = this_last->max - this_last->pos;
npixels = this_last->first_pixel + (this_last->max - this_last->pos) - this_first->first_pixel;
if (memcmp (spixels + this_first->first_pixel, spixels + prev_first->first_pixel,
npixels * sizeof (uae_u16)) != 0)
return 1;
......@@ -5214,7 +5214,7 @@ static void vsync_handler_post (void)
if (rpt_available && currprefs.m68k_speed == 0) {
framewait ();
} else {
render_screen ();
if (render_screen ())
show_screen ();
}
}
......@@ -5222,7 +5222,7 @@ static void vsync_handler_post (void)
} else if (currprefs.m68k_speed == 0) {
framewait ();
} else {
render_screen ();
if (render_screen ())
show_screen ();
}
......@@ -5787,8 +5787,8 @@ static void hsync_handler_post (bool isvsync)
last_planes_vpos = vpos;
if (vpos >= minfirstline && first_planes_vpos == 0) {
first_planes_vpos = vpos > minfirstline ? vpos - 1 : vpos;
} else if (vpos == current_maxvpos () - 1) {
last_planes_vpos = vpos - 1;
} else if (vpos >= current_maxvpos () - 1) {
last_planes_vpos = current_maxvpos ();
}
}
if (diw_change == 0) {
......
......@@ -322,8 +322,8 @@ extern int firstword_bplcon1;
#define MIN_DISPLAY_W 256
#define MIN_DISPLAY_H 192
#define MAX_DISPLAY_W 352
#define MAX_DISPLAY_H 276
#define MAX_DISPLAY_W 362
#define MAX_DISPLAY_H 283
static int gclow, gcloh, gclox, gcloy;
......@@ -361,7 +361,7 @@ int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy)
plflastline_total = last_planes_vpos;
if (doublescan <= 0) {
int min = coord_diw_to_window_x (94);
int min = coord_diw_to_window_x (92);
int max = coord_diw_to_window_x (460);
if (diwfirstword_total < min)
diwfirstword_total = min;
......@@ -2160,7 +2160,7 @@ static void pfield_draw_line (int lineno, int gfx_ypos, int follow_ypos)
} else {
int tmp = hposblank;
hposblank = 1;
hposblank = brdblank;
fill_line ();
do_flush_line (gfx_ypos);
hposblank = tmp;
......@@ -2206,7 +2206,7 @@ static void center_image (void)
linetoscr_x_adjust_bytes = visible_left_border * gfxvidinfo.pixbytes;
visible_right_border = visible_left_border + gfxvidinfo.width;
visible_right_border = visible_left_border + w;
if (visible_right_border > max_diwlastword)
visible_right_border = max_diwlastword;
......@@ -2271,10 +2271,18 @@ static void init_drawing_frame (void)
if ((src->width > 0 && src->height > 0) || (currprefs.gfx_api || currprefs.gfx_filter > 0)) {
int nr = m >> 1;
int nl = (m & 1) == 0 ? 0 : 1;
if (nr < currprefs.gfx_autoresolution_minh)
nr = currprefs.gfx_autoresolution_minh;
if (nl < currprefs.gfx_autoresolution_minv)
nl = currprefs.gfx_autoresolution_minv;
if (nr > gfxvidinfo.gfx_resolution_reserved)
nr = gfxvidinfo.gfx_resolution_reserved;
if (nl > gfxvidinfo.gfx_vresolution_reserved)
nl = gfxvidinfo.gfx_vresolution_reserved;
if (changed_prefs.gfx_resolution != nr || changed_prefs.gfx_vresolution != nl) {
changed_prefs.gfx_resolution = nr;
changed_prefs.gfx_vresolution = nl;
......@@ -2575,6 +2583,8 @@ void finish_drawing_frame (void)
#ifdef ECS_DENISE
if (brdblank_changed) {
last_max_ypos = max_ypos_thisframe;
for (i = 0; i < sizeof linestate / sizeof *linestate; i++)
linestate[i] = LINE_UNDECIDED;
notice_screen_contents_lost ();
brdblank_changed = 0;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -307,7 +307,7 @@ void alloc_colors_rgb (int rw, int gw, int bw, int rs, int gs, int bs, int aw, i
int j;
if (currprefs.gfx_blackerthanblack) {
j = i * 15 / 16;
j = i * 15 / 16 + 15;
} else {
j = i;
}
......
......@@ -242,6 +242,7 @@ struct uae_prefs {
struct wh gfx_size_win_xtra[6];
struct wh gfx_size_fs_xtra[6];
bool gfx_autoresolution;
int gfx_autoresolution_minv, gfx_autoresolution_minh;
bool gfx_scandoubler;
int gfx_refreshrate;
int gfx_avsync, gfx_pvsync;
......
......@@ -8,16 +8,14 @@ DEFEVENT(MOUSE1_HORIZ,"Mouse1 Horizontal",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,0)
DEFEVENT(MOUSE1_VERT,"Mouse1 Vertical",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,1)
DEFEVENT(MOUSE1_HORIZ_INV,"Mouse1 Horizontal (inverted)",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,0|IE_INVERT)
DEFEVENT(MOUSE1_VERT_INV,"Mouse1 Vertical (inverted)",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,1|IE_INVERT)
DEFEVENT(MOUSE1_LAST,"", AM_DUMMY, 0,0,0)
DEFEVENT(MOUSE1_UP,"Mouse1 Up",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_UP)
DEFEVENT(MOUSE1_DOWN,"Mouse1 Down",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_DOWN)
DEFEVENT(MOUSE1_LEFT,"Mouse1 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,1,DIR_LEFT)
DEFEVENT(MOUSE1_RIGHT,"Mouse1 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,1,DIR_RIGHT)
DEFEVENT(MOUSE1_WHEEL,"Mouse1 Wheel",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,2)
DEFEVENT(MOUSE1_LAST,"", AM_DUMMY, 0,0,0)
DEFEVENT(MOUSE_CDTV_HORIZ,"CDTV Mouse Horizontal",AM_JOY_AXIS,8,1,0|IE_CDTV)
DEFEVENT(MOUSE_CDTV_VERT,"CDTV Mouse Vertical",AM_JOY_AXIS,8,1,1|IE_CDTV)
DEFEVENT(MOUSE_CDTV_UP,"CDTV Mouse Up",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_UP|IE_CDTV)
......@@ -62,14 +60,13 @@ DEFEVENT(MOUSE2_HORIZ,"Mouse2 Horizontal",AM_MOUSE_AXIS|AM_JOY_AXIS,8,2,0)
DEFEVENT(MOUSE2_VERT,"Mouse2 Vertical",AM_MOUSE_AXIS|AM_JOY_AXIS,8,2,1)
DEFEVENT(MOUSE2_HORIZ_INV,"Mouse2 Horizontal (inverted)",AM_MOUSE_AXIS|AM_JOY_AXIS,8,2,0|IE_INVERT)
DEFEVENT(MOUSE2_VERT_INV,"Mouse2 Vertical (inverted)",AM_MOUSE_AXIS|AM_JOY_AXIS,8,2,1|IE_INVERT)
DEFEVENT(MOUSE2_LAST,"", AM_DUMMY, 0,0,0)
DEFEVENT(MOUSE2_UP,"Mouse2 Up",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_UP)
DEFEVENT(MOUSE2_DOWN,"Mouse2 Down",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_DOWN)
DEFEVENT(MOUSE2_LEFT,"Mouse2 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,2,DIR_LEFT)
DEFEVENT(MOUSE2_RIGHT,"Mouse2 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,2,DIR_RIGHT)
DEFEVENT(MOUSE2_LAST,"", AM_DUMMY, 0,0,0)
DEFEVENT(JOY2_HORIZ,"Joy2 Horizontal",AM_JOY_AXIS,0,2,DIR_LEFT|DIR_RIGHT)
DEFEVENT(JOY2_VERT,"Joy2 Vertical",AM_JOY_AXIS,0,2,DIR_UP|DIR_DOWN)
DEFEVENT(JOY2_HORIZ_POT,"Joy2 Horizontal (Analog)",AM_JOY_AXIS,128,2,1)
......
/* src/sysconfig.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* we want ecs_denise */
#undef ECS_DENISE
......@@ -165,7 +168,7 @@
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if `st_blocks' is member of `struct stat'. */
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
......@@ -300,6 +303,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......@@ -371,29 +377,62 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
......
......@@ -1011,8 +1011,23 @@ static struct zfile *dsq (struct zfile *z, int lzx)
int blocksize = (buf[10] << 8) | buf[11];
struct zfile *zo;
int size = blocks * blocksize;
int off = buf[3] == 0x13 ? 52 : 32;
int off;
int i;
uae_u8 *bitmap = NULL;
uae_u8 *nullsector;
nullsector = xcalloc (uae_u8, blocksize);
if (buf[3] == 0x13) {
off = 52;
if (buf[off - 1] == 1) {
bitmap = &buf[off];
off += (blocks + 7) / 8;
} else if (buf[off - 1] > 1) {
write_log ("unknown DSQ extra header type %d\n", buf[off - 1]);
}
} else {
off = 32;
}
if (size < 1760 * 512)
size = 1760 * 512;
......@@ -1026,13 +1041,21 @@ static struct zfile *dsq (struct zfile *z, int lzx)
}
zo = zfile_fopen_empty (z, fn, size);
xfree (fn);
for (i = 0; i < blocks / (sectors / heads); i++) {
zfile_fwrite (buf + off, sectors * blocksize / heads, 1, zo);
off += sectors * (blocksize + 16) / heads;
for (i = 0; i < blocks; i++) {
int bmoff = i - 2;
if (bmoff >= 0 && bitmap && (bitmap[bmoff / 8] & (1 << ((bmoff & 7))))) {
zfile_fwrite (nullsector, blocksize, 1, zo);
} else {
zfile_fwrite (buf + off, blocksize, 1, zo);
off += blocksize;
}
if ((i % sectors) == sectors - 1)
off += sectors * 16;
}
//FIXME: zfile_fclose_archive (zv);
zfile_fclose (z);
xfree (buf);
xfree (nullsector);
return zo;
}
xfree (buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment