Commit 589916df authored by mtufan's avatar mtufan

puae 2.3.3 fixes

parent bae18629
......@@ -8,7 +8,7 @@ base=" --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --enable-drvsnd
cd32=" --enable-cd32 "
a600=" --enable-gayle "
scsi=" --enable-scsi-device --enable-ncr --enable-a2091 "
other=" --with-caps --enable-amax --enable-gccopt"
other=" --with-caps --enable-amax --enable-gccopt --enable-serial-port"
#
#
./bootstrap.sh
......
......@@ -677,6 +677,7 @@ AC_ARG_ENABLE(noflags, AS_HELP_STRING([--enable-noflags], [Enable
AC_ARG_ENABLE(ncr, AS_HELP_STRING([--enable-ncr], [Enable NCR SCSI emulation (default no)]), [WANT_NCR=$enableval],[])
AC_ARG_ENABLE(scsi-device, AS_HELP_STRING([--enable-scsi-device], [Enable emulation of SCSI devices (default no)]), [WANT_SCSIEMU=$enableval],[])
AC_ARG_ENABLE(save-state, AS_HELP_STRING([--disable-save-state], [Disable support for saving state snapshots (default no)]), [WANT_SAVESTATE=$enableval],[])
AC_ARG_ENABLE(serial-port, AS_HELP_STRING([--enable-serial-port], [Enable serial port emulation (default no)]), [WANT_SERIAL=$enableval],[])
AC_ARG_ENABLE(threads, AS_HELP_STRING([--enable-threads], [Enable thread support (default auto)]), [WANT_THREADS=$enableval],[])
AC_ARG_ENABLE(ui, AS_HELP_STRING([--enable-ui], [Use a user interface if possible (default on)]), [WANT_UI=$enableval],[])
AC_ARG_ENABLE(vidmode, AS_HELP_STRING([--enable-vidmode], [X11 version: Use the XF86VidMode extension]), [WANT_VIDMODE=$enableval],[])
......@@ -1764,6 +1765,20 @@ else
AC_MSG_RESULT(no)
fi
dnl
dnl serial port emulation
dnl
AC_MSG_CHECKING([whether to build serial port emulation])
if [[ "x$WANT_BSDSOCK" != "xyes" ]]; then
dnl NEED_THREAD_SUPPORT=yes
UAE_DEFINES="$UAE_DEFINES -DSERIAL_PORT"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl
dnl 64 bit?
dnl //mtufan
......
......@@ -942,7 +942,7 @@ static uae_u32 REGPARAM2 dmac_wgeti (uaecptr addr)
}
static uae_u32 REGPARAM2 dmac_lgeti (uaecptr addr)
{
uae_u32 v = 0xffff;
uae_u32 v;
#ifdef JIT
special_mem |= S_READ;
#endif
......@@ -957,6 +957,7 @@ static int REGPARAM2 dmac_check (uaecptr addr, uae_u32 size)
static uae_u8 *REGPARAM2 dmac_xlate (uaecptr addr)
{
write_log ("%x ", addr);
addr &= rom_mask;
addr += rombank * rom_size;
return rom + addr;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -553,7 +553,7 @@ static void check_changes (int unitnum)
imagechangetime[unitnum] = 8 * 50;
}
}
write_log ("CD: eject (%s) open=%d\n", pollmode ? L"slow" : L"fast", wasopen[unitnum] ? 1 : 0);
write_log ("CD: eject (%s) open=%d\n", pollmode ? "slow" : "fast", wasopen[unitnum] ? 1 : 0);
#ifdef RETROPLATFORM
rp_cd_image_change (unitnum, NULL);
#endif
......@@ -571,7 +571,7 @@ static void check_changes (int unitnum)
_tcscpy (changed_prefs.cdslots[unitnum].name, newimagefiles[unitnum]);
currprefs.cdslots[unitnum].inuse = changed_prefs.cdslots[unitnum].inuse = cdimagefileinuse[unitnum];
newimagefiles[unitnum][0] = 0;
write_log ("CD: delayed insert '%s' (open=%d)\n", currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : L"<EMPTY>", wasopen[unitnum] ? 1 : 0);
write_log ("CD: delayed insert '%s' (open=%d)\n", currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : "<EMPTY>", wasopen[unitnum] ? 1 : 0);
device_func_init (0);
if (wasopen[unitnum]) {
if (!device_func[unitnum]->opendev (unitnum, currprefs.cdslots[unitnum].name, 0)) {
......
......@@ -2537,7 +2537,6 @@ static void finish_decisions (void)
decide_diw (hpos);
decide_line (hpos);
decide_fetch (hpos);
finish_final_fetch (hpos, fetchmode);
record_color_change2 (hsyncstartpos, 0xffff, 0);
if (thisline_decision.plfleft != -1 && thisline_decision.plflinelen == -1) {
......
......@@ -1094,7 +1094,7 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
/* High-density or diskspare disk? */
drv->num_tracks = 0;
if (size > 160 * 11 * 512) { // larger than standard adf?
if (size > 160 * 11 * 512 + 511) { // larger than standard adf?
for (i = 80; i <= 83; i++) {
if (size == i * 22 * 512 * 2) { // HD
drv->ddhd = 2;
......@@ -3590,8 +3590,10 @@ void restore_disk_finish (void)
currprefs.nr_floppies = changed_prefs.nr_floppies = cnt;
DISK_check_change ();
setamax ();
#if 0
if (dskdmaen)
dumpdisk ();
#endif
}
uae_u8 *restore_disk (int num,uae_u8 *src)
......
......@@ -870,12 +870,16 @@ STATIC_INLINE uae_u8 render_sprites (int pos, int dualpf, uae_u8 apixel, int aga
STATIC_INLINE uae_u32 shsprite (int dpix, uae_u32 spix_val, uae_u32 v, int spr)
{
uae_u8 sprcol;
uae_u16 scol;
if (!spr)
return v;
sprcol = render_sprites (dpix, 0, spix_val, 0);
if (sprcol)
return colors_for_drawing.color_regs_ecs[sprcol];
if (!sprcol)
return v;
/* good enough for now.. */
scol = colors_for_drawing.color_regs_ecs[sprcol] & 0xccc;
scol |= scol >> 2;
return xcolors[scol];
}
static int NOINLINE linetoscr_16_sh (int spix, int dpix, int stoppos, int spr)
......
......@@ -9,6 +9,8 @@
*
*/
//#define EXP_DEBUG
#include "sysconfig.h"
#include "sysdeps.h"
......@@ -19,7 +21,6 @@
#include "autoconf.h"
#include "custom.h"
#include "newcpu.h"
#include "picasso96.h"
#include "savestate.h"
#include "zfile.h"
#include "catweasel.h"
......@@ -234,6 +235,9 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr)
#endif
addr &= 0xFFFF;
b = expamem[addr];
#ifdef EXP_DEBUG
write_log ("expamem_bget %x %x\n", addr, b);
#endif
return b;
}
......@@ -267,6 +271,9 @@ static void REGPARAM2 expamem_lput (uaecptr addr, uae_u32 value)
static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
{
#ifdef EXP_DEBUG
write_log ("expamem_wput %x %x\n", addr, value);
#endif
#ifdef JIT
special_mem |= S_WRITE;
#endif
......@@ -319,6 +326,9 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
static void REGPARAM2 expamem_bput (uaecptr addr, uae_u32 value)
{
#ifdef EXP_DEBUG
write_log ("expamem_bput %x %x\n", addr, value);
#endif
#ifdef JIT
special_mem |= S_WRITE;
#endif
......@@ -638,6 +648,9 @@ static uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
addr -= filesys_start & 65535;
addr &= 65535;
m = filesysory + addr;
#ifdef EXP_DEBUG
write_log ("filesys_lget %x %x\n", addr, do_get_mem_long ((uae_u32 *)m));
#endif
return do_get_mem_long ((uae_u32 *)m);
}
......@@ -650,6 +663,9 @@ static uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
addr -= filesys_start & 65535;
addr &= 65535;
m = filesysory + addr;
#ifdef EXP_DEBUG
write_log ("filesys_wget %x %x\n", addr, do_get_mem_word ((uae_u16 *)m));
#endif
return do_get_mem_word ((uae_u16 *)m);
}
......@@ -660,6 +676,9 @@ static uae_u32 REGPARAM2 filesys_bget (uaecptr addr)
#endif
addr -= filesys_start & 65535;
addr &= 65535;
#ifdef EXP_DEBUG
write_log ("filesys_bget %x %x\n", addr, filesysory[addr]);
#endif
return filesysory[addr];
}
......@@ -684,6 +703,9 @@ static void REGPARAM2 filesys_bput (uaecptr addr, uae_u32 b)
#ifdef JIT
special_mem |= S_WRITE;
#endif
#ifdef EXP_DEBUG
write_log ("filesys_bput %x %x\n", addr, b);
#endif
}
static addrbank filesys_bank = {
......
......@@ -2966,6 +2966,10 @@ static void inputdevice_checkconfig (void)
currprefs.jports[1].id != changed_prefs.jports[1].id ||
currprefs.jports[2].id != changed_prefs.jports[2].id ||
currprefs.jports[3].id != changed_prefs.jports[3].id ||
currprefs.jports[0].mode != changed_prefs.jports[0].mode ||
currprefs.jports[1].mode != changed_prefs.jports[1].mode ||
currprefs.jports[2].mode != changed_prefs.jports[2].mode ||
currprefs.jports[3].mode != changed_prefs.jports[3].mode ||
currprefs.input_selected_setting != changed_prefs.input_selected_setting ||
currprefs.input_joymouse_multiplier != changed_prefs.input_joymouse_multiplier ||
currprefs.input_joymouse_deadzone != changed_prefs.input_joymouse_deadzone ||
......
......@@ -1781,11 +1781,18 @@ static bool load_kickstart_replacement (void)
struct zfile *f;
f = zfile_fopen_data ("aros.gz", arosrom_len, arosrom);
if (!f)
if (!f) {
write_log ("KS Replacement: AROS open failed\n");
return false;
}
f = zfile_gunzip (f);
if (!f)
if (!f) {
write_log ("KS Replacement: AROS gunzip failed\n");
return false;
} else {
write_log ("KS Replacement: AROS ok\n");
}
kickmem_mask = 0x80000 - 1;
kickmem_size = 0x80000;
extendedkickmem_size = 0x80000;
......
......@@ -69,6 +69,9 @@ static struct winuae_currentmode *currentmode = &currentmodestruct;
static int serial_period_hsyncs, serial_period_hsync_counter;
static int data_in_serdatr; /* new data received */
// serial
unsigned int seriallog = 0;
// dinput
int rawkeyboard = -1;
static bool rawinput_enabled_mouse, rawinput_enabled_keyboard;
......@@ -1516,3 +1519,17 @@ double getcurrentvblankrate (void)
*/
return 50;
}
// parser.c
void serialuartbreak (int v)
{
if (/*hCom == INVALID_HANDLE_VALUE ||*/ !currprefs.use_serial)
return;
/* if (v)
EscapeCommFunction (hCom, SETBREAK);
else
EscapeCommFunction (hCom, CLRBREAK);
*/
}
......@@ -42,7 +42,7 @@
#define O_NONBLOCK O_NDELAY
#endif
#define SERIALDEBUG 1 /* 0, 1, 2 3 */
#define SERIALDEBUG 0 /* 0, 1, 2 3 */
#define MODEMTEST 0 /* 0 or 1 */
void serial_open (void);
......
/* 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
......@@ -168,7 +165,7 @@
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
/* Define to 1 if `st_blocks' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
......@@ -303,9 +300,6 @@
/* 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
......@@ -377,62 +371,29 @@
/* 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 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 your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* 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
......
......@@ -1757,7 +1757,6 @@ static struct zfile *zfile_fopenx2 (const TCHAR *name, const TCHAR *mode, int ma
{
struct zfile *f;
TCHAR tmp[MAX_DPATH];
TCHAR dirsep[2] = { FSDB_DIR_SEPARATOR, '\0' };
#ifdef _WIN32
if (isinternetfile (name))
......
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