int audio_channel_mask = 15;
+STATIC_INLINE int isaudio(void)
+{
+ if (!currprefs.produce_sound)
+ return 0;
+ if (currprefs.picasso96_nocustom && picasso_on)
+ return 0;
+ return 1;
+}
+
static int debugchannel (int ch)
{
if ((1 << ch) & DEBUG_CHANNEL_MASK) return 1;
{
unsigned long int n_cycles;
- if (currprefs.produce_sound == 0 || savestate_state == STATE_RESTORE)
+ if (!isaudio())
+ return;
+ if (savestate_state == STATE_RESTORE)
return;
n_cycles = get_cycles () - last_cycles;
{
int nr, handle;
- if (currprefs.produce_sound == 0)
+ if (!isaudio())
return;
update_audio ();
if (audio_channel[nr].per == PERIOD_MAX - 1 && per != PERIOD_MAX - 1) {
audio_channel[nr].evtime = CYCLE_UNIT;
- if (currprefs.produce_sound > 0) {
+ if (isaudio()) {
schedule_audio ();
events_schedule ();
}
cfgfile_write (f, "sound_max_buff=%d\n", p->sound_maxbsiz);
cfgfile_write (f, "sound_frequency=%d\n", p->sound_freq);
+ cfgfile_write (f, "sound_latency=%d\n", p->sound_latency);
cfgfile_write (f, "sound_interpol=%s\n", interpolmode[p->sound_interpol]);
cfgfile_write (f, "sound_adjust=%d\n", p->sound_adjust);
cfgfile_write (f, "sound_filter=%s\n", soundfiltermode1[p->sound_filter]);
cfgfile_write (f, "cpu_compatible=%s\n", p->cpu_compatible ? "true" : "false");
cfgfile_write (f, "cpu_cycle_exact=%s\n", p->cpu_cycle_exact ? "true" : "false");
cfgfile_write (f, "blitter_cycle_exact=%s\n", p->blitter_cycle_exact ? "true" : "false");
+ cfgfile_write (f, "rtg_nocustom=%s\n", p->picasso96_nocustom ? "true" : "false");
cfgfile_write (f, "log_illegal_mem=%s\n", p->illegal_mem ? "true" : "false");
if (p->catweasel >= 100)
}
}
- if (cfgfile_intval (option, value, "sound_max_buff", &p->sound_maxbsiz, 1)
+ if (cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)) {
+ /* backwards compatibility */
+ p->sound_latency = 1000 * (p->sound_maxbsiz >> 1) / p->sound_freq;
+ return 1;
+ }
+
+ if (cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1)
+ || cfgfile_intval (option, value, "sound_max_buff", &p->sound_maxbsiz, 1)
|| cfgfile_intval (option, value, "sound_bits", &p->sound_bits, 1)
|| cfgfile_intval (option, value, "state_replay_rate", &p->statecapturerate, 1)
|| cfgfile_intval (option, value, "state_replay_buffer", &p->statecapturebuffersize, 1)
|| cfgfile_yesno (option, value, "fpu_strict", &p->fpu_strict)
|| cfgfile_yesno (option, value, "comp_midopt", &p->comp_midopt)
|| cfgfile_yesno (option, value, "comp_lowopt", &p->comp_lowopt)
+ || cfgfile_yesno (option, value, "rtg_nocustom", &p->picasso96_nocustom)
|| cfgfile_yesno (option, value, "scsi", &p->scsi))
return 1;
if (cfgfile_intval (option, value, "cachesize", &p->cachesize, 1)
p->sound_bits = DEFAULT_SOUND_BITS;
p->sound_freq = DEFAULT_SOUND_FREQ;
p->sound_maxbsiz = DEFAULT_SOUND_MAXB;
+ p->sound_latency = 100;
p->sound_interpol = 1;
p->sound_filter = FILTER_SOUND_EMUL;
p->sound_filter_type = 0;
p->maprom = 0;
p->filesys_no_uaefsdb = 0;
p->filesys_custom_uaefsdb = 1;
+ p->picasso96_nocustom = 0;
p->cart_internal = 1;
p->gfx_filter = 0;
p->scsi = 1;
p->socket_emu = 1;
p->cart_internal = 0;
+ p->picasso96_nocustom = 1;
return configure_rom (p, roms, romcheck);
}
#include "enforcer.h"
#endif
+STATIC_INLINE int nocustom(void)
+{
+ if (picasso_on && currprefs.picasso96_nocustom)
+ return 1;
+ return 0;
+}
+
void uae_abort (const char *format,...)
{
static int nomore;
* but the new color has not been entered into the table yet. */
static void record_color_change (int hpos, int regno, unsigned long value)
{
- /* Early positions don't appear on-screen. */
if (regno < 0x1000 && nodraw ())
return;
+ /* Early positions don't appear on-screen. */
if (vpos < minfirstline)
return;
int oldstrobe = cop_state.strobe;
eventtab[ev_copper].active = 0;
+ if (nocustom())
+ return;
if (was_active)
events_schedule ();
int vp = vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80);
int c_hpos = cop_state.hpos;
+ if (nocustom()) {
+ eventtab[ev_copper].active = 0;
+ return;
+ }
+
if (eventtab[ev_copper].active) {
dump_copper ("error1",until_hpos);
eventtab[ev_copper].active = 0;
{
copper_enabled_thisline = 0;
unset_special (SPCFLAG_COPPER);
- if (! dmaen (DMA_COPPER) || cop_state.state == COP_stop || cop_state.state == COP_bltwait)
+ if (!dmaen (DMA_COPPER) || cop_state.state == COP_stop || cop_state.state == COP_bltwait || nocustom())
return;
if (cop_state.state == COP_wait) {
static int ciahsync;
int hpos = current_hpos ();
- sync_copper_with_cpu (maxhpos, 0);
-
- //copper_check (1);
-
- finish_decisions ();
- if (thisline_decision.plfleft != -1) {
- if (currprefs.collision_level > 1)
- do_sprite_collisions ();
- if (currprefs.collision_level > 2)
- do_playfield_collisions ();
+ if (!nocustom()) {
+ sync_copper_with_cpu (maxhpos, 0);
+ //copper_check (1);
+ finish_decisions ();
+ if (thisline_decision.plfleft != -1) {
+ if (currprefs.collision_level > 1)
+ do_sprite_collisions ();
+ if (currprefs.collision_level > 2)
+ do_playfield_collisions ();
+ }
+ hsync_record_line_state (next_lineno, nextline_how, thisline_changed);
+ /* reset light pen latch */
+ if (vpos == sprite_vblank_endline)
+ vpos_lpen = -1;
+#ifdef CD32
+ AKIKO_hsync_handler ();
+#endif
+#ifdef CPUEMU_6
+ if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
+ decide_blitter (hpos);
+ memset (cycle_line, 0, sizeof cycle_line);
+ cycle_line[9] = CYCLE_REFRESH;
+ cycle_line[3] = CYCLE_REFRESH;
+ cycle_line[5] = CYCLE_REFRESH;
+ cycle_line[7] = CYCLE_REFRESH;
+ }
+#endif
}
- hsync_record_line_state (next_lineno, nextline_how, thisline_changed);
eventtab[ev_hsync].evtime += get_cycles () - eventtab[ev_hsync].oldcycles;
eventtab[ev_hsync].oldcycles = get_cycles ();
CIA_hsync_handler ();
-#ifdef CD32
- AKIKO_hsync_handler ();
-#endif
#ifdef PICASSO96
picasso_handle_hsync ();
ciahsync = 0;
}
- /* reset light pen latch */
- if (vpos == sprite_vblank_endline)
- vpos_lpen = -1;
-
-#ifdef CPUEMU_6
- if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
- decide_blitter (hpos);
- memset (cycle_line, 0, sizeof cycle_line);
- cycle_line[9] = CYCLE_REFRESH;
- cycle_line[3] = CYCLE_REFRESH;
- cycle_line[5] = CYCLE_REFRESH;
- cycle_line[7] = CYCLE_REFRESH;
- }
-#endif
if ((currprefs.chipset_mask & CSMASK_AGA) || (!currprefs.chipset_mask & CSMASK_ECS_AGNUS))
last_custom_value = rand ();
else
last_custom_value = 0xffff;
- if (!currprefs.blitter_cycle_exact && bltstate != BLT_done && dmaen (DMA_BITPLANE) && diwstate == DIW_waiting_stop)
- blitter_slowdown (thisline_decision.plfleft, thisline_decision.plfright - (16 << fetchmode),
- cycle_diagram_total_cycles[fmode][GET_RES (bplcon0)][GET_PLANES_LIMIT (bplcon0)],
- cycle_diagram_free_cycles[fmode][GET_RES (bplcon0)][GET_PLANES_LIMIT (bplcon0)]);
+ if (!nocustom()) {
+ if (!currprefs.blitter_cycle_exact && bltstate != BLT_done && dmaen (DMA_BITPLANE) && diwstate == DIW_waiting_stop)
+ blitter_slowdown (thisline_decision.plfleft, thisline_decision.plfright - (16 << fetchmode),
+ cycle_diagram_total_cycles[fmode][GET_RES (bplcon0)][GET_PLANES_LIMIT (bplcon0)],
+ cycle_diagram_free_cycles[fmode][GET_RES (bplcon0)][GET_PLANES_LIMIT (bplcon0)]);
- if (currprefs.produce_sound)
- audio_hsync (1);
+ if (currprefs.produce_sound)
+ audio_hsync (1);
- hardware_line_completed (next_lineno);
+ hardware_line_completed (next_lineno);
+ }
/* In theory only an equality test is needed here - but if a program
goes haywire with the VPOSW register, it can cause us to miss this,
#ifdef JIT
if (compiled_code) {
if (currprefs.m68k_speed == -1) {
- static int count=0;
-
+ static int count = 0;
count++;
if (trigger_frh(count)) {
frh_handler();
}
is_lastline = trigger_frh(count+1) && ! rpt_did_reset;
- }
- else
+ } else {
is_lastline=0;
+ }
} else {
#endif
is_lastline = vpos + 1 == maxvpos + (lof == 0 ? 0 : 1) && currprefs.m68k_speed == -1 && ! rpt_did_reset;
}
#endif
- if (bplcon0 & 4)
- notice_interlace_seen ();
+ if (!nocustom()) {
+ if (bplcon0 & 4)
+ notice_interlace_seen ();
- if (!nodraw ()) {
- int lineno = vpos;
- nextline_how = nln_normal;
- if (currprefs.gfx_linedbl) {
- lineno *= 2;
- nextline_how = currprefs.gfx_linedbl == 1 ? nln_doubled : nln_nblack;
- if (bplcon0 & 4) {
- if (!lof) {
- lineno++;
- nextline_how = nln_lower;
- } else {
- nextline_how = nln_upper;
+ if (!nodraw ()) {
+ int lineno = vpos;
+ nextline_how = nln_normal;
+ if (currprefs.gfx_linedbl) {
+ lineno *= 2;
+ nextline_how = currprefs.gfx_linedbl == 1 ? nln_doubled : nln_nblack;
+ if (bplcon0 & 4) {
+ if (!lof) {
+ lineno++;
+ nextline_how = nln_lower;
+ } else {
+ nextline_how = nln_upper;
+ }
}
}
+ next_lineno = lineno;
+ reset_decisions ();
}
- next_lineno = lineno;
- reset_decisions ();
}
+
#ifdef FILESYS
if (uae_int_requested) {
set_uae_int_flag ();
INTREQ (0x8000 | 0x0008);
}
#endif
+
/* See if there's a chance of a copper wait ending this line. */
cop_state.hpos = 0;
cop_state.last_write = 0;
static uae_u32 custom_lget (uaecptr) REGPARAM;
static uae_u32 custom_wget (uaecptr) REGPARAM;
static uae_u32 custom_bget (uaecptr) REGPARAM;
+static uae_u32 custom_lgeti (uaecptr) REGPARAM;
+static uae_u32 custom_wgeti (uaecptr) REGPARAM;
static void custom_lput (uaecptr, uae_u32) REGPARAM;
static void custom_wput (uaecptr, uae_u32) REGPARAM;
static void custom_bput (uaecptr, uae_u32) REGPARAM;
addrbank custom_bank = {
custom_lget, custom_wget, custom_bget,
custom_lput, custom_wput, custom_bput,
- default_xlate, default_check, NULL, "Custom chipset"
+ default_xlate, default_check, NULL, "Custom chipset",
};
STATIC_INLINE uae_u32 REGPARAM2 custom_wget_1 (uaecptr addr, int noput)
return v;
}
-uae_u32 REGPARAM2 custom_wget (uaecptr addr)
+static uae_u32 REGPARAM2 custom_wget (uaecptr addr)
{
uae_u32 v;
return custom_wget2 (addr);
}
-uae_u32 REGPARAM2 custom_bget (uaecptr addr)
+static uae_u32 REGPARAM2 custom_bget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
return custom_wget2 (addr & ~1) >> (addr & 1 ? 0 : 8);
}
-uae_u32 REGPARAM2 custom_lget (uaecptr addr)
+static uae_u32 REGPARAM2 custom_lget (uaecptr addr)
{
#ifdef JIT
special_mem |= S_READ;
return ((uae_u32)custom_wget (addr) << 16) | custom_wget (addr + 2);
}
-int REGPARAM2 custom_wput_1 (int hpos, uaecptr addr, uae_u32 value, int noget)
+static int REGPARAM2 custom_wput_1 (int hpos, uaecptr addr, uae_u32 value, int noget)
{
addr &= 0x1FE;
value &= 0xffff;
return 0;
}
-void REGPARAM2 custom_wput (uaecptr addr, uae_u32 value)
+static void REGPARAM2 custom_wput (uaecptr addr, uae_u32 value)
{
int hpos = current_hpos ();
#ifdef JIT
custom_wput_1 (hpos, addr, value, 0);
}
-void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
+static void REGPARAM2 custom_bput (uaecptr addr, uae_u32 value)
{
static int warned;
}
}
-void REGPARAM2 custom_lput(uaecptr addr, uae_u32 value)
+static void REGPARAM2 custom_lput(uaecptr addr, uae_u32 value)
{
#ifdef JIT
special_mem |= S_WRITE;
if (currprefs.chipset_mask != changed_prefs.chipset_mask ||
currprefs.gfx_vsync != changed_prefs.gfx_vsync ||
+ currprefs.picasso96_nocustom != changed_prefs.picasso96_nocustom ||
currprefs.ntscmode != changed_prefs.ntscmode) {
+ currprefs.picasso96_nocustom = changed_prefs.picasso96_nocustom;
currprefs.gfx_vsync = changed_prefs.gfx_vsync;
currprefs.chipset_mask = changed_prefs.chipset_mask;
if (currprefs.ntscmode != changed_prefs.ntscmode) {
#define DISK_INDEXSYNC 1
#define DISK_WORDSYNC 2
-#define DISK_REVOLUTION 4 /* 4,8,16,32 */
+#define DISK_MOTORDELAY 4
+#define DISK_REVOLUTION 8 /* 8,16,32,64 */
#define DSKREADY_TIME 4
#define DSKREADY_DOWN_TIME 10
+static int diskevent_flag;
+static int disk_sync_cycle;
+
#if 0
#define MAX_DISK_WORDS_PER_LINE 50 /* depends on floppy_speed */
static uae_u32 dma_tab[MAX_DISK_WORDS_PER_LINE + 1];
int buffered_cyl, buffered_side;
int cyl;
int motoroff;
+ int motordelay; /* dskrdy needs some clock cycles before it changes after switching off motor */
int state;
int wrprot;
uae_u16 bigmfmbuf[0x4000 * DDHDMULT];
#endif
if (disk_debug_logging > 1)
write_log (" ->motor off");
+ if (currprefs.cpu_level <= 1) {
+ drv->motordelay = 1;
+ diskevent_flag = DISK_MOTORDELAY;
+ eventtab[ev_disk].oldcycles = get_cycles ();
+ eventtab[ev_disk].evtime = get_cycles () + 30 * CYCLE_UNIT;
+ eventtab[ev_disk].active = 1;
+ events_schedule ();
+ }
}
drv->motoroff = off;
if (drv->motoroff) {
/* report drive ID */
if (drv->idbit && currprefs.dfxtype[dr] != DRV_35_DD_ESCOM)
st &= ~0x20;
-#if 0
- if (dr == 0 && currprefs.dfxtype[dr] == DRV_35_DD &&
- drv->motoroff && drv->motorcycle + CYCLE_UNIT * 1 > get_cycles())
- st &= ~0x20, write_log("x %d\n", get_cycles());
-#endif
+ /* dskrdy needs some cycles after switching the motor off.. (Pro Tennis Tour) */
+ if (drv->motordelay) {
+ write_log ("MOTORDELAY! %x\n", m68k_getpc());
+ st &= ~0x20;
+ drv->motordelay = 0;
+ }
}
if (drive_track0 (drv))
st &= ~0x10;
}
}
-static int diskevent_flag;
-static int disk_sync_cycle;
-
void DISK_handler (void)
{
int flag = diskevent_flag;
fetchnextrevolution (&floppy[2]);
if (flag & (DISK_REVOLUTION << 3))
fetchnextrevolution (&floppy[3]);
- if (flag & DISK_WORDSYNC) {
+ if (flag & DISK_WORDSYNC)
INTREQ (0x8000 | 0x1000);
- }
- if (flag & DISK_INDEXSYNC) {
+ if (flag & DISK_INDEXSYNC)
cia_diskindex ();
+ floppy[0].motordelay = floppy[1].motordelay = floppy[2].motordelay = floppy[3].motordelay = 0;
#if 0
{
int i;
}
}
#endif
- }
}
static void disk_doupdate_write (drive * drv, int floppybits)
int sound_bits;
int sound_freq;
int sound_maxbsiz;
+ int sound_latency;
int sound_interpol;
int sound_adjust;
int sound_filter;
int cpu_level;
int cpu_compatible;
int address_space_24;
+ int picasso96_nocustom;
uae_u32 z3fastmem_size;
uae_u32 z3fastmem_start;
DEFEVENT(MOUSE1_UP,"Mouse1 Up",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_UP)
DEFEVENT(MOUSE1_DOWN,"Mouse1 Down",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_DOWN)
-DEFEVENT(MOUSE1_LEFT,"Mouse1 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_LEFT)
-DEFEVENT(MOUSE1_RIGHT,"Mouse1 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,1,DIR_RIGHT)
+DEFEVENT(MOUSE1_LEFT,"Mouse1 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,1,DIR_LEFT)
+DEFEVENT(MOUSE1_RIGHT,"Mouse1 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,1,DIR_RIGHT)
DEFEVENT(MOUSE1_WHEEL,"Mouse1 Wheel",AM_MOUSE_AXIS|AM_JOY_AXIS,8,1,2)
DEFEVENT(JOY1_HORIZ,"Joy1 Horizontal",AM_JOY_AXIS,0,1,DIR_LEFT|DIR_RIGHT)
DEFEVENT(JOY1_VERT,"Joy1 Vertical",AM_JOY_AXIS,0,1,DIR_UP|DIR_DOWN)
-DEFEVENT(JOY1_HORIZ_POT,"Joy1 Horizontal (Analog)",AM_JOY_AXIS,64,1,0)
-DEFEVENT(JOY1_VERT_POT,"Joy1 Vertical (Analog)",AM_JOY_AXIS,64,1,1)
+DEFEVENT(JOY1_HORIZ_POT,"Joy1 Horizontal (Analog)",AM_JOY_AXIS,128,1,0)
+DEFEVENT(JOY1_VERT_POT,"Joy1 Vertical (Analog)",AM_JOY_AXIS,128,1,1)
DEFEVENT(JOY1_LEFT,"Joy1 Left",AM_K,16,1,DIR_LEFT)
DEFEVENT(JOY1_RIGHT,"Joy1 Right",AM_K,16,1,DIR_RIGHT)
DEFEVENT(MOUSE2_UP,"Mouse2 Up",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_UP)
DEFEVENT(MOUSE2_DOWN,"Mouse2 Down",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_DOWN)
-DEFEVENT(MOUSE2_LEFT,"Mouse2 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_LEFT)
-DEFEVENT(MOUSE2_RIGHT,"Mouse2 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,32,2,DIR_RIGHT)
+DEFEVENT(MOUSE2_LEFT,"Mouse2 Left",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,2,DIR_LEFT)
+DEFEVENT(MOUSE2_RIGHT,"Mouse2 Right",AM_KEY|AM_JOY_BUT|AM_MOUSE_BUT,64,2,DIR_RIGHT)
DEFEVENT(JOY2_HORIZ,"Joy2 Horizontal",AM_JOY_AXIS,0,2,DIR_LEFT|DIR_RIGHT)
DEFEVENT(JOY2_VERT,"Joy2 Vertical",AM_JOY_AXIS,0,2,DIR_UP|DIR_DOWN)
-DEFEVENT(JOY2_HORIZ_POT,"Joy2 Horizontal (Analog)",AM_JOY_AXIS,64,2,0)
-DEFEVENT(JOY2_VERT_POT,"Joy2 Vertical (Analog)",AM_JOY_AXIS,64,2,1)
+DEFEVENT(JOY2_HORIZ_POT,"Joy2 Horizontal (Analog)",AM_JOY_AXIS,128,2,0)
+DEFEVENT(JOY2_VERT_POT,"Joy2 Vertical (Analog)",AM_JOY_AXIS,128,2,1)
DEFEVENT(JOY2_LEFT,"Joy2 Left",AM_K,16,2,DIR_LEFT)
DEFEVENT(JOY2_RIGHT,"Joy2 Right",AM_K,16,2,DIR_RIGHT)
count = 0;
for (;;) {
mem_type = count;
+ mem_size = 0;
switch (count) {
case 0: /* Kickstart ROM */
mem_start = 0xf80000;
mem_real_start = extendedkickmemory;
mem_size = extendedkickmem_size;
path = currprefs.romextfile;
- sprintf (tmpname, "CD32 Extended");
+ sprintf (tmpname, "Extended");
break;
default:
return 0;
// set the source format
wfxSrc.wFormatTag = WAVE_FORMAT_PCM;
- wfxSrc.nChannels = currprefs.sound_stereo == 3 ? 4 : (currprefs.sound_stereo ? 2 : 1);
+ wfxSrc.nChannels = (currprefs.sound_stereo == 3 || currprefs.sound_stereo == 2) ? 4 : (currprefs.sound_stereo ? 2 : 1);
wfxSrc.nSamplesPerSec = workprefs.sound_freq;
wfxSrc.nBlockAlign = wfxSrc.nChannels * (workprefs.sound_bits / 8);
wfxSrc.nAvgBytesPerSec = wfxSrc.nBlockAlign * wfxSrc.nSamplesPerSec;
uae_u16 tw;
uae_u32 tl;
int bits = 16;
- int channels = currprefs.sound_stereo == 3 ? 4 : (currprefs.sound_stereo ? 2 : 1);
+ int channels = (currprefs.sound_stereo == 3 || currprefs.sound_stereo == 2) ? 4 : (currprefs.sound_stereo ? 2 : 1);
fseek (wavfile, 0, SEEK_SET);
fwrite ("RIFF", 1, 4, wavfile);
DWORD dwDDSColor;
DWORD flags = DDPF_RGB;
- ZeroMemory( &ddpfOverlayFormat, sizeof(ddpfOverlayFormat) );
+ ZeroMemory(&ddpfOverlayFormat, sizeof(ddpfOverlayFormat));
ddpfOverlayFormat.dwSize = sizeof(ddpfOverlayFormat);
- ZeroMemory( &ddsd, sizeof(ddsd) );
+ ZeroMemory(&ddsd, sizeof(ddsd));
- if( bOverlayAvailable )
- {
+ if (bOverlayAvailable) {
write_log( "CreateOverlaySurface being called with %d-bits!\n", bits );
- if( bits == 16 )
- {
+ if(bits == 16) {
// Set the overlay format to 16 bit RGB 5:6:5
ddpfOverlayFormat.dwFlags = flags;
ddpfOverlayFormat.dwRGBBitCount = 16;
ddpfOverlayFormat.dwRBitMask = 0xF800;
ddpfOverlayFormat.dwGBitMask = 0x07E0;
ddpfOverlayFormat.dwBBitMask = 0x001F;
- }
- else if( bits == 32 )
- {
+ } else if(bits == 32) {
// Set the overlay format to 32 bit ARGB 8:8:8:8
ddpfOverlayFormat.dwFlags = flags;
ddpfOverlayFormat.dwRGBBitCount = 32;
ddpfOverlayFormat.dwRBitMask = 0x00FF0000;
ddpfOverlayFormat.dwGBitMask = 0x0000FF00;
ddpfOverlayFormat.dwBBitMask = 0x000000FF;
- }
- else if( bits == 8 )
- {
+ } else if(bits == 8) {
// Set the overlay format to 8 bit palette
ddpfOverlayFormat.dwFlags = flags | DDPF_PALETTEINDEXED8;
ddpfOverlayFormat.dwRGBBitCount = 8;
ddpfOverlayFormat.dwRBitMask = 0x00000000;
ddpfOverlayFormat.dwGBitMask = 0x00000000;
ddpfOverlayFormat.dwBBitMask = 0x00000000;
- }
- else
- {
+ } else {
// We don't handle this case...
return DDERR_INVALIDPIXELFORMAT;
}
ddsd.dwHeight = height;
ddsd.ddpfPixelFormat = ddpfOverlayFormat;
- ZeroMemory(&overlayfx,sizeof(overlayfx));
+ ZeroMemory(&overlayfx, sizeof(overlayfx));
overlayfx.dwSize = sizeof(overlayfx);
overlayflags = DDOVER_SHOW | DDOVER_DDFX | DDOVER_KEYDESTOVERRIDE;
// Attempt to create the surface with theses settings
ddrval = IDirectDraw7_CreateSurface (DirectDrawState.directdraw.dd, &ddsd, &DirectDrawState.overlay.surface, NULL);
- if(SUCCEEDED(ddrval))
- {
+ if(SUCCEEDED(ddrval)) {
DirectDrawState.isoverlay = 1;
- }
- else
- {
+ } else {
DirectDrawState.isoverlay = 0;
}
- }
- else
- {
+ } else {
write_log( "CreateOverlaySurface being called, but no overlay support with this card...!\n" );
}
return ddrval;
clearsurface (primary_surface);
} else {
// We're not full-screen, so you cannot create a flipping pair...
- ZeroMemory( &DirectDrawState.primary.desc, sizeof(DDSURFACEDESC2));
+ ZeroMemory(&DirectDrawState.primary.desc, sizeof(DDSURFACEDESC2));
DirectDrawState.primary.desc.dwSize = sizeof(DDSURFACEDESC2);
DirectDrawState.primary.desc.dwFlags = DDSD_CAPS;
DirectDrawState.primary.desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
NULL);
}
- if(FAILED(ddrval))
- {
+ if(FAILED(ddrval)) {
goto out;
- }
- else
+ } else
{
write_log( "DDRAW: Primary %ssurface created in video-memory\n", DirectDrawState.flipping != single_buffer ? "flipping " : "" );
}
surf_flags = surface->dwFlags;
pfp = &surface->ddpfPixelFormat;
- if( ( surf_flags & DDSD_PIXELFORMAT ) == 0x0 )
+ if((surf_flags & DDSD_PIXELFORMAT) == 0x0)
return RGBFB_NONE;
if ((pfp->dwFlags & DDPF_RGB) == 0)
struct uae_driveinfo *udi2 = udi;
int nonzeropart = 0;
int gotpart = 0;
+ int safepart = 0;
write_log ("%d MBR partitions found\n", dli->PartitionCount);
for (i = 0; i < dli->PartitionCount && (*index2) < MAX_FILESYSTEM_UNITS; i++) {
PARTITION_INFORMATION *pi = &dli->PartitionEntry[i];
sprintf (udi->device_name, "HD_P#%d_%s", pi->PartitionNumber, orgname);
udi++;
(*index2)++;
+ safepart = 1;
}
gotpart = 1;
}
write_log ("empty MBR partition table detected, checking for RDB\n");
} else if (!gotpart) {
write_log ("non-empty MBR partition table detected, doing RDB check anyway\n");
- } else if (harddrive_dangerous != 0x1234dead) {
- ret = 1;
- goto end;
+ } else if (safepart) {
+ goto amipartfound; /* ugly but bleh.. */
}
} else {
write_log ("no MBR partition table detected, checking for RDB\n");
ret = 1;
goto end;
}
-
- write_log ("device accepted, start=%I64d, size=%I64d, block=%d\n", udi->offset, udi->size, udi->bytespersector);
+amipartfound:
if (i > 1)
sprintf (udi->device_name, "HD_*_%s", orgname);
else
extern int mouseactive, focus;
extern int ignore_messages_all;
#define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 1"
+#define WINUAEBETASTR " Beta 2"
extern char start_path_exe[MAX_DPATH];
extern char start_path_data[MAX_DPATH];