Update to E-UAE 0.8.29 (only the relevant files for WII port)

This commit is contained in:
fabio.olimpieri 2014-01-25 11:19:44 +00:00
parent a20bd73360
commit bb717201a4
40 changed files with 1888 additions and 1701 deletions

View File

@ -29,6 +29,7 @@ SRCS := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/caps/*.c $(SRC_DIR)/dms/*.c $(SRC_D
$(SRC_DIR)/gfxdep/sdlkeys.c \ $(SRC_DIR)/gfxdep/sdlkeys.c \
$(SRC_DIR)/guidep/gui-sdl.c \ $(SRC_DIR)/guidep/gui-sdl.c \
$(SRC_DIR)/guidep/menu.c \ $(SRC_DIR)/guidep/menu.c \
$(SRC_DIR)/guidep/VirtualKeyboard.c \
$(SRC_DIR)/joydep/joystick.c \ $(SRC_DIR)/joydep/joystick.c \
$(SRC_DIR)/machdep/support.c \ $(SRC_DIR)/machdep/support.c \
$(SRC_DIR)/osdep/main.c \ $(SRC_DIR)/osdep/main.c \
@ -61,6 +62,7 @@ SRCS := $(filter-out \
src/gengenblitter.c \ src/gengenblitter.c \
src/genlinetoscr.c \ src/genlinetoscr.c \
src/linetoscr.c \ src/linetoscr.c \
src/make_hdf.c \
src/readdisk.c \ src/readdisk.c \
src/scsiemul.c \ src/scsiemul.c \
src/svgancui.c \ src/svgancui.c \
@ -70,7 +72,7 @@ SRCS := $(filter-out \
genlinetoscr_args="-b" genlinetoscr_args="-b"
# Library object files. # Library object files.
OBJS := $(subst $(SRC_DIR),$(OBJ_DIR),$(SRCS:.c=.o)) $(OBJ_DIR)/guidep/VirtualKeyboard.o OBJS := $(subst $(SRC_DIR),$(OBJ_DIR),$(SRCS:.c=.o))
# Test source files. # Test source files.
# It can be useful to switch this variable around to select individual tests which are problematic. # It can be useful to switch this variable around to select individual tests which are problematic.
@ -165,7 +167,7 @@ uae.dol: uae.elf
@echo ---- @echo ----
# Compilation flags. # Compilation flags.
COMMON_FLAGS := -g -O2 -ftree-vectorize -ffast-math -pipe -fomit-frame-pointer -fdiagnostics-show-option $(MACHDEP) -Wall -Wno-unused -Wno-format COMMON_FLAGS := -g -O2 -ftree-vectorize -ffast-math -pipe -fdiagnostics-show-option $(MACHDEP) -Wall -Wno-unused -Wno-format
INCLUDES := -Isrc/md-generic/ -Isrc/include -Isrc -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/SDL -I$(PORTLIBS)/include INCLUDES := -Isrc/md-generic/ -Isrc/include -Isrc -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/SDL -I$(PORTLIBS)/include
DEFINES := -DOS_WITHOUT_MEMORY_MANAGEMENT -DSAVESTATE -DUSE_SDL -DSUPPORT_THREADS -DCPUEMU_0 -DCPUEMU_5 -DCPUEMU_6 \ DEFINES := -DOS_WITHOUT_MEMORY_MANAGEMENT -DSAVESTATE -DUSE_SDL -DSUPPORT_THREADS -DCPUEMU_0 -DCPUEMU_5 -DCPUEMU_6 \
-DFPUEMU -DAGA -DAUTOCONFIG -DFILESYS \ -DFPUEMU -DAGA -DAUTOCONFIG -DFILESYS \

69
README
View File

@ -1,5 +1,5 @@
E-UAE 0.8.29-WIP4 E-UAE 0.8.29
================= ============
E-UAE is an Amiga emulator, a program that allows you to run software E-UAE is an Amiga emulator, a program that allows you to run software
designed for Amiga computers on other platforms, such as Linux or Mac designed for Amiga computers on other platforms, such as Linux or Mac
@ -40,43 +40,42 @@ are available for purchase online from Cloanto (publishers of the
Amiga Forever distribution). See http://www.amigaforever.com/ Amiga Forever distribution). See http://www.amigaforever.com/
What's new since 0.8.29-WIP3 What's new since 0.8.29-WIP4
============================ ============================
A huge amount of work has gone into E-UAE since the last public New features:
release. Not of all of this work will be readily apparent to users * Added a command-line tool for generating blank hardfile images,
since it took place under the surface. However, some user-visible called make_hdf
changes include: * Support for IPF floppy images now supported on OS X (and officially
on AMD64/Linux now that libcapsimage is publically available). Go to
http://www.softpres.org/ to download the plug-in.
* X-Arcade joystick supported (thanks to Robert Hurst for the patch).
* Build scripts now include a compile-time option --disable-fpu to
disable building of FPU emulation.
* Emulation core from WinUAE 1.3.x merged. Performance improvements:
* Much more stable on SMP hosts. * Some small custom chip and blitter tweaks merged from WinUAE 1.4.3.
* Builds on Solaris x86 (with GCC). * Some minor performance optimizations to blitter emulation, floppy
* Integrated mouse-hack feature merged from WinUAE (this synchronizes controller emulation and rendering code. (Thanks to Mustafa Tufan,
the Amiga mouse pointer with the host pointer when E-UAE is running developer of PSP and GP2x ports of E-UAE, for a couple of these).
in a window on your desktop) merged from WinUAE. The old AmigaOS
mousehack tool is no longer required.
* New, easier-to-use Linux SCSI back-end (Jochen Becher).
* Experimental GL renderer in SDL display back-end (originally from
Jochen Becher but mostly re-written). On most platforms this is yet
to offer much over the existing 2D renderer, but on Mac OS X it
offers significantly better performance. Enabled with
'sdl.use_gl=true'.
* Support for the 'uae-configuration' tool merged from WinUAE. This is
an AmigaOS shell command which allows UAE settings to be queried and
modified from within the emulation environment.
* Better, smoother performance when cpu_speed=real (A500 speed). E-UAE
adapts better to changing system latencies.
* 'Sinc' audio interpolation added (Antti Lankila).
* Minor performance improvements in interpretive CPU emulator and JIT
engine.
* Mac OS X icon added (from Daniel Pimley).
* Lots of bugs fixes, including:
- Broken 'delayed' interrupt handling when JIT was disabled.
- Inconsistent refreshing of P96 screens.
- Filesystems being mounted twice.
- Hardfiles broken following a reset.
- Broken detection of XKB path in X11 driver (fix from Peter Volkov).
Bug fixes:
* Version 0.8.29-WIP4 broke the interrupt controller emulation. Fixed.
This also makes Action Replay cartridge emulation work again.
* HDToolbox would hang when scanning for hard drives. Mostly fixed (I
still have one unreproducible report of HDToolbox hanging).
* Hardfile emulation will no longer leak threads following a reset
This also fixes crashes on exit on AmigaOS and clone hosts.
* Building on MacOS X no longer fails when building supporting tools
like readdisk.
* Exiting E-UAE on OS X when started from Hi-Toro would cause 'load
config file' dialog to be displayed. Fixed.
* BeOS sound driver was broken in recent changes to audio layer. Now
fixed (fingers crossed).
Other:
* Removed support for 8-bit sound (since the official UAE did so).
Still to do Still to do
=========== ===========

View File

@ -30,11 +30,26 @@ Here are a selection of the the supported options:
The config script for UAE supports a bunch of compile-time options for The config script for UAE supports a bunch of compile-time options for
selecting what features are built into UAE. Here's a selection: selecting what features are built into UAE. Here's a selection:
--enable-fpu
Build CPU emulation with suppport for optional emulation of a math
coprocessor (Motoroloa 68881/2, etc.). Defaults to true.
--enable-compatible-cpu
Build CPU emulation with support for optional emulation of
instruction prefetch. Defaults to true.
--enable-cycle-exact-cpu
Build CPU/custom chip emulation with support for optional
cycle-exact emulation of interactions between the CPU and Amiga chip
set. Defaults to true.
--enable-jit --enable-jit
Build CPU emulation with JIT compiler. Currently only supported on Build CPU emulation with support for optional JIT compiler. The JIT
x86 platforms (known to work on Linux, Solaris, AROS, and BeOS, but (which compiles 680x0 instructions to native instructions) is
should work on most Unix-like platforms, providing you are building currently only supported on x86 platforms. (It is known to work on
with GCC). Defaults to enabled when building for x86. Linux, Solaris, AROS, and BeOS, but should work on most Unix-like
platforms, providing you are building with GCC). Defaults to enabled
when building for x86.
--enable-natmem --enable-natmem
If building the JIT, include support for direct memory access (which If building the JIT, include support for direct memory access (which
@ -68,7 +83,7 @@ selecting what features are built into UAE. Here's a selection:
--enable-bsdsock --enable-bsdsock
Build with support for emulated network stack (an emulated Build with support for emulated network stack (an emulated
bsdsocket.library). This works only on Unix platforms at the moment bsdsocket.library). This works only on Unix platforms at the moment
(including Linux and OS X). (including Linux, Solaris and OS X).
--with-caps --with-caps
Build with support for IPF (CAPS) images. This requires the IPF Build with support for IPF (CAPS) images. This requires the IPF

View File

@ -708,13 +708,6 @@ sound_output=<type>
exact - audio emulation is enabled and exact output enabled. exact - audio emulation is enabled and exact output enabled.
sound_bits=<n>
Selects the resolution of audio output. <n> can be 8 or 16 for 8-bit and
16-bit output, respectively. Most hosts will use 16-bit output and this
will be the default.
sound_frequency=<n> sound_frequency=<n>
Selects the frequency of emulated audio output in Hertz. Typically, Selects the frequency of emulated audio output in Hertz. Typically,

55
docs/make_hdf.txt Normal file
View File

@ -0,0 +1,55 @@
make_hdf
========
make_hdf is a command-line tool for creating unformatted hard disk
images (hard files) for E-UAE (and other versions of UAE). It will
also print a config option that can be added to a UAE config file to
mount the created disk image.
Usage
-----
make_hdf accepts the following parameters:
make_hdf <path> <size> [<device>]
<path> The path to the file to create. Note that any directories
included in this path must already exist; make_hdf will not
create them for you.
<size> The size of the hard disk image to create in MB. Add a trailing
'G' to the size to specify a size in GB or a 'K' for a size
in KB.
<device> Device name to be included in the generated config option.
This is optional and defaults to DH0: if omitted.
Example
-------
> make_hdf hdf/my_disk.hdf 2G DH5:
Will generate a 1 GB disk as the file 'hdf/my_disk.hdf' and the
following config options are output (see configuration.txt).
hardfile2=rw,DH5:hdf/my_disk.hdf,32,2,2,512,0,
hardfile=rw,32,2,2,512,hdf/my_disk.hdf
Limits
------
On systems that do not support large files sizes (i.e, systems without
support for 64-bit file sizes), make_hdf is limited to creating hard
files up to 2GB in size.
On systems that do support large file sizes, make_hdf can create hard
files up to around 2TB in size (whether you can make use of disks that
in AmigaOS is another question).
Sparse files
------------
Where supported (e.g., Linux, MacOS X), make_hdf will create sparse
files. This allows hard disk images which are not full to take up less
space on disk.

View File

@ -56,8 +56,7 @@ static int debugchannel (unsigned int ch)
#define SINC_QUEUE_LENGTH (SINC_QUEUE_MAX_AGE / MIN_ALLOWED_PERIOD + NUMBER_OF_CPU_UPDATES_ALLOWED) #define SINC_QUEUE_LENGTH (SINC_QUEUE_MAX_AGE / MIN_ALLOWED_PERIOD + NUMBER_OF_CPU_UPDATES_ALLOWED)
typedef struct { typedef struct {
int age; int age, output;
int output;
} sinc_queue_t; } sinc_queue_t;
struct audio_channel_data { struct audio_channel_data {
@ -108,31 +107,18 @@ void init_sound_table16 (void)
for (j = 0; j < 64; j++) for (j = 0; j < 64; j++)
sound_table[j][i] = j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1); sound_table[j][i] = j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1);
} }
#ifdef HAVE_8BIT_AUDIO_SUPPORT
void init_sound_table8 (void)
{
int i,j;
for (i = 0; i < 256; i++)
for (j = 0; j < 64; j++)
sound_table[j][i] = (j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1)) / 256;
}
#endif
#endif #endif
#ifdef MULTIPLICATION_PROFITABLE #ifdef MULTIPLICATION_PROFITABLE
typedef uae_s8 sample8_t; typedef uae_s8 sample8_t;
#define DO_CHANNEL_1(v, c) do { (v) *= audio_channel[c].vol; } while (0) #define DO_CHANNEL_1(v, c) do { (v) *= audio_channel[c].vol; } while (0)
#define SBASEVAL8(logn) ((logn) == 1 ? SOUND8_BASE_VAL << 7 : SOUND8_BASE_VAL << 8)
#define SBASEVAL16(logn) ((logn) == 1 ? SOUND16_BASE_VAL >> 1 : SOUND16_BASE_VAL) #define SBASEVAL16(logn) ((logn) == 1 ? SOUND16_BASE_VAL >> 1 : SOUND16_BASE_VAL)
#define FINISH_DATA(data,b,logn) do { if (14 - (b) + (logn) > 0) (data) >>= 14 - (b) + (logn); else (data) <<= (b) - 14 - (logn); } while (0); #define FINISH_DATA(data, logn) do { (data) <<= 2 - (logn); } while (0);
#else #else
typedef uae_u8 sample8_t; typedef uae_u8 sample8_t;
#define DO_CHANNEL_1(v, c) do { (v) = audio_channel[c].voltbl[(v)]; } while (0) #define DO_CHANNEL_1(v, c) do { (v) = audio_channel[c].voltbl[(v)]; } while (0)
#define SBASEVAL8(logn) SOUND8_BASE_VAL
#define SBASEVAL16(logn) SOUND16_BASE_VAL #define SBASEVAL16(logn) SOUND16_BASE_VAL
#define FINISH_DATA(data,b,logn) #define FINISH_DATA(data, logn)
#endif #endif
/* Always put the right word before the left word. */ /* Always put the right word before the left word. */
@ -154,7 +140,7 @@ STATIC_INLINE void put_sound_word_right (uae_u32 w)
PUT_SOUND_WORD_RIGHT (w); PUT_SOUND_WORD_RIGHT (w);
} }
STATIC_INLINE void put_sound_word_left (uae_u32 w) STATIC_INLINE void put_sound_word_left (uae_u32 w)
{ {
if (mixed_on) { if (mixed_on) {
uae_u32 rold, lold, rnew, lnew, tmp; uae_u32 rold, lold, rnew, lnew, tmp;
@ -177,9 +163,6 @@ STATIC_INLINE void put_sound_word_left (uae_u32 w)
} }
#endif #endif
#define DO_CHANNEL(v, c) do { (v) &= audio_channel[c].adk_mask; data += v; } while (0);
static void sinc_prehandler (unsigned long best_evtime) static void sinc_prehandler (unsigned long best_evtime)
{ {
@ -208,7 +191,7 @@ static void sinc_prehandler (unsigned long best_evtime)
} }
/* make room for new and add the new value */ /* make room for new and add the new value */
memmove (&acd->sinc_queue[1], &acd->sinc_queue[0], memmove (&acd->sinc_queue[1], &acd->sinc_queue[0],
sizeof(acd->sinc_queue[0]) * acd->sinc_queue_length); sizeof(acd->sinc_queue[0]) * acd->sinc_queue_length);
acd->sinc_queue_length += 1; acd->sinc_queue_length += 1;
acd->sinc_queue[0].age = best_evtime; acd->sinc_queue[0].age = best_evtime;
acd->sinc_queue[0].output = output - acd->sinc_output_state; acd->sinc_queue[0].output = output - acd->sinc_output_state;
@ -242,14 +225,14 @@ STATIC_INLINE void samplexx_sinc_handler (int *datasp)
winsinc = winsinc_integral[n]; winsinc = winsinc_integral[n];
for (i = 0; i < 4; i += 1) { for (i = 0; i < 4; i += 1) {
int j, v; int j, v;
struct audio_channel_data *acd = &audio_channel[i]; struct audio_channel_data *acd = &audio_channel[i];
/* The sum rings with harmonic components up to infinity... */ /* The sum rings with harmonic components up to infinity... */
int sum = acd->sinc_output_state << 17; int sum = acd->sinc_output_state << 17;
/* ...but we cancel them through mixing in BLEPs instead */ /* ...but we cancel them through mixing in BLEPs instead */
for (j = 0; j < acd->sinc_queue_length; j += 1) for (j = 0; j < acd->sinc_queue_length; j += 1)
sum -= winsinc[acd->sinc_queue[j].age] * acd->sinc_queue[j].output; sum -= winsinc[acd->sinc_queue[j].age] * acd->sinc_queue[j].output;
v = sum >> 17; v = sum >> 17;
if (v > 32767) if (v > 32767)
v = 32767; v = 32767;
else if (v < -32768) else if (v < -32768)
@ -264,7 +247,7 @@ static void sample16i_sinc_handler (void)
samplexx_sinc_handler (datas); samplexx_sinc_handler (datas);
data1 = datas[0] + datas[3] + datas[1] + datas[2]; data1 = datas[0] + datas[3] + datas[1] + datas[2];
FINISH_DATA (data1, 16, 2); FINISH_DATA (data1, 2);
PUT_SOUND_WORD_MONO (data1); PUT_SOUND_WORD_MONO (data1);
check_sound_buffers (); check_sound_buffers ();
} }
@ -288,7 +271,7 @@ void sample16_handler (void)
data0 += data3; data0 += data3;
{ {
uae_u32 data = SBASEVAL16(2) + data0; uae_u32 data = SBASEVAL16(2) + data0;
FINISH_DATA (data, 16, 2); FINISH_DATA (data, 2);
PUT_SOUND_WORD_MONO (data); PUT_SOUND_WORD_MONO (data);
} }
check_sound_buffers (); check_sound_buffers ();
@ -337,9 +320,10 @@ static void sample16i_rh_handler (void)
delta = audio_channel[3].per; delta = audio_channel[3].per;
ratio = ((audio_channel[3].evtime % delta) << 8) / delta; ratio = ((audio_channel[3].evtime % delta) << 8) / delta;
data0 += (data3 * (256 - ratio) + data3p * ratio) >> 8; data0 += (data3 * (256 - ratio) + data3p * ratio) >> 8;
{ {
uae_u32 data = SBASEVAL16(2) + data0; uae_u32 data = SBASEVAL16(2) + data0;
FINISH_DATA (data, 16, 2); FINISH_DATA (data, 2);
PUT_SOUND_WORD_MONO (data); PUT_SOUND_WORD_MONO (data);
} }
check_sound_buffers (); check_sound_buffers ();
@ -410,64 +394,13 @@ static void sample16i_crux_handler (void)
data0 += data1; data0 += data1;
{ {
uae_u32 data = SBASEVAL16(2) + data0; uae_u32 data = SBASEVAL16(2) + data0;
FINISH_DATA (data, 16, 2); FINISH_DATA (data, 2);
PUT_SOUND_WORD_MONO (data); PUT_SOUND_WORD_MONO (data);
} }
check_sound_buffers (); check_sound_buffers ();
} }
#ifdef HAVE_8BIT_AUDIO_SUPPORT
void sample8_handler (void)
{
uae_u32 data0 = audio_channel[0].current_sample;
uae_u32 data1 = audio_channel[1].current_sample;
uae_u32 data2 = audio_channel[2].current_sample;
uae_u32 data3 = audio_channel[3].current_sample;
DO_CHANNEL_1 (data0, 0);
DO_CHANNEL_1 (data1, 1);
DO_CHANNEL_1 (data2, 2);
DO_CHANNEL_1 (data3, 3);
data0 &= audio_channel[0].adk_mask;
data1 &= audio_channel[1].adk_mask;
data2 &= audio_channel[2].adk_mask;
data3 &= audio_channel[3].adk_mask;
data0 += data1;
data0 += data2;
data0 += data3;
{
uae_u32 data = SBASEVAL8(2) + data0;
FINISH_DATA (data, 8, 2);
PUT_SOUND_BYTE (data);
}
check_sound_buffers ();
}
#endif
#ifdef HAVE_STEREO_SUPPORT #ifdef HAVE_STEREO_SUPPORT
void sample16ss_handler (void)
{
uae_u32 data0 = audio_channel[0].current_sample;
uae_u32 data1 = audio_channel[1].current_sample;
uae_u32 data2 = audio_channel[2].current_sample;
uae_u32 data3 = audio_channel[3].current_sample;
DO_CHANNEL_1 (data0, 0);
DO_CHANNEL_1 (data1, 1);
DO_CHANNEL_1 (data2, 2);
DO_CHANNEL_1 (data3, 3);
data0 &= audio_channel[0].adk_mask;
data1 &= audio_channel[1].adk_mask;
data2 &= audio_channel[2].adk_mask;
data3 &= audio_channel[3].adk_mask;
PUT_SOUND_WORD (data0 << 2);
PUT_SOUND_WORD (data1 << 2);
PUT_SOUND_WORD (data3 << 2);
PUT_SOUND_WORD (data2 << 2);
check_sound_buffers ();
}
static void sample16si_sinc_handler (void) static void sample16si_sinc_handler (void)
{ {
int datas[4], data1, data2; int datas[4], data1, data2;
@ -475,9 +408,9 @@ static void sample16si_sinc_handler (void)
samplexx_sinc_handler (datas); samplexx_sinc_handler (datas);
data1 = datas[0] + datas[3]; data1 = datas[0] + datas[3];
data2 = datas[1] + datas[2]; data2 = datas[1] + datas[2];
FINISH_DATA (data1, 16, 1); FINISH_DATA (data1, 1);
put_sound_word_left (data1); put_sound_word_left (data1);
FINISH_DATA (data2, 16, 1); FINISH_DATA (data2, 1);
put_sound_word_right (data2); put_sound_word_right (data2);
check_sound_buffers (); check_sound_buffers ();
} }
@ -501,14 +434,14 @@ void sample16s_handler (void)
data0 += data3; data0 += data3;
{ {
uae_u32 data = SBASEVAL16(1) + data0; uae_u32 data = SBASEVAL16(1) + data0;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_left (data); put_sound_word_left (data);
} }
data1 += data2; data1 += data2;
{ {
uae_u32 data = SBASEVAL16(1) + data1; uae_u32 data = SBASEVAL16(1) + data1;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_right (data); put_sound_word_right (data);
} }
@ -579,14 +512,14 @@ static void sample16si_crux_handler (void)
data1 += data2; data1 += data2;
data0 += data3; data0 += data3;
{ {
uae_u32 data = SBASEVAL16(1) + data0; uae_u32 data = SBASEVAL16 (1) + data0;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_left (data); put_sound_word_left (data);
} }
{ {
uae_u32 data = SBASEVAL16(1) + data1; uae_u32 data = SBASEVAL16 (1) + data1;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_right (data); put_sound_word_right (data);
} }
check_sound_buffers (); check_sound_buffers ();
@ -638,57 +571,19 @@ static void sample16si_rh_handler (void)
data0 += (data3 * (256 - ratio) + data3p * ratio) >> 8; data0 += (data3 * (256 - ratio) + data3p * ratio) >> 8;
{ {
uae_u32 data = SBASEVAL16(1) + data0; uae_u32 data = SBASEVAL16(1) + data0;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_left (data); put_sound_word_left (data);
} }
{ {
uae_u32 data = SBASEVAL16(1) + data1; uae_u32 data = SBASEVAL16(1) + data1;
FINISH_DATA (data, 16, 1); FINISH_DATA (data, 1);
put_sound_word_right (data); put_sound_word_right (data);
} }
check_sound_buffers (); check_sound_buffers ();
} }
#ifdef HAVE_8BIT_AUDIO_SUPPORT
void sample8s_handler (void)
{
uae_u32 data0 = audio_channel[0].current_sample;
uae_u32 data1 = audio_channel[1].current_sample;
uae_u32 data2 = audio_channel[2].current_sample;
uae_u32 data3 = audio_channel[3].current_sample;
DO_CHANNEL_1 (data0, 0);
DO_CHANNEL_1 (data1, 1);
DO_CHANNEL_1 (data2, 2);
DO_CHANNEL_1 (data3, 3);
data0 &= audio_channel[0].adk_mask;
data1 &= audio_channel[1].adk_mask;
data2 &= audio_channel[2].adk_mask;
data3 &= audio_channel[3].adk_mask;
data0 += data3;
{
uae_u32 data = SBASEVAL8(1) + data0;
FINISH_DATA (data, 8, 1);
PUT_SOUND_BYTE_RIGHT (data);
}
data1 += data2;
{
uae_u32 data = SBASEVAL8(1) + data1;
FINISH_DATA (data, 8, 1);
PUT_SOUND_BYTE_LEFT (data);
}
check_sound_buffers ();
}
#endif
#else #else
#ifdef HAVE_8BIT_AUDIO_SUPPORT
void sample8s_handler (void)
{
sample8_handler();
}
#endif
void sample16s_handler (void) void sample16s_handler (void)
{ {
@ -708,64 +603,8 @@ static void sample16si_sinc_handler (void)
} }
#endif #endif
#ifdef HAVE_ULAW_AUDIO_SUPPORT
static uae_u8 int2ulaw (int ch)
{
int mask;
if (ch < 0) {
ch = -ch;
mask = 0x7f;
} else
mask = 0xff;
if (ch < 32)
ch = 0xF0 | (15 - (ch / 2));
else if (ch < 96)
ch = 0xE0 | (15 - (ch - 32) / 4);
else if (ch < 224)
ch = 0xD0 | (15 - (ch - 96) / 8);
else if (ch < 480)
ch = 0xC0 | (15 - (ch - 224) / 16);
else if (ch < 992 )
ch = 0xB0 | (15 - (ch - 480) / 32);
else if (ch < 2016)
ch = 0xA0 | (15 - (ch - 992) / 64);
else if (ch < 4064)
ch = 0x90 | (15 - (ch - 2016) / 128);
else if (ch < 8160)
ch = 0x80 | (15 - (ch - 4064) / 256);
else
ch = 0x80;
return (uae_u8)(mask & ch);
}
void sample_ulaw_handler (void)
{
unsigned int nr;
uae_u32 data = 0;
for (nr = 0; nr < 4; nr++) {
if (!(adkcon & (0x11 << nr))) {
uae_u32 d = audio_channel[nr].current_sample;
DO_CHANNEL_1 (d, nr);
data += d;
}
}
PUT_SOUND_BYTE (int2ulaw (data));
check_sound_buffers ();
}
#endif
void switch_audio_interpol (void) void switch_audio_interpol (void)
{ {
#if defined HAVE_8BIT_AUDIO_SUPPORT || defined HAVE_ULAW_AUDIO_SUPPORT
if (currprefs.sound_bits == 8)
/* only supported for 16-bit audio */
return;
#endif
if (currprefs.sound_interpol == 0) { if (currprefs.sound_interpol == 0) {
changed_prefs.sound_interpol = 1; changed_prefs.sound_interpol = 1;
write_log ("Interpol on: rh\n"); write_log ("Interpol on: rh\n");
@ -791,6 +630,7 @@ void schedule_audio (void)
eventtab[ev_audio].oldcycles = get_cycles (); eventtab[ev_audio].oldcycles = get_cycles ();
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
struct audio_channel_data *cdp = audio_channel + i; struct audio_channel_data *cdp = audio_channel + i;
if (cdp->evtime != MAX_EV) { if (cdp->evtime != MAX_EV) {
if (best > cdp->evtime) { if (best > cdp->evtime) {
best = cdp->evtime; best = cdp->evtime;
@ -877,8 +717,7 @@ static void audio_handler (unsigned int nr, int timed)
unsigned long evtime = cdp->evtime; unsigned long evtime = cdp->evtime;
cdp->evtime = MAX_EV; cdp->evtime = MAX_EV;
switch (cdp->state) switch (cdp->state) {
{
case 0: case 0:
cdp->request_word = 0; cdp->request_word = 0;
cdp->request_word_skip = 0; cdp->request_word_skip = 0;
@ -1029,7 +868,7 @@ void audio_reset (void)
} }
} }
#ifndef MULTIPLICATION_PROFITABLE #ifndef MULTIPLICATION_PROFITABLE
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
audio_channel[i].voltbl = sound_table[audio_channel[i].vol]; audio_channel[i].voltbl = sound_table[audio_channel[i].vol];
#endif #endif
@ -1048,9 +887,6 @@ STATIC_INLINE int sound_prefs_changed (void)
|| changed_prefs.sound_mixed_stereo != currprefs.sound_mixed_stereo || changed_prefs.sound_mixed_stereo != currprefs.sound_mixed_stereo
|| changed_prefs.sound_latency != currprefs.sound_latency || changed_prefs.sound_latency != currprefs.sound_latency
|| changed_prefs.sound_freq != currprefs.sound_freq || changed_prefs.sound_freq != currprefs.sound_freq
#if defined HAVE_8BIT_AUDIO_SUPPORT || defined HAVE_ULAW_AUDIO_SUPPORT
|| changed_prefs.sound_bits != currprefs.sound_bits
#endif
|| changed_prefs.sound_adjust != currprefs.sound_adjust || changed_prefs.sound_adjust != currprefs.sound_adjust
|| changed_prefs.sound_interpol != currprefs.sound_interpol || changed_prefs.sound_interpol != currprefs.sound_interpol
|| changed_prefs.sound_volume != currprefs.sound_volume); || changed_prefs.sound_volume != currprefs.sound_volume);
@ -1074,9 +910,6 @@ void check_prefs_changed_audio (void)
currprefs.sound_adjust = changed_prefs.sound_adjust; currprefs.sound_adjust = changed_prefs.sound_adjust;
currprefs.sound_interpol = changed_prefs.sound_interpol; currprefs.sound_interpol = changed_prefs.sound_interpol;
currprefs.sound_freq = changed_prefs.sound_freq; currprefs.sound_freq = changed_prefs.sound_freq;
#if defined HAVE_8BIT_AUDIO_SUPPORT || defined HAVE_ULAW_AUDIO_SUPPORT
currprefs.sound_bits = changed_prefs.sound_bits;
#endif
currprefs.sound_latency = changed_prefs.sound_latency; currprefs.sound_latency = changed_prefs.sound_latency;
currprefs.sound_volume = changed_prefs.sound_volume; currprefs.sound_volume = changed_prefs.sound_volume;
if (currprefs.produce_sound >= 2) { if (currprefs.produce_sound >= 2) {
@ -1243,7 +1076,7 @@ void audio_hsync (int dmaaction)
#ifdef DEBUG_AUDIO #ifdef DEBUG_AUDIO
if (debugchannel (nr)) if (debugchannel (nr))
write_log ("AUD%dDMA %d->%d (%d) LEN=%d/%d %08.8X\n", nr, cdp->dmaen, chan_ena, write_log ("AUD%dDMA %d->%d (%d) LEN=%d/%d %08.8X\n", nr, cdp->dmaen, chan_ena,
cdp->state, cdp->wlen, cdp->len, m68k_getpc()); cdp->state, cdp->wlen, cdp->len, m68k_getpc ());
#endif #endif
cdp->dmaen = chan_ena; cdp->dmaen = chan_ena;
if (cdp->dmaen) if (cdp->dmaen)

View File

@ -148,7 +148,7 @@ static const uae_s8 blit_cycle_diagram[][10] =
{ 3, 3, 1,3,4, 1,3,0 }, /* B */ { 3, 3, 1,3,4, 1,3,0 }, /* B */
{ 2, 3, 1,2,0, 1,2 }, /* C */ { 2, 3, 1,2,0, 1,2 }, /* C */
{ 3, 3, 1,2,4, 1,2,0 }, /* D */ { 3, 3, 1,2,4, 1,2,0 }, /* D */
{ 0, 4, 1,2,3,0 }, /* E */ { 0, 3, 1,2,3 }, /* E */
{ 4, 4, 1,2,3,4, 1,2,3,0 } /* F */ { 4, 4, 1,2,3,4, 1,2,3,0 } /* F */
}; };
@ -157,7 +157,7 @@ static const uae_s8 blit_cycle_diagram[][10] =
static const uae_s8 blit_cycle_diagram_fill[][10] = static const uae_s8 blit_cycle_diagram_fill[][10] =
{ {
{ 0, 3, 0,5,0 }, /* 0 */ { 0, 3, 0,5,0 }, /* 0 */
{ 0, 3, 3,5,4 }, /* 1 */ { 0, 3, 0,5,4 }, /* 1 */
{ 0, 3, 0,3,0 }, /* 2 */ { 0, 3, 0,3,0 }, /* 2 */
{ 2, 3, 3,5,4, 3,0 }, /* 3 */ { 2, 3, 3,5,4, 3,0 }, /* 3 */
{ 0, 3, 0,2,5 }, /* 4 */ { 0, 3, 0,2,5 }, /* 4 */
@ -170,7 +170,7 @@ static const uae_s8 blit_cycle_diagram_fill[][10] =
{ 3, 3, 1,3,4, 1,3,0 }, /* B */ { 3, 3, 1,3,4, 1,3,0 }, /* B */
{ 2, 3, 1,2,5, 1,2 }, /* C */ { 2, 3, 1,2,5, 1,2 }, /* C */
{ 3, 4, 1,2,5,4, 1,2,0 }, /* D */ { 3, 4, 1,2,5,4, 1,2,0 }, /* D */
{ 0, 4, 1,2,3,0 }, /* E */ { 0, 3, 1,2,3 }, /* E */
{ 4, 4, 1,2,3,4, 1,2,3,0 } /* F */ { 4, 4, 1,2,3,4, 1,2,3,0 } /* F */
}; };
@ -511,7 +511,7 @@ STATIC_INLINE void blitter_line_incy (void)
static void blitter_line (void) static void blitter_line (void)
{ {
uae_u16 blitahold = blinea >> blinea_shift; uae_u16 blitahold = (blinea & blt_info.bltafwm) >> blinea_shift;
uae_u16 blitbhold = blineb & 1 ? 0xFFFF : 0; uae_u16 blitbhold = blineb & 1 ? 0xFFFF : 0;
uae_u16 blitchold = blt_info.bltcdat; uae_u16 blitchold = blt_info.bltcdat;
@ -598,11 +598,11 @@ static void decide_blitter_line (unsigned int hpos)
cycle_line[blit_last_hpos] |= CYCLE_BLITTER; cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
if (blt_info.vblitsize == 0) { if (blt_info.vblitsize == 0) {
bltdpt = bltcpt; bltdpt = bltcpt;
blitter_done(); blitter_done();
return; return;
} }
} }
break; break;
} }
blit_last_hpos++; blit_last_hpos++;
} }
@ -956,9 +956,8 @@ static void blit_bltset (unsigned int con)
blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch]; blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch];
} }
if ((bltcon1 & 0x80) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS)) if ((bltcon1 & 0x80) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
write_log("warning: BLTCON1 DOFF-bit set\n"); write_log ("warning: ECS BLTCON1 DOFF-bit set\n");
ddat1use = ddat2use = 0;
blit_dmacount = blit_dmacount2 = 0; blit_dmacount = blit_dmacount2 = 0;
blit_nod = 1; blit_nod = 1;
for (i = 0; i < blit_diag[1]; i++) { for (i = 0; i < blit_diag[1]; i++) {
@ -1025,7 +1024,9 @@ void do_blitter (unsigned int hpos)
blit_last_hpos = hpos; blit_last_hpos = hpos;
#endif #endif
reset_blit (1|2); blit_bltset (1|2);
blit_modset ();
ddat1use = ddat2use = 0;
if (blitline) { if (blitline) {
blitsing = bltcon1 & 0x2; blitsing = bltcon1 & 0x2;
@ -1044,7 +1045,7 @@ void do_blitter (unsigned int hpos)
if (1) { if (1) {
if (oldstate != BLT_done) if (oldstate != BLT_done)
write_log ("blitter was already active!\n"); write_log ("blitter was already active!\n");
write_log("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%d\n", write_log ("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%4x\n",
vpos, hpos, blt_info.hblitsize, blt_info.vblitsize, cycles, blit_ch, vpos, hpos, blt_info.hblitsize, blt_info.vblitsize, cycles, blit_ch,
blitdesc ? 1 : 0, blitfill, blitdesc ? 1 : 0, blitfill,
dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc (&regs), blitline, dmaen(DMA_BLITTER)); dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc (&regs), blitline, dmaen(DMA_BLITTER));
@ -1088,13 +1089,14 @@ void do_blitter (unsigned int hpos)
events_schedule(); events_schedule();
} }
void maybe_blit (unsigned int hpos, int hack) void maybe_blit (unsigned int hpos, int hack)
{ {
static int warned; static int warned;
if (bltstate == BLT_done) if (bltstate == BLT_done)
return; return;
if (savestate_state)
return;
if (!warned && dmaen (DMA_BLITTER)) { if (!warned && dmaen (DMA_BLITTER)) {
#ifndef BLITTER_DEBUG #ifndef BLITTER_DEBUG
@ -1110,15 +1112,13 @@ void maybe_blit (unsigned int hpos, int hack)
goto end; goto end;
} }
if (!eventtab[ev_blitter].active)
write_log ("FOO!!?\n");
if (hack == 1 && get_cycles() < blit_firstline_cycles) if (hack == 1 && get_cycles() < blit_firstline_cycles)
goto end; goto end;
blitter_handler (); blitter_handler ();
end:; end:;
#ifdef BLITTER_DEBUG #ifdef BLITTER_DEBUG
blitter_delayed_debug = 1; blitter_delayed_debug = 1;
#endif #endif
} }

View File

@ -3,7 +3,7 @@
* *
* Support for IPF/CAPS disk images * Support for IPF/CAPS disk images
* *
* Copyright 2004-2006 Richard Drummond * Copyright 2004-2007 Richard Drummond
* *
* Based on Win32 CAPS code by Toni Wilen * Based on Win32 CAPS code by Toni Wilen
*/ */
@ -23,7 +23,11 @@ static int caps_flags = DI_LOCK_DENVAR|DI_LOCK_DENNOISE|DI_LOCK_NOISE|DI_LOCK_UP
#define LIB_TYPE 1 #define LIB_TYPE 1
#ifndef TARGET_AMIGAOS #if defined HAVE_DLOPEN && !defined HAVE_FRAMEWORK_CAPSIMAGE
#include <dlfcn.h>
#define CAPSLIB_NAME "libcapsimage.so.2"
/* /*
* Repository for function pointers to the CAPSLib routines * Repository for function pointers to the CAPSLib routines
@ -50,12 +54,6 @@ struct {
CapsLong (*CAPSGetVersionInfo)(struct CapsVersionInfo *pi, CapsULong flag); CapsLong (*CAPSGetVersionInfo)(struct CapsVersionInfo *pi, CapsULong flag);
} capslib; } capslib;
#ifdef HAVE_DLOPEN
#include <dlfcn.h>
#define CAPSLIB_NAME "libcapsimage.so.2"
/* /*
* The Unix/dlopen method for loading and linking the CAPSLib plug-in * The Unix/dlopen method for loading and linking the CAPSLib plug-in
*/ */
@ -83,10 +81,50 @@ static int load_capslib (void)
write_log ("Unable to open " CAPSLIB_NAME "\n."); write_log ("Unable to open " CAPSLIB_NAME "\n.");
return 0; return 0;
} }
#endif // HAVE_DLOPEN
/*
* Some defines so that we don't care that CAPSLib
* isn't statically linked
*/
#define CAPSInit capslib.CAPSInit
#define CAPSExit capslib.CAPSExit
#define CAPSAddImage capslib.CAPSAddImage
#define CAPSRemImage capslib.CAPSRemImage
#define CAPSLockImage capslib.CAPSLockImage
#define CAPSLockImageMemory capslib.CAPSLockImageMemory
#define CAPSUnlockImage capslib.CAPSUnlockImage
#define CAPSLoadImage capslib.CAPSLoadImage
#define CAPSGetImageInfo capslib.CAPSGetImageInfo
#define CAPSLockTrack capslib.CAPSLockTrack
#define CAPSUnlockTrack capslib.CAPSUnlockTrack
#define CAPSUnlockAllTracks capslib.CAPSUnlockAllTracks
#define CAPSGetPlatformName capslib.CAPSGetPlatformName
#define CAPSGetVersionInfo capslib.CAPSGetVersionInfo
#else
#ifdef HAVE_FRAMEWORK_CAPSIMAGE
/*
* On OS X we link weakly to the CAPSImage framework. Thus we can
* let the dynamic linker take care of everything.
*/
/* We check for the existence of this symbol to tell whether the
* the framework could be linked or not.
*/
extern CapsLong CAPSInit(void) __attribute__((weak));
static int load_capslib (void)
{
if (CAPSInit != NULL)
return 1;
else
return 0;
}
#else #else
#ifdef TARGET_AMIGAOS
#ifdef __amigaos4__ #ifdef __amigaos4__
#define __USE_BASETYPE__ #define __USE_BASETYPE__
#include <exec/emulation.h> #include <exec/emulation.h>
@ -323,10 +361,7 @@ LONG CAPSGetVersionInfo (struct CapsVersionInfo *pi, CapsULong flag)
return retval; return retval;
} }
#endif #else
#ifdef TARGET_AMIGAOS
#if 0 #if 0
/* proto file is broken in current CAPS API */ /* proto file is broken in current CAPS API */
@ -337,6 +372,7 @@ LONG CAPSGetVersionInfo (struct CapsVersionInfo *pi, CapsULong flag)
static struct Device *CapsImageBase; static struct Device *CapsImageBase;
#endif #endif
#endif #endif
#endif
#include <proto/exec.h> #include <proto/exec.h>
@ -386,32 +422,8 @@ static int load_capslib (void)
#endif #endif
#endif #endif
#ifndef TARGET_AMIGAOS
/*
* Some defines so that we don't care that CAPSLib
* isn't statically linked
*/
#define CAPSInit capslib.CAPSInit
#define CAPSExit capslib.CAPSExit
#define CAPSAddImage capslib.CAPSAddImage
#define CAPSRemImage capslib.CAPSRemImage
#define CAPSLockImage capslib.CAPSLockImage
#define CAPSLockImageMemory capslib.CAPSLockImageMemory
#define CAPSUnlockImage capslib.CAPSUnlockImage
#define CAPSLoadImage capslib.CAPSLoadImage
#define CAPSGetImageInfo capslib.CAPSGetImageInfo
#define CAPSLockTrack capslib.CAPSLockTrack
#define CAPSUnlockTrack capslib.CAPSUnlockTrack
#define CAPSUnlockAllTracks capslib.CAPSUnlockAllTracks
#define CAPSGetPlatformName capslib.CAPSGetPlatformName
#define CAPSGetVersionInfo capslib.CAPSGetVersionInfo
#endif #endif
/* /*
* CAPS support proper starts here * CAPS support proper starts here
* *
@ -431,8 +443,8 @@ int caps_init (void)
if (noticed) if (noticed)
return 0; return 0;
gui_message ("This disk image needs the C.A.P.S. plugin\n" gui_message ("This disk image needs the C.A.P.S. plugin\n"
"which is available from\n" "which is available from\n"
"http//www.caps-project.org/download.shtml\n"); "http//www.caps-project.org/download.shtml\n");
noticed = 1; noticed = 1;
return 0; return 0;
} }
@ -476,10 +488,8 @@ int caps_loadimage (struct zfile *zf, unsigned int drv, unsigned int *num_tracks
return 0; return 0;
ret = CAPSLockImageMemory (caps_cont[drv], buf, len, 0); ret = CAPSLockImageMemory (caps_cont[drv], buf, len, 0);
free (buf); free (buf);
if (ret != imgeOk) { if (ret != imgeOk)
free (buf);
return 0; return 0;
}
caps_locked[drv] = 1; caps_locked[drv] = 1;
CAPSGetImageInfo (&ci, caps_cont[drv]); CAPSGetImageInfo (&ci, caps_cont[drv]);
*num_tracks = (ci.maxcylinder - ci.mincylinder + 1) * (ci.maxhead - ci.minhead + 1); *num_tracks = (ci.maxcylinder - ci.mincylinder + 1) * (ci.maxhead - ci.minhead + 1);

View File

@ -81,7 +81,6 @@ static const struct cfg_lines opttable[] =
{"keyboard_leds", "Keyboard LEDs" }, {"keyboard_leds", "Keyboard LEDs" },
{"sound_output", "" }, {"sound_output", "" },
{"sound_frequency", "" }, {"sound_frequency", "" },
{"sound_bits", "" },
{"sound_channels", "" }, {"sound_channels", "" },
{"sound_latency", "" }, {"sound_latency", "" },
#ifdef JIT #ifdef JIT
@ -153,7 +152,7 @@ static const char *obsolete[] = {
"sound_pri_cutoff", "sound_pri_time", "sound_pri_cutoff", "sound_pri_time",
"avoid_dga", "override_dga_address", "avoid_vid", "avoid_cmov", "avoid_dga", "override_dga_address", "avoid_vid", "avoid_cmov",
"comp_midopt", "comp_lowopt", "comp_midopt", "comp_lowopt",
"fast_copper", "sound_max_buf", "fast_copper", "sound_max_buf", "sound_bits",
0 }; 0 };
#define UNEXPANDED "$(FILE_PATH)" #define UNEXPANDED "$(FILE_PATH)"
@ -401,7 +400,6 @@ void save_options (FILE *f, const struct uae_prefs *p, int type)
#endif #endif
cfgfile_write (f, "sound_output=%s\n", soundmode1[p->produce_sound]); cfgfile_write (f, "sound_output=%s\n", soundmode1[p->produce_sound]);
cfgfile_write (f, "sound_bits=%d\n", p->sound_bits);
cfgfile_write (f, "sound_channels=%s\n", stereomode[p->sound_stereo]); cfgfile_write (f, "sound_channels=%s\n", stereomode[p->sound_stereo]);
cfgfile_write (f, "sound_stereo_separation=%d\n", p->sound_stereo_separation); cfgfile_write (f, "sound_stereo_separation=%d\n", p->sound_stereo_separation);
cfgfile_write (f, "sound_stereo_mixing_delay=%d\n", p->sound_mixed_stereo >= 0 ? p->sound_mixed_stereo : 0); cfgfile_write (f, "sound_stereo_mixing_delay=%d\n", p->sound_mixed_stereo >= 0 ? p->sound_mixed_stereo : 0);
@ -807,7 +805,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
if (cfgfile_path (option, value, "hardfile_path")) if (cfgfile_path (option, value, "hardfile_path"))
return 1; return 1;
#ifdef SAVESTATE #ifdef SAVESTATE
if (cfgfile_path (option, value, "savestate_path")) if (cfgfile_path (option, value, "savestate_path"))
return 1; return 1;
#endif #endif
#ifndef _WIN32 #ifndef _WIN32
@ -838,7 +836,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
} }
if (cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1) if (cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1)
|| cfgfile_intval (option, value, "sound_bits", &p->sound_bits, 1)
|| cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1) || cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)
|| cfgfile_intval (option, value, "sound_adjust", &p->sound_adjust, 1) || cfgfile_intval (option, value, "sound_adjust", &p->sound_adjust, 1)
|| cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1) || cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1)
@ -905,11 +902,11 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
if (cfgfile_string (option, value, "config_info", p->info, 256) if (cfgfile_string (option, value, "config_info", p->info, 256)
|| cfgfile_string (option, value, "config_description", p->description, 256)) || cfgfile_string (option, value, "config_description", p->description, 256))
return 1; return 1;
#ifdef DEBUGGER #ifdef DEBUGGER
if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger)) if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger))
return 1; return 1;
#endif #endif
if (cfgfile_yesno (option, value, "log_illegal_mem", &p->illegal_mem) if (cfgfile_yesno (option, value, "log_illegal_mem", &p->illegal_mem)
@ -1172,7 +1169,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
return 1; return 1;
#endif #endif
if (cfgfile_strval (option, value, "collision_level", &p->collision_level, collmode, 0)) if (cfgfile_strval (option, value, "collision_level", &p->collision_level, collmode, 0))
return 1; return 1;
if (cfgfile_string (option, value, "kickstart_rom_file", p->romfile, 256) if (cfgfile_string (option, value, "kickstart_rom_file", p->romfile, 256)
|| cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, 256) || cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, 256)
|| cfgfile_string (option, value, "kickstart_key_file", p->keyfile, 256) || cfgfile_string (option, value, "kickstart_key_file", p->keyfile, 256)
@ -1295,7 +1292,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
write_log ("Error: %s\n", err_msg); write_log ("Error: %s\n", err_msg);
free (str); free (str);
} }
#endif #endif
return 1; return 1;
} }
@ -1377,7 +1374,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
write_log ("Error: %s\n", err_msg); write_log ("Error: %s\n", err_msg);
free (str); free (str);
} }
#endif #endif
return 1; return 1;
@ -1565,7 +1562,7 @@ int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real, int *ty
fh = fopen (filename, "r"); fh = fopen (filename, "r");
#ifndef SINGLEFILE #ifndef SINGLEFILE
if (! fh) { if (! fh) {
write_log ("failed\n"); write_log ("failed\n");
return 0; return 0;
} }
#endif #endif
@ -1739,8 +1736,8 @@ static void parse_sound_spec (struct uae_prefs *p, char *spec)
else else
p->sound_stereo = 0; p->sound_stereo = 0;
} }
if (x2) // if (x2)
p->sound_bits = atoi (x2); // p->sound_bits = atoi (x2);
if (x3) if (x3)
p->sound_freq = atoi (x3); p->sound_freq = atoi (x3);
// if (x4) // if (x4)
@ -1848,7 +1845,7 @@ static void parse_hardfile_spec (char *spec)
err_msg = add_filesys_unit (currprefs.mountinfo, 0, 0, x4, 0, atoi (x0), atoi (x1), atoi (x2), atoi (x3), 0, 0, 0); err_msg = add_filesys_unit (currprefs.mountinfo, 0, 0, x4, 0, atoi (x0), atoi (x1), atoi (x2), atoi (x3), 0, 0, 0);
if (err_msg) if (err_msg)
write_log ("%s\n", err_msg); write_log ("%s\n", err_msg);
} }
#endif #endif
@ -2020,8 +2017,8 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
p->color_mode = 0; p->color_mode = 0;
} }
#else #else
p->amiga_screen_type = atoi (arg); p->amiga_screen_type = atoi (arg);
if (p->amiga_screen_type < 0 || p->amiga_screen_type > 2) { if (p->amiga_screen_type < 0 || p->amiga_screen_type > 2) {
write_log ("Bad screen-type selected. Defaulting to public screen.\n"); write_log ("Bad screen-type selected. Defaulting to public screen.\n");
p->amiga_screen_type = 2; p->amiga_screen_type = 2;
} }
@ -2374,7 +2371,6 @@ void default_prefs (struct uae_prefs *p, int type)
p->sound_stereo = 1; p->sound_stereo = 1;
p->sound_stereo_separation = 7; p->sound_stereo_separation = 7;
p->sound_mixed_stereo = 0; p->sound_mixed_stereo = 0;
p->sound_bits = DEFAULT_SOUND_BITS;
p->sound_freq = DEFAULT_SOUND_FREQ; p->sound_freq = DEFAULT_SOUND_FREQ;
p->sound_latency = DEFAULT_SOUND_LATENCY; p->sound_latency = DEFAULT_SOUND_LATENCY;
p->sound_interpol = 0; p->sound_interpol = 0;

View File

@ -667,17 +667,17 @@ STATIC_INLINE void log_dump(void)
return; return;
write_log("----------------------\n"); write_log ("----------------------\n");
for (i=0;i<N_REGS;i++) { for (i=0;i<N_REGS;i++) {
switch(nstate[i]) { switch(nstate[i]) {
case L_UNKNOWN: write_log("Nat %d : UNKNOWN\n",i); break; case L_UNKNOWN: write_log ("Nat %d : UNKNOWN\n",i); break;
case L_UNAVAIL: write_log("Nat %d : UNAVAIL\n",i); break; case L_UNAVAIL: write_log ("Nat %d : UNAVAIL\n",i); break;
default: write_log("Nat %d : %d\n",i,nstate[i]); break; default: write_log ("Nat %d : %d\n",i,nstate[i]); break;
} }
} }
for (i=0;i<VREGS;i++) { for (i=0;i<VREGS;i++) {
if (vstate[i]==L_UNNEEDED) if (vstate[i]==L_UNNEEDED)
write_log("Virt %d: UNNEEDED\n",i); write_log ("Virt %d: UNNEEDED\n",i);
} }
} }
@ -4319,7 +4319,7 @@ MENDFUNC(2,fmul_rr,(FRW d, FR s))
int kill_rodent(int r) int kill_rodent(int r)
{ {
return KILLTHERAT && return KILLTHERAT &&
have_rat_stall && have_rat_stall &&
(live.state[r].status==INMEM || (live.state[r].status==INMEM ||
live.state[r].status==CLEAN || live.state[r].status==CLEAN ||
live.state[r].status==ISCONST || live.state[r].status==ISCONST ||
@ -4349,7 +4349,9 @@ void sync_m68k_pc(void)
********************************************************************/ ********************************************************************/
uae_u32 scratch[VREGS]; uae_u32 scratch[VREGS];
#ifdef FPUEMU
fptype fscratch[VFREGS]; fptype fscratch[VFREGS];
#endif
void init_comp(void) void init_comp(void)
{ {
@ -4395,6 +4397,7 @@ void init_comp(void)
live.state[NEXT_HANDLER].needflush=NF_HANDLER; live.state[NEXT_HANDLER].needflush=NF_HANDLER;
set_status(NEXT_HANDLER,UNDEF); set_status(NEXT_HANDLER,UNDEF);
#ifdef FPUEMU
for (i=0;i<VFREGS;i++) { for (i=0;i<VFREGS;i++) {
if (i<8) { /* First 8 registers map to 68k FPU registers */ if (i<8) { /* First 8 registers map to 68k FPU registers */
live.fate[i].mem=(uae_u32*)(((fptype*)regs.fp)+i); live.fate[i].mem=(uae_u32*)(((fptype*)regs.fp)+i);
@ -4409,7 +4412,7 @@ void init_comp(void)
else else
live.fate[i].mem=(uae_u32*)(fscratch+i); live.fate[i].mem=(uae_u32*)(fscratch+i);
} }
#endif
for (i=0;i<N_REGS;i++) { for (i=0;i<N_REGS;i++) {
live.nat[i].touched=0; live.nat[i].touched=0;
@ -6067,13 +6070,13 @@ void compile_block (const cpu_history *pc_hist, int blocklen, int totcycles)
align_target (align_jumps); align_target (align_jumps);
current_compile_p=get_target(); current_compile_p=get_target();
raise_in_cl_list(bi); raise_in_cl_list(bi);
bi->nexthandler=current_compile_p; bi->nexthandler=current_compile_p;
/* We will flush soon, anyway, so let's do it now */ /* We will flush soon, anyway, so let's do it now */
if (current_compile_p>=max_compile_start) if (current_compile_p>=max_compile_start)
flush_icache_hard(7); flush_icache_hard(7);
do_extra_cycles(totcycles); /* for the compilation time */ do_extra_cycles(totcycles); /* for the compilation time */
} }
} }

View File

@ -212,6 +212,7 @@ enum diw_states
unsigned int plffirstline, plflastline; unsigned int plffirstline, plflastline;
unsigned int plfstrt; unsigned int plfstrt;
unsigned int plfstop; unsigned int plfstop;
static int first_bpl_vpos;
static int last_diw_pix_hpos, last_ddf_pix_hpos; static int last_diw_pix_hpos, last_ddf_pix_hpos;
static int last_decide_line_hpos, last_sprite_decide_line_hpos; static int last_decide_line_hpos, last_sprite_decide_line_hpos;
static int last_fetch_hpos; static int last_fetch_hpos;
@ -375,7 +376,7 @@ static void hsyncdelay(void)
#if 0 #if 0
static unsigned int prevhpos; static unsigned int prevhpos;
while (current_hpos () == prevhpos) while (current_hpos () == prevhpos)
do_cycles (CYCLE_UNIT); do_cycles (CYCLE_UNIT);
prevhpos = current_hpos (); prevhpos = current_hpos ();
#endif #endif
} }
@ -603,16 +604,16 @@ static void debug_cycle_diagram (void)
write_log ("FMODE %d\n=======\n", fm); write_log ("FMODE %d\n=======\n", fm);
for (res = 0; res <= 2; res++) { for (res = 0; res <= 2; res++) {
for (planes = 0; planes <= 8; planes++) { for (planes = 0; planes <= 8; planes++) {
write_log("%d: ",planes); write_log ("%d: ",planes);
for (cycle = 0; cycle < 32; cycle++) { for (cycle = 0; cycle < 32; cycle++) {
v=cycle_diagram_table[fm][res][planes][cycle]; v=cycle_diagram_table[fm][res][planes][cycle];
if (v==0) aa='-'; else if(v>0) aa='1'; else aa='X'; if (v==0) aa='-'; else if(v>0) aa='1'; else aa='X';
write_log("%c",aa); write_log ("%c",aa);
} }
write_log(" %d:%d\n", write_log (" %d:%d\n",
cycle_diagram_free_cycles[fm][res][planes], cycle_diagram_total_cycles[fm][res][planes]); cycle_diagram_free_cycles[fm][res][planes], cycle_diagram_total_cycles[fm][res][planes]);
} }
write_log("\n"); write_log ("\n");
} }
} }
fm=0; fm=0;
@ -732,7 +733,7 @@ STATIC_INLINE void compute_delay_offset (void)
delayoffset = 16; delayoffset = 16;
else /* what about 40 and 56? */ else /* what about 40 and 56? */
delayoffset = 0; delayoffset = 0;
//write_log("%d:%d ", vpos, delayoffset); //write_log ("%d:%d ", vpos, delayoffset);
#endif #endif
} }
@ -1480,6 +1481,8 @@ STATIC_INLINE void decide_fetch (int hpos)
static void start_bpl_dma (unsigned int hpos, int hstart) static void start_bpl_dma (unsigned int hpos, int hstart)
{ {
if (first_bpl_vpos < 0)
first_bpl_vpos = vpos;
fetch_start (hpos); fetch_start (hpos);
fetch_cycle = 0; fetch_cycle = 0;
last_fetch_hpos = hstart; last_fetch_hpos = hstart;
@ -2047,7 +2050,7 @@ static void finish_decisions (void)
if (thisline_decision.plfleft != -1 && thisline_decision.plflinelen == -1) { if (thisline_decision.plfleft != -1 && thisline_decision.plflinelen == -1) {
if (fetch_state != fetch_not_started) { if (fetch_state != fetch_not_started) {
write_log("fetch_state=%d plfleft=%d,len=%d,vpos=%d,hpos=%d\n", write_log ("fetch_state=%d plfleft=%d,len=%d,vpos=%d,hpos=%d\n",
fetch_state, thisline_decision.plfleft, thisline_decision.plflinelen, fetch_state, thisline_decision.plfleft, thisline_decision.plflinelen,
vpos, hpos); vpos, hpos);
uae_abort ("fetch_state != fetch_not_started"); uae_abort ("fetch_state != fetch_not_started");
@ -2264,6 +2267,8 @@ void init_hz (void)
minfirstline = vsstop; minfirstline = vsstop;
if (minfirstline < 2) if (minfirstline < 2)
minfirstline = 2; minfirstline = 2;
if (minfirstline >= maxvpos)
minfirstline = maxvpos - 1;
sprite_vblank_endline = minfirstline - 2; sprite_vblank_endline = minfirstline - 2;
dumpsync (); dumpsync ();
} }
@ -2316,24 +2321,10 @@ static void calcdiw (void)
plffirstline = vstrt; plffirstline = vstrt;
plflastline = vstop; plflastline = vstop;
#if 0
/* This happens far too often. */
if (plffirstline < minfirstline_bpl) {
write_log ("Warning: Playfield begins before line %d (%d)!\n", minfirstline_bpl, plffirstline);
}
#endif
#if 0 /* this comparison is not needed but previous is.. */
if (plflastline > 313) {
/* Turrican does this */
write_log ("Warning: Playfield out of range!\n");
plflastline = 313;
}
#endif
plfstrt = ddfstrt; plfstrt = ddfstrt;
plfstop = ddfstop; plfstop = ddfstop;
/* probably not the correct place.. */ /* probably not the correct place.. */
/* ECS/AGA and ddfstop > maxhpos = always-on display */
if (currprefs.chipset_mask & CSMASK_ECS_AGNUS) { if (currprefs.chipset_mask & CSMASK_ECS_AGNUS) {
if (ddfstop > maxhpos) if (ddfstop > maxhpos)
plfstrt = 0; plfstrt = 0;
@ -2523,19 +2514,14 @@ static void DMACON (unsigned int hpos, uae_u16 v)
} }
} }
if ((dmacon & DMA_BLITPRI) > (oldcon & DMA_BLITPRI) && bltstate != BLT_done) { if ((dmacon & DMA_BLITPRI) > (oldcon & DMA_BLITPRI) && bltstate != BLT_done) {
static int count = 0;
if (!count) {
count = 1;
write_log ("warning: program is doing blitpri hacks.\n");
}
set_special (&regs, SPCFLAG_BLTNASTY);
decide_blitter (hpos); decide_blitter (hpos);
set_special (&regs, SPCFLAG_BLTNASTY);
} }
if (dmaen (DMA_BLITTER) && bltstate == BLT_init) if (dmaen (DMA_BLITTER) && bltstate == BLT_init)
bltstate = BLT_work; bltstate = BLT_work;
if ((dmacon & (DMA_BLITPRI | DMA_BLITTER | DMA_MASTER)) != (DMA_BLITPRI | DMA_BLITTER | DMA_MASTER)) { if ((dmacon & (DMA_BLITPRI | DMA_BLITTER | DMA_MASTER)) != (DMA_BLITPRI | DMA_BLITTER | DMA_MASTER)) {
unset_special (&regs, SPCFLAG_BLTNASTY);
decide_blitter (hpos); decide_blitter (hpos);
unset_special (&regs, SPCFLAG_BLTNASTY);
} }
if (changed & (DMA_MASTER | 0x0f)) if (changed & (DMA_MASTER | 0x0f))
audio_hsync (0); audio_hsync (0);
@ -2550,86 +2536,103 @@ static void DMACON (unsigned int hpos, uae_u16 v)
#ifdef CPUEMU_6 #ifdef CPUEMU_6
static int irq_pending[15]; /* If true, an IRQ is pending arrival at the CPU. */ static int irq_pending[15]; /* If true, an IRQ is pending arrival at the CPU. If false,
static unsigned long irq_due[15]; /* Cycle time that IRQ will arrive at CPU */ * an IRQ has arrived or is disabled. */
static unsigned long irq_time[15]; /* Cycle time an IRQ will arrive at the CPU if that IRQ is
* pending or has arrived; otherwise 0, if an IRQ is disabled. */
/* /*
* Handle interrupt delay in cycle-exact mode. * Get priority level of IRQ (cycle-exact mode)
*/ */
static int intlev_2 (void) STATIC_INLINE int intlev_exact (uae_u16 imask)
{ {
uae_u16 imask = intreq & intena; #if 0
int il = -1; assert ((imask & 0x7FFF) != 0);
#endif
if (imask && (intena & 0x4000)) { unsigned long curr_time = get_cycles ();
unsigned long cycles = get_cycles (); int i;
int i;
for (i = 14; i >= 0; i--) { for (i = 14; i >= 0; i--) {
if (imask & (1 << i)) { if (imask & (1 << i)) {
if (irq_pending[i] && (cycles >= irq_due[i])) { if (irq_pending[i] == 0 || ((curr_time - irq_time[i]) > 4 * CYCLE_UNIT)) {
irq_pending[i] = 0; /* Mark IRQ as arrived. */
irq_pending[i] = 0;
if (i == 13 || i == 14) /* Get priority level of IRQ. */
il = -1; if (i == 13 || i == 14)
else if (i == 11 || i == 12) return 6;
return 5; if (i == 11 || i == 12)
else if (i >= 7 && i <= 10) return 5;
return 4; if (i >= 7 && i <= 10)
else if (i >= 4 && i <= 6) return 4;
return 3; if (i >= 4 && i <= 6)
else if (i == 3) return 3;
return 2; if (i == 3)
else return 2;
return 1; else
} return 1;
} }
} }
} else }
unset_special (&regs, SPCFLAG_INT); /* If we got here, then an at least one IRQ must be pending,
* but has not yet arrived at the CPU. */
return il; return 0;
} }
#endif #endif
/* /*
* Get interrupt level of IRQ. * Get priority level of IRQ (not cycle-exact mode)
*/
STATIC_INLINE int intlev_simple (uae_u16 imask)
{
#if 0
assert ((imask & 0x7FFF) != 0);
#endif
if (imask & 0x6000)
return 6;
if (imask & 0x1800)
return 5;
if (imask & 0x0780)
return 4;
if (imask & 0x0070)
return 3;
if (imask & 0x0008)
return 2;
else
return 1;
}
/*
* Get level of interrupt request presented to CPU.
*
* If no IRQs are active and enabled, returns -1.
* If none of the active IRQs have yet reached the CPU, returns 0.
* Otherwise, returns the priority level of the highest priorty active IRQ.
*/ */
int intlev (void) int intlev (void)
{ {
int il = -1; uae_u16 imask = intreq & intena;
if (imask && (intena & 0x4000)) {
#ifdef CPUEMU_6 #ifdef CPUEMU_6
if (currprefs.cpu_cycle_exact) { if (currprefs.cpu_cycle_exact)
il = intlev_2 (); return intlev_exact (imask);
if (il >= 0 && il <= (int) regs.intmask) else
unset_special (&regs, SPCFLAG_INT);
} else
#endif #endif
{ return intlev_simple (imask);
uae_u16 imask = intreq & intena;
if (imask && (intena & 0x4000)) {
if (imask & 0x6000)
il = 6;
if (imask & 0x1800)
il = 5;
if (imask & 0x0780)
il = 4;
if (imask & 0x0070)
il = 3;
if (imask & 0x0008)
il = 2;
if (imask & 0x0007)
il = 1;
}
} }
return -1;
return il;
} }
/*
* Enable/disable an IRQ.
*/
static void doint (void) static void doint (void)
{ {
set_special (&regs, SPCFLAG_INT); if (intena & 0x4000)
set_special (&regs, SPCFLAG_INT);
#ifdef CPUEMU_6 #ifdef CPUEMU_6
if (currprefs.cpu_cycle_exact) { if (currprefs.cpu_cycle_exact) {
@ -2639,12 +2642,12 @@ static void doint (void)
imask = intreq & intena; imask = intreq & intena;
if (imask && (intena & 0x4000)) { if (imask && (intena & 0x4000)) {
/* Set up delay for IRQ to arrive at the CPU. */ /* Set up time for IRQ to arrive at the CPU. */
unsigned long cycle_irq_due = get_cycles () + 4 * CYCLE_UNIT; unsigned long curr_time = get_cycles ();
for (i = 0; i < 15; i++) { for (i = 0; i < 15; i++) {
if ((imask & (1 << i)) && irq_pending[i] == 0) { if ((imask & (1 << i)) && irq_pending[i] == 0) {
irq_pending[i] = 1; irq_pending[i] = 1;
irq_due[i] = cycle_irq_due; irq_time[i] = curr_time;
} }
} }
} }
@ -2657,7 +2660,7 @@ STATIC_INLINE void INTENA (uae_u16 v)
setclr (&intena,v); setclr (&intena,v);
#if 0 #if 0
if (v & 0x40) if (v & 0x40)
write_log("INTENA %04.4X (%04.4X) %p\n", intena, v, m68k_getpc (&regs)); write_log ("INTENA %04.4X (%04.4X) %p\n", intena, v, m68k_getpc (&regs));
#endif #endif
if (v & 0x8000) if (v & 0x8000)
doint (); doint ();
@ -2677,14 +2680,17 @@ void INTREQ_0 (uae_u16 v)
* pending status. */ * pending status. */
int i; int i;
for (i = 0; i < 15; i++) { for (i = 0; i < 15; i++) {
if (v & (1 << i)) if (v & (1 << i)) {
irq_pending[i] = 0; irq_pending[i] = 0;
irq_time[i] = 0;
}
} }
} }
} }
#endif #endif
doint (); if (intena & 0x4000)
doint ();
} }
void INTREQ (uae_u16 v) void INTREQ (uae_u16 v)
@ -2770,7 +2776,7 @@ static void BPLxPTH (unsigned int hpos, uae_u16 v, int num)
decide_line (hpos); decide_line (hpos);
decide_fetch (hpos); decide_fetch (hpos);
bplpt[num] = (bplpt[num] & 0xffff) | ((uae_u32)v << 16); bplpt[num] = (bplpt[num] & 0xffff) | ((uae_u32)v << 16);
//write_log("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v); //write_log ("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v);
} }
static void BPLxPTL (unsigned int hpos, uae_u16 v, int num) static void BPLxPTL (unsigned int hpos, uae_u16 v, int num)
{ {
@ -2782,7 +2788,7 @@ static void BPLxPTL (unsigned int hpos, uae_u16 v, int num)
if (is_bitplane_dma(hpos - 1) == num + 1 && num > 0) if (is_bitplane_dma(hpos - 1) == num + 1 && num > 0)
delta = 2 << fetchmode; delta = 2 << fetchmode;
bplpt[num] = (bplpt[num] & ~0xffff) | ((v + delta) & 0xfffe); bplpt[num] = (bplpt[num] & ~0xffff) | ((v + delta) & 0xfffe);
//write_log("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v); //write_log ("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
} }
static void BPLCON0 (unsigned int hpos, uae_u16 v) static void BPLCON0 (unsigned int hpos, uae_u16 v)
@ -2924,6 +2930,7 @@ static void DIWHIGH (int hpos, uae_u16 v)
{ {
if (! (currprefs.chipset_mask & CSMASK_ECS_AGNUS)) if (! (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
return; return;
v &= ~(0x8000 | 0x4000 | 0x0080 | 0x0040);
if (diwhigh_written && diwhigh == v) if (diwhigh_written && diwhigh == v)
return; return;
decide_line (hpos); decide_line (hpos);
@ -3056,8 +3063,10 @@ static void BLTSIZE (uae_u16 v)
blt_info.vblitsize = v >> 6; blt_info.vblitsize = v >> 6;
blt_info.hblitsize = v & 0x3F; blt_info.hblitsize = v & 0x3F;
if (!blt_info.vblitsize) blt_info.vblitsize = 1024; if (!blt_info.vblitsize)
if (!blt_info.hblitsize) blt_info.hblitsize = 64; blt_info.vblitsize = 1024;
if (!blt_info.hblitsize)
blt_info.hblitsize = 64;
do_blitter (current_hpos()); do_blitter (current_hpos());
} }
@ -3090,7 +3099,7 @@ STATIC_INLINE void spr_arm (unsigned int num, int state)
spr[num].armed = 0; spr[num].armed = 0;
break; break;
default: default:
nr_armed += 1 - spr[num].armed; nr_armed += 1 - spr[num].armed;
spr[num].armed = 1; spr[num].armed = 1;
break; break;
} }
@ -3443,12 +3452,7 @@ static int isagnus[]= {
static void dump_copper (const char *error, unsigned int until_hpos) static void dump_copper (const char *error, unsigned int until_hpos)
{ {
static int warned = 10; write_log ("%s: vpos=%d until_hpos=%d\n",
if (warned < 0)
return;
warned--;
write_log("%s: vpos=%d until_hpos=%d\n",
error, vpos, until_hpos); error, vpos, until_hpos);
write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%#4.4X ci2=%#4.4X\n", write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%#4.4X ci2=%#4.4X\n",
cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2); cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2);
@ -3664,11 +3668,6 @@ static void update_copper (unsigned int until_hpos)
static int skipped_before; static int skipped_before;
unsigned int vcmp, hcmp, vp1, hp1; unsigned int vcmp, hcmp, vp1, hp1;
if (! skipped_before) {
skipped_before = 1;
write_log ("Program uses Copper SKIP instruction.\n");
}
if (c_hpos >= (maxhpos & ~1)) if (c_hpos >= (maxhpos & ~1))
break; break;
@ -3799,7 +3798,7 @@ STATIC_INLINE void do_sprites_1 (unsigned int num, int cycle, unsigned int hpos)
#if SPRITE_DEBUG > 3 #if SPRITE_DEBUG > 3
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
write_log("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle); write_log ("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
#endif #endif
if (vpos == s->vstart) { if (vpos == s->vstart) {
#if SPRITE_DEBUG > 0 #if SPRITE_DEBUG > 0
@ -4034,6 +4033,7 @@ static void adjust_array_sizes (void)
static void init_hardware_frame (void) static void init_hardware_frame (void)
{ {
first_bpl_vpos = -1;
next_lineno = 0; next_lineno = 0;
nextline_how = nln_normal; nextline_how = nln_normal;
diwstate = DIW_waiting_start; diwstate = DIW_waiting_start;
@ -4115,7 +4115,7 @@ static frame_time_t framewait_friendly (frame_time_t end_time)
static int count = 0; static int count = 0;
static int total = 0; static int total = 0;
uae_msleep (2); uae_msleep (2);
/* Callibrate time we slept for and try to adjust to /* Callibrate time we slept for and try to adjust to
* changing lantencies. * changing lantencies.
@ -4131,7 +4131,7 @@ static frame_time_t framewait_friendly (frame_time_t end_time)
count = 0; count = 0;
} }
} else } else
break; break;
} }
} }
@ -4286,8 +4286,6 @@ static void vsync_handler (void)
picasso_handle_vsync (); picasso_handle_vsync ();
#endif #endif
vsync_handle_redraw (lof, lof_changed);
{ {
static int cnt = 0; static int cnt = 0;
if (cnt == 0) { if (cnt == 0) {
@ -4303,6 +4301,8 @@ static void vsync_handler (void)
record_copper_reset(); record_copper_reset();
#endif #endif
vsync_handle_redraw (lof, lof_changed);
/* For now, let's only allow this to change at vsync time. It gets too /* For now, let's only allow this to change at vsync time. It gets too
* hairy otherwise. */ * hairy otherwise. */
if ((beamcon0 & (0x20|0x80)) != (new_beamcon0 & (0x20|0x80)) || hack_vpos) if ((beamcon0 & (0x20|0x80)) != (new_beamcon0 & (0x20|0x80)) || hack_vpos)
@ -4313,11 +4313,11 @@ static void vsync_handler (void)
eventtab[ev_copper].active = 0; eventtab[ev_copper].active = 0;
COPJMP (1); COPJMP (1);
init_hardware_frame ();
if (timehack_alive > 0) if (timehack_alive > 0)
timehack_alive--; timehack_alive--;
inputdevice_vsync (); inputdevice_vsync ();
init_hardware_frame ();
} }
#ifdef JIT #ifdef JIT
@ -4545,6 +4545,9 @@ void customreset (void)
bplcon4 = 0x11; /* Get AGA chipset into ECS compatibility mode */ bplcon4 = 0x11; /* Get AGA chipset into ECS compatibility mode */
bplcon3 = 0xC00; bplcon3 = 0xC00;
diwhigh = 0;
diwhigh_written = 0;
FMODE (0); FMODE (0);
CLXCON (0); CLXCON (0);
} }
@ -4604,7 +4607,7 @@ void customreset (void)
sprite_buffer_res = currprefs.chipset_mask & CSMASK_AGA ? RES_HIRES : RES_LORES; sprite_buffer_res = currprefs.chipset_mask & CSMASK_AGA ? RES_HIRES : RES_LORES;
if (savestate_state == STATE_RESTORE) { if (savestate_state == STATE_RESTORE) {
unsigned int i; unsigned int i;
uae_u16 v; uae_u16 v;
uae_u32 vv; uae_u32 vv;
@ -4725,8 +4728,8 @@ static int allocate_sprite_tables (void)
delta_color_change = 0; delta_color_change = 0;
if (!sprite_entries[0]) { if (!sprite_entries[0]) {
max_sprite_entry = DEFAULT_MAX_SPRITE_ENTRY; max_sprite_entry = DEFAULT_MAX_SPRITE_ENTRY;
max_color_change = DEFAULT_MAX_COLOR_CHANGE; max_color_change = DEFAULT_MAX_COLOR_CHANGE;
for (num = 0; num < 2; num++) { for (num = 0; num < 2; num++) {
sprite_entries[num] = xmalloc (max_sprite_entry * sizeof (struct sprite_entry)); sprite_entries[num] = xmalloc (max_sprite_entry * sizeof (struct sprite_entry));
@ -4736,7 +4739,7 @@ static int allocate_sprite_tables (void)
memset (sprite_entries[num], 0, max_sprite_entry * sizeof (struct sprite_entry)); memset (sprite_entries[num], 0, max_sprite_entry * sizeof (struct sprite_entry));
memset (color_changes[num], 0, max_color_change * sizeof (struct color_change)); memset (color_changes[num], 0, max_color_change * sizeof (struct color_change));
} else } else
return 0; return 0;
} }
} }
@ -5124,14 +5127,20 @@ void REGPARAM2 custom_wput (uaecptr addr, uae_u32 value)
write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc (&regs)); write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc (&regs));
#endif #endif
sync_copper_with_cpu (hpos, 1); sync_copper_with_cpu (hpos, 1);
if (addr & 1) {
addr &= ~1;
custom_wput_1 (hpos, addr, (value >> 8) | (value & 0xff00), 0);
custom_wput_1 (hpos, addr + 2, (value << 8) | (value & 0x00ff), 0);
return;
}
custom_wput_1 (hpos, addr, value, 0); custom_wput_1 (hpos, addr, value, 0);
} }
void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value) void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
{ {
uae_u16 rval = (value << 8) | (value & 0xFF);
static int warned; static int warned;
uae_u16 rval = (value << 8) | (value & 0xFF);
#ifdef JIT #ifdef JIT
special_mem |= SPECIAL_MEM_WRITE; special_mem |= SPECIAL_MEM_WRITE;
#endif #endif
@ -5280,8 +5289,7 @@ const uae_u8 *restore_custom (const uae_u8 *src)
vsstrt = RW; /* 1E0 VSSTT */ vsstrt = RW; /* 1E0 VSSTT */
hcenter = RW; /* 1E2 HCENTER */ hcenter = RW; /* 1E2 HCENTER */
diwhigh = RW; /* 1E4 DIWHIGH */ diwhigh = RW; /* 1E4 DIWHIGH */
if (diwhigh & 0x8000) diwhigh_written = (diwhigh & 0x8000) ? 1 : 0;
diwhigh_written = 1;
diwhigh &= 0x7fff; diwhigh &= 0x7fff;
RW; /* 1E6 ? */ RW; /* 1E6 ? */
RW; /* 1E8 ? */ RW; /* 1E8 ? */

View File

@ -1025,7 +1025,7 @@ static void rand_shifter (void)
} }
} }
static int drive_empty (drive * drv) STATIC_INLINE int drive_empty (const drive * drv)
{ {
#ifdef CATWEASEL #ifdef CATWEASEL
if (drv->catweasel) if (drv->catweasel)
@ -1055,7 +1055,7 @@ static void drive_step (drive * drv)
#endif #endif
if (drv->steplimit && get_cycles () - drv->steplimitcycle < MIN_STEPLIMIT_CYCLE) { if (drv->steplimit && get_cycles () - drv->steplimitcycle < MIN_STEPLIMIT_CYCLE) {
if (disk_debug_logging > 1) if (disk_debug_logging > 1)
write_log (" step ignored %d", (int)((get_cycles () - drv->steplimitcycle) / CYCLE_UNIT)); write_log (" step ignored %d", (int)((get_cycles () - drv->steplimitcycle) / CYCLE_UNIT));
return; return;
} }
/* A1200's floppy drive needs at least 30 raster lines between steps /* A1200's floppy drive needs at least 30 raster lines between steps
@ -1074,7 +1074,7 @@ static void drive_step (drive * drv)
#endif #endif
} }
/* else /* else
write_log("program tried to step beyond track zero\n"); write_log ("program tried to step beyond track zero\n");
"no-click" programs does that "no-click" programs does that
*/ */
} else { } else {
@ -1094,7 +1094,7 @@ static void drive_step (drive * drv)
} }
rand_shifter (); rand_shifter ();
if (disk_debug_logging > 1) if (disk_debug_logging > 1)
write_log (" ->step %d", drv->cyl); write_log (" ->step %d", drv->cyl);
} }
static int drive_track0 (drive * drv) static int drive_track0 (drive * drv)
@ -1237,7 +1237,7 @@ static void decode_pcdos (drive *drv)
mfm2[93] = 0x5224; mfm2[93] = 0x5224;
mfm2[94] = 0x5224; mfm2[94] = 0x5224;
for (i = 0; i < drv->num_secs; i++) { for (i = 0; i < drv->num_secs; i++) {
mfm2 = dstmfmbuf; mfm2 = dstmfmbuf;
memset (secbuf, 0x00, 12); memset (secbuf, 0x00, 12);
secbuf[12] = 0xa1; secbuf[12] = 0xa1;
secbuf[13] = 0xa1; secbuf[13] = 0xa1;
@ -1270,11 +1270,11 @@ static void decode_pcdos (drive *drv)
mfm2[58] = 0x4489; mfm2[58] = 0x4489;
} }
for (i = 0; i < 200; i++) for (i = 0; i < 200; i++)
*dstmfmbuf++ = 0x9254; *dstmfmbuf++ = 0x9254;
drv->skipoffset = 0; drv->skipoffset = 0;
drv->tracklen = (dstmfmbuf - drv->bigmfmbuf) * 16; drv->tracklen = (dstmfmbuf - drv->bigmfmbuf) * 16;
if (disk_debug_logging > 0) if (disk_debug_logging > 0)
write_log ("pcdos read track %d\n", tr); write_log ("pcdos read track %d\n", tr);
} }
static void decode_amigados (drive *drv) static void decode_amigados (drive *drv)
@ -1293,39 +1293,39 @@ static void decode_amigados (drive *drv)
drv->tracklen = len * 2 * 8; drv->tracklen = len * 2 * 8;
for (sec = 0; sec < drv->num_secs; sec++) { for (sec = 0; sec < drv->num_secs; sec++) {
uae_u8 secbuf[544]; uae_u8 secbuf[544];
uae_u16 mfmbuf[544]; uae_u16 mfmbuf[544];
int i; int i;
uae_u32 deven, dodd; uae_u32 deven, dodd;
uae_u32 hck = 0, dck = 0; uae_u32 hck = 0, dck = 0;
secbuf[0] = secbuf[1] = 0x00; secbuf[0] = secbuf[1] = 0x00;
secbuf[2] = secbuf[3] = 0xa1; secbuf[2] = secbuf[3] = 0xa1;
secbuf[4] = 0xff; secbuf[4] = 0xff;
secbuf[5] = tr; secbuf[5] = tr;
secbuf[6] = sec; secbuf[6] = sec;
secbuf[7] = drv->num_secs - sec; secbuf[7] = drv->num_secs - sec;
for (i = 8; i < 24; i++) for (i = 8; i < 24; i++)
secbuf[i] = 0; secbuf[i] = 0;
read_floppy_data (drv->diskfile, ti, sec * 512, &secbuf[32], 512); read_floppy_data (drv->diskfile, ti, sec * 512, &secbuf[32], 512);
mfmbuf[0] = mfmbuf[1] = 0xaaaa; mfmbuf[0] = mfmbuf[1] = 0xaaaa;
mfmbuf[2] = mfmbuf[3] = 0x4489; mfmbuf[2] = mfmbuf[3] = 0x4489;
deven = ((secbuf[4] << 24) | (secbuf[5] << 16) deven = ((secbuf[4] << 24) | (secbuf[5] << 16)
| (secbuf[6] << 8) | (secbuf[7])); | (secbuf[6] << 8) | (secbuf[7]));
dodd = deven >> 1; dodd = deven >> 1;
deven &= 0x55555555; deven &= 0x55555555;
dodd &= 0x55555555; dodd &= 0x55555555;
mfmbuf[4] = dodd >> 16; mfmbuf[4] = dodd >> 16;
mfmbuf[5] = dodd; mfmbuf[5] = dodd;
mfmbuf[6] = deven >> 16; mfmbuf[6] = deven >> 16;
mfmbuf[7] = deven; mfmbuf[7] = deven;
for (i = 8; i < 48; i++) for (i = 8; i < 48; i++)
mfmbuf[i] = 0xaaaa; mfmbuf[i] = 0xaaaa;
for (i = 0; i < 512; i += 4) { for (i = 0; i < 512; i += 4) {
deven = ((secbuf[i + 32] << 24) | (secbuf[i + 33] << 16) deven = ((secbuf[i + 32] << 24) | (secbuf[i + 33] << 16)
@ -1342,32 +1342,32 @@ static void decode_amigados (drive *drv)
for (i = 4; i < 24; i += 2) for (i = 4; i < 24; i += 2)
hck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1]; hck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1];
deven = dodd = hck; deven = dodd = hck;
dodd >>= 1; dodd >>= 1;
mfmbuf[24] = dodd >> 16; mfmbuf[24] = dodd >> 16;
mfmbuf[25] = dodd; mfmbuf[25] = dodd;
mfmbuf[26] = deven >> 16; mfmbuf[26] = deven >> 16;
mfmbuf[27] = deven; mfmbuf[27] = deven;
for (i = 32; i < 544; i += 2) for (i = 32; i < 544; i += 2)
dck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1]; dck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1];
deven = dodd = dck; deven = dodd = dck;
dodd >>= 1; dodd >>= 1;
mfmbuf[28] = dodd >> 16; mfmbuf[28] = dodd >> 16;
mfmbuf[29] = dodd; mfmbuf[29] = dodd;
mfmbuf[30] = deven >> 16; mfmbuf[30] = deven >> 16;
mfmbuf[31] = deven; mfmbuf[31] = deven;
mfmcode (mfmbuf + 4, 544 - 4); mfmcode (mfmbuf + 4, 544 - 4);
for (i = 0; i < 544; i++) { for (i = 0; i < 544; i++) {
dstmfmbuf[dstmfmoffset % len] = mfmbuf[i]; dstmfmbuf[dstmfmoffset % len] = mfmbuf[i];
dstmfmoffset++; dstmfmoffset++;
} }
} }
if (disk_debug_logging > 0) if (disk_debug_logging > 0)
write_log ("amigados read track %d\n", tr); write_log ("amigados read track %d\n", tr);
} }
static void drive_fill_bigbuf (drive * drv, int force) static void drive_fill_bigbuf (drive * drv, int force)
@ -1807,7 +1807,7 @@ static void drive_eject (drive * drv)
drv->crc32 = 0; drv->crc32 = 0;
drive_settype_id (drv); /* Back to 35 DD */ drive_settype_id (drv); /* Back to 35 DD */
if (disk_debug_logging > 0) if (disk_debug_logging > 0)
write_log ("eject drive %d\n", drv - &floppy[0]); write_log ("eject drive %d\n", drv - &floppy[0]);
} }
/* We use this function if we have no Kickstart ROM. /* We use this function if we have no Kickstart ROM.
@ -2122,7 +2122,7 @@ static char *tobin (uae_u8 v)
static char buf[10]; static char buf[10];
for ( i = 7; i >= 0; i--) for ( i = 7; i >= 0; i--)
buf[7 - i] = v & (1 << i) ? '1' : '0'; buf[7 - i] = v & (1 << i) ? '1' : '0';
buf[i] = 0; buf[8] = 0;
return buf; return buf;
} }
@ -2213,7 +2213,7 @@ void DISK_select (uae_u8 data)
} }
prevdata = data; prevdata = data;
if (disk_debug_logging > 1) if (disk_debug_logging > 1)
write_log ("\n"); write_log ("\n");
} }
uae_u8 DISK_status (void) uae_u8 DISK_status (void)
@ -2262,7 +2262,7 @@ uae_u8 DISK_status (void)
return st; return st;
} }
static int unformatted (drive *drv) STATIC_INLINE int unformatted (const drive *drv)
{ {
unsigned int tr = drv->cyl * 2 + side; unsigned int tr = drv->cyl * 2 + side;
if (tr >= drv->num_tracks) if (tr >= drv->num_tracks)
@ -2442,20 +2442,20 @@ static void updatetrackspeed (drive *drv, unsigned int mfmpos)
} }
} }
static void disk_doupdate_predict (drive * drv, unsigned int startcycle) STATIC_INLINE void disk_doupdate_predict (drive * drv, unsigned int startcycle, int write)
{ {
unsigned int firstcycle = startcycle; unsigned int firstcycle = startcycle;
unsigned int endcycle = maxhpos << 8;
uae_u32 tword = word; uae_u32 tword = word;
unsigned int mfmpos = drv->mfmpos; unsigned int mfmpos = drv->mfmpos;
int indexhack = drv->indexhack;
int is_empty = drive_empty (drv); int is_empty = drive_empty (drv);
int is_unformatted = unformatted (drv); int is_unformatted = unformatted (drv);
unsigned int event_flag = 0;
diskevent_flag = 0; while (startcycle < endcycle && !event_flag) {
while (startcycle < (maxhpos << 8) && !diskevent_flag) {
if (drv->tracktiming[0]) if (drv->tracktiming[0])
updatetrackspeed (drv, mfmpos); updatetrackspeed (drv, mfmpos);
if (dskdmaen != 3) { if (!write) {
tword <<= 1; tword <<= 1;
if (!is_empty) { if (!is_empty) {
if (is_unformatted) if (is_unformatted)
@ -2464,34 +2464,31 @@ static void disk_doupdate_predict (drive * drv, unsigned int startcycle)
tword |= getonebit (drv->bigmfmbuf, mfmpos); tword |= getonebit (drv->bigmfmbuf, mfmpos);
} }
if ((tword & 0xffff) == dsksync) if ((tword & 0xffff) == dsksync)
diskevent_flag |= DISK_WORDSYNC; event_flag |= DISK_WORDSYNC;
} }
mfmpos++; mfmpos++;
mfmpos %= drv->tracklen; mfmpos %= drv->tracklen;
if (mfmpos == 0) if (mfmpos == 0)
diskevent_flag |= DISK_REVOLUTION << (drv - floppy); event_flag |= DISK_REVOLUTION << (drv - floppy);
if (mfmpos == drv->indexoffset) { if (mfmpos == drv->indexoffset)
diskevent_flag |= DISK_INDEXSYNC; event_flag |= DISK_INDEXSYNC;
indexhack = 0; if (!write && (int)mfmpos == drv->skipoffset) {
}
if (dskdmaen != 3 && (int)mfmpos == drv->skipoffset) {
int skipcnt = disk_jitter; int skipcnt = disk_jitter;
while (skipcnt-- > 0) { while (skipcnt-- > 0) {
mfmpos++; mfmpos++;
mfmpos %= drv->tracklen; mfmpos %= drv->tracklen;
if (mfmpos == 0) if (mfmpos == 0)
diskevent_flag |= DISK_REVOLUTION << (drv - floppy); event_flag |= DISK_REVOLUTION << (drv - floppy);
if (mfmpos == drv->indexoffset) { if (mfmpos == drv->indexoffset)
diskevent_flag |= DISK_INDEXSYNC; event_flag |= DISK_INDEXSYNC;
indexhack = 0;
}
} }
} }
startcycle += drv->trackspeed; startcycle += drv->trackspeed;
} }
if (drv->tracktiming[0]) if (drv->tracktiming[0])
updatetrackspeed (drv, drv->mfmpos); updatetrackspeed (drv, drv->mfmpos);
if (diskevent_flag) { diskevent_flag = event_flag;
if (event_flag) {
disk_sync_cycle = startcycle >> 8; disk_sync_cycle = startcycle >> 8;
eventtab[ev_disk].oldcycles = get_cycles (); eventtab[ev_disk].oldcycles = get_cycles ();
eventtab[ev_disk].evtime = get_cycles () + startcycle - firstcycle; eventtab[ev_disk].evtime = get_cycles () + startcycle - firstcycle;
@ -2534,7 +2531,7 @@ static void disk_doupdate_read (drive * drv, int floppybits)
if (drv->tracktiming[0]) if (drv->tracktiming[0])
updatetrackspeed (drv, drv->mfmpos); updatetrackspeed (drv, drv->mfmpos);
word <<= 1; word <<= 1;
if (!is_empty) { if (!is_empty) {
if (is_unformatted) if (is_unformatted)
word |= (rand () & 0x1000) ? 1 : 0; word |= (rand () & 0x1000) ? 1 : 0;
else else
@ -2554,7 +2551,7 @@ static void disk_doupdate_read (drive * drv, int floppybits)
} }
if (bitoffset == 15 && dma_enable && dskdmaen == 2 && dsklength >= 0) { if (bitoffset == 15 && dma_enable && dskdmaen == 2 && dsklength >= 0) {
if (dsklength > 0) { if (dsklength > 0) {
do_chipmem_wput (dskpt, word); do_chipmem_wput (dskpt, word);
dskpt += 2; dskpt += 2;
#ifdef CPUEMU_6 #ifdef CPUEMU_6
cycle_line[7] |= CYCLE_MISC; cycle_line[7] |= CYCLE_MISC;
@ -2708,7 +2705,7 @@ void DISK_hsync (unsigned int tohpos)
void DISK_update (unsigned int tohpos) void DISK_update (unsigned int tohpos)
{ {
unsigned int dr; unsigned int dr;
unsigned int cycles = (tohpos << 8) - disk_hpos; int cycles = (int)((tohpos << 8) - disk_hpos);
disk_jitter = ((rand () >> 4) & 3) + 1; disk_jitter = ((rand () >> 4) & 3) + 1;
if (disk_jitter > 2) if (disk_jitter > 2)
@ -2744,11 +2741,13 @@ void DISK_update (unsigned int tohpos)
continue; continue;
if (selected & (1 << dr)) if (selected & (1 << dr))
continue; continue;
if (dskdmaen == 3) if (dskdmaen == 3) {
disk_doupdate_write (drv, drv->floppybitcounter); disk_doupdate_write (drv, drv->floppybitcounter);
else disk_doupdate_predict (drv, disk_hpos, 1);
} else {
disk_doupdate_read (drv, drv->floppybitcounter); disk_doupdate_read (drv, drv->floppybitcounter);
disk_doupdate_predict (drv, disk_hpos); disk_doupdate_predict (drv, disk_hpos, 0);
}
drv->floppybitcounter %= drv->trackspeed; drv->floppybitcounter %= drv->trackspeed;
break; break;
} }
@ -2828,7 +2827,7 @@ void DSKLEN (uae_u16 v, unsigned int hpos)
dskdmaen == 3 ? "write" : "read", selected ^ 15, dskdmaen == 3 ? "write" : "read", selected ^ 15,
floppy[dr].cyl * 2 + side, floppy[dr].mfmpos); floppy[dr].cyl * 2 + side, floppy[dr].mfmpos);
} }
disk_dma_debugmsg (); disk_dma_debugmsg ();
} }
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++)
@ -2890,7 +2889,7 @@ void DSKLEN (uae_u16 v, unsigned int hpos)
} else if (dskdmaen == 3) { /* TURBO write */ } else if (dskdmaen == 3) { /* TURBO write */
int i; int i;
for (i = 0; i < dsklength; i++) { for (i = 0; i < dsklength; i++) {
drv->bigmfmbuf[pos >> 4] = get_word (dskpt + i * 2); drv->bigmfmbuf[pos >> 4] = get_word (dskpt + i * 2);
pos += 16; pos += 16;

View File

@ -75,8 +75,6 @@ static int dblpfofs[] = { 0, 2, 4, 8, 16, 32, 64, 128 };
static int sprite_offs[256]; static int sprite_offs[256];
static uae_u32 clxtab[256];
/* Video buffer description structure. Filled in by the graphics system /* Video buffer description structure. Filled in by the graphics system
* dependent code. */ * dependent code. */
@ -653,14 +651,6 @@ static void gen_pfield_tables (void)
dblpf_ind2[i] = i >= 128 ? i & 0x7F : (plane2 == 0 ? plane1 : plane2); dblpf_ind2[i] = i >= 128 ? i & 0x7F : (plane2 == 0 ? plane1 : plane2);
sprite_offs[i] = (i & 15) ? 0 : 2; sprite_offs[i] = (i & 15) ? 0 : 2;
clxtab[i] = ((((i & 3) && (i & 12)) << 9)
| (((i & 3) && (i & 48)) << 10)
| (((i & 3) && (i & 192)) << 11)
| (((i & 12) && (i & 48)) << 12)
| (((i & 12) && (i & 192)) << 13)
| (((i & 48) && (i & 192)) << 14));
} }
} }
@ -1221,22 +1211,22 @@ static void pfield_expand_dp_bplcon2 (int regno, int v)
regno -= 0x1000; regno -= 0x1000;
switch (regno) switch (regno)
{ {
case 0x100: case 0x100:
dp_for_drawing->bplcon0 = v; dp_for_drawing->bplcon0 = v;
dp_for_drawing->bplres = GET_RES(v); dp_for_drawing->bplres = GET_RES(v);
dp_for_drawing->nr_planes = GET_PLANES(v); dp_for_drawing->nr_planes = GET_PLANES(v);
dp_for_drawing->ham_seen = !! (v & 0x800); dp_for_drawing->ham_seen = !! (v & 0x800);
break; break;
case 0x104: case 0x104:
dp_for_drawing->bplcon2 = v; dp_for_drawing->bplcon2 = v;
break; break;
#ifdef AGA #ifdef AGA
case 0x106: case 0x106:
dp_for_drawing->bplcon3 = v; dp_for_drawing->bplcon3 = v;
break; break;
case 0x108: case 0x108:
dp_for_drawing->bplcon4 = v; dp_for_drawing->bplcon4 = v;
break; break;
#endif #endif
} }
pfield_expand_dp_bplcon (); pfield_expand_dp_bplcon ();
@ -1826,12 +1816,14 @@ void finish_drawing_frame (void)
#endif #endif
for (i = 0; i < max_ypos_thisframe; i++) { for (i = 0; i < max_ypos_thisframe; i++) {
int where; int where;
int i1 = i + min_ypos_for_screen; int i1;
int line = i + thisframe_y_adjust_real; int line = i + thisframe_y_adjust_real;
if (linestate[line] == LINE_UNDECIDED) if (linestate[line] == LINE_UNDECIDED)
break; break;
i1 = i + min_ypos_for_screen;
where = amiga2aspect_line_map[i1]; where = amiga2aspect_line_map[i1];
if (where >= gfxvidinfo.height) if (where >= gfxvidinfo.height)
break; break;
@ -1841,8 +1833,8 @@ void finish_drawing_frame (void)
pfield_draw_line (line, where, amiga2aspect_line_map[i1 + 1]); pfield_draw_line (line, where, amiga2aspect_line_map[i1 + 1]);
} }
if (currprefs.leds_on_screen) { if (currprefs.leds_on_screen) {
for (i = 0; i < TD_TOTAL_HEIGHT; i++) { int line = gfxvidinfo.height - TD_TOTAL_HEIGHT;
int line = gfxvidinfo.height - TD_TOTAL_HEIGHT + i; for (i = TD_TOTAL_HEIGHT; i--; line++) {
draw_status_line (line); draw_status_line (line);
do_flush_line (line); do_flush_line (line);
} }
@ -2024,7 +2016,7 @@ void reset_drawing (void)
lores_reset (); lores_reset ();
for (i = 0; i < sizeof linestate / sizeof *linestate; i++) for (i = sizeof linestate / sizeof *linestate; i--;)
linestate[i] = LINE_UNDECIDED; linestate[i] = LINE_UNDECIDED;
init_aspect_maps (); init_aspect_maps ();

View File

@ -12,6 +12,7 @@
; 200?.??.?? Picasso96 vblank hack (TW) ; 200?.??.?? Picasso96 vblank hack (TW)
; 2006.03.04 Mousehack code integrated (TW) ; 2006.03.04 Mousehack code integrated (TW)
; 2006.18.07 FileSystem.resource find routine access fault fixed (TW) ; 2006.18.07 FileSystem.resource find routine access fault fixed (TW)
; 2007.03.30 mousehack do not start multiple times anymore (TW)
AllocMem = -198 AllocMem = -198
FreeMem = -210 FreeMem = -210
@ -160,7 +161,7 @@ general_ret:
exter_data: exter_data:
exter_server: exter_server:
movem.l a2,-(sp) movem.l a2,-(sp)
move.w #$FF50,d0 move.w #$FF50,d0 ; exter_int_helper
bsr.w getrtbase bsr.w getrtbase
moveq.l #0,d0 moveq.l #0,d0
jsr (a0) jsr (a0)
@ -169,7 +170,7 @@ exter_server:
; This is the hard part - we have to send some messages. ; This is the hard part - we have to send some messages.
move.l 4.w,a6 move.l 4.w,a6
EXTS_loop: EXTS_loop:
move.w #$FF50,d0 ;exter_int_helper move.w #$FF50,d0 ; exter_int_helper
bsr.w getrtbase bsr.w getrtbase
moveq.l #2,d0 moveq.l #2,d0
jsr (a0) jsr (a0)
@ -621,8 +622,10 @@ filesys_mainloop:
FSML_loop: FSML_loop:
bsr.w mousehack_init bsr.w mousehack_init
move.l a5,a0 move.l a5,a0
jsr -384(a6) ; WaitPort jsr -384(a6) ; WaitPort
move.l a5,a0 move.l a5,a0
jsr -372(a6) ; GetMsg jsr -372(a6) ; GetMsg
move.l d0,a4 move.l d0,a4
@ -665,7 +668,7 @@ nonotif
move.l (a2),a0 move.l (a2),a0
FSML_check_old: FSML_check_old:
move.l a0,d0 move.l a0,d0
beq.b FSML_loop beq.w FSML_loop
move.l (a0),a1 move.l (a0),a1
move.l d0,a0 move.l d0,a0
; This field may be accessed concurrently by several UAE threads. ; This field may be accessed concurrently by several UAE threads.
@ -697,7 +700,7 @@ FSML_FromDOS:
FSML_DoCommand: FSML_DoCommand:
bsr.b LockCheck ; Make sure there are enough locks for the C code to grab. bsr.b LockCheck ; Make sure there are enough locks for the C code to grab.
move.w #$FF30,d0 move.w #$FF30,d0 ; filesys_handler
bsr.w getrtbase bsr.w getrtbase
jsr (a0) jsr (a0)
tst.l d0 tst.l d0
@ -799,14 +802,14 @@ p96vsyncfix1
jsr -$12c(a6) ; SetTaskPri jsr -$12c(a6) ; SetTaskPri
lea p96flag(pc),a0 lea p96flag(pc),a0
move.w (a0),d1 move.w (a0),d1
p962 cmp.w (a0),d1 p962 cmp.w (a0),d1
beq.s p962 beq.s p962
move.l a2,a1 move.l a2,a1
jsr -$12c(a6) ; SetTaskPri jsr -$12c(a6) ; SetTaskPri
moveq #1,d1 moveq #1,d1
movem.l (sp)+,d0-d1/a0-a2/a6 movem.l (sp)+,d0-d1/a0-a2/a6
addq.l #4,sp ; return directly to caller addq.l #4,sp ; return directly to caller
p961 rts p961 rts
; mouse hack ; mouse hack
@ -903,12 +906,16 @@ mousehack_init:
tst.b 157(a3) tst.b 157(a3)
bne.s .no bne.s .no
lea mousehack_e(pc),a0 lea mousehack_e(pc),a0
tst.w (a0) cmp.b #1,(a0)
beq.s .no bne.s .no
lea mhname(pc),a0 lea mhname(pc),a0
lea mousehack_task(pc),a1 lea mousehack_task(pc),a1
bsr createtask bsr createtask
st 157(a3) st 157(a3)
;tell native side that mousehack is active
move.w #$FF38,d0
bsr.w getrtbase
jsr (a0)
.no move.l (sp)+,a0 .no move.l (sp)+,a0
rts rts

View File

@ -1,35 +1,35 @@
db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00);
db(0x60); db(0x00); db(0x04); db(0xf6); db(0x00); db(0x00); db(0x03); db(0xb2); db(0x60); db(0x00); db(0x04); db(0xee); db(0x00); db(0x00); db(0x03); db(0xaa);
db(0x00); db(0x00); db(0x00); db(0x34); db(0x00); db(0x00); db(0x00); db(0xd4); db(0x00); db(0x00); db(0x00); db(0x34); db(0x00); db(0x00); db(0x00); db(0xd4);
db(0x00); db(0x00); db(0x00); db(0x20); db(0x00); db(0x00); db(0x01); db(0x8e); db(0x00); db(0x00); db(0x00); db(0x20); db(0x00); db(0x00); db(0x01); db(0x8e);
db(0x00); db(0x00); db(0x06); db(0xb6); db(0x00); db(0x00); db(0x07); db(0xda); db(0x00); db(0x00); db(0x06); db(0xb0); db(0x00); db(0x00); db(0x07); db(0xd4);
db(0x43); db(0xfa); db(0x09); db(0xa6); db(0x4e); db(0xae); db(0xff); db(0xa0); db(0x43); db(0xfa); db(0x09); db(0xac); db(0x4e); db(0xae); db(0xff); db(0xa0);
db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x16); db(0x20); db(0x40); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x16); db(0x20); db(0x40);
db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xff); db(0xfe);
db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0xfc);
db(0x61); db(0x00); db(0x06); db(0x64); db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x61); db(0x00); db(0x06); db(0x5e); db(0x2a); db(0x50); db(0x43); db(0xfa);
db(0x09); db(0x9e); db(0x70); db(0x24); db(0x7a); db(0x00); db(0x4e); db(0xae); db(0x09); db(0xa4); db(0x70); db(0x24); db(0x7a); db(0x00); db(0x4e); db(0xae);
db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0c); db(0x43); db(0xfa); db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0c); db(0x43); db(0xfa);
db(0x09); db(0x8e); db(0x70); db(0x00); db(0x7a); db(0x01); db(0x4e); db(0xae); db(0x09); db(0x94); db(0x70); db(0x00); db(0x7a); db(0x01); db(0x4e); db(0xae);
db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00); db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00);
db(0x02); db(0x2c); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x02); db(0x2c); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
db(0x26); db(0x40); db(0x27); db(0x4c); db(0x01); db(0x9c); db(0x7c); db(0x00); db(0x26); db(0x40); db(0x27); db(0x4c); db(0x01); db(0x9c); db(0x7c); db(0x00);
db(0xbc); db(0xad); db(0x01); db(0x0c); db(0x64); db(0x24); db(0x2f); db(0x06); db(0xbc); db(0xad); db(0x01); db(0x0c); db(0x64); db(0x24); db(0x2f); db(0x06);
db(0x7e); db(0x01); db(0x2f); db(0x0b); db(0x20); db(0x4b); db(0x61); db(0x00); db(0x7e); db(0x01); db(0x2f); db(0x0b); db(0x20); db(0x4b); db(0x61); db(0x00);
db(0x03); db(0x2a); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff); db(0x03); db(0x22); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff);
db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46); db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46);
db(0x48); db(0x46); db(0x60); db(0xe4); db(0x2c); db(0x1f); db(0x52); db(0x46); db(0x48); db(0x46); db(0x60); db(0xe4); db(0x2c); db(0x1f); db(0x52); db(0x46);
db(0x60); db(0xd6); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x22); db(0x4c); db(0x60); db(0xd6); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x22); db(0x4c);
db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x30); db(0x3c); db(0xff); db(0x80); db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x30); db(0x3c); db(0xff); db(0x80);
db(0x61); db(0x00); db(0x05); db(0xf4); db(0x4e); db(0x90); db(0x72); db(0x03); db(0x61); db(0x00); db(0x05); db(0xee); db(0x4e); db(0x90); db(0x72); db(0x03);
db(0x74); db(0xf6); db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00); db(0x74); db(0xf6); db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00);
db(0x90); db(0x88); db(0x65); db(0x0a); db(0x67); db(0x08); db(0x78); db(0x00); db(0x90); db(0x88); db(0x65); db(0x0a); db(0x67); db(0x08); db(0x78); db(0x00);
db(0x22); db(0x44); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x4c); db(0xdf); db(0x22); db(0x44); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x4c); db(0xdf);
db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x20); db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x20);
db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xc8); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xc2);
db(0x70); db(0x00); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00);
db(0x00); db(0xa0); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); db(0x00); db(0xa0); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c);
db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xb2); db(0x70); db(0x02); db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xac); db(0x70); db(0x02);
db(0x4e); db(0x90); db(0x0c); db(0x40); db(0x00); db(0x01); db(0x6d); db(0x7a); db(0x4e); db(0x90); db(0x0c); db(0x40); db(0x00); db(0x01); db(0x6d); db(0x7a);
db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xe6); db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xe6);
db(0x0c); db(0x40); db(0x00); db(0x02); db(0x6e); db(0x08); db(0x20); db(0x01); db(0x0c); db(0x40); db(0x00); db(0x02); db(0x6e); db(0x08); db(0x20); db(0x01);
@ -47,11 +47,11 @@
db(0x25); db(0x49); db(0x00); db(0x1a); db(0x20); db(0x69); db(0x00); db(0x10); db(0x25); db(0x49); db(0x00); db(0x1a); db(0x20); db(0x69); db(0x00); db(0x10);
db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00);
db(0xff); db(0x76); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0xff); db(0x76); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00);
db(0x05); db(0x26); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01); db(0x05); db(0x20); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01);
db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7);
db(0xc0); db(0xc0); db(0x70); db(0x1a); db(0x22); db(0x3c); db(0x00); db(0x01); db(0xc0); db(0xc0); db(0x70); db(0x1a); db(0x22); db(0x3c); db(0x00); db(0x01);
db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40);
db(0x41); db(0xfa); db(0x08); db(0x17); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x08); db(0x1d); db(0x23); db(0x48); db(0x00); db(0x0a);
db(0x41); db(0xfa); db(0xff); db(0x2a); db(0x23); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xfa); db(0xff); db(0x2a); db(0x23); db(0x48); db(0x00); db(0x0e);
db(0x41); db(0xfa); db(0xff); db(0x22); db(0x23); db(0x48); db(0x00); db(0x12); db(0x41); db(0xfa); db(0xff); db(0x22); db(0x23); db(0x48); db(0x00); db(0x12);
db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08); db(0x70); db(0x03); db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08); db(0x70); db(0x03);
@ -64,24 +64,23 @@
db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); db(0x0c); db(0x40); db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); db(0x0c); db(0x40);
db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); db(0xe4); db(0x88); db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); db(0xe4); db(0x88);
db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); db(0x41); db(0xfa); db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); db(0x41); db(0xfa);
db(0x07); db(0xb1); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b); db(0x07); db(0xb7); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b);
db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); db(0x4e); db(0xae); db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); db(0x4e); db(0xae);
db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); db(0x4e); db(0x75); db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); db(0x4e); db(0x75);
db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x24); db(0x48); db(0x0c); db(0x9a); db(0x00); db(0x00); db(0x03); db(0xf3); db(0x24); db(0x48); db(0x0c); db(0x9a); db(0x00); db(0x00); db(0x03); db(0xf3);
db(0x66); db(0x00); db(0x00); db(0xec); db(0x50); db(0x8a); db(0x2e); db(0x2a); db(0x66); db(0x00); db(0x00); db(0xe4); db(0x50); db(0x8a); db(0x2e); db(0x2a);
db(0x00); db(0x04); db(0x9e); db(0x92); db(0x50); db(0x8a); db(0x52); db(0x87); db(0x00); db(0x04); db(0x9e); db(0x92); db(0x50); db(0x8a); db(0x52); db(0x87);
db(0x26); db(0x4a); db(0x20); db(0x07); db(0xd0); db(0x80); db(0xd0); db(0x80); db(0x26); db(0x4a); db(0x20); db(0x07); db(0xd0); db(0x80); db(0xd0); db(0x80);
db(0xd7); db(0xc0); db(0x28); db(0x4a); db(0x9b); db(0xcd); db(0x7c); db(0x00); db(0xd7); db(0xc0); db(0x28); db(0x4a); db(0x9b); db(0xcd); db(0x7c); db(0x00);
db(0x24); db(0x12); db(0xe5); db(0x8a); db(0x72); db(0x01); db(0x08); db(0x03); db(0x24); db(0x12); db(0x72); db(0x01); db(0x08); db(0x02); db(0x00); db(0x1e);
db(0x00); db(0x1e); db(0x67); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x01); db(0x67); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x01); db(0x08); db(0xc1);
db(0x08); db(0xc1); db(0x00); db(0x10); db(0x08); db(0x83); db(0x00); db(0x1f); db(0x00); db(0x10); db(0xe5); db(0x8a); db(0x20); db(0x02); db(0x66); db(0x04);
db(0x08); db(0x83); db(0x00); db(0x1e); db(0x20); db(0x02); db(0x66); db(0x04);
db(0x42); db(0x9a); db(0x60); db(0x1e); db(0x50); db(0x80); db(0x4e); db(0xae); db(0x42); db(0x9a); db(0x60); db(0x1e); db(0x50); db(0x80); db(0x4e); db(0xae);
db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa0); db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa0);
db(0x20); db(0x40); db(0x20); db(0xc2); db(0x24); db(0xc8); db(0x22); db(0x0d); db(0x20); db(0x40); db(0x20); db(0xc2); db(0x24); db(0xc8); db(0x22); db(0x0d);
db(0x67); db(0x06); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x2a); db(0x80); db(0x67); db(0x06); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x2a); db(0x80);
db(0x2a); db(0x48); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0xb8); db(0x2a); db(0x48); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0xc0);
db(0x7c); db(0x00); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81); db(0x7c); db(0x00); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81);
db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x26); db(0x1b); db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x26); db(0x1b);
db(0x28); db(0x1b); db(0xe5); db(0x8c); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x28); db(0x1b); db(0xe5); db(0x8c); db(0x0c); db(0x83); db(0x00); db(0x00);
@ -106,48 +105,48 @@
db(0x60); db(0xd4); db(0x48); db(0xe7); db(0x40); db(0xe2); db(0x2c); db(0x78); db(0x60); db(0xd4); db(0x48); db(0xe7); db(0x40); db(0xe2); db(0x2c); db(0x78);
db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); db(0x20); db(0x50); db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); db(0x20); db(0x50);
db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68); db(0x00); db(0x0a); db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68); db(0x00); db(0x0a);
db(0x45); db(0xfa); db(0x06); db(0x9e); db(0x10); db(0x19); db(0x12); db(0x1a); db(0x45); db(0xfa); db(0x06); db(0xac); db(0x10); db(0x19); db(0x12); db(0x1a);
db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00); db(0x67); db(0x42); db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00); db(0x67); db(0x42);
db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2); db(0x70); db(0x20); db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2); db(0x70); db(0x20);
db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae);
db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08); db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08);
db(0x00); db(0x08); db(0x41); db(0xfa); db(0x06); db(0x74); db(0x25); db(0x48); db(0x00); db(0x08); db(0x41); db(0xfa); db(0x06); db(0x82); db(0x25); db(0x48);
db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x06); db(0x2d); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x06); db(0x3b); db(0x25); db(0x48);
db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12); db(0x20); db(0x88); db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12); db(0x20); db(0x88);
db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08); db(0x41); db(0xee); db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08); db(0x41); db(0xee);
db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xff); db(0x0a); db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xff); db(0x0a);
db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x47); db(0x02); db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x47); db(0x02);
db(0x4e); db(0x75); db(0x61); db(0x00); db(0xff); db(0x8e); db(0x21); db(0x40); db(0x4e); db(0x75); db(0x61); db(0x00); db(0xff); db(0x8e); db(0x21); db(0x40);
db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc);
db(0x61); db(0x00); db(0x02); db(0xe4); db(0x2a); db(0x50); db(0x30); db(0x3c); db(0x61); db(0x00); db(0x02); db(0xe6); db(0x2a); db(0x50); db(0x30); db(0x3c);
db(0xff); db(0x28); db(0x61); db(0x00); db(0x02); db(0xda); db(0x22); db(0x48); db(0xff); db(0x28); db(0x61); db(0x00); db(0x02); db(0xdc); db(0x22); db(0x48);
db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8); db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8);
db(0x01); db(0x94); db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x83); db(0x01); db(0x94); db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x83);
db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x00); db(0xfc); db(0xec); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x00); db(0xfc); db(0xf4);
db(0x0c); db(0x83); db(0x00); db(0x00); db(0x00); db(0x02); db(0x67); db(0x0c); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x00); db(0x02); db(0x67); db(0x0c);
db(0xc0); db(0x85); db(0x67); db(0x08); db(0x4a); db(0xa8); db(0x01); db(0x90); db(0xc0); db(0x85); db(0x67); db(0x08); db(0x4a); db(0xa8); db(0x01); db(0x90);
db(0x67); db(0x00); db(0xfc); db(0xd8); db(0x20); db(0x28); db(0x01); db(0x90); db(0x67); db(0x00); db(0xfc); db(0xe0); db(0x20); db(0x28); db(0x01); db(0x90);
db(0x67); db(0x12); db(0x2f); db(0x08); db(0x72); db(0x01); db(0x2c); db(0x78); db(0x67); db(0x12); db(0x2f); db(0x08); db(0x72); db(0x01); db(0x2c); db(0x78);
db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x5f); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x5f);
db(0x21); db(0x40); db(0x01); db(0x94); db(0x4a); db(0x83); db(0x6a); db(0x10); db(0x21); db(0x40); db(0x01); db(0x94); db(0x4a); db(0x83); db(0x6a); db(0x10);
db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00);
db(0x02); db(0x86); db(0x4e); db(0x90); db(0x60); db(0x00); db(0x00); db(0x28); db(0x02); db(0x88); db(0x4e); db(0x90); db(0x60); db(0x00); db(0x00); db(0x28);
db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70); db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70);
db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40); db(0x30); db(0x3c); db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40); db(0x30); db(0x3c);
db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0x6a); db(0x4e); db(0x90); db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0x6c); db(0x4e); db(0x90);
db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40); db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40);
db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20); db(0x4a); db(0xa9); db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20); db(0x4a); db(0xa9);
db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69); db(0x01); db(0x94); db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69); db(0x01); db(0x94);
db(0x61); db(0x00); db(0xfd); db(0xc6); db(0x48); db(0xe7); db(0x80); db(0xc0); db(0x61); db(0x00); db(0xfd); db(0xce); db(0x48); db(0xe7); db(0x80); db(0xc0);
db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94); db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94);
db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e);
db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80); db(0x67); db(0x04); db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80); db(0x67); db(0x04);
db(0x61); db(0x00); db(0xfd); db(0x50); db(0x4a); db(0x83); db(0x6b); db(0x00); db(0x61); db(0x00); db(0xfd); db(0x58); db(0x4a); db(0x83); db(0x6b); db(0x00);
db(0xfc); db(0x52); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); db(0xfc); db(0x5a); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00);
db(0x02); db(0x1e); db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29); db(0x02); db(0x20); db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29);
db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a); db(0x27); db(0x7c); db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a); db(0x27); db(0x7c);
db(0x00); db(0x00); db(0x0f); db(0xa0); db(0x00); db(0x14); db(0x43); db(0xfa); db(0x00); db(0x00); db(0x0f); db(0xa0); db(0x00); db(0x14); db(0x43); db(0xfa);
db(0xfb); db(0x5c); db(0x20); db(0x09); db(0xe4); db(0x88); db(0x27); db(0x40); db(0xfb); db(0x64); db(0x20); db(0x09); db(0xe4); db(0x88); db(0x27); db(0x40);
db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40); db(0x00); db(0x24); db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40); db(0x00); db(0x24);
db(0x4a); db(0x87); db(0x67); db(0x36); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4a); db(0x87); db(0x67); db(0x36); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x70); db(0x14); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x70); db(0x14); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x3a);
@ -160,7 +159,7 @@
db(0x70); db(0xff); db(0x2c); db(0x4c); db(0x4e); db(0xee); db(0xff); db(0x6a); db(0x70); db(0xff); db(0x2c); db(0x4c); db(0x4e); db(0xee); db(0xff); db(0x6a);
db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x00); db(0x22); db(0x40); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x00); db(0x22); db(0x40);
db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40); db(0x4b); db(0xe8); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40); db(0x4b); db(0xe8);
db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x04); db(0xbc); db(0x70); db(0x00); db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x04); db(0xca); db(0x70); db(0x00);
db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40); db(0x20); db(0x3c); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40); db(0x20); db(0x3c);
db(0x00); db(0x00); db(0x00); db(0x9e); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x00); db(0x00); db(0x9e); db(0x22); db(0x3c); db(0x00); db(0x01);
db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40);
@ -168,9 +167,9 @@
db(0x27); db(0x46); db(0x00); db(0x08); db(0x7a); db(0x00); db(0x20); db(0x4d); db(0x27); db(0x46); db(0x00); db(0x08); db(0x7a); db(0x00); db(0x20); db(0x4d);
db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae);
db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x26); db(0x2c); db(0x00); db(0x0a);
db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00); db(0x01); db(0x58); db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00); db(0x01); db(0x5a);
db(0x70); db(0x00); db(0x4e); db(0x90); db(0x61); db(0x00); db(0x02); db(0x88); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x61); db(0x00); db(0x02); db(0x8a);
db(0x60); db(0x00); db(0x00); db(0xd8); db(0x61); db(0x00); db(0x02); db(0x80); db(0x60); db(0x00); db(0x00); db(0xda); db(0x61); db(0x00); db(0x02); db(0x82);
db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d);
db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x0c); db(0x6c); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x0c); db(0x6c);
db(0x00); db(0x26); db(0x00); db(0x12); db(0x66); db(0x4a); db(0x0c); db(0xac); db(0x00); db(0x26); db(0x00); db(0x12); db(0x66); db(0x4a); db(0x0c); db(0xac);
@ -183,142 +182,144 @@
db(0x00); db(0x10); db(0x22); db(0x4c); db(0x12); db(0xbc); db(0x00); db(0x08); db(0x00); db(0x10); db(0x22); db(0x4c); db(0x12); db(0xbc); db(0x00); db(0x08);
db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xa6); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xa6); db(0x22); db(0x4c);
db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x60); db(0x9c); db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x60); db(0x9c);
db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x66); db(0x3c); db(0x30); db(0x3c); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x66); db(0x3e); db(0x30); db(0x3c);
db(0xff); db(0x50); db(0x61); db(0x00); db(0x00); db(0xda); db(0x70); db(0x01); db(0xff); db(0x50); db(0x61); db(0x00); db(0x00); db(0xdc); db(0x70); db(0x01);
db(0x4e); db(0x90); db(0x45); db(0xeb); db(0x00); db(0x04); db(0x20); db(0x52); db(0x4e); db(0x90); db(0x45); db(0xeb); db(0x00); db(0x04); db(0x20); db(0x52);
db(0x20); db(0x08); db(0x67); db(0x80); db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x08); db(0x67); db(0x00); db(0xff); db(0x80); db(0x22); db(0x50);
db(0x20); db(0x28); db(0x00); db(0x04); db(0x6a); db(0x16); db(0x48); db(0xe7); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x04); db(0x6a); db(0x16);
db(0x00); db(0xc0); db(0x28); db(0x68); db(0x00); db(0x0a); db(0x61); db(0x4a); db(0x48); db(0xe7); db(0x00); db(0xc0); db(0x28); db(0x68); db(0x00); db(0x0a);
db(0x53); db(0x85); db(0x4c); db(0xdf); db(0x03); db(0x00); db(0x24); db(0x89); db(0x61); db(0x4a); db(0x53); db(0x85); db(0x4c); db(0xdf); db(0x03); db(0x00);
db(0x20); db(0x49); db(0x60); db(0xdc); db(0x24); db(0x48); db(0x20); db(0x49); db(0x24); db(0x89); db(0x20); db(0x49); db(0x60); db(0xda); db(0x24); db(0x48);
db(0x60); db(0xd6); db(0x0c); db(0x85); db(0x00); db(0x00); db(0x00); db(0x14); db(0x20); db(0x49); db(0x60); db(0xd4); db(0x0c); db(0x85); db(0x00); db(0x00);
db(0x65); db(0x00); db(0x00); db(0x0a); db(0x70); db(0x01); db(0x29); db(0x40); db(0x00); db(0x14); db(0x65); db(0x00); db(0x00); db(0x0a); db(0x70); db(0x01);
db(0x00); db(0x04); db(0x60); db(0x12); db(0x61); db(0x32); db(0x30); db(0x3c); db(0x29); db(0x40); db(0x00); db(0x04); db(0x60); db(0x12); db(0x61); db(0x32);
db(0xff); db(0x30); db(0x61); db(0x00); db(0x00); db(0x8a); db(0x4e); db(0x90); db(0x30); db(0x3c); db(0xff); db(0x30); db(0x61); db(0x00); db(0x00); db(0x8a);
db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x52); db(0x85); db(0x28); db(0xab); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x52); db(0x85);
db(0x00); db(0x04); db(0x27); db(0x4c); db(0x00); db(0x04); db(0x60); db(0x00); db(0x28); db(0xab); db(0x00); db(0x04); db(0x27); db(0x4c); db(0x00); db(0x04);
db(0xff); db(0x2c); db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00); db(0x60); db(0x00); db(0xff); db(0x2a); db(0x28); db(0x43); db(0x61); db(0x04);
db(0xff); db(0x24); db(0x22); db(0x54); db(0x20); db(0x6c); db(0x00); db(0x04); db(0x60); db(0x00); db(0xff); db(0x22); db(0x22); db(0x54); db(0x20); db(0x6c);
db(0x29); db(0x4d); db(0x00); db(0x04); db(0x4e); db(0xee); db(0xfe); db(0x92); db(0x00); db(0x04); db(0x29); db(0x4d); db(0x00); db(0x04); db(0x4e); db(0xee);
db(0x2f); db(0x05); db(0x7a); db(0xfc); db(0x24); db(0x53); db(0x2e); db(0x0a); db(0xfe); db(0x92); db(0x2f); db(0x05); db(0x7a); db(0xfc); db(0x24); db(0x53);
db(0x22); db(0x0a); db(0x67); db(0x00); db(0x00); db(0x0c); db(0x52); db(0x85); db(0x2e); db(0x0a); db(0x22); db(0x0a); db(0x67); db(0x00); db(0x00); db(0x0c);
db(0x67); db(0x1e); db(0x22); db(0x4a); db(0x24); db(0x52); db(0x60); db(0xf0); db(0x52); db(0x85); db(0x67); db(0x1e); db(0x22); db(0x4a); db(0x24); db(0x52);
db(0x52); db(0x85); db(0x67); db(0x3c); db(0x24); db(0x47); db(0x70); db(0x18); db(0x60); db(0xf0); db(0x52); db(0x85); db(0x67); db(0x3c); db(0x24); db(0x47);
db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x52); db(0x46); db(0x70); db(0x18); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
db(0x24); db(0x40); db(0x24); db(0x87); db(0x2e); db(0x0a); db(0x60); db(0xe8); db(0x52); db(0x46); db(0x24); db(0x40); db(0x24); db(0x87); db(0x2e); db(0x0a);
db(0x20); db(0x12); db(0x67); db(0x24); db(0x20); db(0x40); db(0x20); db(0x10); db(0x60); db(0xe8); db(0x20); db(0x12); db(0x67); db(0x24); db(0x20); db(0x40);
db(0x67); db(0x1e); db(0x20); db(0x40); db(0x20); db(0x10); db(0x67); db(0x18); db(0x20); db(0x10); db(0x67); db(0x1e); db(0x20); db(0x40); db(0x20); db(0x10);
db(0x70); db(0x00); db(0x22); db(0x80); db(0x22); db(0x4a); db(0x24); db(0x51); db(0x67); db(0x18); db(0x70); db(0x00); db(0x22); db(0x80); db(0x22); db(0x4a);
db(0x70); db(0x18); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x06); db(0x86); db(0x24); db(0x51); db(0x70); db(0x18); db(0x4e); db(0xae); db(0xff); db(0x2e);
db(0x00); db(0x01); db(0x00); db(0x00); db(0x20); db(0x0a); db(0x66); db(0xec); db(0x06); db(0x86); db(0x00); db(0x01); db(0x00); db(0x00); db(0x20); db(0x0a);
db(0x26); db(0x87); db(0x2a); db(0x1f); db(0x4e); db(0x75); db(0x41); db(0xfa); db(0x66); db(0xec); db(0x26); db(0x87); db(0x2a); db(0x1f); db(0x4e); db(0x75);
db(0xf9); db(0x4c); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff); db(0x41); db(0xfa); db(0xf9); db(0x52); db(0x02); db(0x80); db(0x00); db(0x00);
db(0xd1); db(0xc0); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x0c); db(0xaf); db(0xff); db(0xff); db(0xd1); db(0xc0); db(0x4e); db(0x75); db(0x00); db(0x00);
db(0x00); db(0x00); db(0x00); db(0x22); db(0x00); db(0x08); db(0x66); db(0x30); db(0x0c); db(0xaf); db(0x00); db(0x00); db(0x00); db(0x22); db(0x00); db(0x08);
db(0x48); db(0xe7); db(0xc0); db(0xe2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x66); db(0x30); db(0x48); db(0xe7); db(0xc0); db(0xe2); db(0x2c); db(0x78);
db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x24); db(0x40); db(0x00); db(0x04); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda);
db(0x22); db(0x4a); db(0x70); db(0xec); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x24); db(0x40); db(0x22); db(0x4a); db(0x70); db(0xec); db(0x4e); db(0xae);
db(0x41); db(0xfa); db(0xff); db(0xda); db(0x32); db(0x10); db(0xb2); db(0x50); db(0xfe); db(0xd4); db(0x41); db(0xfa); db(0xff); db(0xda); db(0x32); db(0x10);
db(0x67); db(0xfc); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0xb2); db(0x50); db(0x67); db(0xfc); db(0x22); db(0x4a); db(0x4e); db(0xae);
db(0x72); db(0x01); db(0x4c); db(0xdf); db(0x47); db(0x03); db(0x58); db(0x8f); db(0xfe); db(0xd4); db(0x72); db(0x01); db(0x4c); db(0xdf); db(0x47); db(0x03);
db(0x4e); db(0x75); db(0x20); db(0x88); db(0x58); db(0x90); db(0x42); db(0xa8); db(0x58); db(0x8f); db(0x4e); db(0x75); db(0x20); db(0x88); db(0x58); db(0x90);
db(0x00); db(0x04); db(0x21); db(0x48); db(0x00); db(0x08); db(0x4e); db(0x75); db(0x42); db(0xa8); db(0x00); db(0x04); db(0x21); db(0x48); db(0x00); db(0x08);
db(0x48); db(0xe7); db(0x20); db(0x22); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x20); db(0x22); db(0x2c); db(0x79);
db(0x00); db(0x04); db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x00); db(0x00); db(0x00); db(0x04); db(0x70); db(0xff); db(0x4e); db(0xae);
db(0x91); db(0xc8); db(0x24); db(0x00); db(0x6b); db(0x32); db(0x70); db(0x22); db(0xfe); db(0xb6); db(0x91); db(0xc8); db(0x24); db(0x00); db(0x6b); db(0x32);
db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0x70); db(0x22); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
db(0xff); db(0x3a); db(0x91); db(0xc8); db(0x24); db(0x40); db(0x4a); db(0x80); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x91); db(0xc8); db(0x24); db(0x40);
db(0x67); db(0x1e); db(0x15); db(0x7c); db(0x00); db(0x04); db(0x00); db(0x08); db(0x4a); db(0x80); db(0x67); db(0x1e); db(0x15); db(0x7c); db(0x00); db(0x04);
db(0x15); db(0x42); db(0x00); db(0x0f); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0x00); db(0x08); db(0x15); db(0x42); db(0x00); db(0x0f); db(0x93); db(0xc9);
db(0xfe); db(0xda); db(0x25); db(0x40); db(0x00); db(0x10); db(0x41); db(0xea); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x25); db(0x40); db(0x00); db(0x10);
db(0x00); db(0x14); db(0x61); db(0x00); db(0xff); db(0xae); db(0x20); db(0x4a); db(0x41); db(0xea); db(0x00); db(0x14); db(0x61); db(0x00); db(0xff); db(0xae);
db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x44); db(0x04); db(0x4e); db(0x75); db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x44); db(0x04);
db(0x48); db(0xe7); db(0x20); db(0x22); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x20); db(0x22); db(0x2c); db(0x79);
db(0x00); db(0x04); db(0x4a); db(0x80); db(0x67); db(0x20); db(0x24); db(0x40); db(0x00); db(0x00); db(0x00); db(0x04); db(0x4a); db(0x80); db(0x67); db(0x20);
db(0x74); db(0x30); db(0x20); db(0x02); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x24); db(0x40); db(0x74); db(0x30); db(0x20); db(0x02); db(0x22); db(0x3c);
db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
db(0x11); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x08); db(0x21); db(0x42); db(0x20); db(0x40); db(0x11); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x08);
db(0x00); db(0x12); db(0x21); db(0x4a); db(0x00); db(0x0e); db(0x4c); db(0xdf); db(0x21); db(0x42); db(0x00); db(0x12); db(0x21); db(0x4a); db(0x00); db(0x0e);
db(0x44); db(0x04); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x30); db(0x32); db(0x4c); db(0xdf); db(0x44); db(0x04); db(0x4e); db(0x75); db(0x48); db(0xe7);
db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04); db(0x24); db(0x08); db(0x30); db(0x32); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04);
db(0x26); db(0x09); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x08); db(0x5c); db(0x24); db(0x08); db(0x26); db(0x09); db(0x20); db(0x3c); db(0x00); db(0x00);
db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0x08); db(0x5c); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0x2c); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00);
db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x08); db(0x00); db(0x2c); db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x01);
db(0x25); db(0x42); db(0x00); db(0x0a); db(0x47); db(0xea); db(0x00); db(0x5c); db(0x00); db(0x08); db(0x25); db(0x42); db(0x00); db(0x0a); db(0x47); db(0xea);
db(0x25); db(0x4b); db(0x00); db(0x3a); db(0x47); db(0xeb); db(0x08); db(0x00); db(0x00); db(0x5c); db(0x25); db(0x4b); db(0x00); db(0x3a); db(0x47); db(0xeb);
db(0x25); db(0x4b); db(0x00); db(0x3e); db(0x25); db(0x4b); db(0x00); db(0x36); db(0x08); db(0x00); db(0x25); db(0x4b); db(0x00); db(0x3e); db(0x25); db(0x4b);
db(0x22); db(0x4a); db(0x24); db(0x43); db(0x97); db(0xcb); db(0x4e); db(0xae); db(0x00); db(0x36); db(0x22); db(0x4a); db(0x24); db(0x43); db(0x97); db(0xcb);
db(0xfe); db(0xe6); db(0x4c); db(0xdf); db(0x4c); db(0x0c); db(0x4e); db(0x75); db(0x4e); db(0xae); db(0xfe); db(0xe6); db(0x4c); db(0xdf); db(0x4c); db(0x0c);
db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x2f); db(0x08); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00);
db(0x4a); db(0x2b); db(0x00); db(0x9d); db(0x66); db(0x18); db(0x41); db(0xfa); db(0x2f); db(0x08); db(0x4a); db(0x2b); db(0x00); db(0x9d); db(0x66); db(0x24);
db(0xff); db(0xf0); db(0x4a); db(0x50); db(0x67); db(0x10); db(0x41); db(0xfa); db(0x41); db(0xfa); db(0xff); db(0xf0); db(0x0c); db(0x10); db(0x00); db(0x01);
db(0x01); db(0xba); db(0x43); db(0xfa); db(0x00); db(0x0e); db(0x61); db(0x00); db(0x66); db(0x1a); db(0x41); db(0xfa); db(0x01); db(0xc4); db(0x43); db(0xfa);
db(0xff); db(0x8c); db(0x50); db(0xeb); db(0x00); db(0x9d); db(0x20); db(0x5f); db(0x00); db(0x18); db(0x61); db(0x00); db(0xff); db(0x8a); db(0x50); db(0xeb);
db(0x4e); db(0x75); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04); db(0x00); db(0x9d); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x61); db(0x00);
db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x74); db(0x00); db(0xfe); db(0xa0); db(0x4e); db(0x90); db(0x20); db(0x5f); db(0x4e); db(0x75);
db(0x01); db(0xc2); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04); db(0x70); db(0xff);
db(0x28); db(0x40); db(0x70); db(0x14); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x74); db(0x00); db(0x01); db(0xc2);
db(0xfe); db(0xd4); db(0x70); db(0x00); db(0x43); db(0xfa); db(0x01); db(0xae); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x28); db(0x40);
db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x2e); db(0x00); db(0x70); db(0x00); db(0x70); db(0x14); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0xd4);
db(0x30); db(0x3c); db(0x00); db(0x44); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x70); db(0x00); db(0x43); db(0xfa); db(0x01); db(0xae); db(0x4e); db(0xae);
db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40); db(0xfd); db(0xd8); db(0x2e); db(0x00); db(0x70); db(0x00); db(0x30); db(0x3c);
db(0x61); db(0x00); db(0xfe); db(0xbe); db(0x61); db(0x00); db(0xff); db(0x0a); db(0x00); db(0x44); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
db(0x2b); db(0x40); db(0x00); db(0x3c); db(0x67); db(0x00); db(0x00); db(0x7a); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40); db(0x61); db(0x00);
db(0x22); db(0x40); db(0x41); db(0xfa); db(0x01); db(0x3c); db(0x70); db(0x00); db(0xfe); db(0xb2); db(0x61); db(0x00); db(0xfe); db(0xfe); db(0x2b); db(0x40);
db(0x72); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0x44); db(0x4a); db(0x80); db(0x00); db(0x3c); db(0x67); db(0x00); db(0x00); db(0x7a); db(0x22); db(0x40);
db(0x66); db(0x00); db(0x00); db(0x66); db(0x61); db(0x00); db(0xfe); db(0x9a); db(0x41); db(0xfa); db(0x01); db(0x3c); db(0x70); db(0x00); db(0x72); db(0x00);
db(0x61); db(0x00); db(0xfe); db(0xe6); db(0x2b); db(0x40); db(0x00); db(0x40); db(0x4e); db(0xae); db(0xfe); db(0x44); db(0x4a); db(0x80); db(0x66); db(0x00);
db(0x67); db(0x00); db(0x00); db(0x56); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x00); db(0x66); db(0x61); db(0x00); db(0xfe); db(0x8e); db(0x61); db(0x00);
db(0x01); db(0x25); db(0x70); db(0x00); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x2b); db(0x40); db(0x00); db(0x40); db(0x67); db(0x00);
db(0xfe); db(0x44); db(0x4a); db(0x80); db(0x66); db(0x00); db(0x00); db(0x42); db(0x00); db(0x56); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x01); db(0x25);
db(0x47); db(0xed); db(0x00); db(0x16); db(0x27); db(0x4c); db(0x00); db(0x0c); db(0x70); db(0x00); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0x44);
db(0x27); db(0x42); db(0x00); db(0x08); db(0x70); db(0xff); db(0x26); db(0x80); db(0x4a); db(0x80); db(0x66); db(0x00); db(0x00); db(0x42); db(0x47); db(0xed);
db(0x27); db(0x40); db(0x00); db(0x04); db(0x43); db(0xed); db(0x00); db(0x00); db(0x00); db(0x16); db(0x27); db(0x4c); db(0x00); db(0x0c); db(0x27); db(0x42);
db(0x13); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c); db(0x00); db(0x08); db(0x70); db(0xff); db(0x26); db(0x80); db(0x27); db(0x40);
db(0x00); db(0x05); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x00); db(0xfc); db(0x00); db(0x04); db(0x43); db(0xed); db(0x00); db(0x00); db(0x13); db(0x7c);
db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x00); db(0xa0); db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c); db(0x00); db(0x05);
db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4b); db(0x00); db(0x0e); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x00); db(0xfc); db(0x23); db(0x48);
db(0x70); db(0x05); db(0x4e); db(0xae); db(0xff); db(0x58); db(0x60); db(0x02); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x00); db(0xa0); db(0x23); db(0x48);
db(0x4e); db(0x75); db(0x20); db(0x02); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x00); db(0x12); db(0x23); db(0x4b); db(0x00); db(0x0e); db(0x70); db(0x05);
db(0x22); db(0x6d); db(0x00); db(0x3c); db(0x45); db(0xed); db(0x00); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x58); db(0x60); db(0x02); db(0x4e); db(0x75);
db(0x33); db(0x7c); db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x20); db(0x02); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x22); db(0x6d);
db(0x00); db(0x00); db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x3c); db(0x45); db(0xed); db(0x00); db(0x26); db(0x33); db(0x7c);
db(0x00); db(0x28); db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00);
db(0x15); db(0x7c); db(0x00); db(0x04); db(0x00); db(0x04); db(0x42); db(0x2a); db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x28);
db(0x00); db(0x05); db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x15); db(0x7c);
db(0x00); db(0x08); db(0x20); db(0x47); db(0x20); db(0x2d); db(0x00); db(0x16); db(0x00); db(0x04); db(0x00); db(0x04); db(0x42); db(0x2a); db(0x00); db(0x05);
db(0x32); db(0x28); db(0x00); db(0x30); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08);
db(0x35); db(0x40); db(0x00); db(0x0a); db(0x20); db(0x2d); db(0x00); db(0x1a); db(0x20); db(0x47); db(0x20); db(0x2d); db(0x00); db(0x16); db(0x32); db(0x28);
db(0x32); db(0x28); db(0x00); db(0x2e); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x00); db(0x30); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x35); db(0x40);
db(0x48); db(0xc0); db(0x35); db(0x40); db(0x00); db(0x0c); db(0x22); db(0x6d); db(0x00); db(0x0a); db(0x20); db(0x2d); db(0x00); db(0x1a); db(0x32); db(0x28);
db(0x00); db(0x40); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); db(0x00); db(0x2e); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x48); db(0xc0);
db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0x35); db(0x40); db(0x00); db(0x0c); db(0x22); db(0x6d); db(0x00); db(0x40);
db(0xfe); db(0x38); db(0x22); db(0x6d); db(0x00); db(0x40); db(0x25); db(0x69); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); db(0x13); db(0x7c);
db(0x00); db(0x20); db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38);
db(0x00); db(0x12); db(0x22); db(0x6d); db(0x00); db(0x3c); db(0x4e); db(0xae); db(0x22); db(0x6d); db(0x00); db(0x40); db(0x25); db(0x69); db(0x00); db(0x20);
db(0xfe); db(0x38); db(0x60); db(0x00); db(0xff); db(0x76); db(0x30); db(0x3a); db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24); db(0x00); db(0x12);
db(0xfe); db(0x82); db(0x48); db(0xc0); db(0x32); db(0x3a); db(0xfe); db(0x7e); db(0x22); db(0x6d); db(0x00); db(0x3c); db(0x4e); db(0xae); db(0xfe); db(0x38);
db(0x48); db(0xc1); db(0xb0); db(0x91); db(0x66); db(0x00); db(0x00); db(0x0a); db(0x60); db(0x00); db(0xff); db(0x76); db(0x30); db(0x3a); db(0xfe); db(0x76);
db(0xb2); db(0xa9); db(0x00); db(0x04); db(0x67); db(0x00); db(0x00); db(0x18); db(0x48); db(0xc0); db(0x32); db(0x3a); db(0xfe); db(0x72); db(0x48); db(0xc1);
db(0x23); db(0x41); db(0x00); db(0x04); db(0x22); db(0x80); db(0x20); db(0x29); db(0xb0); db(0x91); db(0x66); db(0x00); db(0x00); db(0x0a); db(0xb2); db(0xa9);
db(0x00); db(0x08); db(0x22); db(0x69); db(0x00); db(0x0c); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x67); db(0x00); db(0x00); db(0x18); db(0x23); db(0x41);
db(0x00); db(0x04); db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x41); db(0xf9); db(0x00); db(0x04); db(0x22); db(0x80); db(0x20); db(0x29); db(0x00); db(0x08);
db(0x00); db(0xdf); db(0xf0); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x22); db(0x69); db(0x00); db(0x0c); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x69); db(0x6e); db(0x70); db(0x75); db(0x74); db(0x2e); db(0x64); db(0x65); db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x41); db(0xf9); db(0x00); db(0xdf);
db(0x76); db(0x69); db(0x63); db(0x65); db(0x00); db(0x74); db(0x69); db(0x6d); db(0xf0); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x69); db(0x6e);
db(0x65); db(0x72); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x70); db(0x75); db(0x74); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69);
db(0x65); db(0x00); db(0x55); db(0x41); db(0x45); db(0x20); db(0x6d); db(0x6f); db(0x63); db(0x65); db(0x00); db(0x74); db(0x69); db(0x6d); db(0x65); db(0x72);
db(0x75); db(0x73); db(0x65); db(0x20); db(0x68); db(0x61); db(0x63); db(0x6b); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x65); db(0x00);
db(0x00); db(0x55); db(0x41); db(0x45); db(0x20); db(0x66); db(0x69); db(0x6c); db(0x55); db(0x41); db(0x45); db(0x20); db(0x6d); db(0x6f); db(0x75); db(0x73);
db(0x65); db(0x73); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d); db(0x00); db(0x65); db(0x20); db(0x68); db(0x61); db(0x63); db(0x6b); db(0x00); db(0x55);
db(0x64); db(0x6f); db(0x73); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x41); db(0x45); db(0x20); db(0x66); db(0x69); db(0x6c); db(0x65); db(0x73);
db(0x61); db(0x72); db(0x79); db(0x00); db(0x69); db(0x6e); db(0x74); db(0x75); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d); db(0x00); db(0x64); db(0x6f);
db(0x69); db(0x74); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69); db(0x73); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72);
db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x65); db(0x78); db(0x79); db(0x00); db(0x69); db(0x6e); db(0x74); db(0x75); db(0x69); db(0x74);
db(0x70); db(0x61); db(0x6e); db(0x73); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72);
db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x61); db(0x72); db(0x79); db(0x00); db(0x65); db(0x78); db(0x70); db(0x61);
db(0x46); db(0x69); db(0x6c); db(0x65); db(0x53); db(0x79); db(0x73); db(0x74); db(0x6e); db(0x73); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69);
db(0x65); db(0x6d); db(0x2e); db(0x72); db(0x65); db(0x73); db(0x6f); db(0x75); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x46); db(0x69);
db(0x72); db(0x63); db(0x65); db(0x00); db(0x00); db(0x00); db(0x03); db(0xf2); db(0x6c); db(0x65); db(0x53); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d);
db(0x2e); db(0x72); db(0x65); db(0x73); db(0x6f); db(0x75); db(0x72); db(0x63);
db(0x65); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x03); db(0xf2);

