#define AUDIO_STATUS_PLAY_ERROR 0x14
#define AUDIO_STATUS_NO_STATUS 0x15
+#define MODEL_NAME "MATSHITA0.97" /* also MATSHITA0.96 exists */
+
static smp_comm_pipe requests;
static volatile int thread_alive;
cd_finished = 1;
}
break;
+ case 0x83:
+ if (cdrom_command_cnt_in == 7) {
+ memcpy (cdrom_command_output, MODEL_NAME, strlen (MODEL_NAME));
+ cdrom_command_accepted(strlen (MODEL_NAME), s, &cdrom_command_cnt_in);
+ cd_finished = 1;
+ }
case 0x84:
if (cdrom_command_cnt_in == 7) {
cdrom_command_accepted(cdrom_modeset(cdrom_command_input), s, &cdrom_command_cnt_in);
* checked. */
static void decide_diw (int hpos)
{
- int pix_hpos = coord_diw_to_window_x (hpos == 227 ? 455 : hpos * 2); /* (227.5*2 = 455) */
+ /* Last hpos = hpos + 0.5, eg. normal PAL end hpos is 227.5 * 2 = 455 */
+ int pix_hpos = coord_diw_to_window_x (hpos == maxhpos ? hpos * 2 + 1 : hpos * 2);
if (hdiwstate == DIW_waiting_start && thisline_decision.diwfirstword == -1
&& pix_hpos >= diwfirstword && last_diw_pix_hpos < diwfirstword)
{
int res;
switch ((con3 >> 6) & 3) {
+ default:
+ res = RES_LORES;
+ break;
+#ifdef ECS_DENISE
case 0: /* ECS defaults (LORES,HIRES=LORES sprite,SHRES=HIRES sprite) */
if ((currprefs.chipset_mask & CSMASK_ECS_DENISE) && GET_RES (con0) == RES_SUPERHIRES)
res = RES_HIRES;
else
res = RES_LORES;
break;
- /* AGA */
+#endif
+#ifdef AGA
case 1:
res = RES_LORES;
break;
res = RES_SUPERHIRES;
break;
}
+#endif
return res;
}
bplcon0 = v;
record_register_change (hpos, 0x100, v);
-#ifdef AGA
- if (currprefs.chipset_mask & CSMASK_AGA) {
+#ifdef ECS_DENISE
+ if (currprefs.chipset_mask & CSMASK_ECS_DENISE) {
decide_sprites (hpos);
sprres = expand_sprres (bplcon0, bplcon3);
}
sprxp = (sprpos[num] & 0xFF) * 2 + (sprctl[num] & 1);
sprxp <<= sprite_buffer_res;
/* Quite a bit salad in this register... */
+#ifdef ECS_DENISE
+ if (currprefs.chipset_mask & CSMASK_ECS_DENISE) {
+ sprxp |= ((sprctl[num] >> 3) & 2) >> (2 - sprite_buffer_res);
+ }
+#endif
#ifdef AGA
- if (currprefs.chipset_mask & CSMASK_AGA) {
+ else if (currprefs.chipset_mask & CSMASK_AGA) {
sprxp |= ((sprctl[num] >> 3) & 3) >> (2 - sprite_buffer_res);
s->dblscan = sprpos[num] & 0x80;
}
if (vpos == sprite_vblank_endline)
spr_arm (num, 0);
+#ifdef AGA
if (s->dblscan && (fmode & 0x8000) && (vpos & 1) != (s->vstart & 1) && s->dmastate) {
spr_arm (num, 1);
return;
}
-
+#endif
#if SPRITE_DEBUG > 3
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
write_log ("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
/* These are generated by the drawing code from the line_decisions array for
each line that needs to be drawn. These are basically extracted out of
bit fields in the hardware registers. */
-static int bplehb, bplham, bpldualpf, bpldualpfpri, bpldualpf2of, bplplanecnt, bplres, issprites;
+static int bplehb, bplham, bpldualpf, bpldualpfpri, bpldualpf2of, bplplanecnt, bplres, ecsshres, issprites;
static int plf1pri, plf2pri;
static uae_u32 plf_sprite_mask;
static int sbasecol[2] = { 16, 16 };
static int playfield_start, playfield_end;
static int real_playfield_start, real_playfield_end;
-static int pixels_offset, sprite_pixels_offset;
+static int pixels_offset;
static int src_pixel;
/* How many pixels in window coordinates which are to the left of the left border. */
static int unpainted;
res_shift = lores_shift - bplres;
ddf_left -= DISPLAY_LEFT_SHIFT;
pixels_offset = MAX_PIXELS_PER_LINE - (ddf_left << bplres);
- sprite_pixels_offset = MAX_PIXELS_PER_LINE - (ddf_left << sprite_buffer_res);
- if (sprite_pixels_offset > pixels_offset)
- sprite_pixels_offset = pixels_offset;
ddf_left <<= bplres;
unpainted = visible_left_border < playfield_start ? 0 : visible_left_border - playfield_start;
#include "linetoscr.c"
+#ifdef ECS_DENISE
+/* ECS SuperHires special cases */
+static int NOINLINE linetoscr_16_sh (int spix, int dpix, int stoppos)
+{
+ uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u16 spix_val1, spix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ }
+ return spix;
+}
+static int NOINLINE linetoscr_32_sh (int spix, int dpix, int stoppos)
+{
+ uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u32 spix_val1, spix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ }
+ return spix;
+}
+static int NOINLINE linetoscr_32_shrink1_sh (int spix, int dpix, int stoppos)
+{
+ uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u32 spix_val1, spix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ }
+ return spix;
+}
+static int NOINLINE linetoscr_32_shrink2_sh (int spix, int dpix, int stoppos)
+{
+ uae_u32 *buf = (uae_u32 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u32 spix_val1, spix_val2, dpix_val1, dpix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ dpix_val1 = xcolors[v];
+ v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+ v |= v >> 2;
+ dpix_val2 = xcolors[v];
+ buf[dpix++] = merge_2pixel32 (dpix_val1, dpix_val2);
+ }
+ return spix;
+}
+static int NOINLINE linetoscr_16_shrink1_sh (int spix, int dpix, int stoppos)
+{
+ uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u16 spix_val1, spix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ buf[dpix++] = xcolors[v];
+ }
+ return spix;
+}
+static int NOINLINE linetoscr_16_shrink2_sh (int spix, int dpix, int stoppos)
+{
+ uae_u16 *buf = (uae_u16 *) xlinebuffer;
+
+ while (dpix < stoppos) {
+ uae_u16 spix_val1, spix_val2, dpix_val1, dpix_val2;
+ uae_u16 v;
+ int off;
+ spix_val1 = pixdata.apixels[spix++];
+ spix_val2 = pixdata.apixels[spix++];
+ off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) + ((spix_val1 | spix_val2) & 16);
+ v = (colors_for_drawing.color_regs_ecs[off] & 0xccc) << 0;
+ v |= v >> 2;
+ dpix_val1 = xcolors[v];
+ v = (colors_for_drawing.color_regs_ecs[off] & 0x333) << 2;
+ v |= v >> 2;
+ dpix_val2 = xcolors[v];
+ buf[dpix++] = merge_2pixel16 (dpix_val1, dpix_val2);
+ }
+ return spix;
+}
+#endif
+
static void pfield_do_linetoscr (int start, int stop)
{
xlinecheck(start, stop);
- if (issprites && ((currprefs.chipset_mask & CSMASK_AGA) || sprite_buffer_res > 0)) {
+ if (issprites && (currprefs.chipset_mask & CSMASK_AGA)) {
if (res_shift == 0) {
switch (gfxvidinfo.pixbytes) {
case 1: src_pixel = linetoscr_8_aga_spr (src_pixel, start, stop); break;
}
}
} else
+#endif
+#ifdef ECS_DENISE
+ if (ecsshres) {
+ if (res_shift == 0) {
+ switch (gfxvidinfo.pixbytes) {
+ case 2: src_pixel = linetoscr_16_sh (src_pixel, start, stop); break;
+ case 4: src_pixel = linetoscr_32_sh (src_pixel, start, stop); break;
+ }
+ } else if (res_shift < 0) {
+ if (currprefs.gfx_lores_mode) {
+ switch (gfxvidinfo.pixbytes) {
+ case 2: src_pixel = linetoscr_16_shrink2_sh (src_pixel, start, stop); break;
+ case 4: src_pixel = linetoscr_32_shrink2_sh (src_pixel, start, stop); break;
+ }
+ } else {
+ switch (gfxvidinfo.pixbytes) {
+ case 2: src_pixel = linetoscr_16_shrink1_sh (src_pixel, start, stop); break;
+ case 4: src_pixel = linetoscr_32_shrink1_sh (src_pixel, start, stop); break;
+ }
+ }
+ }
+ } else
#endif
if (1) {
if (res_shift == 0) {
static void NOINLINE draw_sprites_normal_sp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 0, 0, 1, 0, 1); }
static void NOINLINE draw_sprites_normal_dp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 0, 1, 1, 0, 1); }
static void NOINLINE draw_sprites_ham_sp_hi_at (struct sprite_entry *e) { draw_sprites_1 (e, 1, 0, 1, 0, 1); }
+/* shres bitplane, lores sprites (emulation restriction, real ECS SHRES uses hires), ECS DENISE only */
+static void NOINLINE draw_sprites_normal_sp_shi_nat (struct sprite_entry *e) { draw_sprites_2 (e, 0, 0, 2, 0, 1, 0, 0, 0); }
#ifdef AGA
/* not very optimized */
STATIC_INLINE void draw_sprites_ecs (struct sprite_entry *e)
{
- if (e->has_attached)
- if (bplres == 1)
+ int res = bplres;
+ if (e->has_attached) {
+ if (res == 1)
if (dp_for_drawing->ham_seen)
draw_sprites_ham_sp_hi_at (e);
else
draw_sprites_normal_dp_lo_at (e);
else
draw_sprites_normal_sp_lo_at (e);
- else
- if (bplres == 1)
+ } else {
+ if (res == 1)
if (dp_for_drawing->ham_seen)
draw_sprites_ham_sp_hi_nat (e);
else
draw_sprites_normal_dp_hi_nat (e);
else
draw_sprites_normal_sp_hi_nat (e);
- else
+ else if (bplres == 0)
if (dp_for_drawing->ham_seen)
draw_sprites_ham_sp_lo_nat (e);
else
draw_sprites_normal_dp_lo_nat (e);
else
draw_sprites_normal_sp_lo_nat (e);
+#ifdef ECS_DENISE
+ else if (res == 2) /* ECS SHRES = hardware limits to non-attached */
+ draw_sprites_normal_sp_shi_nat (e);
+#endif
+ }
}
#ifdef AGA
bplplanecnt = dp_for_drawing->nr_planes;
bplham = dp_for_drawing->ham_seen;
issprites = dip_for_drawing->nr_sprites;
+#ifdef ECS_DENISE
+ ecsshres = bplres == RES_SUPERHIRES && (currprefs.chipset_mask & CSMASK_ECS_DENISE) && !(currprefs.chipset_mask & CSMASK_AGA);
+#endif
if (bplres > 0)
frame_res = 1;
brdsprt = !brdblank && (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
#endif
}
+
static void pfield_expand_dp_bplcon2 (int regno, int v)
{
regno -= 0x1000;
pfield_init_linetoscr ();
pfield_doline (lineno);
- adjust_drawing_colors (dp_for_drawing->ctable, dp_for_drawing->ham_seen || bplehb);
+ adjust_drawing_colors (dp_for_drawing->ctable, dp_for_drawing->ham_seen || bplehb || ecsshres);
/* The problem is that we must call decode_ham() BEFORE we do the
sprites. */
}
bplham = dp_for_drawing->ham_at_start;
}
+
if (plf2pri > 5 && bplplanecnt == 5 && !(currprefs.chipset_mask & CSMASK_AGA))
weird_bitplane_fix ();
#endif
for (i = 0; i < dip_for_drawing->nr_sprites; i++) {
#ifdef AGA
- if ((currprefs.chipset_mask & CSMASK_AGA) || sprite_buffer_res > RES_LORES)
+ if (currprefs.chipset_mask & CSMASK_AGA)
draw_sprites_aga (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
else
#endif
} else {
visible_left_border = max_diwlastword - gfxvidinfo.width;
if (doublescan)
- visible_left_border = max_diwlastword / 2 - gfxvidinfo.width;
+ visible_left_border = (max_diwlastword - 48) / 2 - gfxvidinfo.width;
}
if (visible_left_border > max_diwlastword - 32)
visible_left_border = max_diwlastword - 32;
changed_prefs.gfx_resolution = (m & 2) == 0 ? 0 : 1;
changed_prefs.gfx_linedbl = (m & 1) == 0 ? 0 : 1;
if (currprefs.gfx_autoresolution) {
- changed_prefs.gfx_filter_horiz_zoom_mult = 1000 / (changed_prefs.gfx_resolution);
+ changed_prefs.gfx_filter_horiz_zoom_mult = 1000 >> changed_prefs.gfx_resolution;
changed_prefs.gfx_filter_vert_zoom_mult = (changed_prefs.gfx_linedbl + 1) * 500;
} else {
*dst = *src;
#define MAXVPOS 312
#else
#define MAXHPOS 256
-#define MAXVPOS 576
+#define MAXVPOS 592
#endif
/* PAL/NTSC values */
/* No divisors for MAX_PIXELS_PER_LINE; we support AGA and may one day
want to use SHRES sprites. */
-#define MAX_SPR_PIXELS (((MAXVPOS + 1)*2 + 1) * MAX_PIXELS_PER_LINE)
+#define MAX_SPR_PIXELS (((MAXVPOS + 1) * 2 + 1) * MAX_PIXELS_PER_LINE)
struct sprite_entry
{
case 4: /* ->Parallel port joystick adapter port #2 */
joy = ie->unit - 1;
if (ie->type & 4) {
+
if (state)
joybutton[joy] |= 1 << ie->data;
else
joybutton[joy] &= ~(1 << ie->data);
+
} else if (ie->type & 8) {
+
/* real mouse / analog stick mouse emulation */
int delta;
int deadzone = currprefs.input_joymouse_deadzone * max / 100;
if (max) {
- if (state < deadzone && state > -deadzone) {
+ if (state <= deadzone && state >= -deadzone) {
state = 0;
+ mouse_deltanoreset[joy][ie->data] = 0;
} else if (state < 0) {
state += deadzone;
+ mouse_deltanoreset[joy][ie->data] = 1;
} else {
state -= deadzone;
+ mouse_deltanoreset[joy][ie->data] = 1;
}
max -= deadzone;
delta = state * currprefs.input_joymouse_multiplier / max;
} else {
delta = state;
+ mouse_deltanoreset[joy][ie->data] = 0;
}
mouse_delta[joy][ie->data] += delta;
mouse_deltanoreset[joy][0] = 0;
} else if (ie->type & 128) { /* analog (paddle) */
+
int deadzone = currprefs.input_joymouse_deadzone * max / 100;
if (max) {
- if (state < deadzone && state > -deadzone) {
+ if (state <= deadzone && state >= -deadzone) {
state = 0;
} else if (state < 0) {
state += deadzone;
}
state = state / 256 + 128;
joydirpot[joy][ie->data] = state;
+
} else {
+
int left = oleft[joy], right = oright[joy], top = otop[joy], bot = obot[joy];
if (ie->type & 16) {
/* button to axis mapping */
if (right) joydir[joy] |= DIR_RIGHT;
if (top) joydir[joy] |= DIR_UP;
if (bot) joydir[joy] |= DIR_DOWN;
+
}
break;
case 0: /* ->KEY */
#define IDC_PORT1_JOYS 1027
#define IDC_SCREENMODE_RTG 1027
#define IDC_MBMEM1 1028
-#define IDC_SCREENMODE_RTG2 1028
#define IDC_SLOWMEM 1030
#define IDC_MBMEM2 1031
#define IDC_PARALLEL 1033
#define IDC_FS_RW 1777
#define IDC_DF3ENABLE 1778
#define IDC_HDF_RW 1778
+#define IDC_HDFINFO 1779
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 334
#define _APS_NEXT_COMMAND_VALUE 40029
-#define _APS_NEXT_CONTROL_VALUE 1779
+#define _APS_NEXT_CONTROL_VALUE 1780
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
#define IDC_FS_RW 1777
#define IDC_DF3ENABLE 1778
#define IDC_HDF_RW 1778
+#define IDC_HDFINFO 1779
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
// Microsoft Visual C++ generated resource script.\r
//\r
-#include "resource.h"\r
+#include "resource."\r
\r
#define APSTUDIO_READONLY_SYMBOLS\r
/////////////////////////////////////////////////////////////////////////////\r
CONTROL "uaenet.device",IDC_SANA2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,92,94,10\r
END\r
\r
-IDD_HARDFILE DIALOGEX 0, 0, 299, 224\r
+IDD_HARDFILE DIALOGEX 0, 0, 299, 249\r
STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
CAPTION "Hardfile Settings"\r
FONT 8, "MS Sans Serif", 0, 0, 0x0\r
BEGIN\r
- GROUPBOX "Settings",IDC_STATIC,10,5,280,127\r
+ GROUPBOX "Settings",IDC_STATIC,10,5,280,146\r
RTEXT "Path:",IDC_HARDFILE_DIR_TEXT,26,18,22,10\r
EDITTEXT IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL\r
PUSHBUTTON "...",IDC_SELECTOR,271,15,11,15\r
EDITTEXT IDC_SECTORS,155,111,35,15,ES_NUMBER\r
RTEXT "Block size:",IDC_BLOCKSIZE_TEXT,197,116,35,10\r
EDITTEXT IDC_BLOCKSIZE,237,111,35,15,ES_NUMBER\r
- GROUPBOX "New hard disk image file",IDC_STATIC,10,134,280,62\r
- PUSHBUTTON "Create",IDC_HF_CREATE,50,149,80,14\r
- EDITTEXT IDC_HF_SIZE,146,149,61,15,ES_NUMBER\r
- PUSHBUTTON "OK",IDOK,102,205,50,14\r
- PUSHBUTTON "Cancel",IDCANCEL,158,205,50,14\r
- EDITTEXT IDC_HF_DOSTYPE,146,172,61,15\r
- COMBOBOX IDC_HF_TYPE,50,172,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+ GROUPBOX "New hard disk image file",IDC_STATIC,10,156,280,62\r
+ PUSHBUTTON "Create",IDC_HF_CREATE,50,171,80,14\r
+ EDITTEXT IDC_HF_SIZE,146,171,61,15,ES_NUMBER\r
+ PUSHBUTTON "OK",IDOK,102,226,50,14\r
+ PUSHBUTTON "Cancel",IDCANCEL,158,226,50,14\r
+ EDITTEXT IDC_HF_DOSTYPE,146,194,61,15\r
+ COMBOBOX IDC_HF_TYPE,50,194,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
COMBOBOX IDC_HDF_CONTROLLER,73,112,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "DOS type",IDC_STATIC,214,174,32,10,SS_CENTERIMAGE\r
- RTEXT "MB",IDC_STATIC,214,152,13,10,SS_CENTERIMAGE\r
- RTEXT "Type:",IDC_STATIC,18,160,25,10,SS_CENTERIMAGE\r
+ RTEXT "DOS type",IDC_STATIC,214,196,32,10,SS_CENTERIMAGE\r
+ RTEXT "MB",IDC_STATIC,214,174,13,10,SS_CENTERIMAGE\r
+ RTEXT "Type:",IDC_STATIC,18,182,25,10,SS_CENTERIMAGE\r
RTEXT "HD Controller:",IDC_STATIC,13,113,52,10,SS_CENTERIMAGE\r
CONTROL "Autoboot",IDC_HDF_AUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,73,53,10\r
CONTROL "Do not mount",IDC_HDF_DONOTMOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,217,74,67,10\r
+ EDITTEXT IDC_HDFINFO,16,131,268,12,ES_CENTER | ES_READONLY\r
END\r
\r
IDD_FILESYS DIALOGEX 15, 25, 299, 111\r
BEGIN\r
IDD_HARDFILE, DIALOG\r
BEGIN\r
- BOTTOMMARGIN, 212\r
+ BOTTOMMARGIN, 224\r
END\r
END\r
#endif // APSTUDIO_INVOKED\r
#define CATWEASEL /* Catweasel MK2/3 support */
#define AHI /* AHI sound emulation */
#define ENFORCER /* UAE Enforcer */
-#define AGA /* AGA chipset emulation */
+#define ECS_DENISE /* ECS DENISE new features */
+#define AGA /* AGA chipset emulation (ECS_DENISE must be enabled) */
#define CD32 /* CD32 emulation */
#define CDTV /* CDTV emulation */
#define D3D /* D3D display filter support */
if (!minimized)
winuae_active (hWnd, minimized);
if (is3dmode() && normal_display_change_starting == 0)
- normal_display_change_starting = 1;
+ normal_display_change_starting = 10;
}
}
recursive--;
setmousestate (dinput_winmouse (), 0, mx, 0);
setmousestate (dinput_winmouse (), 1, my, 0);
}
- } else if ((!mouseactive && isfullscreen() <= 0)) {
+ } else if (!mouseactive && isfullscreen() <= 0) {
setmousestate (0, 0, mx, 1);
setmousestate (0, 1, my, 1);
}
typedef BOOL (CALLBACK* SETPROCESSDPIAWARE)(void);
typedef BOOL (CALLBACK* CHANGEWINDOWMESSAGEFILTER)(UINT, DWORD);
-#define MSGFLT_ADD 1
int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
SETPROCESSDPIAWARE pSetProcessDPIAware;
DWORD_PTR sys_aff;
+ HANDLE thread;
+ CHANGEWINDOWMESSAGEFILTER pChangeWindowMessageFilter;
original_affinity = 1;
GetProcessAffinityMask (GetCurrentProcess(), &original_affinity, &sys_aff);
-#if 0
- HANDLE thread;
thread = GetCurrentThread();
original_affinity = SetThreadAffinityMask(thread, 1);
- CHANGEWINDOWMESSAGEFILTER pChangeWindowMessageFilter;
pChangeWindowMessageFilter = (CHANGEWINDOWMESSAGEFILTER)GetProcAddress(
GetModuleHandle("user32.dll"), "ChangeWindowMessageFilter");
+#if 0
+#define MSGFLT_ADD 1
if (pChangeWindowMessageFilter)
pChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD);
#endif
+
pSetProcessDPIAware = (SETPROCESSDPIAWARE)GetProcAddress(
GetModuleHandle("user32.dll"), "SetProcessDPIAware");
if (pSetProcessDPIAware)
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 6
+#define WINUAEBETA 7
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 10, 28)
+#define WINUAEDATE MAKEBD(2007, 10, 31)
#define WINUAEEXTRA ""
#define WINUAEREV ""
BOOL Translated = FALSE;
UINT mbytes = 0;
- mbytes = GetDlgItemInt( hDlg, IDC_HF_SIZE, &Translated, FALSE );
+ mbytes = GetDlgItemInt(hDlg, IDC_HF_SIZE, &Translated, FALSE);
if (mbytes <= 0)
mbytes = 0;
if( !Translated )
struct fsvdlg_vals
{
- char volume[4096];
- char device[4096];
- char rootdir[4096];
+ char volume[MAX_DPATH];
+ char device[MAX_DPATH];
+ char rootdir[MAX_DPATH];
int bootpri;
int autoboot;
int donotmount;
struct hfdlg_vals
{
- char volumename[4096];
- char devicename[4096];
- char filename[4096];
- char fsfilename[4096];
+ char volumename[MAX_DPATH];
+ char devicename[MAX_DPATH];
+ char filename[MAX_DPATH];
+ char fsfilename[MAX_DPATH];
int sectors;
int reserved;
int surfaces;
sethardfile (hDlg);
}
+static void updatehdfinfo (HWND hDlg, int force)
+{
+ static uae_u64 bsize;
+ static uae_u8 id[4];
+ int blocks, cyls, i;
+ char tmp[200], idtmp[5], tmp2[200];
+
+ if (force) {
+ struct zfile *zf = zfile_fopen (current_hfdlg.filename, "rb");
+ if (zf) {
+ memset (id, 0, sizeof (id));
+ zfile_fread (id, 1, sizeof (id), zf);
+ zfile_fseek (zf, 0, SEEK_END);
+ bsize = zfile_ftell (zf);
+ zfile_fclose (zf);
+ }
+ }
+ cyls = 0;
+ if (current_hfdlg.blocksize * current_hfdlg.sectors * current_hfdlg.surfaces)
+ cyls = bsize / (current_hfdlg.blocksize * current_hfdlg.sectors * current_hfdlg.surfaces);
+ blocks = cyls * (current_hfdlg.sectors * current_hfdlg.surfaces);
+ for (i = 0; i < 4; i++) {
+ unsigned char c = id[i];
+ if (c < 32 || c > 126)
+ c = '.';
+ idtmp[i] = c;
+ idtmp[i + 1] = 0;
+ }
+
+ tmp[0] = 0;
+ if (bsize) {
+ sprintf (tmp2, " %s [%02X%02X%02X%02X]", idtmp, id[0], id[1], id[2], id[3]);
+ if (!cyls || !blocks)
+ sprintf (tmp, "%dMB", bsize / (1024 * 1024));
+ else
+ sprintf (tmp, "%d cyls, %d blocks, %.1fMB/%.1fMB",
+ cyls, blocks,
+ (double)blocks * 1.0 * current_hfdlg.blocksize / (1024.0 * 1024.0),
+ (double)bsize / (1024.0 * 1024.0));
+ if (cyls > 65535)
+ strcat (tmp, " [Too many cyls]");
+ strcat (tmp, tmp2);
+ }
+ SetDlgItemText (hDlg, IDC_HDFINFO, tmp);
+}
+
+
static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
LRESULT res, posn;
+ char tmp[MAX_DPATH];
switch (msg) {
case WM_INITDIALOG:
inithardfile (hDlg);
sethardfile (hDlg);
sethfdostype (hDlg, 0);
+ updatehdfinfo (hDlg, 1);
recursive--;
return TRUE;
GetDlgItemText (hDlg, IDC_PATH_NAME, current_hfdlg.filename, sizeof current_hfdlg.filename);
hardfile_testrdb (hDlg);
inithardfile(hDlg);
+ updatehdfinfo (hDlg, 1);
break;
case IDC_FILESYS_SELECTOR:
DiskSelection (hDlg, IDC_PATH_FILESYS, 12, &workprefs, 0);
break;
}
- GetDlgItemText (hDlg, IDC_PATH_NAME, current_hfdlg.filename, sizeof current_hfdlg.filename);
+ GetDlgItemText (hDlg, IDC_PATH_NAME, tmp, sizeof tmp);
+ if (strcmp (tmp, current_hfdlg.filename)) {
+ strcpy (current_hfdlg.filename, tmp);
+ updatehdfinfo (hDlg, 1);
+ }
GetDlgItemText (hDlg, IDC_PATH_FILESYS, current_hfdlg.fsfilename, sizeof current_hfdlg.fsfilename);
GetDlgItemText (hDlg, IDC_HARDFILE_DEVICE, current_hfdlg.devicename, sizeof current_hfdlg.devicename);
current_hfdlg.sectors = GetDlgItemInt(hDlg, IDC_SECTORS, NULL, FALSE);
posn = SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_GETCURSEL, 0, 0);
if (posn != CB_ERR)
current_hfdlg.controller = posn;
+ updatehdfinfo (hDlg, 0);
recursive--;
break;
+Beta 7:
+
+- added information text to hardfile panel.
+ RDB hardfile: size of selected file, first 4 bytes of data.
+ Regular hardfile: cylinders (warns if > 65535, OS3.5+ only), blocks,
+ current size and total size of hardfile, first 4 bytes of data.
+- analog joystick mouse emulation didn't "repeat"
+- graphics garbage in right border fixed (happened for example when
+ productivity mode with vgaonly was enabled)
+- CDTV CD ROM command 0x83 emulated, returns drive name/version string
+ ("MATSHITA0.97", also "MATSHITA0.96" exists. No idea if there are any
+ real differences). Another quite pointless feature because CDTV's
+ driver does not use command 0x83..
+- ECS superhires sprite positioning fixed. Note that ECS shres sprites
+ always have halved resolution (not size) due to emulation limitation
+- ECS superhires "palette scrambling" emulated, ECS shres colors should
+ be now 100% correct
+- some doublescan emulation tweaks
+
Beta 6:
- do not call CD32 CD emulation handler when non-CD controller