#define PCI_CW_MK4 _T("PCI\\VEN_E159&DEV_0001&SUBSYS_00035213")
#define PCI_CW_MK4_BUG _T("PCI\\VEN_E159&DEV_0001&SUBSYS_00025213")
-extern int os_winnt;
int force_direct_catweasel;
static int direct_detect(void)
{
int devIndex;
int cw = 0;
- if (!os_winnt)
- return 0;
devs = SetupDiGetClassDevsEx(NULL, NULL, NULL, DIGCF_ALLCLASSES | DIGCF_PRESENT, NULL, NULL, NULL);
if (devs == INVALID_HANDLE_VALUE)
return 0;
if (!(dmac_cntr & CNTR_PDMD)) { // non-scsi dma
write_comm_pipe_u32 (&requests, 0x0100, 1);
} else {
- scsi_dmac_start_dma (&wd_cdtv);
+ scsi_dmac_a2091_start_dma (&wd_cdtv);
}
}
static void dmac_stop_dma (void)
if (!(dmac_cntr & CNTR_PDMD)) { // non-scsi dma
;
} else {
- scsi_dmac_stop_dma (&wd_cdtv);
+ scsi_dmac_a2091_stop_dma (&wd_cdtv);
}
}
{
int irq = 0;
- if (currprefs.cs_cdtvscsi && (wdscsi_getauxstatus (&wd_cdtv) & 0x80)) {
+ if (currprefs.cs_cdtvscsi && (wdscsi_getauxstatus (&wd_cdtv.wc) & 0x80)) {
dmac_istr |= ISTR_INTS;
if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_INTS))
irq = 1;
break;
case 0x91:
if (currprefs.cs_cdtvscsi)
- v = wdscsi_getauxstatus (&wd_cdtv);
+ v = wdscsi_getauxstatus (&wd_cdtv.wc);
break;
case 0x93:
if (currprefs.cs_cdtvscsi) {
- v = wdscsi_get (&wd_cdtv);
+ v = wdscsi_get (&wd_cdtv.wc, &wd_cdtv);
checkint ();
}
break;
break;
case 0x91:
if (currprefs.cs_cdtvscsi) {
- wdscsi_sasr (&wd_cdtv, b);
+ wdscsi_sasr (&wd_cdtv.wc, b);
checkint ();
}
break;
case 0x93:
if (currprefs.cs_cdtvscsi) {
- wdscsi_put (&wd_cdtv, b);
+ wdscsi_put (&wd_cdtv.wc, &wd_cdtv, b);
checkint ();
}
break;
_T("WarpEngineA4000"),
_T("TekMagic"),
_T("A2630"),
+ _T("DKB12x0"),
+ _T("FusionForty"),
NULL
};
static const TCHAR *ppc_implementations[] = {
static const TCHAR *hdcontrollers[] = {
_T("uae"),
_T("ide%d"),
- _T("scsi%d"), _T("scsi%d_a2091"), _T("scsi%d_a2091-2"), _T("scsi%d_a4091"), _T("scsi%d_a4091-2"),
+ _T("scsi%d"), _T("scsi%d_a2091"), _T("scsi%d_a2091-2"), _T("scsi%d_gvp"), _T("scsi%d_gvp-2"), _T("scsi%d_a4091"), _T("scsi%d_a4091-2"),
_T("scsi%d_fastlane"), _T("scsi%d_fastlane-2"),
_T("scsi%d_oktagon2008"), _T("scsi%d_oktagon2008-2"),
_T("scsi%d_a3000"), _T("scsi%d_a4000t"), _T("scsi%d_cdtv"), _T("scsi%d_cpuboard"),
cfgfile_write_str (f, _T("kickstart_ext_rom="), p->romextident);
cfgfile_write_board_rom(f, &p->path_rom, &p->a2091rom, _T("a2091"));
+ cfgfile_write_board_rom(f, &p->path_rom, &p->gvprom, _T("gvp"));
cfgfile_write_board_rom(f, &p->path_rom, &p->a4091rom, _T("a4091"));
cfgfile_write_board_rom(f, &p->path_rom, &p->fastlanerom, _T("fastlane"));
cfgfile_write_board_rom(f, &p->path_rom, &p->oktagonrom, _T("oktagon2008"));
cfgfile_dwrite (f, _T("catweasel"), _T("0x%x"), p->catweasel);
else
cfgfile_dwrite (f, _T("catweasel"), _T("%d"), p->catweasel);
+ cfgfile_write_bool(f, _T("toccata"), p->sound_toccata);
+
cfgfile_write_str (f, _T("kbd_lang"), (p->keyboard_lang == KBD_LANG_DE ? _T("de")
: p->keyboard_lang == KBD_LANG_DK ? _T("dk")
cfgfile_dwrite (f, _T("filesys_max_size"), _T("%d"), p->filesys_limit);
cfgfile_dwrite (f, _T("filesys_max_name_length"), _T("%d"), p->filesys_max_name);
cfgfile_dwrite (f, _T("filesys_max_file_size"), _T("%d"), p->filesys_max_file_size);
+ cfgfile_dwrite_bool (f, _T("filesys_inject_icons"), p->filesys_inject_icons);
+ cfgfile_dwrite_str (f, _T("filesys_inject_icons_drawer"), p->filesys_inject_icons_drawer);
+ cfgfile_dwrite_str (f, _T("filesys_inject_icons_project"), p->filesys_inject_icons_project);
+ cfgfile_dwrite_str (f, _T("filesys_inject_icons_tool"), p->filesys_inject_icons_tool);
cfgfile_dwrite_str (f, _T("scsidev_mode"), uaescsidevmodes[p->uaescsidevmode]);
#endif
|| cfgfile_intval (option, value, _T("filesys_max_size"), &p->filesys_limit, 1)
|| cfgfile_intval (option, value, _T("filesys_max_name_length"), &p->filesys_max_name, 1)
|| cfgfile_intval (option, value, _T("filesys_max_file_size"), &p->filesys_max_file_size, 1)
+ || cfgfile_yesno (option, value, _T("filesys_inject_icons"), &p->filesys_inject_icons)
+ || cfgfile_string (option, value, _T("filesys_inject_icons_drawer"), p->filesys_inject_icons_drawer, sizeof p->filesys_inject_icons_drawer / sizeof (TCHAR))
+ || cfgfile_string (option, value, _T("filesys_inject_icons_project"), p->filesys_inject_icons_project, sizeof p->filesys_inject_icons_project / sizeof (TCHAR))
+ || cfgfile_string (option, value, _T("filesys_inject_icons_tool"), p->filesys_inject_icons_tool, sizeof p->filesys_inject_icons_tool / sizeof (TCHAR))
|| cfgfile_intval (option, value, _T("gfx_luminance"), &p->gfx_luminance, 1)
|| cfgfile_intval (option, value, _T("gfx_contrast"), &p->gfx_contrast, 1)
|| cfgfile_yesno (option, value, _T("rtg_nocustom"), &p->picasso96_nocustom)
|| cfgfile_yesno (option, value, _T("floppy_write_protect"), &p->floppy_read_only)
|| cfgfile_yesno (option, value, _T("uae_hide_autoconfig"), &p->uae_hide_autoconfig)
+ || cfgfile_yesno (option, value, _T("toccata"), &p->sound_toccata)
|| cfgfile_yesno (option, value, _T("uaeserial"), &p->uaeserial))
return 1;
return 1;
}
- if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->a2091rom, _T("a2091"), ROMTYPE_A2091BOOT))
+ if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->a2091rom, _T("a2091"), ROMTYPE_A2091))
+ return 1;
+ if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->gvprom, _T("gvp"), ROMTYPE_GVP))
return 1;
- if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->a4091rom, _T("a4091"), ROMTYPE_A4091BOOT))
+ if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->a4091rom, _T("a4091"), ROMTYPE_A4091))
return 1;
if (cfgfile_read_board_rom(option, value, &p->path_rom, &p->fastlanerom, _T("fastlane"), ROMTYPE_FASTLANE))
return 1;
subst(p->path_rom.path[0], p->acceleratorextromfile, sizeof p->acceleratorextromfile / sizeof(TCHAR));
for (i = 0; i < MAX_BOARD_ROMS; i++) {
- subst (p->path_rom.path[0], p->a2091rom.roms[i].romfile, MAX_DPATH / sizeof (TCHAR));
- subst (p->path_rom.path[0], p->a4091rom.roms[i].romfile, MAX_DPATH / sizeof (TCHAR));
- subst (p->path_rom.path[0], p->fastlanerom.roms[i].romfile, MAX_DPATH / sizeof (TCHAR));
+ subst(p->path_rom.path[0], p->a2091rom.roms[i].romfile, MAX_DPATH / sizeof(TCHAR));
+ subst(p->path_rom.path[0], p->gvprom.roms[i].romfile, MAX_DPATH / sizeof(TCHAR));
+ subst(p->path_rom.path[0], p->a4091rom.roms[i].romfile, MAX_DPATH / sizeof(TCHAR));
+ subst(p->path_rom.path[0], p->fastlanerom.roms[i].romfile, MAX_DPATH / sizeof (TCHAR));
}
return 1;
}
}
- if (mmu040_movem && !write) {
- // save EA when MOVEM is something like
+ if (mmu040_movem) {
ssw |= MMU_SSW_CM;
regs.mmu_effective_addr = mmu040_movem_ea;
mmu040_movem = 0;
#include "sampler.h"
#include "clipboard.h"
#include "cpuboard.h"
+#include "sndboard.h"
#ifdef RETROPLATFORM
#include "rp.h"
#endif
last_fetch_hpos = hstart;
}
-#if 0
-/* this may turn on datafetch if program turns dma on during the ddf */
-static void maybe_start_bpl_dma (int hpos)
-{
- /* OCS: BPL DMA never restarts if DMA is turned on during DDF
- * ECS/AGA: BPL DMA restarts but only if DMA was turned off
- outside of DDF or during current line, otherwise display
- processing jumps immediately to "DDFSTOP passed"-condition */
- if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS)) {
- bitplane_dma_turned_on = hpos;
- return;
- }
- if (fetch_state != fetch_not_started)
- return;
- if (diwstate != DIW_waiting_stop)
- return;
- if (hpos <= plfstrt)
- return;
- if (hpos >= plfstop)
- return;
- if (ddfstate != DIW_waiting_start)
- plf_state = plf_passed_stop;
- start_bpl_dma (hpos, hpos);
-}
-#endif
-
STATIC_INLINE bool cant_this_last_line (void)
{
+ // Last line..
+ // ..works normally if A1000 Agnus
+ if (currprefs.cs_dipagnus)
+ return false;
+ // ..inhibits bitplane and sprite DMA if later Agnus revision.
return vpos + 1 >= maxvpos + lof_store;
}
/* This function is responsible for turning on datafetch if necessary. */
static void decide_line (int hpos)
{
+
/* Take care of the vertical DIW. */
if (vpos == plffirstline) {
// A1000 Agnus won't start bitplane DMA if vertical diw is zero.
}
if (diwstate == DIW_waiting_stop) {
+ bool strtpassed = false;
if (dmaecs) {
if (last_decide_line_hpos < plfstrt && hpos >= plfstrt) {
if (plf_state == plf_start && hpos - 2 != ddfstrt_old_hpos)
plf_state = plf_active;
bplstart = plfstrt;
+ /* needed to handle non-cycle exact situation where single call to
+ * decide_line() handles both start and stop conditions
+ */
+ strtpassed = true;
+ }
+ }
+
+ if (dma) {
+ if (plf_state == plf_active && (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS) || hpos >= 0x18 || HARD_DDF_LIMITS_DISABLED)) {
+ start_bpl_dma (hpos, bplstart);
+ last_decide_line_hpos = hpos;
+#ifndef CUSTOM_SIMPLE
+ do_sprites (hpos);
+#endif
+ return;
}
}
if (dmaecs) {
// did we just match ddfstop - 3 but missed ddfstrt? DMA starts from passed plfstop state.
- if (last_decide_line_hpos > plfstrt && (plf_state == plf_active || plf_state == plf_wait_stop) && diwstate == DIW_waiting_stop) {
- int stop = get_ddfstop_to_test (last_decide_line_hpos);
+ if ((last_decide_line_hpos > plfstrt || (strtpassed && plfstop >= plfstrt)) && (plf_state == plf_active || plf_state == plf_wait_stop) && diwstate == DIW_waiting_stop) {
+ int stop = get_ddfstop_to_test(last_decide_line_hpos);
if (last_decide_line_hpos < stop && hpos >= stop - 3) {
if (dma) {
// we did, fetches start!
bplstart = plfstop;
plf_state = plf_active;
- } else {
+ }
+ else {
// line done
plf_state = plf_end;
}
}
}
- if (dma) {
- if (plf_state == plf_active && (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS) || hpos >= 0x18 || HARD_DDF_LIMITS_DISABLED)) {
- start_bpl_dma (hpos, bplstart);
- last_decide_line_hpos = hpos;
-#ifndef CUSTOM_SIMPLE
- do_sprites (hpos);
-#endif
- return;
- }
- }
}
}
double clk = svpos * shpos * fake_vblank_hz;
//write_log (_T("SNDRATE %.1f*%.1f*%.6f=%.6f\n"), svpos, shpos, fake_vblank_hz, clk);
update_sound (clk);
+ update_sndboard_sound (clk);
}
cd32_fmv_set_sync(svpos);
}
#endif
#ifdef NCR9X
ncr9x_rethink();
+#endif
+#ifdef WITH_TOCCATA
+ sndboard_rethink();
#endif
rethink_gayle ();
/* cpuboard_rethink must be last */
decide_line (hpos);
decide_fetch_safe (hpos);
reset_dbplh (hpos, num);
- //v += corrupt_offset;
/* chipset feature: BPLxPTL write and next cycle doing DMA fetch using same pointer register ->
* this write goes nowhere (same happens with all DMA channels, not just BPL)
* (intro MoreNewStuffy by PlasmaForce)
cop_state.hpos = hpos;
cop_state.vpos = vp;
cop_state.state = COP_wait;
+ /* No need to check blitter state again */
cop_state.saved_i2 |= 0x8000;
#ifdef DEBUGGER
} else {
unset_special (SPCFLAG_COPPER);
}
-
-#if 0
- hpos += 3;
- hpos &= ~1;
- if (hpos >= maxhpos) {
- hpos -= maxhpos;
- vp++;
- }
- cop_state.hpos = hpos;
- cop_state.vpos = vp;
- cop_state.state = COP_read1;
-
-#ifdef DEBUGGER
- if (debug_dma)
- record_dma_event (DMA_EVENT_COPPERWAKE, hpos, vp);
- if (debug_copper)
- record_copper_blitwait (cop_state.ip - 4, hpos, vp);
-#endif
-
- if (dmaen (DMA_COPPER) && vp == vpos) {
- copper_enabled_thisline = 1;
- set_special (SPCFLAG_COPPER);
- }
-#endif
}
void do_copper (void)
// fetch both sprite pairs even if DMA was switched off between sprites
int isdma = dmaen (DMA_SPRITE) || ((num & 1) && spr[num & ~1].dmacycle);
- // A1000 Agnus off by one.
- if (cant_this_last_line() && !currprefs.cs_dipagnus)
+ if (cant_this_last_line())
return;
- if (isdma && vpos == sprite_vblank_endline)
- spr_arm (num, 0);
+// see SPRxCTRL below
+// if (isdma && vpos == sprite_vblank_endline)
+// spr_arm (num, 0);
#ifdef AGA
if (isdma && s->dblscan && (fmode & 0x8000) && (vpos & 1) != (s->vstart & 1) && s->dmastate) {
SPRxPOS_1 (data, num, hpos);
s->dmacycle = 1;
} else {
+ // This is needed to disarm previous field's sprite.
+ // It can be seen on OCS Agnus + ECS Denise combination where
+ // this cycle is disabled due to weird DDFTSTR=$18 copper list
+ // which causes corrupted sprite to "wrap around" the display.
SPRxCTL_1 (data, num, hpos);
s->dmastate = 0;
sprstartstop (s);
if (!picasso_on)
gfxboard_vsync_handler ();
#endif
-
+#ifdef WITH_TOCCATA
+ sndboard_vsync();
+#endif
if (varsync_changed || (beamcon0 & (0x20 | 0x80)) != (new_beamcon0 & (0x20 | 0x80))) {
init_hz ();
} else if (vpos_count > 0 && abs (vpos_count - vpos_count_diff) > 1 && vposw_change < 4) {
#ifdef WITH_PPC
uae_ppc_hsync_handler();
cpuboard_hsync();
+#endif
+#ifdef WITH_TOCCATA
+ sndboard_hsync();
#endif
DISK_hsync ();
if (currprefs.produce_sound)
}
#endif
if (currprefs.m68k_speed < 0 && !currprefs.cpu_cycle_exact) {
+ static int sleeps_remaining;
if (is_last_line ()) {
+ sleeps_remaining = (165 - currprefs.cpu_idle) / 6;
+ if (sleeps_remaining < 0)
+ sleeps_remaining = 0;
/* really last line, just run the cpu emulation until whole vsync time has been used */
- if (currprefs.m68k_speed_throttle) {
+ if (regs.stopped && currprefs.cpu_idle) {
+ // CPU in STOP state: sleep if enough time left.
+ frame_time_t rpt = read_processor_time ();
+ while (!vsync_isdone () && (int)vsyncmintime - (int)(rpt + vsynctimebase / 10) > 0 && (int)vsyncmintime - (int)rpt < vsynctimebase) {
+ cpu_sleep_millis(1);
+ rpt = read_processor_time ();
+ }
+ } else if (currprefs.m68k_speed_throttle) {
vsyncmintime = read_processor_time (); /* end of CPU emulation time */
is_syncline = 0;
} else {
frame_time_t rpt = read_processor_time ();
/* Extra time left? Do some extra CPU emulation */
if ((int)vsyncmintime - (int)rpt > 0) {
- is_syncline = 1;
- /* limit extra time */
- is_syncline_end = rpt + vsynctimeperline;
- linecounter = 0;
+ if (regs.stopped && currprefs.cpu_idle && sleeps_remaining > 0) {
+ // STOP STATE: sleep.
+ cpu_sleep_millis(1);
+ sleeps_remaining--;
+ } else {
+ is_syncline = 1;
+ /* limit extra time */
+ is_syncline_end = rpt + vsynctimeperline;
+ linecounter = 0;
+ }
}
}
if (!isvsync ()) {
// extra cpu emulation time if previous 10 lines without extra time.
- if (!is_syncline && linecounter >= 10) {
+ if (!is_syncline && linecounter >= 10 && (!regs.stopped || !currprefs.cpu_idle)) {
is_syncline = -1;
is_syncline_end = read_processor_time () + vsynctimeperline;
linecounter = 0;
gayle_reset (0);
#ifdef A2091
a2091_reset ();
+ gvp_reset ();
#endif
#ifdef GFXBOARD
gfxboard_reset ();
#endif
+#ifdef WITH_TOCCATA
+ sndboard_reset();
+#endif
#ifdef NCR
ncr710_reset();
ncr_reset();
else
dstbak = dst = xmalloc (uae_u8, 1000);
- SL ((currprefs.cs_compatible << 24) | (&get_mem_bank (0) != &chipmem_bank ? 2 : 0) | 1);
+ SL ((currprefs.cs_compatible << 24) | (get_mem_bank_real(0) != &chipmem_bank ? 2 : 0) | 1);
SB (currprefs.genlock ? 1 : 0);
SB (currprefs.cs_rtc);
SL (currprefs.cs_rtc_adjust);
uaecptr addr = *addrp;
addrbank *ba;
int offset = munge24 (addr) >> 16;
+ if (!debug_mem_banks)
+ return offset;
ba = debug_mem_banks[offset];
+ if (!ba)
+ return offset;
addr = (addr & ba->mask) | ba->startmask;
*addrp = addr;
return offset;
TCHAR tmp[200];
_stprintf (tmp, _T("%s [D]"), bank->name);
ms->addr = bank;
+ ms->banknr = banknr;
newbank = &ms->newbank;
memcpy (newbank, bank, sizeof addrbank);
newbank->bget = mode ? mmu_bget : debug_bget;
return -1;
}
+addrbank *get_mem_bank_real(uaecptr addr)
+{
+ addrbank *ab = &get_mem_bank(addr);
+ if (!memwatch_enabled)
+ return ab;
+ addrbank *ab2 = debug_mem_banks[addr >> 16];
+ if (ab2)
+ return ab2;
+ return ab;
+}
+
struct mw_acc
{
uae_u32 mask;
int do_double = 0;
bool have_color_changes;
enum double_how dh;
+ int ls = linestate[lineno];
dp_for_drawing = line_decisions + lineno;
dip_for_drawing = curr_drawinfo + lineno;
resolution_count[dp_for_drawing->bplres]++;
}
- switch (linestate[lineno])
+ switch (ls)
{
case LINE_REMEMBERED_AS_PREVIOUS:
// if (!warned) // happens when program messes up with VPOSW
int tmp = hposblank;
hposblank = 1;
fill_line_border ();
- do_flush_line (vb, gfx_ypos);
hposblank = tmp;
+ do_flush_line(vb, gfx_ypos);
}
}
maxline = ((maxvpos_display + 1) << linedbl) + 2;
#ifdef SMART_UPDATE
for (i = 0; i < maxline; i++) {
- switch (linestate[i]) {
+ int ls = linestate[i];
+ switch (ls) {
case LINE_DONE_AS_PREVIOUS:
linestate[i] = LINE_REMEMBERED_AS_PREVIOUS;
break;
struct vidbuffer *xvbin, *xvbout;
+#define LARGEST_LINE_DEBUG 0
+
static void draw_frame2 (struct vidbuffer *vbin, struct vidbuffer *vbout)
{
int i;
xvbin = vbin;
xvbout = vbout;
-// int largest = 0;
+#if LARGEST_LINE_DEBUG
+ int largest = 0;
+#endif
for (i = 0; i < max_ypos_thisframe; i++) {
int i1 = i + min_ypos_for_screen;
int line = i + thisframe_y_adjust_real;
- int where2 = amiga2aspect_line_map[i1];
+ int whereline = amiga2aspect_line_map[i1];
+ int wherenext = amiga2aspect_line_map[i1 + 1];
- if (where2 >= vbin->inheight)
+ if (whereline >= vbin->inheight)
break;
- if (where2 < 0)
+ if (whereline < 0)
continue;
-// if (largest < where2)
-// largest = where2;
+#if LARGEST_LINE_DEBUG
+ if (largest < whereline)
+ largest = whereline;
+#endif
+
hposblank = 0;
- pfield_draw_line (vbout, line, where2, amiga2aspect_line_map[i1 + 1]);
+ pfield_draw_line(vbout, line, whereline, wherenext);
}
+
+#if LARGEST_LINE_DEBUG
//write_log (_T("%d\n"), largest);
+#endif
}
bool draw_frame (struct vidbuffer *vb)
case nln_lower_black_always:
state[1] = LINE_BLACK;
*state = LINE_DECIDED;
+// if (lineno == (maxvpos + lof_store) * 2 - 1)
+// *state = LINE_BLACK;
break;
case nln_lower_black:
changed += state[0] != LINE_DONE;
state[1] = LINE_DONE;
*state = changed ? LINE_DECIDED : LINE_DONE;
+// if (lineno == (maxvpos + lof_store) * 2 - 1)
+// *state = LINE_BLACK;
break;
case nln_upper_black_always:
*state = LINE_DECIDED;
state[-1] = LINE_BLACK;
+ if (!interlace_seen && lineno == (maxvpos + lof_store) * 2 - 2)
+ state[1] = LINE_BLACK;
break;
case nln_upper_black:
changed += state[0] != LINE_DONE;
*state = changed ? LINE_DECIDED : LINE_DONE;
state[-1] = LINE_DONE;
+ if (!interlace_seen && lineno == (maxvpos + lof_store) * 2 - 2)
+ state[1] = LINE_DONE;
break;
}
}
#include "debug.h"
#include "gayle.h"
#include "cpuboard.h"
+#include "sndboard.h"
#include "uae/ppc.h"
#define EXP_DEBUG 0
if (ecard < cardno) {
call_card_init(ecard);
} else {
- expamem_init_clear2 ();
+ expamem_init_clear2();
+ expamem_init_last();
}
}
uae_u8 pid;
uae_u8 type = add_memory | zorroII | (cfgfile_board_enabled(&currprefs.a2091rom) && !boardnum ? chainedconfig : 0);
int allocated = boardnum ? fastmem2_bank.allocated : fastmem_bank.allocated;
+ uae_u32 serial = 1;
expamem_init_clear ();
if (allocated == 65536)
} else if (cfgfile_board_enabled(&currprefs.a2091rom) || currprefs.uae_hide) {
pid = commodore_a2091_ram;
mid = commodore;
+ serial = 0;
+ } else if (cfgfile_board_enabled(&currprefs.gvprom)) {
+ pid = 10;
+ mid = 2017;
+ serial = 0;
} else {
pid = currprefs.maprom && !currprefs.cpuboard_type ? 1 : 81;
mid = uae_id;
expamem_write (0x10, mid >> 8);
expamem_write (0x14, mid & 0xff);
- expamem_write (0x18, 0x00); /* ser.no. Byte 0 */
- expamem_write (0x1c, 0x00); /* ser.no. Byte 1 */
- expamem_write (0x20, 0x00); /* ser.no. Byte 2 */
- expamem_write (0x24, 0x01); /* ser.no. Byte 3 */
+ expamem_write (0x18, serial >> 24); /* ser.no. Byte 0 */
+ expamem_write (0x1c, serial >> 16); /* ser.no. Byte 1 */
+ expamem_write (0x20, serial >> 8); /* ser.no. Byte 2 */
+ expamem_write (0x24, serial >> 0); /* ser.no. Byte 3 */
expamem_write (0x28, 0x00); /* Rom-Offset hi */
expamem_write (0x2c, 0x00); /* ROM-Offset lo */
return v;
}
+#ifdef WITH_TOCCATA
+static addrbank *expamem_init_toccata(void)
+{
+ return sndboard_init();
+}
+#endif
#ifdef A2065
static addrbank *expamem_init_a2065(void)
{
return a2091_init (1);
}
#endif
+#ifdef A2091
+static addrbank *expamem_init_gvp(void)
+{
+ return gvp_init(0);
+}
+#endif
+#ifdef A2091
+static addrbank *expamem_init_gvp_2(void)
+{
+ return gvp_init(1);
+}
+#endif
#ifdef NCR
static addrbank *expamem_init_a4091(void)
{
{
return ncr710_warpengine_autoconfig_init();
}
+static addrbank *expamem_init_dkb1200(void)
+{
+ return ncr_dkb_autoconfig_init();
+}
#endif
#ifdef GFXBOARD
static addrbank *expamem_init_gfxboard_memory(void)
card_map[cardno++] = NULL;
}
#endif
+#ifdef A2091
+ if (cfgfile_board_enabled(&currprefs.gvprom)) {
+ card_flags[cardno] = 0;
+ card_name[cardno] = _T("GVP");
+ card_init[cardno] = expamem_init_gvp;
+ card_map[cardno++] = NULL;
+ card_name[cardno] = _T("GVP #2");
+ card_init[cardno] = expamem_init_gvp_2;
+ card_map[cardno++] = NULL;
+ }
+#endif
#ifdef NCR
if (cfgfile_board_enabled(&currprefs.oktagonrom)) {
card_name[cardno] = _T("Oktagon 2008");
}
}
#endif
+#ifdef WITH_TOCCATA
+ if (currprefs.sound_toccata) {
+ card_flags[cardno] = 0;
+ card_name[cardno] = _T("Toccata");
+ card_init[cardno] = expamem_init_toccata;
+ card_map[cardno++] = NULL;
+ }
+#endif
/* Z3 boards last */
if (!currprefs.address_space_24) {
card_init[cardno] = expamem_init_warpengine;
card_map[cardno++] = NULL;
}
+ if (currprefs.cpuboard_type == BOARD_DKB1200) {
+ card_name[cardno] = _T("DKB SCSI");
+ card_init[cardno] = expamem_init_dkb1200;
+ card_map[cardno++] = NULL;
+ }
if (z3fastmem_bank.baseaddr != NULL) {
z3num = 0;
card_flags[cardno] = 2 | 1;
#endif
}
- if (cardno > 0 && cardno < MAX_EXPANSION_BOARDS) {
- card_flags[cardno] = 0;
- card_name[cardno] = _T("Empty");
- card_init[cardno] = expamem_init_last;
- card_map[cardno++] = expamem_map_clear;
- }
-
expamem_z3_pointer = 0;
expamem_z3_sum = 0;
if (cardno == 0 || savestate_state)
static int filesys_in_interrupt;
static uae_u32 mountertask;
static int automountunit = -1;
+static int autocreatedunit;
static int cd_unit_offset, cd_unit_number;
#define FS_STARTUP 0
if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
warpengine_add_scsi_unit(unit, uci);
added = true;
+ } else if (currprefs.cpuboard_type == BOARD_DKB1200) {
+ cpuboard_dkb_add_scsi_unit(unit, uci);
+ added = true;
} else if (currprefs.cpuboard_type == BOARD_TEKMAGIC) {
tekmagic_add_scsi_unit(unit, uci);
added = true;
} else if (type == HD_CONTROLLER_TYPE_SCSI_A2091) {
#ifdef A2091
if (cfgfile_board_enabled(&currprefs.a2091rom)) {
- a2091_add_scsi_unit (unit, uci, 0);
+ a2091_add_scsi_unit(unit, uci, 0);
added = true;
}
#endif
} else if (type == HD_CONTROLLER_TYPE_SCSI_A2091_2) {
#ifdef A2091
if (cfgfile_board_enabled(&currprefs.a2091rom)) {
- a2091_add_scsi_unit (unit, uci, 1);
+ a2091_add_scsi_unit(unit, uci, 1);
+ added = true;
+ }
+#endif
+ } else if (type == HD_CONTROLLER_TYPE_SCSI_GVP) {
+#ifdef A2091
+ if (cfgfile_board_enabled(&currprefs.gvprom)) {
+ gvp_add_scsi_unit(unit, uci, 0);
+ added = true;
+ }
+#endif
+ }
+ else if (type == HD_CONTROLLER_TYPE_SCSI_GVP_2) {
+#ifdef A2091
+ if (cfgfile_board_enabled(&currprefs.gvprom)) {
+ gvp_add_scsi_unit(unit, uci, 1);
added = true;
}
#endif
UnitInfo *uip = &mountinfo.ui[0];
cd_unit_offset = MAX_FILESYSTEM_UNITS;
+ autocreatedunit = 0;
for (nr = 0; nr < currprefs.mountitems; nr++) {
struct uaedev_config_data *uci = &currprefs.mountconfig[nr];
return (uae_u32)fs_fsize64 (fsf);
}
+static uae_s64 key_filesize(Key *k)
+{
+ if (k->aino->vfso)
+ return k->aino->vfso->size;
+ return fs_fsize64 (k->fd);
+}
+static uae_s64 key_seek(Key *k, uae_s64 offset, int whence)
+{
+ if (k->aino->vfso)
+ return k->file_pos;
+ return fs_lseek64 (k->fd, offset, whence);
+}
+
static void set_highcyl (UnitInfo *ui, uae_u32 blocks)
{
uaecptr startup = get_long (ui->devicenode + 7 * 4) << 2;
if (uci)
_tcscpy (devname, uci->ci.devname);
else
- _stprintf (devname, _T("RDH%d"), nr_units ());
+ _stprintf (devname, _T("RDH%d"), autocreatedunit++);
_tcscpy (ci.devname, devname);
_tcscpy (ci.volname, volptr);
_tcscpy (ci.rootdir, rootdir);
}
/* Different version because for this one, REL is an nname. */
-static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, TCHAR *rel, uae_u32 *err, uae_u64 uniq_external)
+static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, TCHAR *rel, uae_u32 *err, uae_u64 uniq_external, struct virtualfilesysobject *vfso)
{
a_inode *c = base->child;
int l0 = _tcslen (rel);
}
if (c != 0)
return c;
- if (!isvirtual)
+ if (!isvirtual && !vfso)
c = fsdb_lookup_aino_nname (base, rel);
if (c == 0) {
c = xcalloc (a_inode, 1);
c->comment = 0;
c->uniq_external = uniq_external;
c->has_dbentry = 0;
- if (!fill_file_attrs (unit, base, c)) {
+ if (vfso) {
+ c->dir = vfso->dir;
+ c->comment = my_strdup(vfso->comment);
+ c->amigaos_mode = vfso->amigaos_mode;
+ c->vfso = vfso;
+ } else if (!fill_file_attrs (unit, base, c)) {
xfree (c);
*err = ERROR_NO_FREE_STORE;
return 0;
}
- if (c->dir && !isvirtual)
+ if (c->dir && !isvirtual && !vfso)
fsdb_clean_dir (c);
}
init_child_aino (unit, base, c);
TCHAR *xs;
char *x, *x2;
- if (!get_statinfo(unit, aino, &statbuf)) {
+ if (aino->vfso) {
+ fsdb_can = 1;
+ statbuf.mode = aino->vfso->amigaos_mode;
+ statbuf.mtime.tv_sec = 0;
+ statbuf.mtime.tv_usec = 0;
+ statbuf.size = aino->vfso->size;
+ } else if (!get_statinfo(unit, aino, &statbuf)) {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, ERROR_NOT_A_DOS_DISK);
return;
return _tcslen (fn) > currprefs.filesys_max_name;
}
+static int filesys_readdir(struct fs_dirhandle *d, TCHAR *fn, uae_u64 *uniq)
+{
+ int ok = 0;
+ if (d->fstype == FS_ARCHIVE)
+ ok = zfile_readdir_archive(d->zd, fn);
+ else if (d->fstype == FS_DIRECTORY)
+ ok = my_readdir(d->od, fn);
+ else if (d->fstype == FS_CDFS)
+ ok = isofs_readdir(d->isod, fn, uniq);
+ return ok;
+}
+
static int action_examine_all_do (Unit *unit, uaecptr lock, ExAllKey *eak, uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaecptr control)
{
a_inode *aino, *base = NULL;
d = eak->dirhandle;
if (!eak->fn) {
do {
- if (d->fstype == FS_ARCHIVE)
- ok = zfile_readdir_archive (d->zd, fn);
- else if (d->fstype == FS_DIRECTORY)
- ok = my_readdir (d->od, fn);
- else if (d->fstype == FS_CDFS)
- ok = isofs_readdir (d->isod, fn, &uniq);
- else
- ok = 0;
+ ok = filesys_readdir(d, fn, &uniq);
} while (ok && d->fstype == FS_DIRECTORY && (filesys_name_invalid (fn) || fsdb_name_invalid_dir (fn)));
if (!ok)
return 0;
xfree (eak->fn);
eak->fn = NULL;
}
- aino = lookup_child_aino_for_exnext (unit, base, fn, &err, uniq);
+ aino = lookup_child_aino_for_exnext (unit, base, fn, &err, uniq, NULL);
if (!aino)
return 0;
eak->id = unit->exallid++;
get_fileinfo (unit, packet, info, aino, false);
}
+extern unsigned char def_tool[];
+extern unsigned int def_tool_len;
+extern unsigned char def_project[];
+extern unsigned int def_project_len;
+extern unsigned char def_drawer[];
+extern unsigned int def_drawer_len;
+static struct virtualfilesysobject vfso_icon_tool;
+static struct virtualfilesysobject vfso_icon_project;
+static struct virtualfilesysobject vfso_icon_drawer;
+
+static void load_injected_icon(struct virtualfilesysobject *vfso, const TCHAR *fn, uae_u8 *default_data, int default_size)
+{
+ uae_u8 *data = NULL;
+ int size;
+
+ xfree(vfso->data);
+ if (fn && fn[0])
+ data = zfile_load_file(fn, &size);
+ if (!data) {
+ vfso->data = xmalloc(uae_u8, default_size);
+ memcpy(vfso->data, default_data, default_size);
+ vfso->size = default_size;
+ return;
+ }
+ vfso->data = data;
+ vfso->size = size;
+}
+
+static void load_injected_icons(void)
+{
+ load_injected_icon(&vfso_icon_tool, currprefs.filesys_inject_icons_tool, def_tool, def_tool_len);
+ load_injected_icon(&vfso_icon_project, currprefs.filesys_inject_icons_project, def_project, def_project_len);
+ load_injected_icon(&vfso_icon_drawer, currprefs.filesys_inject_icons_drawer, def_drawer, def_drawer_len);
+}
+
+static void inject_icons_to_directory(Unit *unit, a_inode *base)
+{
+ for (a_inode *aino = base->child; aino; aino = aino->sibling) {
+ int len = _tcslen(aino->aname);
+ if (len >= 5 && !_tcsicmp(aino->aname + len - 5, _T(".info")))
+ continue;
+ TCHAR tmp[256];
+ _stprintf(tmp, _T("%s.info"), aino->aname);
+ bool match = false;
+ for (a_inode *aino2 = base->child; aino2; aino2 = aino2->sibling) {
+ if (!_tcsicmp(aino2->aname, tmp))
+ match = true;
+ }
+ if (match)
+ continue;
+ uae_u32 err;
+ struct virtualfilesysobject *vfso;
+ if (aino->dir) {
+ vfso = &vfso_icon_drawer;
+ } else {
+ struct mystat statbuf;
+ get_statinfo(unit, aino, &statbuf);
+ if (statbuf.mode & A_FIBF_EXECUTE)
+ vfso = &vfso_icon_tool;
+ else
+ vfso = &vfso_icon_project;
+ }
+ lookup_child_aino_for_exnext(unit, base, tmp, &err, 0, vfso);
+ }
+}
+
/* Read a directory's contents, create a_inodes for each file, and
mark them as locked in memory so that recycle_aino will not reap
them.
/* Find next file that belongs to the Amiga fs (skipping things
like "..", "." etc. */
do {
- if (d->fstype == FS_ARCHIVE)
- ok = zfile_readdir_archive (d->zd, fn);
- else if (d->fstype == FS_DIRECTORY)
- ok = my_readdir (d->od, fn);
- else if (d->fstype == FS_CDFS)
- ok = isofs_readdir (d->isod, fn, &uniq);
- else
- ok = 0;
+ ok = filesys_readdir(d, fn, &uniq);
} while (ok && d->fstype == FS_DIRECTORY && (filesys_name_invalid (fn) || fsdb_name_invalid_dir (fn)));
if (!ok)
break;
/* This calls init_child_aino, which will notice that the parent is
being ExNext()ed, and it will increment the locked counts. */
- aino = lookup_child_aino_for_exnext (unit, base, fn, &err, uniq);
+ aino = lookup_child_aino_for_exnext (unit, base, fn, &err, uniq, NULL);
}
fs_closedir (d);
+ if (currprefs.filesys_inject_icons)
+ inject_icons_to_directory(unit, base);
}
static bool do_examine (Unit *unit, dpacket packet, a_inode *aino, uaecptr info, bool longfilesize)
break;
name = aino->nname;
get_fileinfo (unit, packet, info, aino, longfilesize);
- if (!(unit->volflags & (MYVOLUMEINFO_ARCHIVE | MYVOLUMEINFO_CDFS)) && !fsdb_exists(name)) {
+ if (!aino->vfso && !(unit->volflags & (MYVOLUMEINFO_ARCHIVE | MYVOLUMEINFO_CDFS)) && !fsdb_exists(name)) {
TRACE ((_T("%s orphaned"), name));
return false;
}
return true;
}
+#define EXNEXT_DEBUG 0
+
static void action_examine_next (Unit *unit, dpacket packet, bool largefilesize)
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
} else {
daino = lookup_aino(unit, uniq);
if (!daino) {
- // deleted? Look for next larger uniq in same directory
+#if EXNEXT_DEBUG
+ write_log(_T("EXNEXT but next entry is missing! (%d)\n"), uniq);
+#endif
+ // deleted? Look for next larger uniq in same directory.
daino = aino->child;
- while (daino && daino->uniq < uniq) {
+ while (daino && uniq >= daino->uniq) {
daino = daino->sibling;
}
+#if EXNEXT_DEBUG
+ if (daino) {
+ write_log(_T("Using next found entry %d\n"), uniq);
+ }
+#endif
+ // didn't find, what about previous?
+ if (!daino) {
+ daino = aino->child;
+ while (daino && uniq >= daino->uniq) {
+ if (daino->sibling && daino->sibling->uniq >= uniq) {
+#if EXNEXT_DEBUG
+ write_log(_T("Using previous entry %d\n"), uniq);
+#endif
+ break;
+ }
+ daino = daino->sibling;
+ }
+ }
+ // didn't find any but there are still entries? restart from beginning.
+ if (!daino && aino->child) {
+ daino = aino->child;
+#if EXNEXT_DEBUG
+ write_log(_T("Re-starting from beginning %d\n"), daino->uniq);
+#endif
+ }
} else {
daino = daino->sibling;
}
uaecptr name = GET_PCK_ARG3 (packet) << 2;
a_inode *aino;
Key *k;
- struct fs_filehandle *fd;
+ struct fs_filehandle *fd = NULL;
int err;
mode_t openmode;
int aino_created = 0;
PUT_PCK_RES2 (packet, ERROR_OBJECT_IN_USE);
return;
}
+ if (create && aino->vfso) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, ERROR_DELETE_PROTECTED);
+ return;
+ }
if (create == 2 && (aino->amigaos_mode & A_FIBF_DELETE) != 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, ERROR_DELETE_PROTECTED);
prepare_for_open (aino->nname);
- openmode = (((mode & A_FIBF_READ) == 0 ? O_WRONLY
- : (mode & A_FIBF_WRITE) == 0 ? O_RDONLY
- : O_RDWR)
- | (create ? O_CREAT : 0)
- | (create == 2 ? O_TRUNC : 0));
-
- fd = fs_openfile (unit, aino, openmode | O_BINARY);
- if (fd == NULL) {
- if (aino_created)
- delete_aino (unit, aino);
- PUT_PCK_RES1 (packet, DOS_FALSE);
- /* archive and fd == NULL = corrupt archive or out of memory */
- PUT_PCK_RES2 (packet, isvirtual ? ERROR_OBJECT_NOT_AROUND : dos_errno ());
- return;
+ if (!aino->vfso) {
+ openmode = (((mode & A_FIBF_READ) == 0 ? O_WRONLY
+ : (mode & A_FIBF_WRITE) == 0 ? O_RDONLY
+ : O_RDWR)
+ | (create ? O_CREAT : 0)
+ | (create == 2 ? O_TRUNC : 0));
+
+ fd = fs_openfile (unit, aino, openmode | O_BINARY);
+ if (fd == NULL) {
+ if (aino_created)
+ delete_aino (unit, aino);
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ /* archive and fd == NULL = corrupt archive or out of memory */
+ PUT_PCK_RES2 (packet, isvirtual ? ERROR_OBJECT_NOT_AROUND : dos_errno ());
+ return;
+ }
}
k = new_key (unit);
if (size == 0) {
PUT_PCK_RES1 (packet, 0);
PUT_PCK_RES2 (packet, 0);
+ } else if (k->aino->vfso) {
+ uae_s64 filesize = k->aino->vfso->size;
+ for (int i = 0; i < size && k->file_pos < filesize; i++) {
+ put_byte(addr + i, k->aino->vfso->data[k->file_pos]);
+ k->file_pos++;
+ actual++;
+ }
+ PUT_PCK_RES1 (packet, actual);
+ size = 0;
} else if (!valid_address (addr, size)) {
/* check if filesize < size */
uae_s64 filesize, cur;
- filesize = fs_fsize64 (k->fd);
+ filesize = key_filesize(k);
cur = k->file_pos;
if (size > filesize - cur)
size = filesize - cur;
write_log (_T("unixfs warning: Bad pointer passed for read: %08x, size %d\n"), addr, size);
/* ugh this is inefficient but easy */
- if (fs_lseek64 (k->fd, k->file_pos, SEEK_SET) < 0) {
+ if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
PUT_PCK_RES1 (packet, 0);
PUT_PCK_RES2 (packet, dos_errno ());
return;
/* normal fast read */
uae_u8 *realpt = get_real_address (addr);
- if (fs_lseek64 (k->fd, k->file_pos, SEEK_SET) < 0) {
+ if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
PUT_PCK_RES1 (packet, 0);
PUT_PCK_RES2 (packet, dos_errno ());
return;
gui_flicker_led (UNIT_LED(unit), unit->unit, 2);
TRACE((_T("ACTION_WRITE(%s,0x%lx,%ld)\n"), k->aino->nname, addr, size));
- if (unit->ui.readonly || unit->ui.locked) {
+ if (unit->ui.readonly || unit->ui.locked || k->aino->vfso) {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, ERROR_DISK_WRITE_PROTECTED);
return;
} else if (valid_address (addr, size)) {
uae_u8 *realpt = get_real_address (addr);
- if (fs_lseek64 (k->fd, k->file_pos, SEEK_SET) < 0) {
+ if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
PUT_PCK_RES1 (packet, 0);
PUT_PCK_RES2 (packet, dos_errno ());
return;
write_log (_T("unixfs warning: Bad pointer passed for write: %08x, size %d\n"), addr, size);
/* ugh this is inefficient but easy */
- if (fs_lseek64 (k->fd, k->file_pos, SEEK_SET) < 0) {
+ if (key_seek(k, k->file_pos, SEEK_SET) < 0) {
PUT_PCK_RES1 (packet, 0);
PUT_PCK_RES2 (packet, dos_errno ());
return;
TRACE((_T("ACTION_SEEK(%s,%d,%d)=%d\n"), k->aino->nname, pos, mode, cur));
gui_flicker_led (UNIT_LED(unit), unit->unit, 1);
- filesize = fs_fsize64 (k->fd);
+ filesize = key_filesize(k);
if (whence == SEEK_CUR)
temppos = cur + pos;
if (whence == SEEK_SET)
return;
}
- res = fs_lseek64 (k->fd, pos, whence);
+ res = key_seek(k, pos, whence);
if (-1 == res || cur > MAXFILESIZE32) {
PUT_PCK_RES1 (packet, -1);
PUT_PCK_RES2 (packet, ERROR_SEEK_ERROR);
- fs_lseek64 (k->fd, cur, SEEK_SET);
+ key_seek(k, cur, SEEK_SET);
} else {
PUT_PCK_RES1 (packet, cur);
- k->file_pos = fs_lseek64 (k->fd, 0, SEEK_CUR);
+ k->file_pos = key_seek(k, 0, SEEK_CUR);
}
}
PUT_PCK_RES2 (packet, ERROR_OBJECT_NOT_AROUND);
return;
}
+ if (k->aino->vfso) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, ERROR_DISK_WRITE_PROTECTED);
+ return;
+ }
/* Fail if file is >=2G, it is not safe operation. */
- if (fs_fsize64 (k->fd) > MAXFILESIZE32_2G) {
+ if (key_filesize(k) > MAXFILESIZE32_2G) {
PUT_PCK_RES1 (packet, DOS_TRUE);
PUT_PCK_RES2 (packet, ERROR_BAD_NUMBER); /* ? */
return;
write_log (_T("relocking failed '%s' -> '%s'\n"), a1->nname, a2->nname);
free_key (unit, k1);
} else {
- fs_lseek64 (k1->fd, k1->file_pos, SEEK_SET);
+ key_seek(k1, k1->file_pos, SEEK_SET);
}
}
}
PUT_PCK_RES2 (packet, ERROR_OBJECT_IN_USE);
return;
}
- if (a->dir) {
- /* This should take care of removing the fsdb if no files remain. */
- fsdb_dir_writeback (a);
- if (my_rmdir (a->nname) == -1) {
- PUT_PCK_RES1 (packet, DOS_FALSE);
- PUT_PCK_RES2 (packet, dos_errno ());
- return;
- }
- } else {
- if (my_unlink (a->nname) == -1) {
- PUT_PCK_RES1 (packet, DOS_FALSE);
- PUT_PCK_RES2 (packet, dos_errno ());
- return;
+ if (!a->vfso) {
+ if (a->dir) {
+ /* This should take care of removing the fsdb if no files remain. */
+ fsdb_dir_writeback (a);
+ if (my_rmdir (a->nname) == -1) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, dos_errno ());
+ return;
+ }
+ } else {
+ if (my_unlink (a->nname) == -1) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, dos_errno ());
+ return;
+ }
}
}
notify_check (unit, a);
uaecptr date = GET_PCK_ARG4 (packet);
a_inode *a;
struct mytimeval tv;
- int err;
+ int err = 0;
TRACE((_T("ACTION_SET_DATE(0x%lx,\"%s\")\n"), lock, bstr (unit, name)));
handle_softlink (unit, packet, a);
return;
}
- amiga_to_timeval (&tv, get_long (date), get_long (date + 4), get_long (date + 8), 50);
- //write_log (_T("%llu.%u (%d,%d,%d) %s\n"), tv.tv_sec, tv.tv_usec, get_long (date), get_long (date + 4), get_long (date + 8), a->nname);
- if (!my_utime (a->nname, &tv))
- err = dos_errno ();
+ if (!a->vfso) {
+ amiga_to_timeval (&tv, get_long (date), get_long (date + 4), get_long (date + 8), 50);
+ //write_log (_T("%llu.%u (%d,%d,%d) %s\n"), tv.tv_sec, tv.tv_usec, get_long (date), get_long (date + 4), get_long (date + 8), a->nname);
+ if (!my_utime (a->nname, &tv))
+ err = dos_errno ();
+ }
if (err != 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, err);
PUT_PCK_RES2 (packet, err1);
return;
}
-
/* rename always fails if file is open for writing */
for (k1 = unit->keys; k1; k1 = knext) {
knext = k1->next;
return;
}
- if (-1 == my_rename (a1->nname, a2->nname)) {
- int ret = -1;
- /* maybe we have open file handles that caused failure? */
- write_log (_T("rename '%s' -> '%s' failed, trying relocking..\n"), a1->nname, a2->nname);
- wehavekeys = relock_do (unit, a1);
- /* try again... */
- ret = my_rename (a1->nname, a2->nname);
- /* restore locks */
- relock_re (unit, a1, a2, ret == -1 ? 1 : 0);
- if (ret == -1) {
- delete_aino (unit, a2);
- PUT_PCK_RES1 (packet, DOS_FALSE);
- PUT_PCK_RES2 (packet, dos_errno ());
- return;
+ if (!a1->vfso) {
+ if (-1 == my_rename (a1->nname, a2->nname)) {
+ int ret = -1;
+ /* maybe we have open file handles that caused failure? */
+ write_log (_T("rename '%s' -> '%s' failed, trying relocking..\n"), a1->nname, a2->nname);
+ wehavekeys = relock_do (unit, a1);
+ /* try again... */
+ ret = my_rename (a1->nname, a2->nname);
+ /* restore locks */
+ relock_re (unit, a1, a2, ret == -1 ? 1 : 0);
+ if (ret == -1) {
+ delete_aino (unit, a2);
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, dos_errno ());
+ return;
+ }
}
}
a2->has_dbentry = a1->has_dbentry;
a2->db_offset = a1->db_offset;
a2->dirty = 0;
+ a2->vfso = a1->vfso;
move_exkeys (unit, a1, a2);
move_aino_children (unit, a1, a2);
delete_aino (unit, a1);
cur = k->file_pos;
{
uae_s64 temppos;
- uae_s64 filesize = fs_fsize64 (k->fd);
+ uae_s64 filesize = key_filesize(k);
if (whence == SEEK_CUR)
temppos = cur + pos;
return;
}
}
- res = fs_lseek64 (k->fd, pos, whence);
+ res = key_seek(k, pos, whence);
if (-1 == res) {
PUT_PCK64_RES1 (packet, DOS_FALSE);
} else {
PUT_PCK64_RES1 (packet, TRUE);
PUT_PCK64_RES2 (packet, 0);
- k->file_pos = fs_lseek64 (k->fd, 0, SEEK_CUR);
+ k->file_pos = key_seek(k, 0, SEEK_CUR);
}
TRACE((_T("= oldpos %lld newpos %lld\n"), cur, k->file_pos));
}
/* Write one then truncate: that should give the right size in all cases. */
fs_lseek (k->fd, offset, whence);
- offset = fs_lseek64 (k->fd, offset, whence);
+ offset = key_seek(k, offset, whence);
fs_write (k->fd, /* whatever */(uae_u8*)&k1, 1);
if (k->file_pos > offset)
k->file_pos = offset;
- fs_lseek64 (k->fd, k->file_pos, SEEK_SET);
+ key_seek(k, k->file_pos, SEEK_SET);
if (my_truncate (k->aino->nname, offset) == -1) {
PUT_PCK64_RES1 (packet, DOS_FALSE);
PUT_PCK64_RES2 (packet, ERROR_INVALID_LOCK);
return;
}
- filesize = fs_fsize64 (k->fd);
+ filesize = key_filesize(k);
TRACE((_T("ACTION_GET_FILE_SIZE64(%s)=%lld\n"), k->aino->nname, filesize));
if (filesize >= 0) {
PUT_PCK64_RES1 (packet, filesize);
/* Write one then truncate: that should give the right size in all cases. */
fs_lseek (k->fd, offset, whence);
- offset = fs_lseek64 (k->fd, offset, whence);
+ offset = key_seek(k, offset, whence);
fs_write (k->fd, /* whatever */(uae_u8*)&k1, 1);
if (k->file_pos > offset)
k->file_pos = offset;
- fs_lseek64 (k->fd, k->file_pos, SEEK_SET);
+ key_seek(k, k->file_pos, SEEK_SET);
if (my_truncate (k->aino->nname, offset) == -1) {
PUT_PCK_RES1 (packet, DOS_FALSE);
cur = k->file_pos;
{
uae_s64 temppos;
- uae_s64 filesize = fs_fsize64 (k->fd);
+ uae_s64 filesize = key_filesize(k);
if (whence == SEEK_CUR)
temppos = cur + pos;
return;
}
}
- res = fs_lseek64 (k->fd, pos, whence);
+ res = key_seek(k, pos, whence);
if (-1 == res) {
PUT_PCK_RES1 (packet, DOS_FALSE);
} else {
PUT_PCK_RES1 (packet, TRUE);
set_quadp(GET_PCK_ARG3(packet), cur);
- k->file_pos = fs_lseek64 (k->fd, 0, SEEK_CUR);
+ k->file_pos = key_seek(k, 0, SEEK_CUR);
}
TRACE((_T("= oldpos %lld newpos %lld\n"), cur, k->file_pos));
}
{
if (isrestore ())
return;
+ load_injected_icons();
filesys_reset2 ();
initialize_mountinfo ();
}
missing = 1;
} else {
uae_s64 s;
- s = fs_fsize64 (k->fd);
+ s = key_filesize(k);
if (s != savedsize)
write_log (_T("FS: restored file '%s' size changed! orig=%llu, now=%lld!!\n"), p, savedsize, s);
if (k->file_pos > s) {
write_log (_T("FS: restored filepos larger than size of file '%s'!! %llu > %lld\n"), p, k->file_pos, s);
k->file_pos = s;
}
- fs_lseek64 (k->fd, k->file_pos, SEEK_SET);
+ key_seek(k, k->file_pos, SEEK_SET);
}
}
xfree (p);
return;
if (using_ce || isce020())
printf ("\tipl_fetch ();\n");
- ipl_fetched = true;
+ ipl_fetched = 1;
}
+static void single_check_ipl(void)
+{
+ check_ipl();
+ ipl_fetched = 2;
+
+}
+/* this is not true, it seems to be microcode controller */
+
/* Apparently interrupt state is sampled
* during any memory access. Because we don't
* know if there are future memory accesses,
*/
static void check_ipl_again (void)
{
- if (!ipl_fetched)
+ if (ipl_fetched != 1)
return;
if (using_ce)
printf ("\tipl_fetch ();\n");
}
if (curi->mnemo == i_MOVE)
genflags (flag_logical, curi->size, "src", "", "");
+
+ if (curi->size == sz_long) {
+ if ((curi->dmode == Ad16 || curi->dmode == PC16) && curi->smode == imm) {
+ // lots more needed..
+ // move.l x,absl
+ // move.l (an),x(an)
+ single_check_ipl();
+ }
+ }
+
genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
sync_m68k_pc ();
if (dualprefetch) {
#define HD_CONTROLLER_TYPE_SCSI_AUTO 2
#define HD_CONTROLLER_TYPE_SCSI_A2091 3
#define HD_CONTROLLER_TYPE_SCSI_A2091_2 4
-#define HD_CONTROLLER_TYPE_SCSI_A4091 5
-#define HD_CONTROLLER_TYPE_SCSI_A4091_2 6
-#define HD_CONTROLLER_TYPE_SCSI_FASTLANE 7
-#define HD_CONTROLLER_TYPE_SCSI_FASTLANE_2 8
-#define HD_CONTROLLER_TYPE_SCSI_OKTAGON 9
-#define HD_CONTROLLER_TYPE_SCSI_OKTAGON_2 10
-#define HD_CONTROLLER_TYPE_SCSI_A3000 11
-#define HD_CONTROLLER_TYPE_SCSI_A4000T 12
-#define HD_CONTROLLER_TYPE_SCSI_CDTV 13
-#define HD_CONTROLLER_TYPE_SCSI_CPUBOARD 14
-#define HD_CONTROLLER_TYPE_PCMCIA_SRAM 15
-#define HD_CONTROLLER_TYPE_PCMCIA_IDE 16
+#define HD_CONTROLLER_TYPE_SCSI_GVP 5
+#define HD_CONTROLLER_TYPE_SCSI_GVP_2 6
+#define HD_CONTROLLER_TYPE_SCSI_A4091 7
+#define HD_CONTROLLER_TYPE_SCSI_A4091_2 8
+#define HD_CONTROLLER_TYPE_SCSI_FASTLANE 9
+#define HD_CONTROLLER_TYPE_SCSI_FASTLANE_2 10
+#define HD_CONTROLLER_TYPE_SCSI_OKTAGON 11
+#define HD_CONTROLLER_TYPE_SCSI_OKTAGON_2 12
+#define HD_CONTROLLER_TYPE_SCSI_A3000 13
+#define HD_CONTROLLER_TYPE_SCSI_A4000T 14
+#define HD_CONTROLLER_TYPE_SCSI_CDTV 15
+#define HD_CONTROLLER_TYPE_SCSI_CPUBOARD 16
+#define HD_CONTROLLER_TYPE_PCMCIA_SRAM 17
+#define HD_CONTROLLER_TYPE_PCMCIA_IDE 18
#define HD_CONTROLLER_TYPE_IDE_FIRST 1
#define HD_CONTROLLER_TYPE_IDE_LAST 1
#define HD_CONTROLLER_TYPE_SCSI_FIRST 2
-#define HD_CONTROLLER_TYPE_SCSI_LAST 14
+#define HD_CONTROLLER_TYPE_SCSI_LAST 16
#define FILESYS_VIRTUAL 0
#define FILESYS_HARDFILE 1
#define A_FIBF_EXECUTE (1<<1)
#define A_FIBF_DELETE (1<<0)
+struct virtualfilesysobject
+{
+ int dir;
+ TCHAR *comment;
+ uae_u32 amigaos_mode;
+ uae_u8 *data;
+ int size;
+};
+
/* AmigaOS "keys" */
typedef struct a_inode_struct {
#ifdef AINO_DEBUG
/* not equaling unit.mountcount -> not in this volume */
unsigned int mountcount;
uae_u64 uniq_external;
+ struct virtualfilesysobject *vfso;
#ifdef AINO_DEBUG
uae_u32 checksum2;
#endif
extern int gfxboard_get_vram_min (int);
extern int gfxboard_get_vram_max (int);
extern bool gfxboard_need_byteswap (int type);
+extern int gfxboard_get_autoconfig_size(int type);
extern double gfxboard_get_vsync (void);
extern void gfxboard_refresh (void);
extern bool gfxboard_toggle (int mode);
#endif
#define get_mem_bank(addr) (*mem_banks[bankindex(addr)])
+extern addrbank *get_mem_bank_real(uaecptr);
#ifdef JIT
#define put_mem_bank(addr, b, realstart) do { \
#define UAE_OPTIONS_H
#define UAEMAJOR 3
-#define UAEMINOR 0
+#define UAEMINOR 1
#define UAESUBREV 0
typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
int filesys_limit;
int filesys_max_name;
int filesys_max_file_size;
+ bool filesys_inject_icons;
+ TCHAR filesys_inject_icons_tool[MAX_DPATH];
+ TCHAR filesys_inject_icons_project[MAX_DPATH];
+ TCHAR filesys_inject_icons_drawer[MAX_DPATH];
int uaescsidevmode;
bool reset_delay;
struct boardromconfig a4091rom;
struct boardromconfig fastlanerom;
struct boardromconfig oktagonrom;
+ struct boardromconfig gvprom;
TCHAR romfile[MAX_DPATH];
TCHAR romident[256];
bool native_code;
bool uae_hide_autoconfig;
int z3_mapping_mode;
+ bool sound_toccata;
int mountitems;
struct uaedev_config_data mountconfig[MOUNT_CONFIG_SIZE];
extern struct zfile *zfile_fopen_data (const TCHAR *name, uae_u64 size, const uae_u8 *data);
extern struct zfile *zfile_fopen_load_zfile (struct zfile *f);
extern uae_u8 *zfile_load_data (const TCHAR *name, const uae_u8 *data,int datalen, int *outlen);
+extern uae_u8 *zfile_load_file(const TCHAR *name, int *outlen);
extern struct zfile *zfile_fopen_parent (struct zfile*, const TCHAR*, uae_u64 offset, uae_u64 size);
extern int zfile_exists (const TCHAR *name);
#include "uaenative.h"
#include "tabletlibrary.h"
#include "cpuboard.h"
+#include "sndboard.h"
#include "uae/ppc.h"
#ifdef RETROPLATFORM
#include "rp.h"
#endif
#ifdef A2091
a2091_free ();
+ gvp_free ();
a3000scsi_free ();
#endif
#ifdef NCR
#endif
#ifdef WITH_PPC
uae_ppc_free();
+#endif
+#ifdef WITH_TOCCATA
+ sndboard_free();
#endif
gfxboard_free();
savestate_free ();
ce_banktype[i] = CE_MEMBANK_FAST16;
}
+ // A4000T NCR is 32-bit
+ if (currprefs.cs_mbdmac == 2) {
+ ce_banktype[0xdd0000 >> 16] = CE_MEMBANK_FAST32;
+ }
+
if (currprefs.address_space_24) {
for (i = 1; i < 256; i++)
memcpy (&ce_banktype[i * 256], &ce_banktype[0], 256);
addrbank *rb = NULL;
if (size < 32)
size = 32;
- cb = &get_mem_bank (0xf00000);
+ cb = get_mem_bank_real(0xf00000);
if (!rb && cb && (cb->flags & ABFLAG_ROM) && get_word (0xf00000) == 0x1114)
rb = cb;
- cb = &get_mem_bank (0xe00000);
+ cb = get_mem_bank_real(0xe00000);
if (!rb && cb && (cb->flags & ABFLAG_ROM) && get_word (0xe00000) == 0x1114)
rb = cb;
if (!rb)
return start + 2 * 1024 * 1024;
}
+void map_banks_set(addrbank *bank, int start, int size, int realsize)
+{
+ bank->startmask = start << 16;
+ map_banks(bank, start, size, realsize);
+}
+
void memory_clear (void)
{
mem_hardreset = 0;
map_banks (&cardmem_bank, cardmem_bank.start >> 16, cardmem_bank.allocated >> 16, 0);
#endif
cpuboard_map();
- map_banks (&kickmem_bank, 0xF8, 8, 0);
+ map_banks_set(&kickmem_bank, 0xF8, 8, 0);
if (currprefs.maprom) {
if (!cpuboard_maprom())
- map_banks (&kickram_bank, currprefs.maprom >> 16, extendedkickmem2_bank.allocated ? 32 : (extendedkickmem_bank.allocated ? 16 : 8), 0);
+ map_banks_set(&kickram_bank, currprefs.maprom >> 16, extendedkickmem2_bank.allocated ? 32 : (extendedkickmem_bank.allocated ? 16 : 8), 0);
}
/* map beta Kickstarts at 0x200000/0xC00000/0xF00000 */
if (kickmem_bank.baseaddr[0] == 0x11 && kickmem_bank.baseaddr[2] == 0x4e && kickmem_bank.baseaddr[3] == 0xf9 && kickmem_bank.baseaddr[4] == 0x00) {
uae_u32 addr = kickmem_bank.baseaddr[5];
if (addr == 0x20 && currprefs.chipmem_size <= 0x200000 && currprefs.fastmem_size == 0)
- map_banks (&kickmem_bank, addr, 8, 0);
+ map_banks_set(&kickmem_bank, addr, 8, 0);
if (addr == 0xC0 && currprefs.bogomem_size == 0)
- map_banks (&kickmem_bank, addr, 8, 0);
+ map_banks_set(&kickmem_bank, addr, 8, 0);
if (addr == 0xF0)
- map_banks (&kickmem_bank, addr, 8, 0);
+ map_banks_set(&kickmem_bank, addr, 8, 0);
}
if (a1000_bootrom)
#endif
if (a3000_f0)
- map_banks (&extendedkickmem_bank, 0xf0, 1, 0);
+ map_banks_set(&extendedkickmem_bank, 0xf0, 1, 0);
/* Map the chipmem into all of the lower 8MB */
map_overlay (1);
switch (extendedkickmem_type) {
case EXTENDED_ROM_KS:
- map_banks (&extendedkickmem_bank, 0xE0, 8, 0);
+ map_banks_set(&extendedkickmem_bank, 0xE0, 8, 0);
break;
#ifdef CDTV
case EXTENDED_ROM_CDTV:
- map_banks (&extendedkickmem_bank, 0xF0, extendedkickmem_bank.allocated == 2 * ROM_SIZE_512 ? 16 : 8, 0);
+ map_banks_set(&extendedkickmem_bank, 0xF0, extendedkickmem_bank.allocated == 2 * ROM_SIZE_512 ? 16 : 8, 0);
break;
#endif
#ifdef CD32
case EXTENDED_ROM_CD32:
- map_banks (&extendedkickmem_bank, 0xE0, 8, 0);
+ map_banks_set(&extendedkickmem_bank, 0xE0, 8, 0);
break;
#endif
}
#ifdef AUTOCONFIG
if (need_uae_boot_rom ())
- map_banks (&rtarea_bank, rtarea_base >> 16, 1, 0);
+ map_banks_set(&rtarea_bank, rtarea_base >> 16, 1, 0);
#endif
if ((cloanto_rom || currprefs.cs_ksmirror_e0) && (currprefs.maprom != 0xe00000) && !extendedkickmem_type)
- map_banks (&kickmem_bank, 0xE0, 8, 0);
+ map_banks(&kickmem_bank, 0xE0, 8, 0);
if (currprefs.cs_ksmirror_a8) {
if (extendedkickmem2_bank.allocated) {
- map_banks (&extendedkickmem2_bank, 0xa8, 16, 0);
+ map_banks_set(&extendedkickmem2_bank, 0xa8, 16, 0);
} else {
struct romdata *rd = getromdatabypath (currprefs.cartfile);
if (!rd || rd->id != 63) {
if (extendedkickmem_type == EXTENDED_ROM_CD32 || extendedkickmem_type == EXTENDED_ROM_KS)
- map_banks (&extendedkickmem_bank, 0xb0, 8, 0);
+ map_banks(&extendedkickmem_bank, 0xb0, 8, 0);
else
- map_banks (&kickmem_bank, 0xb0, 8, 0);
- map_banks (&kickmem_bank, 0xa8, 8, 0);
+ map_banks(&kickmem_bank, 0xb0, 8, 0);
+ map_banks(&kickmem_bank, 0xa8, 8, 0);
}
}
}
*/
+static int iack_cycle(int nr)
+{
+ int vector;
+
+ if (1) {
+ // non-autovectored
+ vector = x_get_byte(0x00fffff1 | ((nr - 24) << 1));
+ if (currprefs.cpu_cycle_exact)
+ x_do_cycles(4 * cpucycleunit);
+ } else {
+ // autovectored
+
+ }
+ return vector;
+}
+
static void Exception_ce000 (int nr)
{
uae_u32 currpc = m68k_getpc (), newpc;
x_put_word (m68k_areg (regs, 7) + 0, mode);
x_put_word (m68k_areg (regs, 7) + 2, last_fault_for_exception_3 >> 16);
x_do_cycles (2 * cpucycleunit);
- write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_addr_for_exception_3, currpc, get_long (4 * nr));
+ write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_addr_for_exception_3, currpc, get_long_debug (4 * nr));
goto kludge_me_do;
}
if (currprefs.cpu_model == 68010) {
// 68010 creates only format 0 and 8 stack frames
m68k_areg (regs, 7) -= 8;
x_put_word (m68k_areg (regs, 7) + 4, currpc); // write low address
- if (interrupt) {
- // fetch interrupt vector number
- nr = x_get_byte (0x00fffff1 | ((nr - 24) << 1));
- x_do_cycles (4 * cpucycleunit);
- }
+ if (interrupt)
+ nr = iack_cycle(nr);
x_put_word (m68k_areg (regs, 7) + 0, regs.sr); // write SR
x_put_word (m68k_areg (regs, 7) + 2, currpc >> 16); // write high address
x_put_word (m68k_areg (regs, 7) + 6, nr * 4);
} else {
m68k_areg (regs, 7) -= 6;
x_put_word (m68k_areg (regs, 7) + 4, currpc); // write low address
- if (interrupt) {
- // fetch interrupt vector number
- nr = x_get_byte (0x00fffff1 | ((nr - 24) << 1));
- x_do_cycles (4 * cpucycleunit);
- }
+ if (interrupt)
+ nr = iack_cycle(nr);
x_put_word (m68k_areg (regs, 7) + 0, regs.sr); // write SR
x_put_word (m68k_areg (regs, 7) + 2, currpc >> 16); // write high address
}
interrupt = nr >= 24 && nr < 24 + 8;
if (interrupt && currprefs.cpu_model <= 68010)
- nr = x_get_byte (0x00fffff1 | (nr << 1));
+ nr = iack_cycle(nr);
exception_debug (nr);
MakeSR ();
m68k_areg (regs, 7) -= 2;
x_put_word (m68k_areg (regs, 7), 0xb000 + nr * 4);
}
- write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, regs.instruction_pc, currpc, x_get_long (regs.vbr + 4*nr));
+ write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, regs.instruction_pc, currpc, get_long_debug (regs.vbr + 4*nr));
} else if (nr ==5 || nr == 6 || nr == 7 || nr == 9) {
m68k_areg (regs, 7) -= 4;
x_put_long (m68k_areg (regs, 7), regs.instruction_pc);
x_put_word (m68k_areg (regs, 7) + 6, last_op_for_exception_3);
x_put_word (m68k_areg (regs, 7) + 8, regs.sr);
x_put_long (m68k_areg (regs, 7) + 10, last_addr_for_exception_3);
- write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, x_get_long (regs.vbr + 4*nr));
+ write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, get_long_debug (regs.vbr + 4*nr));
goto kludge_me_do;
}
}
if ((opcode & 0xF000) == 0xF000) {
if (warned < 20) {
- write_log (_T("B-Trap %x at %x (%p)\n"), opcode, pc, regs.pc_p);
+ write_log(_T("B-Trap %04X at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x2c));
warned++;
}
Exception (0xB);
}
if ((opcode & 0xF000) == 0xA000) {
if (warned < 20) {
- write_log (_T("A-Trap %x at %x (%p)\n"), opcode, pc, regs.pc_p);
+ write_log(_T("A-Trap %04X at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x28));
warned++;
}
Exception (0xA);
return 4;
}
if (warned < 20) {
- write_log (_T("Illegal instruction: %04x at %08X -> %08X\n"), opcode, pc, get_long (regs.vbr + 0x10));
+ write_log (_T("Illegal instruction: %04x at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x10));
warned++;
//activate_debugger();
}
}
#endif
+#if 0
if (!uae_int_requested && !uaenet_int_requested && currprefs.cpu_idle && currprefs.m68k_speed != 0 && (regs.spcflags & SPCFLAG_STOP)
#ifdef WITH_PPC
&& ppc_state != PPC_STATE_ACTIVE
}
}
}
+#endif
}
if (regs.spcflags & SPCFLAG_TRACE)
if (regs.halted) {
cpu_halt (regs.halted);
- if (regs.halted < 0)
+ if (regs.halted < 0) {
haltloop();
- continue;
+ continue;
+ }
}
#if 0
d3dx = LoadLibrary (D3DX9DLL);
if (d3dx == NULL) {
- _tcscpy (errmsg, _T("Direct3D: Newer DirectX Runtime required.\n\nhttp://go.microsoft.com/fwlink/?linkid=56513"));
+ if (os_vista)
+ _tcscpy(errmsg, _T("Direct3D: Optional DirectX9 components are not installed.\n")
+ _T("\nhttp://go.microsoft.com/fwlink/?linkid=56513"));
+ else
+ _tcscpy (errmsg, _T("Direct3D: Newer DirectX Runtime required or optional DirectX9 components are not installed.\n")
+ _T("\nhttp://go.microsoft.com/fwlink/?linkid=56513"));
if (isfullscreen () <= 0)
ShellExecute(NULL, _T("open"), _T("http://go.microsoft.com/fwlink/?linkid=56513"), NULL, NULL, SW_SHOWNORMAL);
return errmsg;
if (v == INVALID_FILE_ATTRIBUTES)
return -1;
if (!(v & FILE_ATTRIBUTE_DIRECTORY))
- return -1;
+ return -2;
/*
if (v & FILE_ATTRIBUTE_READONLY)
ret |= MYVOLUMEINFO_READONLY;
uae_u8 fsdb[UAEFSDB2_LEN];
uae_u32 mode;
+ if (aino->vfso)
+ return 1;
+
tmpmask = filesys_parse_mask (aino->amigaos_mode);
mode = GetFileAttributesSafe (aino->nname);
int fsdb_mode_supported (const a_inode *aino)
{
int mask = aino->amigaos_mode;
+ if (aino->vfso)
+ return mask;
if (0 && aino->dir)
return 0;
if (fsdb_mode_representable_p (aino, mask))
if (0 && aino->dir)
return amigaos_mode == 0;
+ if (aino->vfso)
+ return 1;
if (mask & A_FIBF_SCRIPT) /* script */
return 0;
if ((mask & 15) == 15) /* xxxxRWED == OK */
p96mem_offset = NULL;
p96mem_size = z3rtgmem_size;
p96base_offset = 0;
+ uae_u32 z3rtgallocsize = 0;
if (changed_prefs.rtgmem_size && gfxboard_is_z3 (changed_prefs.rtgmem_type)) {
+ z3rtgallocsize = gfxboard_get_autoconfig_size(changed_prefs.rtgmem_type) < 0 ? changed_prefs.rtgmem_size : gfxboard_get_autoconfig_size(changed_prefs.rtgmem_type);
if (changed_prefs.z3autoconfig_start == Z3BASE_UAE)
p96base_offset = natmemsize + startbarrier + z3offset;
else
- p96base_offset = expansion_startaddress(natmemsize + startbarrier + z3offset, changed_prefs.rtgmem_size);
+ p96base_offset = expansion_startaddress(natmemsize + startbarrier + z3offset, z3rtgallocsize);
} else if (changed_prefs.rtgmem_size && !gfxboard_is_z3 (changed_prefs.rtgmem_type)) {
p96base_offset = getz2rtgaddr (changed_prefs.rtgmem_size);
}
}
addr = expansion_startaddress(addr, changed_prefs.z3fastmem_size);
addr += changed_prefs.z3fastmem_size;
- addr = expansion_startaddress(addr, changed_prefs.rtgmem_size);
+ addr = expansion_startaddress(addr, changed_prefs.z3fastmem2_size);
+ addr += changed_prefs.z3fastmem2_size;
+ addr = expansion_startaddress(addr, z3rtgallocsize);
if (gfxboard_is_z3(changed_prefs.rtgmem_type)) {
p96base_offset = addr;
// adjust p96mem_offset to beginning of natmem
} else if (!_tcscmp(shmids[shmid].name, _T("ramsey_high"))) {
shmaddr = natmem_offset + 0x08000000;
got = TRUE;
+ } else if (!_tcscmp(shmids[shmid].name, _T("fusionforty"))) {
+ shmaddr = natmem_offset + 0x11000000;
+ got = TRUE;
} else if (!_tcscmp(shmids[shmid].name, _T("blizzard_40"))) {
shmaddr = natmem_offset + 0x40000000;
got = TRUE;
return NULL;
hmode = pixbytes == 1 ? RGBFB_CLUT : RGBFB_B8G8R8A8;
convert = getconvert (picasso96_state.RGBFormat, pixbytes);
+ alloc_colors_picasso(8, 8, 8, 16, 8, 0, picasso96_state.RGBFormat);
if (pixbytes > 1 && hmode != convert) {
copyall (src + off, dst, width, height, picasso96_state.BytesPerRow, picasso96_state.BytesPerPixel, width * pixbytes, pixbytes, false, convert);
}
}
+ gfx_set_picasso_colors(picasso96_state.RGBFormat);
+
*widthp = width;
*heightp = height;
*pitch = width * pixbytes;
*depth = pixbytes * 8;
+
return dst;
}
void freertgbuffer (uae_u8 *dst)
#define IDC_CS_CD32FMV 1771
#define IDC_CS_SCSIMODE 1772
#define IDC_DF0ENABLE 1773
+#define IDC_CS_TOCCATA 1773
#define IDC_DF1ENABLE 1774
#define IDC_FS_SELECT_DIR 1774
#define IDC_FS_SELECT_FILE 1775
BEGIN
COMBOBOX IDC_SOUNDCARDLIST,1,1,393,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,1,19,132,112
- CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,35,108,10
- CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,53,107,10
- CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,71,108,10
- CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,89,108,10
- GROUPBOX "Volume",IDC_STATIC,139,19,255,69
- RTEXT "Paula Audio",IDC_STATIC,152,38,51,10,SS_CENTERIMAGE
+ CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,46,108,10
+ CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,64,107,10
+ CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,82,108,10
+ CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,100,108,10
+ GROUPBOX "Master Volume",IDC_STATIC,139,19,255,69
+ RTEXT "Paula/AHI",IDC_STATIC,152,38,51,10,SS_CENTERIMAGE
CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,32,105,20
EDITTEXT IDC_SOUNDVOLUME2,329,35,48,12,ES_CENTER | ES_READONLY
- RTEXT "CD Audio",IDC_STATIC,152,67,51,10,SS_CENTERIMAGE
+ RTEXT "CD",IDC_STATIC,152,67,51,10,SS_CENTERIMAGE
CONTROL "",IDC_SOUNDVOLUMECD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,61,105,20
EDITTEXT IDC_SOUNDVOLUMECD2,329,64,48,12,ES_CENTER | ES_READONLY
GROUPBOX "Sound Buffer Size",IDC_STATIC,140,90,254,42
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,241,187,11
COMBOBOX IDC_NETDEVICE,202,256,178,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,242,151,11
+ CONTROL "Toccata Z2 sound card emulation",IDC_CS_TOCCATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,255,151,11
END
IDD_INPUTMAP DIALOGEX 0, 0, 421, 341
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "WinUAE"
- VALUE "FileVersion", "3.0.0.0"
+ VALUE "FileVersion", "3.1.0.0"
VALUE "InternalName", "WinUAE"
- VALUE "LegalCopyright", "© 1996-2014 under the GNU Public License (GPL)"
+ VALUE "LegalCopyright", "© 1996-2015 under the GNU Public License (GPL)"
VALUE "OriginalFilename", "WinUAE.exe"
VALUE "ProductName", "WinUAE"
- VALUE "ProductVersion", "3.0.0.0"
+ VALUE "ProductVersion", "3.1.0.0"
END
END
BLOCK "VarFileInfo"
#define WITH_UAENET_PCAP
#define WITH_PPC
#define WITH_QEMU_CPU
+#define WITH_TOCCATA
#else
#include <float.h>
#include <WtsApi32.h>
#include <Avrt.h>
+#include <Cfgmgr32.h>
#include "resource.h"
#include "cloanto/RetroPlatformIPC.h"
#endif
#include "uae/ppc.h"
+#include "fsdb.h"
extern int harddrive_dangerous, do_rdbdump;
extern int no_rawinput, no_directinput, no_windowsmouse;
setmousebuttonstate (dinput_winmouse (), num, updown);
}
+#define MEDIA_INSERT_QUEUE_SIZE 10
+static TCHAR *media_insert_queue[MEDIA_INSERT_QUEUE_SIZE];
+static int media_insert_queue_type[MEDIA_INSERT_QUEUE_SIZE];
+static int media_change_timer;
+static int device_change_timer;
+
+static int is_in_media_queue(const TCHAR *drvname)
+{
+ for (int i = 0; i < MEDIA_INSERT_QUEUE_SIZE; i++) {
+ if (media_insert_queue[i] != NULL) {
+ if (!_tcsicmp(drvname, media_insert_queue[i]))
+ return i;
+ }
+ }
+ return -1;
+}
+
+static void start_media_insert_timer(HWND hwnd)
+{
+ if (!media_change_timer) {
+ media_change_timer = 1;
+ SetTimer(hwnd, 2, 1000, NULL);
+ }
+}
+
+static void add_media_insert_queue(HWND hwnd, const TCHAR *drvname, int retrycnt)
+{
+ int idx = is_in_media_queue(drvname);
+ if (idx >= 0) {
+ if (retrycnt > media_insert_queue_type[idx])
+ media_insert_queue_type[idx] = retrycnt;
+ write_log(_T("%s already queued for insertion, cnt=%d.\n"), drvname, retrycnt);
+ start_media_insert_timer(hwnd);
+ return;
+ }
+ for (int i = 0; i < MEDIA_INSERT_QUEUE_SIZE; i++) {
+ if (media_insert_queue[i] == NULL) {
+ media_insert_queue[i] = my_strdup(drvname);
+ media_insert_queue_type[i] = retrycnt;
+ start_media_insert_timer(hwnd);
+ return;
+ }
+ }
+}
+
#define MSGDEBUG 1
static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
return 0;
case WM_TIMER:
+ if (wParam == 2) {
+ bool restart = false;
+ KillTimer(hWnd, 2);
+ media_change_timer = 0;
+ DWORD r = CMP_WaitNoPendingInstallEvents(0);
+ write_log(_T("filesys timer, CMP_WaitNoPendingInstallEvents=%d\n"), r);
+ if (r == WAIT_OBJECT_0) {
+ for (int i = 0; i < MEDIA_INSERT_QUEUE_SIZE; i++) {
+ if (media_insert_queue[i]) {
+ TCHAR *drvname = media_insert_queue[i];
+ int r = my_getvolumeinfo (drvname);
+ if (r < 0) {
+ if (media_insert_queue_type[i] > 0) {
+ write_log(_T("Mounting %s but drive is not ready, %d.. retrying %d..\n"), drvname, r, media_insert_queue_type[i]);
+ media_insert_queue_type[i]--;
+ restart = true;
+ continue;
+ } else {
+ write_log(_T("Mounting %s but drive is not ready, %d.. aborting..\n"), drvname, r);
+ }
+ } else {
+ int inserted = 1;
+ DWORD type = GetDriveType(drvname);
+ if (type == DRIVE_CDROM)
+ inserted = -1;
+ r = filesys_media_change (drvname, inserted, NULL);
+ if (r < 0) {
+ write_log(_T("Mounting %s but previous media change is still in progress..\n"), drvname);
+ restart = true;
+ break;
+ } else if (r > 0) {
+ write_log(_T("%s mounted\n"), drvname);
+ } else {
+ write_log(_T("%s mount failed\n"), drvname);
+ }
+ }
+ xfree(media_insert_queue[i]);
+ media_insert_queue[i] = NULL;
+ }
+ }
+ } else if (r == WAIT_TIMEOUT) {
+ restart = true;
+ }
+ if (restart)
+ start_media_insert_timer(hWnd);
+ } else if (wParam == 4) {
+ device_change_timer = 0;
+ KillTimer(hWnd, 4);
+ inputdevice_devicechange (&changed_prefs);
+ } else if (wParam == 1) {
#ifdef PARALLEL_PORT
- finishjob ();
+ finishjob ();
#endif
+ }
return 0;
case WM_CREATE:
return 0;
case WM_DESTROY:
+ if (device_change_timer)
+ KillTimer(hWnd, 4);
+ device_change_timer = 0;
ChangeClipboardChain (hWnd, hwndNextViewer);
close_tablet (tablet);
wait_keyrelease ();
#ifdef FILESYS
case WM_USER + 2:
{
- typedef struct {
- DWORD dwItem1; // dwItem1 contains the previous PIDL or name of the folder.
- DWORD dwItem2; // dwItem2 contains the new PIDL or name of the folder.
- } SHNOTIFYSTRUCT;
- TCHAR path[MAX_PATH];
-
- if (lParam == SHCNE_MEDIAINSERTED || lParam == SHCNE_DRIVEADD || lParam == SHCNE_MEDIAREMOVED || lParam == SHCNE_DRIVEREMOVED) {
- SHNOTIFYSTRUCT *shns = (SHNOTIFYSTRUCT*)wParam;
- if (SHGetPathFromIDList ((struct _ITEMIDLIST *)(shns->dwItem1), path)) {
- int inserted = lParam == SHCNE_MEDIAINSERTED || lParam == SHCNE_DRIVEADD ? 1 : 0;
- UINT errormode = SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
- write_log (_T("Shell Notification %d '%s'\n"), inserted, path);
- if (!win32_hardfile_media_change (path, inserted)) {
- if ((inserted && CheckRM (path)) || !inserted) {
+ LONG lEvent;
+ PIDLIST_ABSOLUTE *ppidl;
+ HANDLE lock = SHChangeNotification_Lock((HANDLE)wParam, (DWORD)lParam, &ppidl, &lEvent);
+ if (lock) {
+ if (lEvent == SHCNE_MEDIAINSERTED || lEvent == SHCNE_DRIVEADD || lEvent == SHCNE_MEDIAREMOVED || lEvent == SHCNE_DRIVEREMOVED) {
+ TCHAR drvpath[MAX_PATH + 1];
+ if (SHGetPathFromIDList(ppidl[0], drvpath)) {
+ int inserted = (lEvent == SHCNE_MEDIAINSERTED || lEvent == SHCNE_DRIVEADD) ? 1 : 0;
+ write_log (_T("Shell Notification %d '%s'\n"), inserted, drvpath);
+ if (!win32_hardfile_media_change (drvpath, inserted)) {
if (inserted) {
- DWORD type = GetDriveType(path);
- if (type == DRIVE_CDROM)
- inserted = -1;
+ add_media_insert_queue(hWnd, drvpath, 5);
+ } else {
+ if (is_in_media_queue(drvpath) >= 0) {
+ write_log(_T("Insertion queued, removal event dropped\n"));
+ } else {
+ filesys_media_change (drvpath, inserted, NULL);
+ }
}
- filesys_media_change (path, inserted, NULL);
}
}
- SetErrorMode (errormode);
}
+ SHChangeNotification_Unlock(lock);
}
}
return TRUE;
extern bool win32_spti_media_change (TCHAR driveletter, int insert);
extern bool win32_ioctl_media_change (TCHAR driveletter, int insert);
DEV_BROADCAST_HDR *pBHdr = (DEV_BROADCAST_HDR *)lParam;
- static int waitfornext;
+ int devicechange = 0;
if (wParam == DBT_DEVNODES_CHANGED && lParam == 0) {
- if (waitfornext)
- inputdevice_devicechange (&changed_prefs);
- waitfornext = 0;
+ devicechange = 1;
} else if (pBHdr && pBHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
DEV_BROADCAST_DEVICEINTERFACE *dbd = (DEV_BROADCAST_DEVICEINTERFACE*)lParam;
if (wParam == DBT_DEVICEREMOVECOMPLETE)
- inputdevice_devicechange (&changed_prefs);
+ devicechange = 1;
else if (wParam == DBT_DEVICEARRIVAL)
- waitfornext = 1;
+ devicechange = 1;
} else if (pBHdr && pBHdr->dbch_devicetype == DBT_DEVTYP_VOLUME) {
DEV_BROADCAST_VOLUME *pBVol = (DEV_BROADCAST_VOLUME *)lParam;
if (wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE) {
inserted = 0;
if (pBVol->dbcv_flags & DBTF_MEDIA) {
bool matched = false;
-#ifdef WINDDK
matched |= win32_spti_media_change (drive, inserted);
matched |= win32_ioctl_media_change (drive, inserted);
-#endif
}
if (type == DRIVE_REMOVABLE || type == DRIVE_CDROM || !inserted) {
write_log (_T("WM_DEVICECHANGE '%s' type=%d inserted=%d\n"), drvname, type, inserted);
if (!win32_hardfile_media_change (drvname, inserted)) {
- if ((inserted && CheckRM (drvname)) || !inserted) {
- if (type == DRIVE_CDROM && inserted)
- inserted = -1;
- filesys_media_change (drvname, inserted, NULL);
+ if (inserted) {
+ add_media_insert_queue(hWnd, drvname, 0);
+ } else {
+ if (is_in_media_queue(drvname) >= 0) {
+ write_log(_T("Insertion queued, removal event dropped\n"));
+ } else {
+ filesys_media_change (drvname, inserted, NULL);
+ }
}
}
}
}
}
}
+ if (devicechange) {
+ if (device_change_timer)
+ KillTimer(hWnd, 4);
+ device_change_timer = 1;
+ SetTimer(hWnd, 4, 2000, NULL);
+ }
}
#endif
return TRUE;
case WM_ENABLE:
case WT_PACKET:
case WM_WTSSESSION_CHANGE:
+ case WM_TIMER:
return AmigaWindowProc (hWnd, message, wParam, lParam);
#if 0
case WM_DISPLAYCHANGE:
write_log (_T("\n%s (%d.%d %s%s[%d])"), VersionStr,
osVersion.dwMajorVersion, osVersion.dwMinorVersion, osVersion.szCSDVersion,
- _tcslen (osVersion.szCSDVersion) > 0 ? _T(" ") : _T(""), os_winnt_admin);
+ _tcslen (osVersion.szCSDVersion) > 0 ? _T(" ") : _T(""), os_admin);
write_log (_T(" %d-bit %X.%X.%X %d %s"),
wow64 ? 64 : 32,
SystemInfo.wProcessorArchitecture, SystemInfo.wProcessorLevel, SystemInfo.wProcessorRevision,
SystemInfo.dwNumberOfProcessors, filedate);
write_log (_T("\n(c) 1995-2001 Bernd Schmidt - Core UAE concept and implementation.")
- _T("\n(c) 1998-2014 Toni Wilen - Win32 port, core code updates.")
+ _T("\n(c) 1998-2015 Toni Wilen - Win32 port, core code updates.")
_T("\n(c) 1996-2001 Brian King - Win32 port, Picasso96 RTG, and GUI.")
_T("\n(c) 1996-1999 Mathias Ortmann - Win32 port and bsdsocket support.")
_T("\n(c) 2000-2001 Bernd Meyer - JIT engine.")
return 0;
_tcscpy (progid2, progid);
_tcscat (progid2, extension);
- if (os_winnt_admin > 1)
+ if (os_admin > 1)
rkey = HKEY_LOCAL_MACHINE;
else
rkey = HKEY_CURRENT_USER;
_tcscpy (progid2, progid);
_tcscat (progid2, ext2 ? ext2 : extension);
- if (os_winnt_admin > 1)
+ if (os_admin > 1)
rkey = HKEY_LOCAL_MACHINE;
else
rkey = HKEY_CURRENT_USER;
_tcscpy (progid2, progid);
_tcscat (progid2, extension);
- if (os_winnt_admin > 1)
+ if (os_admin > 1)
rkey = HKEY_LOCAL_MACHINE;
else
rkey = HKEY_CURRENT_USER;
regsetstr (fkey, exts[0].ext, _T(""));
regclosetree (fkey);
}
- if (os_winnt_admin > 1) {
+ if (os_admin > 1) {
DWORD disposition;
TCHAR rpath[MAX_DPATH];
HKEY rkey = HKEY_LOCAL_MACHINE;
#endif
}
-int os_winnt, os_winnt_admin, os_64bit, os_win7, os_vista, os_winxp, cpu_number;
+int os_admin, os_64bit, os_win7, os_vista, cpu_number;
static int isadminpriv (void)
{
pGetNativeSystemInfo (&SystemInfo);
osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (GetVersionEx (&osVersion)) {
- if ((osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
- (osVersion.dwMajorVersion <= 4))
- {
- /* WinUAE not supported on this version of Windows... */
- TCHAR szWrongOSVersion[MAX_DPATH];
- WIN32GUI_LoadUIString (IDS_WRONGOSVERSION, szWrongOSVersion, MAX_DPATH);
- pre_gui_message (szWrongOSVersion);
- return FALSE;
- }
- if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT)
- os_winnt = 1;
- if (osVersion.dwMajorVersion > 5 || (osVersion.dwMajorVersion == 5 && osVersion.dwMinorVersion >= 1))
- os_winxp = 1;
if (osVersion.dwMajorVersion >= 6)
os_vista = 1;
if (osVersion.dwMajorVersion >= 7 || (osVersion.dwMajorVersion == 6 && osVersion.dwMinorVersion >= 1))
os_64bit = 1;
}
cpu_number = SystemInfo.dwNumberOfProcessors;
- if (!os_winnt)
- return 0;
- os_winnt_admin = isadminpriv ();
- if (os_winnt_admin) {
+ os_admin = isadminpriv ();
+ if (os_admin) {
if (pIsUserAnAdmin) {
if (pIsUserAnAdmin ())
- os_winnt_admin++;
+ os_admin++;
} else {
- os_winnt_admin++;
+ os_admin++;
}
}
struct tm when;
__time64_t now;
- if (os_winnt && GetModuleFileName (NULL, path, MAX_DPATH)) {
+ if (GetModuleFileName (NULL, path, MAX_DPATH)) {
TCHAR dumpfilename[100];
TCHAR beta[100];
TCHAR path3[MAX_DPATH];
const static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2L, 0xF16F, 0x11CF,
{ 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 } };
-typedef ULONG (CALLBACK *SHCHANGENOTIFYREGISTER)
- (HWND hwnd,
- int fSources,
- LONG fEvents,
- UINT wMsg,
- int cEntries,
- const SHChangeNotifyEntry *pshcne);
-typedef BOOL (CALLBACK *SHCHANGENOTIFYDEREGISTER)(ULONG ulID);
-
void addnotifications (HWND hwnd, int remove, int isgui)
{
static ULONG ret;
static HDEVNOTIFY hdn;
static int wtson;
- LPITEMIDLIST ppidl;
-
if (remove) {
if (ret > 0)
if (hdn)
UnregisterDeviceNotification (hdn);
hdn = 0;
- if (os_winxp && wtson && !isgui)
+ if (wtson && !isgui)
WTSUnRegisterSessionNotification (hwnd);
wtson = 0;
} else {
DEV_BROADCAST_DEVICEINTERFACE NotificationFilter = { 0 };
- if(SHGetSpecialFolderLocation (hwnd, CSIDL_DESKTOP, &ppidl) == NOERROR) {
- SHChangeNotifyEntry shCNE;
- shCNE.pidl = ppidl;
- shCNE.fRecursive = TRUE;
- ret = SHChangeNotifyRegister (hwnd, SHCNE_DISKEVENTS, SHCNE_MEDIAINSERTED | SHCNE_MEDIAREMOVED | SHCNE_DRIVEREMOVED | SHCNE_DRIVEADD,
- WM_USER + 2, 1, &shCNE);
- }
+ SHChangeNotifyEntry shCNE = { 0 };
+ shCNE.pidl = NULL;
+ shCNE.fRecursive = TRUE;
+ ret = SHChangeNotifyRegister (hwnd, SHCNRF_ShellLevel | SHCNRF_InterruptLevel | SHCNRF_NewDelivery,
+ SHCNE_MEDIAREMOVED | SHCNE_MEDIAINSERTED | SHCNE_DRIVEREMOVED | SHCNE_DRIVEADD,
+ WM_USER + 2, 1, &shCNE);
NotificationFilter.dbcc_size =
sizeof(DEV_BROADCAST_DEVICEINTERFACE);
NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_HID;
- hdn = RegisterDeviceNotification (hwnd, &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);
- if (os_winxp && !isgui)
+ hdn = RegisterDeviceNotification (hwnd, &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
+ if (!isgui)
wtson = WTSRegisterSessionNotification (hwnd, NOTIFY_FOR_THIS_SESSION);
}
}
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEPUBLICBETA 0
+#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
#define LANG_DLL_FULL_VERSION_MATCH 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("0")
+#define WINUAEBETA _T("1")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2014, 12, 17)
+#define WINUAEDATE MAKEBD(2015, 1, 1)
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
extern int framecnt;
extern TCHAR VersionStr[256];
extern TCHAR BetaStr[64];
-extern int os_winnt_admin, os_64bit, os_vista, os_winxp, os_win7, cpu_number;
+extern int os_admin, os_64bit, os_vista, os_win7, cpu_number;
extern OSVERSIONINFO osVersion;
extern int paraport_mask;
extern int gui_active;
DWORD dwHold;
BOOL result = FALSE;
- _stprintf (filename, _T("%s."), DriveName);
+ _stprintf (filename, _T("\\\\?\\%s"), DriveName);
dwHold = GetFileAttributes (filename);
if(dwHold != 0xFFFFFFFF)
result = TRUE;
#include <ddraw.h>
#include <shobjidl.h>
#include <dbt.h>
+#include <Cfgmgr32.h>
#include "resource.h"
#include "sysconfig.h"
};
static struct scsiromselect scsiromdata[] =
{
- { workprefs.a2091rom.roms[0].romfile, ROMTYPE_A2091BOOT | ROMTYPE_NONE },
- { workprefs.a4091rom.roms[0].romfile, ROMTYPE_A4091BOOT },
+ { workprefs.a2091rom.roms[0].romfile, ROMTYPE_A2091 | ROMTYPE_NONE },
+ { workprefs.gvprom.roms[0].romfile, ROMTYPE_GVP },
+ { workprefs.a4091rom.roms[0].romfile, ROMTYPE_A4091 },
{ workprefs.fastlanerom.roms[0].romfile, ROMTYPE_FASTLANE },
{ workprefs.oktagonrom.roms[0].romfile, ROMTYPE_OKTAGON },
{ workprefs.acceleratorextromfile, ROMTYPE_CPUBOARDEXT },
49, 50, 75, 51, 76, 77, -1, 5, 4, -1, -2, // ARCADIA
53, 54, 55, 56, -1, -1, // A590/A2091
+ 111, -1, -1, // GVP Series I
+ 109, 110, -1, -1, // GVP Series II
57, 58, -1, -1, // A4091
102, -1, -1, // Fastlane
103, -1, -1, // Oktagon
92, -1, -1, // 2060
93, -1, -1, // Warp Engine
105, -1, -1, // TekMagic
+ 112, -1, -1, // DKB 12x0
+ 113, -1, -1, // Fusion Forty
95, 101, -1, -1, // CS MK I
96, -1, -1, // CS MK II
97, -1, -1, // CS MK III
p1 = _T("A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0A4000T\0")
_T("CD32\0CDTV\0CDTV-CR\0Arcadia Multi Select\0")
- _T("A590/A2091 SCSI\0A4091 SCSI\0Fastlane\0Oktagon 2008\0")
+ _T("A590/A2091 SCSI\0GVP Series I SCSI\0GVP Series II SCSI\0A4091 SCSI\0Fastlane\0Oktagon 2008\0")
_T("CD32 Full Motion Video\0")
_T("Picasso IV\0")
_T("Blizzard 1230-IV\0Blizzard 1260\0")
_T("Blizzard 1230-IV/SCSI\0Blizzard 1260/SCSI\0")
_T("Blizzard 2060\0Warp Engine\0TekMagic 2040/2060\0")
+ _T("DKB 1230/1240\0Fusion Forty\0")
_T("CyberStorm MK I\0CyberStorm MK II\0CyberStorm MK III\0")
_T("Blizzard PPC\0CyberStorm PPC\0")
_T("SCSI:%s"),
_T("A2091:%s"),
_T("A2091 2nd:%s"),
+ _T("GVP: %s"),
+ _T("GVP 2nd: %s"),
_T("A4091:%s"),
_T("A4091 2nd:%s"),
_T("Fastlane:%s"),
ew (hDlg, IDC_RTG_HWSPRITE, rtg3 && workprefs.gfx_api);
ShowWindow (GetDlgItem(hDlg, IDC_CS_SCSIMODE), SW_HIDE);
ew(hDlg, IDC_CS_CD32FMV, en);
+ ew(hDlg, IDC_CS_TOCCATA, en);
ew (hDlg, IDC_CS_SCSIMODE, FALSE);
}
CheckDlgButton (hDlg, IDC_SANA2, workprefs.sana2);
CheckDlgButton (hDlg, IDC_A2065, workprefs.a2065name[0] ? 1 : 0);
CheckDlgButton(hDlg, IDC_CS_CD32FMV, workprefs.cs_cd32fmv);
+ CheckDlgButton(hDlg, IDC_CS_TOCCATA, workprefs.sound_toccata);
CheckDlgButton(hDlg, IDC_CS_SCSIMODE, workprefs.scsi == 2);
SendDlgItemMessage (hDlg, IDC_RTG_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[1].gfx_backbuffers == 0 ? 0 : workprefs.gfx_apmode[1].gfx_backbuffers - 1, 0);
cw = catweasel_detect ();
case IDC_CS_CD32FMV:
workprefs.cs_cd32fmv = ischecked(hDlg, IDC_CS_CD32FMV) ? 1 : 0;
break;
+ case IDC_CS_TOCCATA:
+ workprefs.sound_toccata = ischecked(hDlg, IDC_CS_TOCCATA) ? 1 : 0;
+ break;
}
if (HIWORD (wParam) == CBN_SELENDOK || HIWORD (wParam) == CBN_KILLFOCUS || HIWORD (wParam) == CBN_EDITCHANGE) {
uae_u32 mask = workprefs.picasso96_modeflags;
SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("Warp Engine"));
SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("Tek Magic"));
SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("A2620/A2630"));
+ SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("DKB 1230/1240"));
+ SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("Fusion Forty"));
setcpuboardmemsize(hDlg);
case WM_USER:
#endif
ew(hDlg, IDC_CPUBOARDROMFILE, workprefs.cpuboard_type != 0);
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_RESETCONTENT, 0, 0);
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091"));
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A4091"));
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane"));
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008"));
- SendDlgItemMessage (hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Blizzard SCSI Kit IV"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_RESETCONTENT, 0, 0);
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("GVP Series II"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("A4091"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008"));
+ SendDlgItemMessage(hDlg, IDC_SCSIROMSELECT, CB_ADDSTRING, 0, (LPARAM)_T("Blizzard SCSI Kit IV"));
int found = -1;
for (int i = 0; scsiromdata[i].name; i++) {
values_to_kickstartdlg (hDlg);
break;
case IDC_SCSIROMCHOOSER:
- DiskSelection(hDlg, IDC_SCSIROMCHOOSER, 6, &workprefs, path);
+ DiskSelection(hDlg, IDC_SCSIROMFILE, 6, &workprefs, path);
values_to_kickstartdlg (hDlg);
break;
case IDC_CPUBOARDROMCHOOSER:
static void inithdcontroller (HWND hDlg, int ctype, int devtype)
{
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_RESETCONTENT, 0, 0);
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("UAE"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("IDE"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("SCSI (Auto)"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091 #2 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4091 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4091 #2 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane #2 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008 #2 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A3000 SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4000T SCSI"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("CDTV SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_RESETCONTENT, 0, 0);
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("UAE"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("IDE"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("SCSI (Auto)"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A590/A2091 #2 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("GVP SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("GVP #2 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4091 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4091 #2 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Fastlane #2 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Oktagon 2008 #2 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A3000 SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("A4000T SCSI"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("CDTV SCSI"));
SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("Accelerator board SCSI"));
SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("PCMCIA SRAM"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("PCMCIA IDE"));
- SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER, CB_SETCURSEL, ctype, 0);
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_ADDSTRING, 0, (LPARAM)_T("PCMCIA IDE"));
+ SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER, CB_SETCURSEL, ctype, 0);
SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER_UNIT, CB_RESETCONTENT, 0, 0);
if (ctype >= HD_CONTROLLER_TYPE_IDE_FIRST && ctype <= HD_CONTROLLER_TYPE_SCSI_LAST) {
case WM_INITDIALOG:
recursive++;
if (current_cddlg.ci.controller_type == HD_CONTROLLER_TYPE_UAE)
- current_cddlg.ci.controller_type = (cfgfile_board_enabled(&workprefs.a2091rom) || cfgfile_board_enabled(&workprefs.a4091rom) || workprefs.cs_cdtvscsi || (workprefs.cs_mbdmac & 3)) ? HD_CONTROLLER_TYPE_SCSI_AUTO : HD_CONTROLLER_TYPE_IDE_AUTO;
+ current_cddlg.ci.controller_type = (cfgfile_board_enabled(&workprefs.a2091rom) || cfgfile_board_enabled(&workprefs.gvprom) || cfgfile_board_enabled(&workprefs.a4091rom) || workprefs.cs_cdtvscsi || (workprefs.cs_mbdmac & 3)) ? HD_CONTROLLER_TYPE_SCSI_AUTO : HD_CONTROLLER_TYPE_IDE_AUTO;
inithdcontroller(hDlg, current_cddlg.ci.controller_type, UAEDEV_CD);
SendDlgItemMessage (hDlg, IDC_HDF_CONTROLLER_UNIT, CB_SETCURSEL, current_cddlg.ci.controller_unit, 0);
InitializeListView (hDlg);
static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
- static int waitfornext;
+ static int devicechangetimer;
static int oldwidth, oldheight;
switch (msg)
DEV_BROADCAST_HDR *pBHdr = (DEV_BROADCAST_HDR *)lParam;
int doit = 0;
if (wParam == DBT_DEVNODES_CHANGED && lParam == 0) {
- if (waitfornext)
- doit = 1;
+ doit = 1;
} else if (pBHdr && pBHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
DEV_BROADCAST_DEVICEINTERFACE *dbd = (DEV_BROADCAST_DEVICEINTERFACE*)lParam;
write_log (_T("%s: %s\n"), wParam == DBT_DEVICEREMOVECOMPLETE ? _T("Removed") : _T("Inserted"),
if (wParam == DBT_DEVICEREMOVECOMPLETE)
doit = 1;
else if (wParam == DBT_DEVICEARRIVAL)
- waitfornext = 1; /* DirectInput enumeration does not yet show the new device.. */
+ doit = 1;
}
if (doit) {
- inputdevice_devicechange (&workprefs);
- updatePanel (currentpage);
- waitfornext = 0;
+ if (devicechangetimer)
+ KillTimer(hDlg, 3);
+ devicechangetimer = 1;
+ SetTimer(hDlg, 3, 2000, NULL);
}
}
return TRUE;
+ case WM_TIMER:
+ if (wParam == 3) {
+ KillTimer(hDlg, 3);
+ devicechangetimer = 0;
+ inputdevice_devicechange (&workprefs);
+ updatePanel (currentpage);
+ break;
+ }
+
case WM_DESTROY:
PostQuitMessage (0);
return TRUE;
case WM_CLOSE:
+ if (devicechangetimer)
+ KillTimer(hDlg, 3);
+ devicechangetimer = 0;
addnotifications (hDlg, TRUE, TRUE);
updatePanel (-1);
DestroyWindow(hDlg);
}
return TRUE;
case WM_INITDIALOG:
- waitfornext = 0;
guiDlg = hDlg;
scaleresource_setfont (hDlg);
SendMessage (hDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon (GetModuleHandle (NULL), MAKEINTRESOURCE(IDI_APPICON)));
<ClCompile Include="..\..\cpuemu_33.cpp" />
<ClCompile Include="..\..\cpuemu_40.cpp" />
<ClCompile Include="..\..\cpummu30.cpp" />
+ <ClCompile Include="..\..\def_icons.cpp" />
<ClCompile Include="..\..\dlopen.cpp" />
<ClCompile Include="..\..\ethernet.cpp" />
<ClCompile Include="..\..\events.cpp" />
<ClCompile Include="..\..\slirp\tcp_timer.cpp" />
<ClCompile Include="..\..\slirp\tftp.cpp" />
<ClCompile Include="..\..\slirp\udp.cpp" />
+ <ClCompile Include="..\..\sndboard.cpp" />
<ClCompile Include="..\..\specialmonitors.cpp" />
<ClCompile Include="..\..\statusline.cpp" />
<ClCompile Include="..\..\tabletlibrary.cpp" />
<ClCompile Include="..\..\cpuemu_24.cpp">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\..\sndboard.cpp">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\def_icons.cpp">
+ <Filter>common</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\resources\35floppy.ico">
- restore only single input target to default.
+- Lowered disk motor startup delay, more closer match with real hardware (at least matches some random drive
+ in my A500)
+- Memwatch points in KS ROM address space crashed during reset. (Wrong ROM mirror selection)
+- A4000T NCR SCSI data bus width become 16-bit in cycle-exact mode. Caused write triggerable registers
+ to start operation before full 32-bit value was written.
+- Memwatch points didn't work in ROM addresses.
+- CPU HALT state caused infinite loop in some configurations.
+- 2900b16 68040 MMU MOVEM stack frame update was incorrect. (NetBSD crash, probably other Unix-likes too)
+- Some 68000 MOVE variants seem to sample interrupt lines before writes and some after writes. Added special
+ case for one variant, allows Made in Croatia / Binary to work in cycle-exact mode. Need more testing later,
+ there does not seem to be any pattern.
+- Last line sometimes flickered with random colors in "Double, fields/+" non-interlaced mode.
+- RTG mode screenshots in 16-bit host color depth mode had wrong colors.
+- Non-cycle exact modes with display vertical diw open but bitplane DMA disabled: in some situations display was
+ corrupted or shifted. (Gloom AGA, Worms Directors Cut title screens)
+- Directory filesystem exnext packet update didn't always work correctly if file was deleted during directory
+ enumeration. (Which is technically illegal but it accidentally worked with OFS/FFS and become a feature..)
+- Autoconfig space was not unmapped after it finished, broke during previous autoconfig rewrite.
+- GUI didn't allow selection of custom SCSI ROM file.
+- Completely rewritten CPU idle function, max CPU idle setting should now work without any slowdown side-effects,
+ also lowest CPU idle state should be less than 10%. Please test.
+- Last line is not special if A1000 Agnus. I was expecting this result when I noticed that A1000 sprite behavior
+ is different in last line vs later Agnus models. A1000 Agnus: all visible lines are normal, later revisions:
+ last line inhibits bitplane and sprite DMA. Real A1000 confirmed. I think this is last A1000 vs later Agnus
+ revision undocumented difference.
+- Small sprite update, only writes to SPRxCTL disarms sprite (I had special case for first DMA write to SPRxPOS
+ too, only because it worked around another old bug..). Now OCS Agnus + ECS Denise + KS3.1 combination mouse
+ cursor sprite corruption is 100% correct.
+- On the fly media insertions are now serialized and only processed when Windows PnP manager reports idle
+ state (Media mounting works even if it causes "installing drivers" phase) and multiple simultaneous media
+ insertions also work reliably now (for example USB reader connected with multiple cards already inserted)
+- First on the fly inserted device name becomes RDH0:, second RDH1: and so on. Previously number was next
+ available directory filesystem unit number.
+- Delay enumeration of inserted/removed input devices by 2 seconds. One removal or insertion can cause
+ multiple device events (which is harmless but sometimes annoying)
+- Picasso IV autoconfig missed special case, other boards are 16M in Z3 mode but PIV is 32M. Fixes incorrect
+ address alignment if Z3 fast RAM is also enabled and size is less than 32M. (OS4 black screen hang)
+- Picasso IV byteswap VRAM space didn't handle byte reads or writes correctly, only words and longs worked.
+ (OS4 1024*768*16 screen mode glitches, possibly also other 16 bit modes)
+
+New hardware emulated:
+
+- GVP SCSI Series I and II hardware emulation (WD33C93), HC+8 board. v3.15 and v4.15 boot ROMs added to ROM
+ scanner (gvpscsi.device). GVP SCSI enabled + Z2 fast RAM: use GVP Z2 fast ram autoconfig ID.
+- DKB 1230/1240 accelerator board + SCSI emulation (FAS246 which appears to be compatible with 53C94/FAS216).
+ SCSI is non-DMA (dkbscsi.device). v1.23 ROM added to ROM scanner. RAM not emulated, no idea about address space.
+- Fusion Forty accelerator board emulation. It has interesting menu and graphics in boot ROM, press right
+ mouse button when booting. v3.4 ROM images added to ROM scanner. RAM expansion emulated.
+- Toccata Z2 sound card emulation.
+
+Toccata hardware features emulated:
+- Mono and stereo channel modes.
+- 8-bit and 16-bit linear PCM. Companded (ulaw/alaw) modes are not supported.
+- Left and right output channel volume control and mute.
+- All AD1848 supported output frequencies.
+- Output only. Input channels are not supported.
+
+Technical details:
+- Has 1024x9bit FIFO chip, one for output and one for input.
+- No DMA. Uses level 6 interrupt to fill FIFO, 512 bytes/interrupt. Interrupt triggers when FIFO has 512 bytes or less
+ data available. (Which makes about 7 interrupts/frame at 44100Hz/16bit/stereo)
+
+Notes:
+- Different implementation than uae ahi and CD audio. Audio goes to Paula emulation backend (after Paula 8 to 16-bit
+ conversions and filters). Very good latency but glitches are possible if configured buffer size is too small or
+ not enough CPU power available (just like with Paula audio). It should be usable for (game) sound effect, not just
+ for music.
+- Because it uses Paula audio path, Toccata audio is included with sound recording. Same method may be used with
+ CD audio in future. (Possibly optionally).
+- It is best to set same sample rate in both AHI and UAE sound settings to reduce possible resampling artifacts.
+- Does any DMA capable simple sound cards exist? (Simple = basic CODEC chip only, no DSP chip)
+
3.0.0
Beta 28: (RC3)
return out;
}
+uae_u8 *zfile_load_file(const TCHAR *name, int *outlen)
+{
+ struct zfile *zf;
+ int size;
+ uae_u8 *out;
+
+ zf = zfile_fopen(name, _T("rb"));
+ if (!zf)
+ return NULL;
+ size = zfile_size(zf);
+ out = xmalloc (uae_u8, size);
+ zfile_fread(out, 1, size, zf);
+ zfile_fclose(zf);
+ *outlen = size;
+ return out;
+}
int zfile_truncate (struct zfile *z, uae_s64 size)
{