View File

@ -93,11 +93,15 @@ static void generate_func(void)
#endif #endif
if (a_is_on) printf("uae_u32 preva = 0;\n"); if (a_is_on) printf("uae_u32 preva = 0;\n");
if (b_is_on) printf("uae_u32 prevb = 0, srcb = b->bltbhold;\n"); if (b_is_on) printf("uae_u32 prevb = 0, srcb = b->bltbhold;\n");
printf("uae_u32 srcc = b->bltcdat;\n"); if (c_is_on) printf("uae_u32 srcc = b->bltcdat;\n");
printf("uae_u32 dstd=0;\n"); printf("uae_u32 dstd=0;\n");
printf("uaecptr dstp = 0;\n"); printf("uaecptr dstp = 0;\n");
printf("for (j = b->vblitsize; j--; ) {\n"); printf("for (j = b->vblitsize; j--; ) {\n");
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat, srca;\n\n"); if (a_is_on) {
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat, srca;\n\n");
} else {
printf("\tfor (i = b->hblitsize; i--; ) {\n\t\tuae_u32 bltadat, srca;\n\n");
}
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc += 2; }\n"); if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc += 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget (ptb); ptb += 2;\n"); if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget (ptb); ptb += 2;\n");
if (b_is_on) printf("\t\t\tsrcb = (((uae_u32)prevb << 16) | bltbdat) >> b->blitbshift;\n"); if (b_is_on) printf("\t\t\tsrcb = (((uae_u32)prevb << 16) | bltbdat) >> b->blitbshift;\n");
@ -116,8 +120,8 @@ static void generate_func(void)
if (c_is_on) printf("\tif (ptc) ptc += b->bltcmod;\n"); if (c_is_on) printf("\tif (ptc) ptc += b->bltcmod;\n");
printf("\tif (ptd) ptd += b->bltdmod;\n"); printf("\tif (ptd) ptd += b->bltdmod;\n");
printf("}\n"); printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n"); if (b_is_on) printf("\tb->bltbhold = srcb;\n");
printf("b->bltcdat = srcc;\n"); if (c_is_on) printf("\tb->bltcdat = srcc;\n");
printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n"); printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
#if 0 #if 0
printf("}\n"); printf("}\n");
@ -170,11 +174,15 @@ static void generate_func(void)
#endif #endif
if (a_is_on) printf("uae_u32 preva = 0;\n"); if (a_is_on) printf("uae_u32 preva = 0;\n");
if (b_is_on) printf("uae_u32 prevb = 0, srcb = b->bltbhold;\n"); if (b_is_on) printf("uae_u32 prevb = 0, srcb = b->bltbhold;\n");
printf("uae_u32 srcc = b->bltcdat;\n"); if (c_is_on) printf("uae_u32 srcc = b->bltcdat;\n");
printf("uae_u32 dstd=0;\n"); printf("uae_u32 dstd=0;\n");
printf("uaecptr dstp = 0;\n"); printf("uaecptr dstp = 0;\n");
printf("for (j = b->vblitsize; j--; ) {\n"); printf("for (j = b->vblitsize; j--; ) {\n");
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat, srca;\n"); if (a_is_on) {
printf("\tfor (i = 0; i < b->hblitsize; i++) {\n\t\tuae_u32 bltadat, srca;\n");
} else {
printf("\tfor (i = b->hblitsize; i--; ) {\n\t\tuae_u32 bltadat, srca;\n");
}
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc -= 2; }\n"); if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget (ptc); ptc -= 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget (ptb); ptb -= 2;\n"); if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget (ptb); ptb -= 2;\n");
if (b_is_on) printf("\t\t\tsrcb = ((bltbdat << 16) | prevb) >> b->blitdownbshift;\n"); if (b_is_on) printf("\t\t\tsrcb = ((bltbdat << 16) | prevb) >> b->blitdownbshift;\n");
@ -193,8 +201,8 @@ static void generate_func(void)
if (c_is_on) printf("\tif (ptc) ptc -= b->bltcmod;\n"); if (c_is_on) printf("\tif (ptc) ptc -= b->bltcmod;\n");
printf("\tif (ptd) ptd -= b->bltdmod;\n"); printf("\tif (ptd) ptd -= b->bltdmod;\n");
printf("}\n"); printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n"); if (b_is_on) printf("\tb->bltbhold = srcb;\n");
printf("b->bltcdat = srcc;\n"); if (c_is_on) printf("\tb->bltcdat = srcc;\n");
printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n"); printf("\t\tif (dstp) chipmem_wput (dstp, dstd);\n");
#if 0 #if 0
printf("}\n"); printf("}\n");
@ -268,4 +276,3 @@ int main(int argc, char **argv)
} }
return 0; return 0;
} }

View File

@ -52,7 +52,7 @@
#ifdef DEBUG #ifdef DEBUG
#define DEBUG_LOG write_log #define DEBUG_LOG write_log
#else #else
#define DEBUG_LOG(...) do ; while(0) #define DEBUG_LOG(...) do {} while(0)
#endif #endif
static SDL_Surface *display; static SDL_Surface *display;
@ -1159,7 +1159,7 @@ void handle_events (void)
switch (rEvent.type) { switch (rEvent.type) {
case SDL_QUIT: case SDL_QUIT:
DEBUG_LOG ("Event: quit\n"); DEBUG_LOG ("Event: quit\n");
uae_stop (); uae_quit ();
break; break;
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:

View File

@ -263,7 +263,7 @@ static int handle_scsi (uaecptr request, struct hardfiledata *hfd)
ls = 12; ls = 12;
break; break;
default: default:
lr = -1; lr = -1;
write_log ("UAEHF: unsupported scsi command %#2.2X\n", cmd); write_log ("UAEHF: unsupported scsi command %#2.2X\n", cmd);
status = 2; /* CHECK CONDITION */ status = 2; /* CHECK CONDITION */
s[0] = 0x70; s[0] = 0x70;
@ -408,7 +408,7 @@ static uae_u32 REGPARAM2 hardfile_open (TrapContext *context)
/* Check unit number */ /* Check unit number */
if (unit >= 0 && get_hardfile_data (unit) && start_thread (unit)) { if (unit >= 0 && get_hardfile_data (unit) && start_thread (unit)) {
hfpd->opencount++; hfpd->opencount++;
put_word (m68k_areg(&context->regs, 6) + 32, get_word (m68k_areg(&context->regs, 6) + 32) + 1); put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) + 1);
put_long (tmp1 + 24, unit); /* io_Unit */ put_long (tmp1 + 24, unit); /* io_Unit */
put_byte (tmp1 + 31, 0); /* io_Error */ put_byte (tmp1 + 31, 0); /* io_Error */
put_byte (tmp1 + 8, 7); /* ln_type = NT_REPLYMSG */ put_byte (tmp1 + 8, 7); /* ln_type = NT_REPLYMSG */
@ -432,8 +432,12 @@ static uae_u32 REGPARAM2 hardfile_close (TrapContext *context)
if (!hfpd->opencount) if (!hfpd->opencount)
return 0; return 0;
hfpd->opencount--; hfpd->opencount--;
if (hfpd->opencount == 0)
if (hfpd->opencount == 0) {
write_comm_pipe_u32 (&hfpd->requests, 0, 1); write_comm_pipe_u32 (&hfpd->requests, 0, 1);
uae_sem_wait (&hfpd->sync_sem);
}
put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) - 1); put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) - 1);
return 0; return 0;
} }
@ -663,7 +667,7 @@ static uae_u32 hardfile_do_io (struct hardfiledata *hfd, struct hardfileprivdata
error = handle_scsi (request, hfd); error = handle_scsi (request, hfd);
} else { /* we don't want users trashing their "partition" hardfiles with hdtoolbox */ } else { /* we don't want users trashing their "partition" hardfiles with hdtoolbox */
error = -3; /* IOERR_NOCMD */ error = -3; /* IOERR_NOCMD */
write_log ("UAEHF: HD_SCSICMD tried on regular HDF, unit %d", unit); write_log ("UAEHF: HD_SCSICMD tried on regular HDF, unit %d\n", unit);
} }
break; break;
@ -676,7 +680,7 @@ static uae_u32 hardfile_do_io (struct hardfiledata *hfd, struct hardfileprivdata
put_byte (request + 31, error); put_byte (request + 31, error);
hf_log2 ("hf: unit=%d, request=%p, cmd=%d offset=%u len=%d, actual=%d error%=%d\n", unit, request, hf_log2 ("hf: unit=%d, request=%p, cmd=%d offset=%u len=%d, actual=%d error%=%d\n", unit, request,
get_word(request + 28), get_long (request + 44), get_long (request + 36), actual, error); get_word (request + 28), get_long (request + 44), get_long (request + 36), actual, error);
return async; return async;
} }
@ -793,11 +797,20 @@ void hardfile_reset (void)
if ((request = hfpd->d_request[i])) if ((request = hfpd->d_request[i]))
abort_async (hfpd, request, 0, 0); abort_async (hfpd, request, 0, 0);
} }
write_comm_pipe_u32 (&hfpd->requests, 0, 1);
uae_sem_wait (&hfpd->sync_sem);
} }
memset (hfpd, 0, sizeof (struct hardfileprivdata)); memset (hfpd, 0, sizeof (struct hardfileprivdata));
} }
} }
void hardfile_cleanup (void)
{
hardfile_reset ();
}
void hardfile_install (void) void hardfile_install (void)
{ {
uae_u32 functable, datatable; uae_u32 functable, datatable;

View File

@ -14,9 +14,9 @@
//#define HDF_DEBUG //#define HDF_DEBUG
#ifdef HDF_DEBUG #ifdef HDF_DEBUG
#define DEBUG_LOG write_log( "%s: ", __func__); write_log #define DEBUG_LOG write_log ( "%s: ", __func__); write_log
#else #else
#define DEBUG_LOG(...) do ; while(0) #define DEBUG_LOG(...) do {} while(0)
#endif #endif
@ -47,7 +47,7 @@ static int hdf_seek (struct hardfiledata *hfd, uae_u64 offset)
return -1; return -1;
} }
ret = lseek ((int)hfd->handle, offset, SEEK_SET); ret = lseek (hfd->handle, offset, SEEK_SET);
if (ret == -1) { if (ret == -1) {
DEBUG_LOG ("seek failed\n"); DEBUG_LOG ("seek failed\n");
@ -67,7 +67,7 @@ static void poscheck (struct hardfiledata *hfd, int len)
abort (); abort ();
} }
pos = lseek ((int)hfd->handle, 0, SEEK_CUR); pos = lseek (hfd->handle, 0, SEEK_CUR);
if (pos == -1 ) { if (pos == -1 ) {
gui_message ("hd: poscheck failed. seek failure, error %d", errno); gui_message ("hd: poscheck failed. seek failure, error %d", errno);
@ -101,7 +101,7 @@ int hdf_open (struct hardfiledata *hfd, const char *name)
if ((handle = open (name, hfd->readonly ? O_RDONLY : O_RDWR)) != -1) { if ((handle = open (name, hfd->readonly ? O_RDONLY : O_RDWR)) != -1) {
int i; int i;
strcpy (hfd->path, name); strcpy (hfd->path, name);
hfd->handle = (void *) handle; hfd->handle = handle;
hfd->cache = 0; hfd->cache = 0;
i = strlen (name) - 1; i = strlen (name) - 1;
@ -131,8 +131,8 @@ extern int hdf_dup (struct hardfiledata *dhfd, const struct hardfiledata *shfd)
{ {
DEBUG_LOG ("called\n"); DEBUG_LOG ("called\n");
if ((int)shfd->handle >= 0) { if (shfd->handle >= 0) {
dhfd->handle = (void *)dup ((int)shfd->handle); dhfd->handle = dup (shfd->handle);
} }
return 0; return 0;
@ -142,8 +142,8 @@ void hdf_close (struct hardfiledata *hfd)
{ {
DEBUG_LOG ("called\n"); DEBUG_LOG ("called\n");
close ((int)hfd->handle); close (hfd->handle);
hfd->handle = (void *)-1; hfd->handle = -1;
} }
int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len) int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len)
@ -155,7 +155,7 @@ int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len)
hfd->cache_valid = 0; hfd->cache_valid = 0;
hdf_seek (hfd, offset); hdf_seek (hfd, offset);
poscheck (hfd, len); poscheck (hfd, len);
n = read ((int)hfd->handle, buffer, len); n = read (hfd->handle, buffer, len);
DEBUG_LOG ("read %d bytes\n", n); DEBUG_LOG ("read %d bytes\n", n);
@ -171,7 +171,7 @@ int hdf_write (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len)
hfd->cache_valid = 0; hfd->cache_valid = 0;
hdf_seek (hfd, offset); hdf_seek (hfd, offset);
poscheck (hfd, len); poscheck (hfd, len);
n = write ((int)hfd->handle, buffer, len); n = write (hfd->handle, buffer, len);
DEBUG_LOG ("Wrote %d bytes\n", n); DEBUG_LOG ("Wrote %d bytes\n", n);

View File

@ -45,6 +45,7 @@ extern void filesys_install_code (void);
extern void filesys_store_devinfo (uae_u8 *); extern void filesys_store_devinfo (uae_u8 *);
extern void hardfile_install (void); extern void hardfile_install (void);
extern void hardfile_reset (void); extern void hardfile_reset (void);
extern void hardfile_cleanup (void);
extern void emulib_install (void); extern void emulib_install (void);
extern void expansion_init (void); extern void expansion_init (void);
extern void expansion_cleanup (void); extern void expansion_cleanup (void);

View File

@ -9,7 +9,7 @@
typedef union { typedef union {
int i; int i;
uae_u32 u32; uae_u32 u32;
void *pv; const void *pv;
} uae_pt; } uae_pt;
/* These currently require the maximum size to be known at initialization /* These currently require the maximum size to be known at initialization
@ -71,7 +71,7 @@ STATIC_INLINE void write_comm_pipe_pt (smp_comm_pipe *p, uae_pt data, int no_buf
maybe_wake_reader (p, no_buffer); maybe_wake_reader (p, no_buffer);
return; return;
} }
uae_sem_wait (&p->lock); uae_sem_wait (&p->lock);
if (nxwrp == p->rdp) { if (nxwrp == p->rdp) {
/* Pipe full! */ /* Pipe full! */
@ -128,7 +128,7 @@ STATIC_INLINE uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p)
return foo.u32; return foo.u32;
} }
STATIC_INLINE void *read_comm_pipe_pvoid_blocking (smp_comm_pipe *p) STATIC_INLINE const void *read_comm_pipe_pvoid_blocking (smp_comm_pipe *p)
{ {
uae_pt foo = read_comm_pipe_pt_blocking (p); uae_pt foo = read_comm_pipe_pt_blocking (p);
return foo.pv; return foo.pv;
@ -148,7 +148,7 @@ STATIC_INLINE void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffe
write_comm_pipe_pt (p, foo, no_buffer); write_comm_pipe_pt (p, foo, no_buffer);
} }
STATIC_INLINE void write_comm_pipe_pvoid (smp_comm_pipe *p, void *data, int no_buffer) STATIC_INLINE void write_comm_pipe_pvoid (smp_comm_pipe *p, const void *data, int no_buffer)
{ {
uae_pt foo; uae_pt foo;
foo.pv = data; foo.pv = data;

View File

@ -14,7 +14,11 @@ struct hardfiledata {
int surfaces; int surfaces;
int reservedblocks; int reservedblocks;
unsigned int blocksize; unsigned int blocksize;
#ifdef WIN32
void *handle; void *handle;
#else
int handle;
#endif
int readonly; int readonly;
int flags; int flags;
uae_u8 *cache; uae_u8 *cache;

View File

@ -28,16 +28,11 @@ extern void sound_volume (int dir);
extern void switch_audio_interpol (void); extern void switch_audio_interpol (void);
extern void sample16_handler (void); extern void sample16_handler (void);
extern void sample8_handler (void);
extern void sample16s_handler (void); extern void sample16s_handler (void);
extern void sample16ss_handler (void); extern void sample16ss_handler (void);
extern void sample8s_handler (void);
extern void sample_ulaw_handler (void);
#ifdef MULTIPLICATION_PROFITABLE #ifdef MULTIPLICATION_PROFITABLE
STATIC_INLINE void init_sound_table16 (void) { } STATIC_INLINE void init_sound_table16 (void) { }
STATIC_INLINE void init_sound_table8 (void) { }
#else #else
extern void init_sound_table16 (void); extern void init_sound_table16 (void);
extern void init_sound_table8 (void);
#endif #endif

View File

@ -1,423 +1,422 @@
/* /*
* UAE - The Un*x Amiga Emulator * UAE - The Un*x Amiga Emulator
* *
* Stuff * Stuff
* *
* Copyright 1995, 1996 Ed Hanway * Copyright 1995, 1996 Ed Hanway
* Copyright 1995-2001 Bernd Schmidt * Copyright 1995-2001 Bernd Schmidt
*/ */
typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
struct uaedev_mount_info; struct uaedev_mount_info;
struct strlist { struct strlist {
struct strlist *next; struct strlist *next;
char *option, *value; char *option, *value;
int unknown; int unknown;
}; };
// Device Port // Device Port
enum Porttype { enum Porttype {
PORT_DEFAULT, // Load from device of dol file PORT_DEFAULT, // Load from device of dol file
PORT_SD, // Load from SD card PORT_SD, // Load from SD card
PORT_USB, // Load from USB port PORT_USB, // Load from USB port
PORT_SMB //Load from network PORT_SMB //Load from network
}; };
/* maximum number native input devices supported (single type) */ /* maximum number native input devices supported (single type) */
#define MAX_INPUT_DEVICES 6 #define MAX_INPUT_DEVICES 6
/* maximum number of native input device's buttons and axles supported */ /* maximum number of native input device's buttons and axles supported */
#define MAX_INPUT_DEVICE_EVENTS 256 #define MAX_INPUT_DEVICE_EVENTS 256
/* 4 different customization settings */ /* 4 different customization settings */
#define MAX_INPUT_SETTINGS 4 #define MAX_INPUT_SETTINGS 4
#define MAX_INPUT_SUB_EVENT 4 #define MAX_INPUT_SUB_EVENT 4
#define MAX_INPUT_SIMULTANEOUS_KEYS 4 #define MAX_INPUT_SIMULTANEOUS_KEYS 4
struct uae_input_device { struct uae_input_device {
char *name; char *name;
uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; uae_s16 eventid[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
char *custom [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; char *custom [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
uae_u16 flags [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; uae_u16 flags [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
uae_s16 extra [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS]; uae_s16 extra [MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
uae_u8 enabled; uae_u8 enabled;
}; };
#define MAX_SPARE_DRIVES 20 #define MAX_SPARE_DRIVES 20
#define CONFIG_TYPE_HARDWARE 1 #define CONFIG_TYPE_HARDWARE 1
#define CONFIG_TYPE_HOST 2 #define CONFIG_TYPE_HOST 2
struct uae_prefs { struct uae_prefs {
struct strlist *all_lines; struct strlist *all_lines;
char description[256]; char description[256];
char info[256]; char info[256];
int config_version; int config_version;
int illegal_mem; int illegal_mem;
int use_serial; int use_serial;
int serial_demand; int serial_demand;
int serial_hwctsrts; int serial_hwctsrts;
int serial_direct; int serial_direct;
int parallel_demand; int parallel_demand;
int socket_emu; int socket_emu;
#ifdef DEBUGGER #ifdef DEBUGGER
int start_debugger; int start_debugger;
#endif #endif
int start_gui; int start_gui;
KbdLang keyboard_lang; KbdLang keyboard_lang;
int test_drawing_speed; int test_drawing_speed;
int produce_sound; int produce_sound;
int sound_stereo; int sound_stereo;
int sound_stereo_separation; int sound_stereo_separation;
int sound_mixed_stereo; int sound_mixed_stereo;
int sound_bits; int sound_freq;
int sound_freq; int sound_latency;
int sound_latency; int sound_interpol;
int sound_interpol; int sound_adjust;
int sound_adjust; int sound_volume;
int sound_volume;
#ifdef JIT
#ifdef JIT int comptrustbyte;
int comptrustbyte; int comptrustword;
int comptrustword; int comptrustlong;
int comptrustlong; int comptrustnaddr;
int comptrustnaddr; int compnf;
int compnf; int compforcesettings;
int compforcesettings; int compfpu;
int compfpu;
int comp_hardflush;
int comp_hardflush; int comp_constjump;
int comp_constjump; int comp_oldsegv;
int comp_oldsegv;
int cachesize;
int cachesize; int optcount[10];
int optcount[10]; #endif
#endif
int gfx_framerate;
int gfx_framerate; int gfx_width_win, gfx_height_win;
int gfx_width_win, gfx_height_win; int gfx_width_fs, gfx_height_fs;
int gfx_width_fs, gfx_height_fs; int gfx_width, gfx_height;
int gfx_width, gfx_height; int gfx_refreshrate;
int gfx_refreshrate; int gfx_vsync;
int gfx_vsync; int gfx_lores;
int gfx_lores; int gfx_linedbl;
int gfx_linedbl; int gfx_correct_aspect;
int gfx_correct_aspect; int gfx_afullscreen;
int gfx_afullscreen; int gfx_pfullscreen;
int gfx_pfullscreen; int gfx_xcenter;
int gfx_xcenter; int gfx_ycenter;
int gfx_ycenter;
#ifdef GFXFILTER
#ifdef GFXFILTER int gfx_filter;
int gfx_filter; int gfx_filter_scanlines;
int gfx_filter_scanlines; int gfx_filter_scanlineratio;
int gfx_filter_scanlineratio; int gfx_filter_scanlinelevel;
int gfx_filter_scanlinelevel; int gfx_filter_horiz_zoom, gfx_filter_vert_zoom;
int gfx_filter_horiz_zoom, gfx_filter_vert_zoom; int gfx_filter_horiz_offset, gfx_filter_vert_offset;
int gfx_filter_horiz_offset, gfx_filter_vert_offset; int gfx_filter_filtermode;
int gfx_filter_filtermode; #endif
#endif
int color_mode;
int color_mode;
int immediate_blits;
int immediate_blits; unsigned int chipset_mask;
unsigned int chipset_mask; int ntscmode;
int ntscmode; int genlock;
int genlock; int chipset_refreshrate;
int chipset_refreshrate; int collision_level;
int collision_level; int leds_on_screen;
int leds_on_screen; int keyboard_leds[3];
int keyboard_leds[3]; int keyboard_leds_in_use;
int keyboard_leds_in_use; int scsi;
int scsi; int catweasel_io;
int catweasel_io; int cpu_idle;
int cpu_idle; int cpu_cycle_exact;
int cpu_cycle_exact; int blitter_cycle_exact;
int blitter_cycle_exact; int floppy_speed;
int floppy_speed; int tod_hack;
int tod_hack; uae_u32 maprom;
uae_u32 maprom;
char df[4][256];
char df[4][256]; char dfxlist[MAX_SPARE_DRIVES][256];
char dfxlist[MAX_SPARE_DRIVES][256]; char romfile[256];
char romfile[256]; char romextfile[256];
char romextfile[256]; char keyfile[256];
char keyfile[256]; char flashfile[256];
char flashfile[256]; #ifdef ACTION_REPLAY
#ifdef ACTION_REPLAY char cartfile[256];
char cartfile[256]; #endif
#endif char prtname[256];
char prtname[256]; char sername[256];
char sername[256]; #ifndef WIN32
#ifndef WIN32 char scsi_device[256];
char scsi_device[256]; #endif
#endif
int m68k_speed;
int m68k_speed; int cpu_level;
int cpu_level; int cpu_compatible;
int cpu_compatible; int address_space_24;
int address_space_24;
#ifdef HAVE_MACHDEP_TIMER
#ifdef HAVE_MACHDEP_TIMER int use_processor_clock;
int use_processor_clock; #endif
#endif
uae_u32 z3fastmem_size;
uae_u32 z3fastmem_size; uae_u32 fastmem_size;
uae_u32 fastmem_size; uae_u32 chipmem_size;
uae_u32 chipmem_size; uae_u32 bogomem_size;
uae_u32 bogomem_size; uae_u32 a3000mem_size;
uae_u32 a3000mem_size; uae_u32 gfxmem_size;
uae_u32 gfxmem_size;
int kickshifter;
int kickshifter; int filesys_no_uaefsdb;
int filesys_no_uaefsdb;
struct uaedev_mount_info *mountinfo;
struct uaedev_mount_info *mountinfo;
int nr_floppies;
int nr_floppies; int dfxtype[4];
int dfxtype[4]; #ifdef DRIVESOUND
#ifdef DRIVESOUND int dfxclick[4];
int dfxclick[4]; char dfxclickexternal[4][256];
char dfxclickexternal[4][256]; int dfxclickvolume;
int dfxclickvolume; #endif
#endif
int hide_cursor; /* Whether to hide host WM cursor or not */
int hide_cursor; /* Whether to hide host WM cursor or not */
/* Target specific options */
/* Target specific options */ #ifdef USE_X11_GFX
#ifdef USE_X11_GFX int x11_use_low_bandwidth;
int x11_use_low_bandwidth; int x11_use_mitshm;
int x11_use_mitshm; int x11_use_dgamode;
int x11_use_dgamode; #endif
#endif
#ifdef USE_SVGALIB_GFX
#ifdef USE_SVGALIB_GFX int svga_no_linear;
int svga_no_linear; #endif
#endif
#ifdef _WIN32
#ifdef _WIN32 int win32_middle_mouse;
int win32_middle_mouse; int win32_logfile;
int win32_logfile;
int win32_active_priority;
int win32_active_priority; int win32_inactive_priority;
int win32_inactive_priority; int win32_inactive_pause;
int win32_inactive_pause; int win32_inactive_nosound;
int win32_inactive_nosound; int win32_iconified_priority;
int win32_iconified_priority; int win32_iconified_pause;
int win32_iconified_pause; int win32_iconified_nosound;
int win32_iconified_nosound;
int win32_no_overlay; /* If this is set, we won't try and use any RGB overlays */
int win32_no_overlay; /* If this is set, we won't try and use any RGB overlays */ int win32_ctrl_F11_is_quit;
int win32_ctrl_F11_is_quit; int win32_automount_drives;
int win32_automount_drives; int win32_midioutdev;
int win32_midioutdev; int win32_midiindev;
int win32_midiindev; int win32_aspi;
int win32_aspi; int win32_soundcard;
int win32_soundcard; #endif
#endif
#ifdef USE_CURSES_GFX
#ifdef USE_CURSES_GFX int curses_reverse_video;
int curses_reverse_video; #endif
#endif
#if defined USE_SDL_GFX || defined USE_X11_GFX
#if defined USE_SDL_GFX || defined USE_X11_GFX int map_raw_keys;
int map_raw_keys; #endif
#endif #ifdef USE_SDL_GFX
#ifdef USE_SDL_GFX int use_gl;
int use_gl; #endif
#endif
#ifdef USE_AMIGA_GFX
#ifdef USE_AMIGA_GFX int amiga_screen_type;
int amiga_screen_type; char amiga_publicscreen[256];
char amiga_publicscreen[256]; int amiga_use_grey;
int amiga_use_grey; int amiga_use_dither;
int amiga_use_dither; #endif
#endif
#ifdef SAVESTATE
#ifdef SAVESTATE int statecapture;
int statecapture; int statecapturerate, statecapturebuffersize;
int statecapturerate, statecapturebuffersize; #endif
#endif
int use_wheel_input;
int use_wheel_input; int logfile;
int logfile; #ifdef GEKKO
#ifdef GEKKO int smb_enable;
int smb_enable; char SmbUser[32];
char SmbUser[32]; char SmbPwd[32];
char SmbPwd[32]; char SmbShare[32];
char SmbShare[32]; char SmbIp[32];
char SmbIp[32]; int Port; //SD, USB or SMB
int Port; //SD, USB or SMB int rumble;
int rumble; int gfx_correct_ratio;
int gfx_correct_ratio; #endif
#endif
/* input */
/* input */
int jport0;
int jport0; int jport1;
int jport1; int input_selected_setting;
int input_selected_setting; int input_joymouse_multiplier;
int input_joymouse_multiplier; int input_joymouse_deadzone;
int input_joymouse_deadzone; int input_joystick_deadzone;
int input_joystick_deadzone; int input_joymouse_speed;
int input_joymouse_speed; int input_autofire_framecnt;
int input_autofire_framecnt; int input_mouse_speed;
int input_mouse_speed; struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
struct uae_input_device joystick_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
struct uae_input_device mouse_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES];
struct uae_input_device keyboard_settings[MAX_INPUT_SETTINGS + 1][MAX_INPUT_DEVICES]; };
};
extern void save_options (FILE *, const struct uae_prefs *, int);
extern void save_options (FILE *, const struct uae_prefs *, int); extern void cfgfile_write (FILE *f, const char *format,...);
extern void cfgfile_write (FILE *f, const char *format,...);
extern void default_prefs (struct uae_prefs *, int);
extern void default_prefs (struct uae_prefs *, int); extern void discard_prefs (struct uae_prefs *, int);
extern void discard_prefs (struct uae_prefs *, int);
extern void prefs_set_attr (const char *key, const char *value);
extern void prefs_set_attr (const char *key, const char *value); extern const char *prefs_get_attr (const char *key);
extern const char *prefs_get_attr (const char *key);
int parse_cmdline_option (struct uae_prefs *, char, char *);
int parse_cmdline_option (struct uae_prefs *, char, char *);
extern int cfgfile_yesno (const char *option, const char *value, const char *name, int *location);
extern int cfgfile_yesno (const char *option, const char *value, const char *name, int *location); extern int cfgfile_intval (const char *option, const char *value, const char *name, int *location, int scale);
extern int cfgfile_intval (const char *option, const char *value, const char *name, int *location, int scale); extern int cfgfile_strval (const char *option, const char *value, const char *name, int *location, const char *table[], int more);
extern int cfgfile_strval (const char *option, const char *value, const char *name, int *location, const char *table[], int more); extern int cfgfile_string (const char *option, const char *value, const char *name, char *location, int maxsz);
extern int cfgfile_string (const char *option, const char *value, const char *name, char *location, int maxsz); extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file);
extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file); extern void cfgfile_subst_home (char *path, unsigned int maxlen);
extern void cfgfile_subst_home (char *path, unsigned int maxlen);
extern int machdep_parse_option (struct uae_prefs *, const char *option, const char *value);
extern int machdep_parse_option (struct uae_prefs *, const char *option, const char *value); extern void machdep_save_options (FILE *, const struct uae_prefs *);
extern void machdep_save_options (FILE *, const struct uae_prefs *); extern void machdep_default_options (struct uae_prefs *);
extern void machdep_default_options (struct uae_prefs *);
extern int target_parse_option (struct uae_prefs *, const char *option, const char *value);
extern int target_parse_option (struct uae_prefs *, const char *option, const char *value); extern void target_save_options (FILE *, const struct uae_prefs *);
extern void target_save_options (FILE *, const struct uae_prefs *); extern void target_default_options (struct uae_prefs *);
extern void target_default_options (struct uae_prefs *);
extern int gfx_parse_option (struct uae_prefs *, const char *option, const char *value);
extern int gfx_parse_option (struct uae_prefs *, const char *option, const char *value); extern void gfx_save_options (FILE *, const struct uae_prefs *);
extern void gfx_save_options (FILE *, const struct uae_prefs *); extern void gfx_default_options (struct uae_prefs *);
extern void gfx_default_options (struct uae_prefs *);
extern void audio_default_options (struct uae_prefs *p);
extern void audio_default_options (struct uae_prefs *p); extern void audio_save_options (FILE *f, const struct uae_prefs *p);
extern void audio_save_options (FILE *f, const struct uae_prefs *p); extern int audio_parse_option (struct uae_prefs *p, const char *option, const char *value);
extern int audio_parse_option (struct uae_prefs *p, const char *option, const char *value);
extern int cfgfile_load (struct uae_prefs *, const char *filename, int *);
extern int cfgfile_load (struct uae_prefs *, const char *filename, int *); extern int cfgfile_save (const struct uae_prefs *, const char *filename, int);
extern int cfgfile_save (const struct uae_prefs *, const char *filename, int); extern void cfgfile_parse_line (struct uae_prefs *p, char *, int);
extern void cfgfile_parse_line (struct uae_prefs *p, char *, int); extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value, int);
extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value, int); extern int cfgfile_get_description (const char *filename, char *description, int*);
extern int cfgfile_get_description (const char *filename, char *description, int*); extern void cfgfile_show_usage (void);
extern void cfgfile_show_usage (void); extern uae_u32 cfgfile_uaelib(int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen);
extern uae_u32 cfgfile_uaelib(int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen); extern uae_u32 cfgfile_uaelib_modify (uae_u32 mode, uae_u32 parms, uae_u32 size, uae_u32 out, uae_u32 outsize);
extern uae_u32 cfgfile_uaelib_modify (uae_u32 mode, uae_u32 parms, uae_u32 size, uae_u32 out, uae_u32 outsize); extern uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae_u32 outsize);
extern uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae_u32 outsize); extern void cfgfile_addcfgparam (char *);
extern void cfgfile_addcfgparam (char *); extern unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max);
extern unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max); extern int cfgfile_configuration_change(int);
extern int cfgfile_configuration_change(int);
extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
extern void check_prefs_changed_custom (void);
extern void check_prefs_changed_custom (void); extern void check_prefs_changed_cpu (void);
extern void check_prefs_changed_cpu (void); extern void check_prefs_changed_audio (void);
extern void check_prefs_changed_audio (void); extern int check_prefs_changed_gfx (void);
extern int check_prefs_changed_gfx (void);
extern struct uae_prefs currprefs, changed_prefs;
extern struct uae_prefs currprefs, changed_prefs;
extern void machdep_init (void);
extern void machdep_init (void);
/* AIX doesn't think it is Unix. Neither do I. */
/* AIX doesn't think it is Unix. Neither do I. */ #if defined(_ALL_SOURCE) || defined(_AIX)
#if defined(_ALL_SOURCE) || defined(_AIX) #undef __unix
#undef __unix #define __unix
#define __unix #endif
#endif
#define MAX_COLOR_MODES 5
#define MAX_COLOR_MODES 5
/* #define NEED_TO_DEBUG_BADLY */
/* #define NEED_TO_DEBUG_BADLY */
#if !defined(USER_PROGRAMS_BEHAVE)
#if !defined(USER_PROGRAMS_BEHAVE) #define USER_PROGRAMS_BEHAVE 0
#define USER_PROGRAMS_BEHAVE 0 #endif
#endif
/* Some memsets which know that they can safely overwrite some more memory
/* Some memsets which know that they can safely overwrite some more memory * at both ends and use that knowledge to align the pointers. */
* at both ends and use that knowledge to align the pointers. */
#define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16))
#define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16))
/* When you call this routine, bear in mind that it rounds the bounds and
/* When you call this routine, bear in mind that it rounds the bounds and * may need some padding for the array. */
* may need some padding for the array. */
#define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2)
#define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2) STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len)
STATIC_INLINE void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len) {
{ uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
uae_u32 *p2 = (uae_u32 *)((char *)p + offset); int a = len & 7;
int a = len & 7; len >>= 3;
len >>= 3; switch (a) {
switch (a) { case 7: p2--; goto l1;
case 7: p2--; goto l1; case 6: p2-=2; goto l2;
case 6: p2-=2; goto l2; case 5: p2-=3; goto l3;
case 5: p2-=3; goto l3; case 4: p2-=4; goto l4;
case 4: p2-=4; goto l4; case 3: p2-=5; goto l5;
case 3: p2-=5; goto l5; case 2: p2-=6; goto l6;
case 2: p2-=6; goto l6; case 1: p2-=7; goto l7;
case 1: p2-=7; goto l7; case 0: if (!--len) return; break;
case 0: if (!--len) return; break; }
}
for (;;) {
for (;;) { p2[0] = c;
p2[0] = c; l1:
l1: p2[1] = c;
p2[1] = c; l2:
l2: p2[2] = c;
p2[2] = c; l3:
l3: p2[3] = c;
p2[3] = c; l4:
l4: p2[4] = c;
p2[4] = c; l5:
l5: p2[5] = c;
p2[5] = c; l6:
l6: p2[6] = c;
p2[6] = c; l7:
l7: p2[7] = c;
p2[7] = c;
if (!len)
if (!len) break;
break; len--;
len--; p2 += 8;
p2 += 8; }
} }
}
/* This one knows it will never be asked to clear more than 32 bytes. Make sure you call this with a
/* This one knows it will never be asked to clear more than 32 bytes. Make sure you call this with a constant for the length. */
constant for the length. */ #define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2)
#define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2) STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len)
STATIC_INLINE void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len) {
{ uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
uae_u32 *p2 = (uae_u32 *)((char *)p + offset);
switch (len) {
switch (len) { case 9: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; p2[8] = c; break;
case 9: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; p2[8] = c; break; case 8: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; break;
case 8: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; break; case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break;
case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break; case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break;
case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break; case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break;
case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break; case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break;
case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break; case 3: p2[0] = c; p2[1] = c; p2[2] = c; break;
case 3: p2[0] = c; p2[1] = c; p2[2] = c; break; case 2: p2[0] = c; p2[1] = c; break;
case 2: p2[0] = c; p2[1] = c; break; case 1: p2[0] = c; break;
case 1: p2[0] = c; break; case 0: break;
case 0: break; default: printf("Hit the programmer.\n"); break;
default: printf("Hit the programmer.\n"); break; }
} }
}
#if defined TARGET_AMIGAOS && defined(__GNUC__)
#if defined TARGET_AMIGAOS && defined(__GNUC__) #include "od-amiga/amiga-kludges.h"
#include "od-amiga/amiga-kludges.h" #endif
#endif

View File

@ -340,7 +340,7 @@ extern int gui_message_multibutton (int flags, const char *format,...);
# define rmdir unlink # define rmdir unlink
/* Definately problems! */ /* Definately problems! */
# define chmod(a,b) //# define chmod(a,b)
# define dup(fd) fd # define dup(fd) fd
# define utime(filename, buf) 0 # define utime(filename, buf) 0
#endif #endif

View File

@ -11,14 +11,9 @@
#include "sysconfig.h" #include "sysconfig.h"
/* TODO: Version details currently are currently defined #define UAEMAJOR UAE_VERSION_MAJOR
* twice: once in the configure script and once here. #define UAEMINOR UAE_VERSION_MINOR
* Need to fix this. #define UAESUBREV UAE_VERSION_REVISION
*/
#define UAEMAJOR 0
#define UAEMINOR 8
#define UAESUBREV 29
#define UAEVERSION (256*65536L*UAEMAJOR + 65536L*UAEMINOR + UAESUBREV) #define UAEVERSION (256*65536L*UAEMAJOR + 65536L*UAEMINOR + UAESUBREV)
@ -28,10 +23,6 @@
# define UAE_NAME "E-UAE" # define UAE_NAME "E-UAE"
#endif #endif
#define STRINGIZE(x) #x #define UAE_VERSION_STRING UAE_NAME " " UAE_VERSION
#define MAKE_VERSION_STRING(x,y,z) STRINGIZE(x) "." STRINGIZE(y) "." STRINGIZE(z)
#define UAE_VERSION_STRING \
UAE_NAME " " MAKE_VERSION_STRING (UAEMAJOR, UAEMINOR, UAESUBREV)
#endif #endif

View File

@ -530,15 +530,18 @@ int mousehack_alive (void)
static void mousehack_enable (void) static void mousehack_enable (void)
{ {
#ifdef FILESYS /* Internal mousehack depends on filesys boot-rom */
if (!mousehack_allowed ()) if (!mousehack_allowed ())
return; return;
if (rtarea[get_long (RTAREA_BASE + 40) + 12 - 1]) if (rtarea[get_long (RTAREA_BASE + 40) + 12 - 1])
return; return;
rtarea[get_long (RTAREA_BASE + 40) + 12 - 1] = 1; rtarea[get_long (RTAREA_BASE + 40) + 12 - 1] = 1;
#endif
} }
static void mousehack_helper (void) static void mousehack_helper (void)
{ {
#ifdef FILESYS /* Internal mousehack depends on filesys boot-rom */
int mousexpos, mouseypos; int mousexpos, mouseypos;
uae_u8 *p; uae_u8 *p;
@ -561,6 +564,7 @@ static void mousehack_helper (void)
p[1] = mousexpos; p[1] = mousexpos;
p[2] = mouseypos >> 8; p[2] = mouseypos >> 8;
p[3] = mouseypos; p[3] = mouseypos;
#endif
} }
STATIC_INLINE int adjust (int val) STATIC_INLINE int adjust (int val)

View File

@ -29,7 +29,7 @@ static int *fs_np;
static int *fs_np; static int *fs_np;
static int *fs_ck; static int *fs_ck;
static int *fs_se; static int *fs_se;
#ifdef ARCADIA #ifdef XARCADE
static int *fs_xa1; static int *fs_xa1;
static int *fs_xa2; static int *fs_xa2;
#endif #endif
@ -114,7 +114,7 @@ void record_key (int kc)
case AK_LSH: fs = 1; fs_se[5] = b; break; case AK_LSH: fs = 1; fs_se[5] = b; break;
} }
} }
#ifdef ARCADIA #ifdef XARCADE
if (fs_xa1 != 0) { if (fs_xa1 != 0) {
switch (k) { switch (k) {
case AK_NP8: fs = 1; fs_xa1[0] = b; break; case AK_NP8: fs = 1; fs_xa1[0] = b; break;
@ -149,7 +149,7 @@ void record_key (int kc)
kc ^= AK_RCTRL << 1; kc ^= AK_RCTRL << 1;
kc ^= AK_CTRL << 1; kc ^= AK_CTRL << 1;
} }
#ifdef ARCADIA #ifdef XARCADE
if (fs_xa1 || fs_xa2) { if (fs_xa1 || fs_xa2) {
int k2 = k; int k2 = k;
if (k == AK_1) if (k == AK_1)
@ -187,7 +187,7 @@ void record_key (int kc)
void joystick_setting_changed (void) void joystick_setting_changed (void)
{ {
fs_np = fs_ck = fs_se = 0; fs_np = fs_ck = fs_se = 0;
#ifdef ARCADIA #ifdef XARCADE
fs_xa1 = fs_xa2 = 0; fs_xa1 = fs_xa2 = 0;
#endif #endif
@ -206,7 +206,7 @@ void joystick_setting_changed (void)
else if (JSEM_ISSOMEWHEREELSE (1, &currprefs)) else if (JSEM_ISSOMEWHEREELSE (1, &currprefs))
fs_se = fakestate[1]; fs_se = fakestate[1];
#ifdef ARCADIA #ifdef XARCADE
if (JSEM_ISXARCADE1 (0, &currprefs)) if (JSEM_ISXARCADE1 (0, &currprefs))
fs_xa1 = fakestate[0]; fs_xa1 = fakestate[0];
else if (JSEM_ISXARCADE1 (1, &currprefs)) else if (JSEM_ISXARCADE1 (1, &currprefs))

View File

@ -458,11 +458,7 @@ void usage (void)
static void show_version (void) static void show_version (void)
{ {
#ifdef PACKAGE_VERSION write_log (UAE_VERSION_STRING "\n");
write_log (PACKAGE_NAME " " PACKAGE_VERSION "\n");
#else
write_log ("UAE %d.%d.%d\n", UAEMAJOR, UAEMINOR, UAESUBREV);
#endif
write_log ("Build date: " __DATE__ " " __TIME__ "\n"); write_log ("Build date: " __DATE__ " " __TIME__ "\n");
} }
@ -533,29 +529,7 @@ static void parse_cmdline (int argc, char **argv)
} }
} }
#endif #endif
/*
static void parse_user_conf_file(const char *extension)
{
// FIXME! ska: This is temporary, and will be removed when you can
// pass command line options in meta.xml for the homebrew channel
char user_options[255] = "";
char *user_argv[] = {"program", "-f", user_options};
#ifdef OPTIONS_IN_HOME
char *home = getenv ("HOME");
if (home != NULL && strlen (home) < 240)
{
strcpy (user_options, home);
strcat (user_options, "/");
}
#endif
strcat(user_options, OPTIONSFILENAME);
strcat(user_options, extension);
// Allow the user uaerc to override the default one
//parse_cmdline (3, user_argv);
// Until here
}
*/
static void parse_cmdline_and_init_file (int argc, char **argv) static void parse_cmdline_and_init_file (int argc, char **argv)
{ {
char *home; char *home;
@ -585,7 +559,7 @@ static void parse_cmdline_and_init_file (int argc, char **argv)
#ifdef OPTIONS_IN_HOME #ifdef OPTIONS_IN_HOME
/* sam: if not found in $HOME then look in current directory */ /* sam: if not found in $HOME then look in current directory */
char *saved_path = strdup (optionsfile); char *saved_path = strdup (optionsfile);
strcpy (optionsfile, OPTIONSFILENAME); strcpy (optionsfile, OPTIONSFILENAME);
if (! cfgfile_load (&currprefs, optionsfile, 0) ) { if (! cfgfile_load (&currprefs, optionsfile, 0) ) {
/* If not in current dir either, change path back to home /* If not in current dir either, change path back to home
@ -593,7 +567,7 @@ static void parse_cmdline_and_init_file (int argc, char **argv)
strcpy (optionsfile, saved_path); strcpy (optionsfile, saved_path);
} }
free (saved_path); free (saved_path);
#endif #endif
} }
@ -741,13 +715,13 @@ static int do_preinit_machine (int argc, char **argv)
init_shm (); init_shm ();
#endif #endif
rtarea_init ();
#ifdef FILESYS #ifdef FILESYS
rtarea_init ();
hardfile_install (); hardfile_install ();
#endif #endif
if (restart_config[0]) if (restart_config[0])
parse_cmdline_and_init_file (argc, argv); parse_cmdline_and_init_file (argc, argv);
else else
currprefs = changed_prefs; currprefs = changed_prefs;
@ -952,6 +926,7 @@ static void do_exit_machine (void)
#endif #endif
#ifdef FILESYS #ifdef FILESYS
filesys_cleanup (); filesys_cleanup ();
hardfile_cleanup ();
#endif #endif
#ifdef SAVESTATE #ifdef SAVESTATE
savestate_free (); savestate_free ();
@ -968,7 +943,7 @@ void real_main (int argc, char **argv)
{ {
show_version (); show_version ();
#if defined(FILESYS) #ifdef FILESYS
currprefs.mountinfo = changed_prefs.mountinfo = &options_mountinfo; currprefs.mountinfo = changed_prefs.mountinfo = &options_mountinfo;
#endif #endif
restart_program = 1; restart_program = 1;
@ -987,11 +962,11 @@ void real_main (int argc, char **argv)
do_preinit_machine (argc, argv); do_preinit_machine (argc, argv);
/* Should we open the GUI? TODO: This mess needs to go away */ /* Should we open the GUI? TODO: This mess needs to go away */
want_gui = currprefs.start_gui; want_gui = currprefs.start_gui;
if (restart_program == 2) if (restart_program == 2)
want_gui = 0; want_gui = 0;
else if (restart_program == 3) else if (restart_program == 3)
want_gui = 1; want_gui = 1;
changed_prefs = currprefs; changed_prefs = currprefs;
@ -1041,7 +1016,7 @@ void real_main (int argc, char **argv)
uae_target_state = UAE_STATE_RUNNING; uae_target_state = UAE_STATE_RUNNING;
/* /*
* Main Loop * Main Loop
*/ */
do { do {
set_state (uae_target_state); set_state (uae_target_state);
@ -1063,7 +1038,7 @@ void real_main (int argc, char **argv)
handle_events (); handle_events ();
/* Manually pump input device */ /* Manually pump input device */
inputdevicefunc_keyboard.read (); inputdevicefunc_keyboard.read ();
inputdevicefunc_mouse.read (); inputdevicefunc_mouse.read ();
inputdevicefunc_joystick.read (); inputdevicefunc_joystick.read ();
inputdevice_handle_inputcode (); inputdevice_handle_inputcode ();
@ -1096,7 +1071,7 @@ void real_main (int argc, char **argv)
do_exit_machine (); do_exit_machine ();
/* TODO: This stuff is a hack. What we need to do is /* TODO: This stuff is a hack. What we need to do is
* check whether a config GUI is available. If not, * check whether a config GUI is available. If not,
* then quit. * then quit.
*/ */
@ -1110,7 +1085,7 @@ int init_sdl (void)
{ {
int result = (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER /*| SDL_INIT_AUDIO*/) == 0); int result = (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER /*| SDL_INIT_AUDIO*/) == 0);
if (result) if (result)
atexit (SDL_Quit); atexit (SDL_Quit);
return result; return result;
} }

184
src/make_hdf.c Normal file
View File

@ -0,0 +1,184 @@
/*
* E-UAE - The portable Amiga Emulator
*
* make_hdf
*
* A quick hack to generate a hard file image and associated config option.
* Anybody want to show this rubbish some love, feel free.
*
* Copyright Richard Drummond 2007
*
*/
#include "sysconfig.h"
#include "sysdeps.h"
#include <ctype.h>
static void print_help (void)
{
fprintf (stderr, "make_hdf <path> <size> [<device>]\n");
fprintf (stderr, "\n");
fprintf (stderr, "<path> = file path to hdf image to create\n");
fprintf (stderr, "<size> = size of image to create in MB\n");
fprintf (stderr, " follow <size> by G to specify size in GB\n");
fprintf (stderr, "<device> = device name to include in config option\n");
fprintf (stderr, " defaults to DH0 if omitted\n");
}
static int create_hdf (const char *path, off_t size)
{
FILE *f;
void *buf;
const size_t CHUNK_SIZE = 4096;
f = fopen (path, "wb+");
if (f) {
if (size == 0) {
fclose (f);
return 0;
}
/*
* Try it the easy way.
*/
if (fseeko (f, size - 1, SEEK_SET) == 0) {
fputc (0, f);
if (fseeko (f, 0, SEEK_SET) == 0) {
fclose (f);
return 0;
}
}
/*
* Okay. That failed. Let's assume seeking passed
* the end of a file ain't supported. Do it the
* hard way.
*/
fseeko (f, 0, SEEK_SET);
buf = calloc (1, CHUNK_SIZE);
while (size >= (off_t) CHUNK_SIZE) {
if (fwrite (buf, CHUNK_SIZE, 1, f) != 1)
break;
size -= CHUNK_SIZE;
}
if (size < (off_t) CHUNK_SIZE) {
if (size == 0 || fwrite (buf, (size_t)size, 1, f) == 1) {
fclose (f);
return 0;
}
}
}
perror ("Failed creating hdf");
if (f) {
fclose (f);
/* TODO: Should probably delete failed image here. */
}
return -1;
}
int main (int argc, char *argv[])
{
const char *hdf_path;
const char *device_name = "DH0";
uae_u64 size;
char *size_spec;
uae_u32 block_size = 512;
uae_u64 num_blocks;
uae_u32 cylinders;
uae_u32 blocks_per_track;
uae_u32 surfaces;
if (argc < 3 || strcmp (argv[1], "-h") == 0) {
print_help ();
exit (EXIT_SUCCESS);
}
hdf_path = argv[1];
size = strtoll(argv[2], &size_spec, 10);
if (argv[3])
device_name = argv[3];
/* Munge size specifier */
if (size > 0) {
char c = (toupper(*size_spec));
if (c == 'K')
size *= 1024;
else if (c == 'M' || c == '\0')
size *= 1024 * 1024;
else if (c == 'G')
size *= 1024 * 1024 * 1024;
else
size = 0;
}
if (size <= 0) {
fprintf (stderr, "Invalid size\n");
exit (EXIT_FAILURE);
}
if ((size >= (1LL << 31)) && (sizeof (off_t) < sizeof (uae_u64))) {
fprintf (stderr, "Specified size too large (2GB file size is maximum).\n");
exit (EXIT_FAILURE);
}
num_blocks = size / block_size;
/* We don't want more than (2^32)-1 blocks */
if (num_blocks >= (1LL << 32)) {
fprintf (stderr, "Specified size too large (too many blocks).\n");
exit (EXIT_FAILURE);
}
/*
* Try and work out some plausible geometry
*
* We try and set surfaces and blocks_per_track to keep
* cylinders < 65536. Prior to OS 3.9, FFS had problems with
* more cylinders than that.
*/
/* The default practice in UAE hardfiles, so let's start there. */
blocks_per_track = 32;
surfaces = 1;
cylinders = num_blocks / (blocks_per_track * surfaces);
if (cylinders == 0) {
fprintf (stderr, "Specified size is too small.\n");
exit (EXIT_FAILURE);
}
while (cylinders > 65535 && surfaces < 255) {
surfaces++;
cylinders = num_blocks / (blocks_per_track * surfaces);
}
while (cylinders > 65535 && blocks_per_track < 255) {
blocks_per_track++;
cylinders = num_blocks / (blocks_per_track * surfaces);
}
/* Calculate size based on above geometry */
num_blocks = (uae_u64)cylinders * surfaces * blocks_per_track;
/* make file */
if (create_hdf (hdf_path, num_blocks * block_size) < 0)
return EXIT_FAILURE;
/* output_spec */
printf ("hardfile2=rw,%s:%s,%d,%d,%d,%d,%d,\n", device_name, hdf_path, blocks_per_track, surfaces, 2, block_size, 0);
printf ("hardfile=rw,%d,%d,%d,%d,%s\n", blocks_per_track, surfaces, 2, block_size, hdf_path);
return EXIT_SUCCESS;
}

View File

@ -26,19 +26,19 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
// d0 3=readsamples d1=unit a0=addr read samples from card ret: d0=samples read // d0 3=readsamples d1=unit a0=addr read samples from card ret: d0=samples read
// make sure you have from amigaside blksize*4 mem alloced // make sure you have from amigaside blksize*4 mem alloced
// d0=-1 no data available d0=-2 no recording open // d0=-1 no data available d0=-2 no recording open
// d0 > 0 there are more blksize Data in the que // d0 > 0 there are more blksize Data in the que
// do the loop until d0 get 0 // do the loop until d0 get 0
// if d0 is greater than 200 bring a message // if d0 is greater than 200 bring a message
// that show the user that data is lost // that show the user that data is lost
// maximum blocksbuffered are 250 (8,5 sec) // maximum blocksbuffered are 250 (8,5 sec)
// d0 4=writeinterrupt d1=unit d0=0 no interrupt happen for this unit // d0 4=writeinterrupt d1=unit d0=0 no interrupt happen for this unit
// d0=-2 no playing open // d0=-2 no playing open
//note units for now not support use only unit 0 //note units for now not support use only unit 0
// d0=10 get clipboard size d0=size in bytes // d0=10 get clipboard size d0=size in bytes
// d0=11 get clipboard data a0=clipboarddata // d0=11 get clipboard data a0=clipboarddata
//Note: a get clipboard size must do before //Note: a get clipboard size must do before
// d0=12 write clipboard data a0=clipboarddata // d0=12 write clipboard data a0=clipboarddata
// d0=13 setp96mouserate d1=hz value // d0=13 setp96mouserate d1=hz value
// d0=100 open dll d1=dll name in windows name conventions // d0=100 open dll d1=dll name in windows name conventions
@ -55,14 +55,14 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
int opcode = m68k_dreg (&context->regs, 0); int opcode = m68k_dreg (&context->regs, 0);
switch (opcode) { switch (opcode) {
int i, slen, t, todo, byte1, byte2; int i, slen, t, todo, byte1, byte2;
uae_u32 src, num_vars; uae_u32 src, num_vars;
static int cap_pos, clipsize; static int cap_pos, clipsize;
#if 0 #if 0
LPTSTR p, p2, pos1, pos2; LPTSTR p, p2, pos1, pos2;
static LPTSTR clipdat; static LPTSTR clipdat;
#endif #endif
int cur_pos; int cur_pos;
/* /*
* AHI emulation support * AHI emulation support
@ -82,7 +82,7 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
case 2: case 2:
addr=(char *)m68k_areg (&context->regs, 0); addr=(char *)m68k_areg (&context->regs, 0);
for (i = 0; i < (amigablksize*4); i += 4) { for (i = 0; i < (amigablksize*4); i += 4) {
ahisndbufpt[0] = get_long((unsigned int)addr + i); ahisndbufpt[0] = get_long ((unsigned int)addr + i);
ahisndbufpt+=1; ahisndbufpt+=1;
/*ahisndbufpt[0]=chipmem_bget((unsigned int)addr+i+2); /*ahisndbufpt[0]=chipmem_bget((unsigned int)addr+i+2);
ahisndbufpt+=1; ahisndbufpt+=1;
@ -106,7 +106,7 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
else else
todo = cur_pos + (RECORDBUFFER * t) - cap_pos; todo = cur_pos + (RECORDBUFFER * t) - cap_pos;
if (todo < t) { if (todo < t) {
//if no complete buffer ready exit //if no complete buffer ready exit
return -1; return -1;
} }
i = IDirectSoundCaptureBuffer_Lock (lpDSB2r, cap_pos, t, &pos1, &byte1, &pos2, &byte2, 0); i = IDirectSoundCaptureBuffer_Lock (lpDSB2r, cap_pos, t, &pos1, &byte1, &pos2, &byte2, 0);
@ -253,7 +253,7 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
oldnum = uaevar.changenum; oldnum = uaevar.changenum;
return 1; return 1;
} }
case 105: //returns memory offset case 105: //returns memory offset
return (uae_u32) get_real_address (0); return (uae_u32) get_real_address (0);
case 106: //byteswap 16bit vars case 106: //byteswap 16bit vars
//a0 = start address //a0 = start address
@ -319,7 +319,7 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
BSWAP_WORD_END: BSWAP_WORD_END:
} }
return (uae_u32) bswap_buffer; return (uae_u32) bswap_buffer;
case 107: //byteswap 32bit vars - see case 106 case 107: //byteswap 32bit vars - see case 106
//a0 = start address //a0 = start address
//d1 = number of 32bit vars //d1 = number of 32bit vars
//returns address of new array //returns address of new array
@ -389,6 +389,7 @@ static uae_u32 REGPARAM2 misc_demux (TrapContext *context)
void misc_hsync_stuff (void) void misc_hsync_stuff (void)
{ {
#ifdef FILESYS
static int misc_demux_installed; static int misc_demux_installed;
#ifdef AHI #ifdef AHI
@ -413,4 +414,5 @@ void misc_hsync_stuff (void)
org (a); org (a);
misc_demux_installed = 1; misc_demux_installed = 1;
} }
#endif
} }

View File

@ -373,9 +373,9 @@ void init_m68k (void)
struct regstruct regs; struct regstruct regs;
static uae_s32 m68kpc_offset; static uae_s32 m68kpc_offset;
#define get_ibyte_1(regs, o) get_byte((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o) + 1) #define get_ibyte_1(regs, o) get_byte ((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o) + 1)
#define get_iword_1(regs, o) get_word((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o)) #define get_iword_1(regs, o) get_word ((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o))
#define get_ilong_1(regs, o) get_long((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o)) #define get_ilong_1(regs, o) get_long ((regs)->pc + ((regs)->pc_p - (regs)->pc_oldp) + (o))
static uae_s32 ShowEA (void *f, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf, uae_u32 *eaddr, int safemode) static uae_s32 ShowEA (void *f, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf, uae_u32 *eaddr, int safemode)
{ {
@ -690,11 +690,14 @@ void REGPARAM2 MakeFromSR (struct regstruct *regs)
} }
} }
/* Interrupt priority level may have changed. Assert SPCFLAG_INT
* to check if there's an IRQ ready to go at the new level. */
set_special (regs, SPCFLAG_INT); set_special (regs, SPCFLAG_INT);
if (regs->t1 || regs->t0) if (regs->t1 || regs->t0)
set_special (regs, SPCFLAG_TRACE); set_special (regs, SPCFLAG_TRACE);
else else
/* Keep SPCFLAG_DOTRACE, we still want a trace exception for /* Keep SPCFLAG_DOTRACE, we still want a trace exception for
SR-modifying instructions (including STOP). */ SR-modifying instructions (including STOP). */
unset_special (regs, SPCFLAG_TRACE); unset_special (regs, SPCFLAG_TRACE);
} }
@ -976,15 +979,12 @@ void REGPARAM2 Exception (int nr, struct regstruct *regs, uaecptr oldpc)
STATIC_INLINE void service_interrupt (unsigned int level, struct regstruct *regs) STATIC_INLINE void service_interrupt (unsigned int level, struct regstruct *regs)
{ {
if (level > regs->intmask) { regs->stopped = 0;
unset_special (regs, SPCFLAG_STOP);
regs->stopped = 0; Exception (level + 24, regs, 0);
unset_special (regs, SPCFLAG_STOP);
Exception (level + 24, regs, 0); regs->intmask = level;
regs->intmask = level;
}
} }
/* /*
@ -1472,7 +1472,7 @@ unsigned long REGPARAM2 op_illg (uae_u32 opcode, struct regstruct *regs)
if ((opcode & 0xF000) == 0xF000) { if ((opcode & 0xF000) == 0xF000) {
if (warned < 20) { if (warned < 20) {
write_log ("B-Trap %04x at %08x (%p)\n", opcode, m68k_getpc (regs) + m68kpc_offset, regs->pc_p); write_log ("B-Trap %04x at %08x (%p)\n", opcode, m68k_getpc (regs) + m68kpc_offset, regs->pc_p);
warned++; warned++;
} }
Exception (0xB, regs, 0); Exception (0xB, regs, 0);
@ -1600,13 +1600,13 @@ static NOINLINE void do_stop (struct regstruct *regs)
/* Avoid small numbers of STOP cycles. Arbitrary number here. */ /* Avoid small numbers of STOP cycles. Arbitrary number here. */
if (stop_count > 32) { if (stop_count > 32) {
frame_time_t curr_time = uae_gethrtime (); frame_time_t curr_time = uae_gethrtime ();
uae_msleep (1); uae_msleep (1);
idletime += uae_gethrtime() - curr_time; idletime += uae_gethrtime() - curr_time;
} }
} }
} }
} }
@ -1697,12 +1697,14 @@ STATIC_INLINE int do_specialties (int cycles, struct regstruct *regs)
* In non-cycle-exact mode we handle this by separating the interrupt request * In non-cycle-exact mode we handle this by separating the interrupt request
* pending (SPCFLAG_INT) and interrupt request arrived (SPCFLAG_DOINT) events. * pending (SPCFLAG_INT) and interrupt request arrived (SPCFLAG_DOINT) events.
* This ensures that there's always a delay of one opcode (and so at least 2 * This ensures that there's always a delay of one opcode (and so at least 2
* machine cycles) between the interrupt controller requesting an interrupt * machine cycles) between the interrupt controller requesting an interrupt or
* and us servicing it here. * the processor changing its interrupt priority level and us servicing it here.
* *
* In cycle-exact mode, there's just one event (SPCFLAG_INT) and the delay is * In cycle-exact mode, there's just one event (SPCFLAG_INT) and the delay is
* handled internally by the interrupt controller code in custom.c - intlev() * handled internally by the interrupt controller code in custom.c - intlev()
* and friends. * and friends.
*
* This stuff needs some tidying up!
*/ */
if ((regs->spcflags & SPCFLAG_DOINT) || if ((regs->spcflags & SPCFLAG_DOINT) ||
(currprefs.cpu_cycle_exact && (regs->spcflags & SPCFLAG_INT))) { (currprefs.cpu_cycle_exact && (regs->spcflags & SPCFLAG_INT))) {
@ -1711,8 +1713,15 @@ STATIC_INLINE int do_specialties (int cycles, struct regstruct *regs)
unset_special (regs, SPCFLAG_DOINT); unset_special (regs, SPCFLAG_DOINT);
if (intr != -1) if (intr > (int)regs->intmask) {
if (currprefs.cpu_cycle_exact)
unset_special(regs, SPCFLAG_INT);
service_interrupt (intr, regs); service_interrupt (intr, regs);
} else {
if (intr < 0 && currprefs.cpu_cycle_exact)
unset_special (regs, SPCFLAG_INT);
}
} }
if ((regs->spcflags & SPCFLAG_INT) && !currprefs.cpu_cycle_exact) { if ((regs->spcflags & SPCFLAG_INT) && !currprefs.cpu_cycle_exact) {

View File

@ -466,8 +466,8 @@ static void do_fillrect (uae_u8 *src, int x, int y, int width, int height,
* display-emulation on a 16-bit or higher screen. */ * display-emulation on a 16-bit or higher screen. */
if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat) { if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat) {
# ifndef WORDS_BIGENDIAN # ifndef WORDS_BIGENDIAN
if (Bpp > 1) if (Bpp > 1)
if (!(Bpp == 4 && need_argb32_hack)) if (!(Bpp == 4 && need_argb32_hack))
pen = bswap_32 (pen); pen = bswap_32 (pen);
# else # else
if (Bpp == 4 && need_argb32_hack) if (Bpp == 4 && need_argb32_hack)
@ -586,7 +586,7 @@ static void do_blit (struct RenderInfo *ri, int Bpp, int srcx, int srcy,
* Call OS blitting function that can do it in video memory. * Call OS blitting function that can do it in video memory.
* Should return if it was successful * Should return if it was successful
*/ */
if (DX_Blit (srcx, srcy, dstx, dsty, width, height, opcode)) if (DX_Blit (srcx, srcy, dstx, dsty, width, height, opcode))
return; return;
} }
@ -733,9 +733,9 @@ STATIC_INLINE void write_currline (uae_u8 *srcp, int line_no, int first_byte, in
dstp += line_no * picasso_vidinfo.rowbytes + first_byte; dstp += line_no * picasso_vidinfo.rowbytes + first_byte;
if (need_argb32_hack && Bpp == 4) if (need_argb32_hack && Bpp == 4)
memcpy_bswap32 (dstp, srcp, byte_count); memcpy_bswap32 (dstp, srcp, byte_count);
else else
memcpy (dstp, srcp, byte_count); memcpy (dstp, srcp, byte_count);
} else { } else {
dstp += line_no * picasso_vidinfo.rowbytes + first_byte * Bpp; dstp += line_no * picasso_vidinfo.rowbytes + first_byte * Bpp;
@ -755,7 +755,7 @@ STATIC_INLINE void write_currline (uae_u8 *srcp, int line_no, int first_byte, in
} }
} }
} }
gfx_unlock_picasso (); gfx_unlock_picasso ();
} }
} }
@ -850,7 +850,7 @@ void picasso_refresh (int call_setpalette)
ri.BytesPerRow = picasso96_state.BytesPerRow; ri.BytesPerRow = picasso96_state.BytesPerRow;
ri.RGBFormat = picasso96_state.RGBFormat; ri.RGBFormat = picasso96_state.RGBFormat;
if (set_panning_called) { if (set_panning_called) {
width = picasso96_state.VirtualWidth; width = picasso96_state.VirtualWidth;
height = picasso96_state.VirtualHeight; height = picasso96_state.VirtualHeight;
} else { } else {
@ -976,7 +976,7 @@ STATIC_INLINE void do_blitrect_frame_buffer (struct RenderInfo *ri,
break; break;
} }
case BLIT_LAST: case BLIT_LAST:
write_log( "P96: ERROR - do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n"); write_log ( "P96: ERROR - do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break; break;
} /* switch opcode */ } /* switch opcode */
} // for end } // for end
@ -1048,7 +1048,7 @@ STATIC_INLINE void do_blitrect_frame_buffer (struct RenderInfo *ri,
dst += dstri->BytesPerRow; dst += dstri->BytesPerRow;
} /* for height */ } /* for height */
} }
return; return;
} }
// (mask != 0xFF && Bpp <= 1) // (mask != 0xFF && Bpp <= 1)
tmp3 = tmp2 = tmp = xmalloc (linewidth * height); /* allocate enough memory for the src-rect */ tmp3 = tmp2 = tmp = xmalloc (linewidth * height); /* allocate enough memory for the src-rect */
@ -1153,28 +1153,84 @@ static void FillBoardInfo (uaecptr amigamemptr, struct LibResolution *res,
dm->res.width * dm->res.height * dm->refresh); dm->res.width * dm->res.height * dm->refresh);
} }
static uae_u32 AssignModeID (int i, int count) struct modeids {
int width, height;
int id;
};
static const struct modeids mi[] =
{ {
if (DisplayModes[i].res.width == 320 && DisplayModes[i].res.height == 200) /* "original" modes */
return 0x50001000;
else if (DisplayModes[i].res.width == 320 && DisplayModes[i].res.height == 240)
return 0x50011000;
else if (DisplayModes[i].res.width == 640 && DisplayModes[i].res.height == 400)
return 0x50021000;
else if (DisplayModes[i].res.width == 640 && DisplayModes[i].res.height == 480)
return 0x50031000;
else if (DisplayModes[i].res.width == 800 && DisplayModes[i].res.height == 600)
return 0x50041000;
else if (DisplayModes[i].res.width == 1024 && DisplayModes[i].res.height == 768)
return 0x50051000;
else if (DisplayModes[i].res.width == 1152 && DisplayModes[i].res.height == 864)
return 0x50061000;
else if (DisplayModes[i].res.width == 1280 && DisplayModes[i].res.height == 1024)
return 0x50071000;
else if (DisplayModes[i].res.width == 1600 && DisplayModes[i].res.height == 1280)
return 0x50081000;
return 0x50091000 + count * 0x10000; { 320, 200, 0 },
{ 320, 240, 1 },
{ 640, 400, 2 },
{ 640, 480, 3 },
{ 800, 600, 4 },
{ 1024, 768, 5 },
{ 1152, 864, 6 },
{ 1280,1024, 7 },
{ 1600,1280, 8 },
/* new modes */
{ 704, 480, 129 },
{ 704, 576, 130 },
{ 720, 480, 131 },
{ 720, 576, 132 },
{ 768, 483, 133 },
{ 768, 576, 134 },
{ 800, 480, 135 },
{ 848, 480, 136 },
{ 854, 480, 137 },
{ 948, 576, 138 },
{ 1024, 576, 139 },
{ 1152, 768, 140 },
{ 1152, 864, 141 },
{ 1280, 720, 142 },
{ 1280, 768, 143 },
{ 1280, 800, 144 },
{ 1280, 854, 145 },
{ 1280, 960, 146 },
{ 1366, 768, 147 },
{ 1440, 900, 148 },
{ 1440, 960, 149 },
{ 1600,1200, 150 },
{ 1680,1050, 151 },
{ 1920,1080, 152 },
{ 1920,1200, 153 },
{ 2048,1152, 154 },
{ 2048,1536, 155 },
{ 2560,1600, 156 },
{ 2560,2048, 157 },
{ 400, 300, 158 },
{ 512, 384, 159 },
{ 640, 432, 160 },
{ 1360, 768, 161 },
{ 1360,1024, 162 },
{ 1400,1050, 163 },
{ 1792,1344, 164 },
{ 1800,1440, 165 },
{ 1856,1392, 166 },
{ 1920,1440, 167 },
{ 480, 360, 168 },
{ 640, 350, 169 },
{ 1600, 900, 170 },
{ 960, 600, 171 },
{ 1088, 612, 172 },
{ -1, -1, 0 }
};
static uae_u32 AssignModeID (int w, int h, unsigned int *non_standard_count)
{
unsigned int i;
for (i = 0; mi[i].width > 0; i++) {
if (w == mi[i].width && h == mi[i].height)
return 0x50001000 | (mi[i].id * 0x10000);
}
(*non_standard_count)++;
write_log ("P96: Non-stanard mode %dx%d\n", w, h);
return 0x51001000 - (*non_standard_count) * 0x10000;
} }
/**************************************** /****************************************
@ -1204,6 +1260,7 @@ uae_u32 REGPARAM2 picasso_InitCard (struct regstruct *regs)
{ {
struct LibResolution res; struct LibResolution res;
int i; int i;
unsigned int non_standard_count = 0;
int ModeInfoStructureCount = 1, LibResolutionStructureCount = 0; int ModeInfoStructureCount = 1, LibResolutionStructureCount = 0;
uaecptr amigamemptr = 0; uaecptr amigamemptr = 0;
uaecptr AmigaBoardInfo = m68k_areg (regs, 2); uaecptr AmigaBoardInfo = m68k_areg (regs, 2);
@ -1226,7 +1283,7 @@ uae_u32 REGPARAM2 picasso_InitCard (struct regstruct *regs)
for (i = 0; i < mode_count;) { for (i = 0; i < mode_count;) {
int j = i; int j = i;
/* Add a LibResolution structure to the ResolutionsList MinList in our BoardInfo */ /* Add a LibResolution structure to the ResolutionsList MinList in our BoardInfo */
res.DisplayID = AssignModeID (i, LibResolutionStructureCount); res.DisplayID = AssignModeID (DisplayModes[i].res.width, DisplayModes[i].res.height, &non_standard_count);
res.BoardInfo = AmigaBoardInfo; res.BoardInfo = AmigaBoardInfo;
res.Width = DisplayModes[i].res.width; res.Width = DisplayModes[i].res.width;
res.Height = DisplayModes[i].res.height; res.Height = DisplayModes[i].res.height;
@ -1462,7 +1519,7 @@ static void init_picasso_screen (void)
if (set_panning_called) { if (set_panning_called) {
picasso96_state.Extent = picasso96_state.Address picasso96_state.Extent = picasso96_state.Address
+ (picasso96_state.BytesPerRow * vheight); + (picasso96_state.BytesPerRow * vheight);
xoff = picasso96_state.XOffset; xoff = picasso96_state.XOffset;
yoff = picasso96_state.YOffset; yoff = picasso96_state.YOffset;
} }
@ -1647,8 +1704,8 @@ uae_u32 REGPARAM2 picasso_InvertRect (struct regstruct *regs)
do_invertrect (&ri, Bpp, X, Y, Width, Height); do_invertrect (&ri, Bpp, X, Y, Width, Height);
else else
do_blit (&ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0); do_blit (&ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0);
} }
result = 1; result = 1;
} }
return result; return result;
} }
@ -1840,7 +1897,7 @@ uae_u32 REGPARAM2 picasso_FillRect (struct regstruct *regs)
do_blit (&ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0); do_blit (&ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0);
result = 1; result = 1;
} }
} }
} }
return result; return result;
} }
@ -1902,8 +1959,8 @@ STATIC_INLINE int BlitRectHelper (void)
int can_do_visible_blit = 0; int can_do_visible_blit = 0;
if (opcode == BLIT_DST) { if (opcode == BLIT_DST) {
write_log ("P96: WARNING - BlitRect() being called with opcode of BLIT_DST\n"); write_log ("P96: WARNING - BlitRect() being called with opcode of BLIT_DST\n");
return 1; return 1;
} }
/* /*
@ -1941,16 +1998,16 @@ STATIC_INLINE int BlitRectHelper (void)
P96TRACE (("P96: Did do_blit 1 in BlitRect()\n")); P96TRACE (("P96: Did do_blit 1 in BlitRect()\n"));
} else { } else {
P96TRACE (("P96: Did not do_blit 1 in BlitRect()\n")); P96TRACE (("P96: Did not do_blit 1 in BlitRect()\n"));
} }
return 1; return 1;
} }
STATIC_INLINE int BlitRect (uaecptr ri, uaecptr dstri, STATIC_INLINE int BlitRect (uaecptr ri, uaecptr dstri,
unsigned long srcx, unsigned long srcy, unsigned long srcx, unsigned long srcy,
unsigned long dstx, unsigned long dsty, unsigned long dstx, unsigned long dsty,
unsigned long width, unsigned long height, unsigned long width, unsigned long height,
uae_u8 mask, BLIT_OPCODE opcode) uae_u8 mask, BLIT_OPCODE opcode)
{ {
/* Set up the params */ /* Set up the params */
@ -2011,7 +2068,7 @@ uae_u32 REGPARAM2 picasso_BlitRect (struct regstruct *regs)
P96TRACE (("P96: BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy, P96TRACE (("P96: BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy,
dstx, dsty, width, height, Mask)); dstx, dsty, width, height, Mask));
result = BlitRect (renderinfo, (uaecptr)NULL, srcx, srcy, dstx, dsty, result = BlitRect (renderinfo, 0, srcx, srcy, dstx, dsty,
width, height, Mask, BLIT_SRC); width, height, Mask, BLIT_SRC);
return result; return result;
@ -2164,7 +2221,7 @@ uae_u32 REGPARAM picasso_BlitPattern (struct regstruct *regs)
wgfx_flushline (); wgfx_flushline ();
if (CopyRenderInfoStructureA2U (rinf, &ri) if (CopyRenderInfoStructureA2U (rinf, &ri)
&& CopyPatternStructureA2U (pinf, &pattern)) { && CopyPatternStructureA2U (pinf, &pattern)) {
Bpp = GetBytesPerPixel (ri.RGBFormat); Bpp = GetBytesPerPixel (ri.RGBFormat);
uae_mem = ri.Memory + Y*ri.BytesPerRow + X*Bpp; /* offset with address */ uae_mem = ri.Memory + Y*ri.BytesPerRow + X*Bpp; /* offset with address */
@ -2179,7 +2236,7 @@ uae_u32 REGPARAM picasso_BlitPattern (struct regstruct *regs)
if( pattern.DrawMode == COMP) if( pattern.DrawMode == COMP)
P96TRACE (("P96: WARNING - BlitPattern() has unhandled mask 0x%x with"\ P96TRACE (("P96: WARNING - BlitPattern() has unhandled mask 0x%x with"\
" COMP DrawMode. Using fall-back routine.\n", Mask)); " COMP DrawMode. Using fall-back routine.\n", Mask));
else else
result = 1; result = 1;
} else } else
@ -2255,17 +2312,17 @@ uae_u32 REGPARAM picasso_BlitPattern (struct regstruct *regs)
} /* switch (Bpp) */ } /* switch (Bpp) */
} }
break; break;
} /* switch (pattern.DrawMode) */ } /* switch (pattern.DrawMode) */
} /* for (bits) */ } /* for (bits) */
} /* for (cols) */ } /* for (cols) */
} /* for (rows) */ } /* for (rows) */
/* If we need to update a second-buffer (extra_mem is set), then do it only if visible! */ /* If we need to update a second-buffer (extra_mem is set), then do it only if visible! */
if (picasso_vidinfo.extra_mem && renderinfo_is_current_screen (&ri)) if (picasso_vidinfo.extra_mem && renderinfo_is_current_screen (&ri))
do_blit (&ri, Bpp, X, Y, X, Y, W, H, BLIT_SRC, 0); do_blit (&ri, Bpp, X, Y, X, Y, W, H, BLIT_SRC, 0);
result = 1; result = 1;
} }
} }
return result; return result;
} }
@ -2337,13 +2394,13 @@ uae_u32 REGPARAM2 picasso_BlitTemplate (struct regstruct *regs)
# endif # endif
return 0; return 0;
} else } else
result = 1; result = 1;
} else } else
result = 1; result = 1;
#if 1 #if 1
if (tmp.DrawMode == COMP) { if (tmp.DrawMode == COMP) {
/* workaround, let native blitter handle COMP mode */ /* workaround, let native blitter handle COMP mode */
# if 0 //def _WIN32 # if 0 //def _WIN32
flushpixels(); flushpixels();
# endif # endif
@ -2499,7 +2556,7 @@ static void PlanarToChunky (struct RenderInfo *ri, struct BitMap *bm,
uae_u8 *PLANAR[8]; uae_u8 *PLANAR[8];
uae_u8 *image = ri->Memory + dstx * GetBytesPerPixel (ri->RGBFormat) uae_u8 *image = ri->Memory + dstx * GetBytesPerPixel (ri->RGBFormat)
+ dsty * ri->BytesPerRow; + dsty * ri->BytesPerRow;
int Depth = bm->Depth; int Depth = bm->Depth;
unsigned long rows, bitoffset = srcx & 7; unsigned long rows, bitoffset = srcx & 7;
long eol_offset; long eol_offset;
@ -2600,7 +2657,7 @@ uae_u32 REGPARAM2 picasso_BlitPlanar2Chunky (struct regstruct *regs)
return 0; return 0;
} }
if (!CopyRenderInfoStructureA2U (ri, &local_ri) if (!CopyRenderInfoStructureA2U (ri, &local_ri)
|| !CopyBitMapStructureA2U (bm, &local_bm)) || !CopyBitMapStructureA2U (bm, &local_bm))
return 0; return 0;
P96TRACE (("P96: BlitPlanar2Chunky(%d, %d, %d, %d, %d, %d) Minterm 0x%x," P96TRACE (("P96: BlitPlanar2Chunky(%d, %d, %d, %d, %d, %d) Minterm 0x%x,"
@ -2774,7 +2831,7 @@ uae_u32 REGPARAM2 picasso_BlitPlanar2Direct (struct regstruct *regs)
" Using fall-back routine.\n")); " Using fall-back routine.\n"));
} }
} else { } else {
P96TRACE (("P96: WARNING - BlitPlanar2Direct () has unhandled op-code" P96TRACE (("P96: WARNING - BlitPlanar2Direct () has unhandled op-code"
" 0x%x. Using fall-back routine.\n", minterm)); " 0x%x. Using fall-back routine.\n", minterm));
} }
return result; return result;
@ -2803,22 +2860,22 @@ uae_u32 REGPARAM2 picasso_BlitPlanar2Direct (struct regstruct *regs)
STATIC_INLINE void flush_write (uaecptr addr, uae_u8 size) STATIC_INLINE void flush_write (uaecptr addr, uae_u8 size)
{ {
if (picasso_on) { if (picasso_on) {
/* Is this data on the same framebuffer line as previous /* Is this data on the same framebuffer line as previous
* successive writes? */ * successive writes? */
if (addr >= currline_start && (addr + size) <= currline_end) { if (addr >= currline_start && (addr + size) <= currline_end) {
/* Yes. Don't flush now. We'll flush the whole line later */ /* Yes. Don't flush now. We'll flush the whole line later */
if (addr < currline_min) if (addr < currline_min)
currline_min = addr; currline_min = addr;
if ((addr + size) > currline_max) if ((addr + size) > currline_max)
currline_max = addr + size; currline_max = addr + size;
} else { } else {
/* Otherwise, this data is on different line, or /* Otherwise, this data is on different line, or
* we don't have a current line */ * we don't have a current line */
int line_no; int line_no;
/* If there is a current line, flush it to the display now */ /* If there is a current line, flush it to the display now */
if (currline_start != 0xFFFFFFFF) if (currline_start != 0xFFFFFFFF)
flush_currline (); flush_currline ();
/* Now we need to set up a new current line, starting with this /* Now we need to set up a new current line, starting with this
* write.*/ * write.*/
@ -2827,13 +2884,13 @@ STATIC_INLINE void flush_write (uaecptr addr, uae_u8 size)
/* If this line is outside of the p96 screen in the framebuffer /* If this line is outside of the p96 screen in the framebuffer
* we ignore it */ * we ignore it */
if ((line_no >= picasso96_state.YOffset) && (line_no < picasso96_state.YOffset + picasso96_state.Height)) { if ((line_no >= picasso96_state.YOffset) && (line_no < picasso96_state.YOffset + picasso96_state.Height)) {
currline_start = picasso96_state.Address + line_no * picasso96_state.BytesPerRow; currline_start = picasso96_state.Address + line_no * picasso96_state.BytesPerRow;
currline_end = currline_start + picasso96_state.BytesPerRow; currline_end = currline_start + picasso96_state.BytesPerRow;
currline_min = addr; currline_min = addr;
currline_max = addr+size; currline_max = addr+size;
currline_y = line_no; currline_y = line_no;
} }
} }
} }
} }
@ -2939,13 +2996,13 @@ int picasso_display_mode_index (uae_u32 x, uae_u32 y, uae_u32 d)
{ {
int i; int i;
for (i = 0; i < mode_count; i++) { for (i = 0; i < mode_count; i++) {
if (DisplayModes[i].res.width == x if (DisplayModes[i].res.width == x
&& DisplayModes[i].res.height == y && DisplayModes[i].res.height == y
&& DisplayModes[i].depth == (int)d) && DisplayModes[i].depth == (int)d)
break; break;
} }
if (i == mode_count) if (i == mode_count)
i = -1; i = -1;
return i; return i;
} }
@ -2988,14 +3045,14 @@ void InitPicasso96 (void)
} }
mode_count = DX_FillResolutions (&picasso96_pixel_format); mode_count = DX_FillResolutions (&picasso96_pixel_format);
qsort (DisplayModes, mode_count, sizeof (struct PicassoResolution), qsort (DisplayModes, mode_count, sizeof (struct PicassoResolution),
resolution_compare); resolution_compare);
/* Work-around for possible P96 bug. A8R8G8B8 modes have /* Work-around for possible P96 bug. A8R8G8B8 modes have
* palette emulation issues. Tell the world we have a * palette emulation issues. Tell the world we have a
* a BGRA mode instead (and we'll byte-swap all pixels output). * a BGRA mode instead (and we'll byte-swap all pixels output).
*/ */
if (picasso_vidinfo.rgbformat == RGBFB_A8R8G8B8) { if (picasso_vidinfo.rgbformat == RGBFB_A8R8G8B8) {
picasso_vidinfo.rgbformat = RGBFB_B8G8R8A8; picasso_vidinfo.rgbformat = RGBFB_B8G8R8A8;
picasso96_pixel_format &= RGBFF_CHUNKY; picasso96_pixel_format &= RGBFF_CHUNKY;
picasso96_pixel_format |= 1 << picasso_vidinfo.rgbformat; picasso96_pixel_format |= 1 << picasso_vidinfo.rgbformat;

View File

@ -1,242 +1,237 @@
/* /*
* UAE - The Un*x Amiga Emulator * UAE - The Un*x Amiga Emulator
* *
* Support for SDL sound * Support for SDL sound
* *
* Copyright 1997 Bernd Schmidt * Copyright 1997 Bernd Schmidt
* Copyright 2003-2006 Richard Drummond * Copyright 2003-2006 Richard Drummond
*/ */
#include "sysconfig.h" #include "sysconfig.h"
#include "sysdeps.h" #include "sysdeps.h"
#include "options.h" #include "options.h"
#include "gensound.h" #include "gensound.h"
#include "sounddep/sound.h" #include "sounddep/sound.h"
#include "threaddep/thread.h" #include "threaddep/thread.h"
#include <SDL_audio.h> #include <SDL_audio.h>
#include <SDL.h> #include <SDL.h>
static int have_sound = 0; static int have_sound = 0;
uae_u16 sndbuffer[44100]; uae_u16 sndbuffer[44100];
uae_u16 *sndbufpt; uae_u16 *sndbufpt;
int sndbufsize; int sndbufsize;
static SDL_AudioSpec spec; static SDL_AudioSpec spec;
static smp_comm_pipe to_sound_pipe; static smp_comm_pipe to_sound_pipe;
static uae_sem_t data_available_sem, callback_done_sem, sound_init_sem; static uae_sem_t data_available_sem, callback_done_sem, sound_init_sem;
static int in_callback, closing_sound; static int in_callback, closing_sound;
static void clearbuffer (void) static void clearbuffer (void)
{ {
memset (sndbuffer, (spec.format == AUDIO_U8) ? SOUND8_BASE_VAL : SOUND16_BASE_VAL, sizeof (sndbuffer)); memset (sndbuffer, 0, sizeof (sndbuffer));
} }
/* This shouldn't be necessary . . . */ /* This shouldn't be necessary . . . */
static void dummy_callback (void *userdata, Uint8 *stream, int len) static void dummy_callback (void *userdata, Uint8 *stream, int len)
{ {
return; return;
} }
static void sound_callback (void *userdata, Uint8 *stream, int len) static void sound_callback (void *userdata, Uint8 *stream, int len)
{ {
if (closing_sound) if (closing_sound)
return; return;
in_callback = 1; in_callback = 1;
/* Wait for data to finish. */ /* Wait for data to finish. */
uae_sem_wait (&data_available_sem); uae_sem_wait (&data_available_sem);
if (! closing_sound) { if (! closing_sound) {
memcpy (stream, sndbuffer, sndbufsize); memcpy (stream, sndbuffer, sndbufsize);
/* Notify writer that we're done. */ /* Notify writer that we're done. */
uae_sem_post (&callback_done_sem); uae_sem_post (&callback_done_sem);
} }
in_callback = 0; in_callback = 0;
} }
void finish_sound_buffer (void) void finish_sound_buffer (void)
{ {
uae_sem_post (&data_available_sem); uae_sem_post (&data_available_sem);
uae_sem_wait (&callback_done_sem); uae_sem_wait (&callback_done_sem);
} }
/* Try to determine whether sound is available. */ /* Try to determine whether sound is available. */
int setup_sound (void) int setup_sound (void)
{ {
int success = 0; int success = 0;
if (SDL_InitSubSystem (SDL_INIT_AUDIO) == 0) { if (SDL_InitSubSystem (SDL_INIT_AUDIO) == 0) {
spec.freq = currprefs.sound_freq; spec.freq = currprefs.sound_freq;
spec.format = currprefs.sound_bits == 8 ? AUDIO_U8 : AUDIO_S16SYS; spec.format = AUDIO_S16SYS;
spec.channels = currprefs.sound_stereo ? 2 : 1; spec.channels = currprefs.sound_stereo ? 2 : 1;
spec.callback = dummy_callback; spec.callback = dummy_callback;
spec.samples = spec.freq * currprefs.sound_latency / 1000; spec.samples = spec.freq * currprefs.sound_latency / 1000;
spec.callback = sound_callback; spec.callback = sound_callback;
spec.userdata = 0; spec.userdata = 0;
if (SDL_OpenAudio (&spec, 0) < 0) { if (SDL_OpenAudio (&spec, 0) < 0) {
write_log ("Couldn't open audio: %s\n", SDL_GetError()); write_log ("Couldn't open audio: %s\n", SDL_GetError());
SDL_QuitSubSystem (SDL_INIT_AUDIO); SDL_QuitSubSystem (SDL_INIT_AUDIO);
} else { } else {
success = 1; success = 1;
SDL_CloseAudio (); SDL_CloseAudio ();
} }
} }
sound_available = success; sound_available = success;
return sound_available; return sound_available;
} }
static int open_sound (void) static int open_sound (void)
{ {
spec.freq = currprefs.sound_freq; spec.freq = currprefs.sound_freq;
spec.format = currprefs.sound_bits == 8 ? AUDIO_U8 : AUDIO_S16SYS; spec.format = AUDIO_S16SYS;
spec.channels = currprefs.sound_stereo ? 2 : 1; spec.channels = currprefs.sound_stereo ? 2 : 1;
spec.samples = spec.freq * currprefs.sound_latency / 1000; spec.samples = spec.freq * currprefs.sound_latency / 1000;
spec.callback = sound_callback; spec.callback = sound_callback;
spec.userdata = 0; spec.userdata = 0;
clearbuffer(); clearbuffer();
if (SDL_OpenAudio (&spec, NULL) < 0) { if (SDL_OpenAudio (&spec, NULL) < 0) {
write_log ("Couldn't open audio: %s\n", SDL_GetError()); write_log ("Couldn't open audio: %s\n", SDL_GetError());
return 0; return 0;
} }
if (spec.format == AUDIO_S16SYS) { init_sound_table16 ();
init_sound_table16 (); sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
} else { have_sound = 1;
init_sound_table8 (); sound_available = 1;
sample_handler = currprefs.sound_stereo ? sample8s_handler : sample8_handler; obtainedfreq = currprefs.sound_freq;
} sndbufsize = spec.samples * 2 * spec.channels;
have_sound = 1; write_log ("SDL sound driver found and configured at %d Hz, buffer is %d ms (%d bytes).\n",
spec.freq, spec.samples * 1000 / spec.freq, sndbufsize);
sound_available = 1; sndbufpt = sndbuffer;
obtainedfreq = currprefs.sound_freq;
sndbufsize = spec.samples * currprefs.sound_bits / 8 * spec.channels; return 1;
write_log ("SDL sound driver found and configured for %d bits at %d Hz, buffer is %d ms (%d bytes).\n", }
currprefs.sound_bits, spec.freq, spec.samples * 1000 / spec.freq, sndbufsize);
sndbufpt = sndbuffer; static void *sound_thread (void *dummy)
{
return 1; for (;;) {
} int cmd = read_comm_pipe_int_blocking (&to_sound_pipe);
int n;
static void *sound_thread (void *dummy)
{ switch (cmd) {
for (;;) { case 0:
int cmd = read_comm_pipe_int_blocking (&to_sound_pipe); open_sound ();
int n; uae_sem_post (&sound_init_sem);
break;
switch (cmd) { case 1:
case 0: uae_sem_post (&sound_init_sem);
open_sound (); return 0;
uae_sem_post (&sound_init_sem); }
break; }
case 1: }
uae_sem_post (&sound_init_sem);
return 0; /* We need a thread for this, since communication between finish_sound_buffer
} * and the callback works through semaphores. In theory, this is unnecessary,
} * since SDL uses a sound thread internally, and the callback runs in its
} * context. But we don't want to depend on SDL's internals too much. */
static void init_sound_thread (void)
/* We need a thread for this, since communication between finish_sound_buffer {
* and the callback works through semaphores. In theory, this is unnecessary, uae_thread_id tid;
* since SDL uses a sound thread internally, and the callback runs in its
* context. But we don't want to depend on SDL's internals too much. */ init_comm_pipe (&to_sound_pipe, 20, 1);
static void init_sound_thread (void) uae_sem_init (&data_available_sem, 0, 0);
{ uae_sem_init (&callback_done_sem, 0, 0);
uae_thread_id tid; uae_sem_init (&sound_init_sem, 0, 0);
uae_start_thread (sound_thread, NULL, &tid);
init_comm_pipe (&to_sound_pipe, 20, 1); }
uae_sem_init (&data_available_sem, 0, 0);
uae_sem_init (&callback_done_sem, 0, 0); void close_sound (void)
uae_sem_init (&sound_init_sem, 0, 0); {
uae_start_thread (sound_thread, NULL, &tid); if (! have_sound)
} return;
void close_sound (void) SDL_PauseAudio (1);
{ clearbuffer();
if (! have_sound) if (in_callback) {
return; closing_sound = 1;
uae_sem_post (&data_available_sem);
SDL_PauseAudio (1); }
clearbuffer(); write_comm_pipe_int (&to_sound_pipe, 1, 1);
if (in_callback) { uae_sem_wait (&sound_init_sem);
closing_sound = 1; SDL_CloseAudio ();
uae_sem_post (&data_available_sem); uae_sem_destroy (&data_available_sem);
} uae_sem_destroy (&sound_init_sem);
write_comm_pipe_int (&to_sound_pipe, 1, 1); uae_sem_destroy (&callback_done_sem);
uae_sem_wait (&sound_init_sem); have_sound = 0;
SDL_CloseAudio ();
uae_sem_destroy (&data_available_sem); #ifdef DRIVESOUND
uae_sem_destroy (&sound_init_sem); driveclick_free();
uae_sem_destroy (&callback_done_sem); #endif
have_sound = 0; }
#ifdef DRIVESOUND int init_sound (void)
driveclick_free(); {
#endif in_callback = 0;
} closing_sound = 0;
int init_sound (void) init_sound_thread ();
{ write_comm_pipe_int (&to_sound_pipe, 0, 1);
in_callback = 0; uae_sem_wait (&sound_init_sem);
closing_sound = 0; SDL_PauseAudio (0);
init_sound_thread (); #ifdef DRIVESOUND
write_comm_pipe_int (&to_sound_pipe, 0, 1); driveclick_init();
uae_sem_wait (&sound_init_sem); #endif
SDL_PauseAudio (0);
return have_sound;
#ifdef DRIVESOUND }
driveclick_init();
#endif void pause_sound (void)
{
return have_sound;
} SDL_PauseAudio (1);
clearbuffer();
void pause_sound (void) if (in_callback) {
{ closing_sound = 1;
uae_sem_post (&data_available_sem);
SDL_PauseAudio (1); }
clearbuffer(); }
if (in_callback) {
closing_sound = 1; void resume_sound (void)
uae_sem_post (&data_available_sem); {
} clearbuffer();
} SDL_PauseAudio (0);
closing_sound = 0;
void resume_sound (void) }
{
clearbuffer(); void reset_sound (void)
SDL_PauseAudio (0); {
closing_sound = 0; clearbuffer();
} return;
}
void reset_sound (void)
{ void sound_volume (int dir)
clearbuffer(); {
return; }
}
/*
void sound_volume (int dir) * Handle audio specific cfgfile options
{ */
} void audio_default_options (struct uae_prefs *p)
{
/* }
* Handle audio specific cfgfile options
*/ void audio_save_options (FILE *f, const struct uae_prefs *p)
void audio_default_options (struct uae_prefs *p) {
{ }
}
int audio_parse_option (struct uae_prefs *p, const char *option, const char *value)
void audio_save_options (FILE *f, const struct uae_prefs *p) {
{ return 0;
} }
int audio_parse_option (struct uae_prefs *p, const char *option, const char *value)
{
return 0;
}

View File

@ -42,10 +42,7 @@ STATIC_INLINE void check_sound_buffers (void)
#define PUT_SOUND_WORD_RIGHT(b) PUT_SOUND_WORD(b) #define PUT_SOUND_WORD_RIGHT(b) PUT_SOUND_WORD(b)
#define PUT_SOUND_WORD_MONO(b) PUT_SOUND_WORD_LEFT(b) #define PUT_SOUND_WORD_MONO(b) PUT_SOUND_WORD_LEFT(b)
#define SOUND16_BASE_VAL 0 #define SOUND16_BASE_VAL 0
#define SOUND8_BASE_VAL 128
#define DEFAULT_SOUND_BITS 16
#define DEFAULT_SOUND_FREQ 44100 #define DEFAULT_SOUND_FREQ 44100
#define DEFAULT_SOUND_LATENCY 100 #define DEFAULT_SOUND_LATENCY 100
#define HAVE_STEREO_SUPPORT #define HAVE_STEREO_SUPPORT
#define HAVE_8BIT_AUDIO_SUPPORT

View File

@ -15,9 +15,6 @@
/* Define to 1 if you have the <caps/capsimage.h> header file. */ /* Define to 1 if you have the <caps/capsimage.h> header file. */
#undef HAVE_CAPS_CAPSIMAGE_H #undef HAVE_CAPS_CAPSIMAGE_H
/* Define to 1 if you have the `cfmakeraw' function. */
#undef HAVE_CFMAKERAW
/* Define to 1 if you have the <curses.h> header file. */ /* Define to 1 if you have the <curses.h> header file. */
#undef HAVE_CURSES_H #undef HAVE_CURSES_H
@ -40,11 +37,8 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `getcwd' function. */ /* Define to 1 if you have the CAPS framework. */
#undef HAVE_GETCWD #undef HAVE_FRAMEWORK_CAPSIMAGE
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
/* Define to 1 if you have the `gettimeofday' function. */ /* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY #undef HAVE_GETTIMEOFDAY
@ -68,9 +62,6 @@
/* Define to 1 if you have the <libraries/cybergraphics.h> header file. */ /* Define to 1 if you have the <libraries/cybergraphics.h> header file. */
#undef HAVE_LIBRARIES_CYBERGRAPHICS_H #undef HAVE_LIBRARIES_CYBERGRAPHICS_H
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
/* Define to 1 if you have the `localtime_r' function. */ /* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R #undef HAVE_LOCALTIME_R
@ -83,9 +74,6 @@
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
/* Define to 1 if you have the `nanosleep' function. */ /* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP #undef HAVE_NANOSLEEP
@ -101,9 +89,6 @@
/* Define to 1 if you have the `readdir_r' function. */ /* Define to 1 if you have the `readdir_r' function. */
#undef HAVE_READDIR_R #undef HAVE_READDIR_R
/* Define to 1 if you have the `rmdir' function. */
#undef HAVE_RMDIR
/* Define to 1 if you have the `select' function. */ /* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT #undef HAVE_SELECT
@ -231,9 +216,6 @@
/* Define to 1 if you have the <sys/vfs.h> header file. */ /* Define to 1 if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H #undef HAVE_SYS_VFS_H
/* Define to 1 if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR
/* Define to 1 if you have the `timegm' function. */ /* Define to 1 if you have the `timegm' function. */
#undef HAVE_TIMEGM #undef HAVE_TIMEGM
@ -359,6 +341,21 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME #undef TM_IN_SYS_TIME
/* Define to the UAE version */
#undef UAE_VERSION
/* Define to the UAE major version number */
#undef UAE_VERSION_MAJOR
/* Define to the UAE minor version number */
#undef UAE_VERSION_MINOR
/* Define to the UAE revision number */
#undef UAE_VERSION_REVISION
/* Define to the optional UAE version tag */
#undef UAE_VERSION_TAG
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION

View File

@ -1,6 +1,9 @@
/* src/sysconfig.h. Generated from sysconfig.h.in by configure. */ /* src/sysconfig.h. Generated from sysconfig.h.in by configure. */
/* src/sysconfig.h.in. Generated from configure.in by autoheader. */ /* src/sysconfig.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to 1 if you have the `alarm' function. */ /* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1 #define HAVE_ALARM 1
@ -19,11 +22,8 @@
/* Define to 1 if you have the <caps/capsimage.h> header file. */ /* Define to 1 if you have the <caps/capsimage.h> header file. */
/* #undef HAVE_CAPS_CAPSIMAGE_H */ /* #undef HAVE_CAPS_CAPSIMAGE_H */
/* Define to 1 if you have the `cfmakeraw' function. */
#define HAVE_CFMAKERAW 1
/* Define to 1 if you have the <curses.h> header file. */ /* Define to 1 if you have the <curses.h> header file. */
#define HAVE_CURSES_H 1 /* #undef HAVE_CURSES_H */
/* Define to 1 if you have the <cybergraphx/cybergraphics.h> header file. */ /* Define to 1 if you have the <cybergraphx/cybergraphics.h> header file. */
/* #undef HAVE_CYBERGRAPHX_CYBERGRAPHICS_H */ /* #undef HAVE_CYBERGRAPHX_CYBERGRAPHICS_H */
@ -36,7 +36,7 @@
#define HAVE_DIRENT_H 1 #define HAVE_DIRENT_H 1
/* "Define to 1 if you have 'dlopen' function */ /* "Define to 1 if you have 'dlopen' function */
#define HAVE_DLOPEN 1 /* #undef HAVE_DLOPEN */
/* Define to 1 if you have the <dustat.h> header file. */ /* Define to 1 if you have the <dustat.h> header file. */
/* #undef HAVE_DUSTAT_H */ /* #undef HAVE_DUSTAT_H */
@ -44,11 +44,8 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getcwd' function. */ /* Define to 1 if you have the CAPS framework. */
#define HAVE_GETCWD 1 /* #undef HAVE_FRAMEWORK_CAPSIMAGE */
/* Define to 1 if you have the `getopt' function. */
#define HAVE_GETOPT 1
/* Define to 1 if you have the `gettimeofday' function. */ /* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1 #define HAVE_GETTIMEOFDAY 1
@ -72,9 +69,6 @@
/* Define to 1 if you have the <libraries/cybergraphics.h> header file. */ /* Define to 1 if you have the <libraries/cybergraphics.h> header file. */
/* #undef HAVE_LIBRARIES_CYBERGRAPHICS_H */ /* #undef HAVE_LIBRARIES_CYBERGRAPHICS_H */
/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1
/* Define to 1 if you have the `localtime_r' function. */ /* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
@ -85,16 +79,13 @@
/* #undef HAVE_MACHINE_SOUNDCARD_H */ /* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1 /* #undef HAVE_MEMORY_H */
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define to 1 if you have the `nanosleep' function. */ /* Define to 1 if you have the `nanosleep' function. */
#define HAVE_NANOSLEEP 1 #define HAVE_NANOSLEEP 1
/* Define to 1 if you have the <ncurses.h> header file. */ /* Define to 1 if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1 /* #undef HAVE_NCURSES_H */
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */ /* #undef HAVE_NDIR_H */
@ -105,9 +96,6 @@
/* Define to 1 if you have the `readdir_r' function. */ /* Define to 1 if you have the `readdir_r' function. */
#define HAVE_READDIR_R 1 #define HAVE_READDIR_R 1
/* Define to 1 if you have the `rmdir' function. */
#undef HAVE_RMDIR
/* Define to 1 if you have the `select' function. */ /* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1 #define HAVE_SELECT 1
@ -115,7 +103,7 @@
#define HAVE_SETITIMER 1 #define HAVE_SETITIMER 1
/* Define to 1 if you have the `sigaction' function. */ /* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION #define HAVE_SIGACTION 1
/* Define to 1 if you have the `sleep' function. */ /* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1 #define HAVE_SLEEP 1
@ -137,7 +125,7 @@
#define HAVE_STRCASECMP 1 #define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcmpi' function. */ /* Define to 1 if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */ #define HAVE_STRCMPI 1
/* Define to 1 if you have the `strdup' function. */ /* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1 #define HAVE_STRDUP 1
@ -146,12 +134,10 @@
#define HAVE_STRERROR 1 #define HAVE_STRERROR 1
/* Define to 1 if you have the `stricmp' function. */ /* Define to 1 if you have the `stricmp' function. */
/* #undef HAVE_STRICMP */ #define HAVE_STRICMP 1
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1 #define HAVE_STRINGS_H 1
/*#undef HAVE_STRINGS_H */
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
@ -159,7 +145,7 @@
/* Define to 1 if you have the `strstr' function. */ /* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
/* Define to 1 if `st_blocks' is member of `struct stat'. */ /* Define to 1 if `st_blocks' is a member of `struct stat'. */
#define HAVE_STRUCT_STAT_ST_BLOCKS 1 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use /* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
@ -193,17 +179,16 @@
/* #undef HAVE_SYS_FS_TYPES_H */ /* #undef HAVE_SYS_FS_TYPES_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */ /* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1 /* #undef HAVE_SYS_IOCTL_H */
/* Define to 1 if you have the <sys/ipc.h> header file. */ /* Define to 1 if you have the <sys/ipc.h> header file. */
#define HAVE_SYS_IPC_H 1 /* #undef HAVE_SYS_IPC_H */
/* Define to 1 if you have the <sys/mman.h> header file. */ /* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1 /* #undef HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/mount.h> header file. */ /* Define to 1 if you have the <sys/mount.h> header file. */
/*#define HAVE_SYS_MOUNT_H 1 */ /* #undef HAVE_SYS_MOUNT_H */
#undef HAVE_SYS_MOUNT_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/ */
@ -213,24 +198,22 @@
#define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/shm.h> header file. */ /* Define to 1 if you have the <sys/shm.h> header file. */
#define HAVE_SYS_SHM_H 1 /* #undef HAVE_SYS_SHM_H */
/* Define to 1 if you have the <sys/soundcard.h> header file. */ /* Define to 1 if you have the <sys/soundcard.h> header file. */
#define HAVE_SYS_SOUNDCARD_H 1 /* #undef HAVE_SYS_SOUNDCARD_H */
/* Define to 1 if you have the <sys/statfs.h> header file. */ /* Define to 1 if you have the <sys/statfs.h> header file. */
/*#define HAVE_SYS_STATFS_H 1*/ /* #undef HAVE_SYS_STATFS_H */
#undef HAVE_SYS_STATFS_H
/* Define to 1 if you have the <sys/statvfs.h> header file. */ /* Define to 1 if you have the <sys/statvfs.h> header file. */
#define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STATVFS_H 1
/* #undef HAVE_SYS_STATVFS_H1 */
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1 #define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/termios.h> header file. */ /* Define to 1 if you have the <sys/termios.h> header file. */
#define HAVE_SYS_TERMIOS_H 1 /* #undef HAVE_SYS_TERMIOS_H */
/* Define to 1 if you have the <sys/time.h> header file. */ /* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIME_H 1
@ -239,14 +222,10 @@
#define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/vfs.h> header file. */ /* Define to 1 if you have the <sys/vfs.h> header file. */
/* #define HAVE_SYS_VFS_H 1 */ /* #undef HAVE_SYS_VFS_H */
#undef HAVE_SYS_VFS_H
/* Define to 1 if you have the `tcgetattr' function. */
#define HAVE_TCGETATTR 1
/* Define to 1 if you have the `timegm' function. */ /* Define to 1 if you have the `timegm' function. */
#undef HAVE_TIMEGM //#define HAVE_TIMEGM 1
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */ /* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#define HAVE_UINTMAX_T 1 #define HAVE_UINTMAX_T 1
@ -267,8 +246,7 @@
#define HAVE_UTIME_NULL 1 #define HAVE_UTIME_NULL 1
/* Define to 1 if you have the <values.h> header file. */ /* Define to 1 if you have the <values.h> header file. */
/*#define HAVE_VALUES_H 1 */ /* #undef HAVE_VALUES_H */
#undef HAVE_VALUES_H
/* Define to 1 if you have the `vfprintf' function. */ /* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1 #define HAVE_VFPRINTF 1
@ -295,13 +273,16 @@
#define PACKAGE_NAME "E-UAE" #define PACKAGE_NAME "E-UAE"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "E-UAE 0.8.29-WIP4" #define PACKAGE_STRING "E-UAE 0.8.29"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "e-uae" #define PACKAGE_TARNAME "e-uae"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "0.8.29-WIP4" #define PACKAGE_VERSION "0.8.29"
/* Define to the necessary symbol if this constant uses a non-standard name on /* Define to the necessary symbol if this constant uses a non-standard name on
your system. */ your system. */
@ -343,8 +324,7 @@
/* Define if statfs takes 2 args and struct statfs has a field named f_bsize. /* Define if statfs takes 2 args and struct statfs has a field named f_bsize.
(4.3BSD, SunOS 4, HP-UX, AIX PS/2) */ (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */
/*#define STAT_STATFS2_BSIZE 1*/ /* #undef STAT_STATFS2_BSIZE */
#undef STAT_STATFS2_BSIZE
/* Define if statfs takes 2 args and struct statfs has a field named f_fsize. /* Define if statfs takes 2 args and struct statfs has a field named f_fsize.
(4.4BSD, NetBSD) */ (4.4BSD, NetBSD) */
@ -361,7 +341,7 @@
/* #undef STAT_STATFS4 */ /* #undef STAT_STATFS4 */
/* Define if there is a function named statvfs. (SVR4) */ /* Define if there is a function named statvfs. (SVR4) */
/* #undef STAT_STATVFS */ #define STAT_STATVFS 1
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1 #define STDC_HEADERS 1
@ -372,29 +352,77 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */ /* #undef TM_IN_SYS_TIME */
/* Version number of package */ /* Define to the UAE version */
#define VERSION "0.8.29-WIP4" #define UAE_VERSION "0.8.29"
/* Define to 1 if your processor stores words with the most significant byte /* Define to the UAE major version number */
first (like Motorola and SPARC, unlike Intel and VAX). */ #define UAE_VERSION_MAJOR 0
#define WORDS_BIGENDIAN 1
/* Define to 1 if the X Window System is missing or not being used. */ /* Define to the UAE minor version number */
/* #undef X_DISPLAY_MISSING */ #define UAE_VERSION_MINOR 8
/* Define to 1 if on AIX 3. /* Define to the UAE revision number */
System headers sometimes define this. #define UAE_VERSION_REVISION 29
We just want to avoid a redefinition error message. */
/* Define to the optional UAE version tag */
#define UAE_VERSION_TAG ""
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
/* # undef _ALL_SOURCE */ # define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif #endif
/* Version number of package */
#define VERSION "0.8.29"
/* 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
# define WORDS_BIGENDIAN 1
# endif
#endif
/* Define to 1 if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING 1
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64 /* #undef _FILE_OFFSET_BITS */
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */ /* #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. */ /* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */
@ -414,7 +442,7 @@
/* #undef size_t */ /* #undef size_t */
/* Substitute for socklen_t */ /* Substitute for socklen_t */
/* #undef socklen_t */ #define socklen_t int
/* Define to unsigned long or unsigned long long if <stdint.h> and /* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */ <inttypes.h> don't define. */

View File

@ -10,7 +10,21 @@ LDFLAGS =
CFLAGS = -I../include CFLAGS = -I../include
LIBRARIES = LIBRARIES =
all: gencpu.exe gencomp.exe build68k.exe genblitter.exe genlinetoscr.exe all: copy gencpu.exe gencomp.exe build68k.exe genblitter.exe genlinetoscr.exe
copy:
cp ../genblitter.c genblitter.c
cp ../blitops.c blitops.c
cp ../writelog.c writelog.c
cp ../build68k.c build68k.c
cp ../gencpu.c gencpu.c
cp ../readcpu.c readcpu.c
cp ../missing.c missing.c
cp ../gencomp.c gencomp.c
cp ../genlinetoscr.c genlinetoscr.c
cp ../cpudefs.c cpudefs.c
install: install:
@ -18,7 +32,7 @@ install:
clean: clean:
-rm -f *.o -rm -f *.o
-rm cpudefs.c -rm cpudefs.c
-rm -f gencpu.exe gencomp.exe build68k.exe genblitter.exe genlinetoscr.exe -rm -f gencpu.exe gencomp.exe build68k.exe genblitter.exe genlinetoscr.exe genblitter.c blitops.c writelog.c build68k.c gencpu.c readcpu.c missing.c gencomp.c genlinetoscr.c cpudefs.c
distclean: clean distclean: clean

View File

@ -20,13 +20,13 @@
#define HAVE_STRCASECMP 1 #define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcmpi' function. */ /* Define to 1 if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */ #define HAVE_STRCMPI 1
/* Define to 1 if you have the `strdup' function. */ /* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1 #define HAVE_STRDUP 1
/* Define to 1 if you have the `stricmp' function. */ /* Define to 1 if you have the `stricmp' function. */
/* #undef HAVE_STRICMP */ #define HAVE_STRICMP 1
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1 #define HAVE_STRINGS_H 1
@ -80,7 +80,7 @@
#define SIZEOF_VOID_P 4 #define SIZEOF_VOID_P 4
/* The size of `__int64', as computed by sizeof. */ /* The size of `__int64', as computed by sizeof. */
#define SIZEOF___INT64 0 #define SIZEOF___INT64 8
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1 #define STDC_HEADERS 1
@ -89,7 +89,7 @@
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
/* # undef _ALL_SOURCE */ # define _ALL_SOURCE 1
#endif #endif
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */

View File

@ -303,6 +303,7 @@ static uae_u32 emulib_Debug (void)
*/ */
static uae_u32 FindFunctionInObject (uae_u8 *objectptr) static uae_u32 FindFunctionInObject (uae_u8 *objectptr)
{ {
#if 0
uae_u8 *text_hdr; uae_u8 *text_hdr;
uae_u8 offset; uae_u8 offset;
text_hdr = (uae_u8 *)strstr ("text", (char *)objectptr); text_hdr = (uae_u8 *)strstr ("text", (char *)objectptr);
@ -310,6 +311,7 @@ static uae_u32 FindFunctionInObject (uae_u8 *objectptr)
offset = *(text_hdr + 19); offset = *(text_hdr + 19);
return (uae_u32)(objectptr + offset); return (uae_u32)(objectptr + offset);
} }
#endif
return 0; return 0;
} }