#endif
cdrom_data_offset = seekpos;
cdrom_seek_delay = abs (cdrom_current_sector - cdrom_data_offset);
- if (cdrom_seek_delay < 100) {
+ if (cdrom_seek_delay < 100 || currprefs.cd_speed == 0) {
cdrom_seek_delay = 1;
} else {
cdrom_seek_delay /= 1000;
cdrom_seek_delay--;
}
framecounter += (float)maxvpos * vblank_hz / (75.0 * cdrom_speed);
+ if (currprefs.cd_speed == 0)
+ framecounter = 1;
framesync = true;
}
if (cdrom_command_cnt_in == 7) {
cdrom_command_accepted (0, s, &cdrom_command_cnt_in);
cd_finished = 1;
- sleep_millis (500);
+ if (currprefs.cd_speed)
+ sleep_millis (500);
activate_stch = 1;
}
break;
cdrom_offset / cdtv_sectorsize, dmac_acr, cnt, cdrom_length / 2);
#endif
dma_wait += cnt * (uae_u64)312 * 50 / 75 + 1;
+ if (currprefs.cd_speed == 0)
+ dma_wait = 1;
while (cnt > 0 && dmac_dma) {
uae_u8 buffer[2352];
if (!didread || readsector != (cdrom_offset / cdtv_sectorsize)) {
static int cdtvcr_media;
static int subqcnt;
static int cd_audio_status;
+static int cdtvcr_wait_sectors;
static void cdtvcr_battram_reset (void)
{
{
uae_u8 buffer[2048];
int didread;
-
+
+ cdtvcr_wait_sectors = 0;
while (len) {
didread = sys_command_cd_read (unitnum, buffer, start, 1);
if (!didread)
}
addr += 2048;
start++;
+ cdtvcr_wait_sectors++;
}
- cdtvcr_cmd_done();
}
static void cdtvcr_do_cmd(void)
void CDTVCR_hsync_handler (void)
{
- static int subqcnt;
+ static int subqcnt, readcnt;
if (!currprefs.cs_cdtvcr)
return;
+ if (cdtvcr_wait_sectors > 0 && currprefs.cd_speed == 0) {
+ cdtvcr_wait_sectors = 0;
+ cdtvcr_cmd_done();
+ }
+ readcnt--;
+ if (readcnt <= 0) {
+ int cdspeed = cdtvcr_4510_ram[CDTVCR_CD_SPEED] ? 150 : 75;
+ readcnt = (int)(maxvpos * vblank_hz / cdspeed);
+ if (cdtvcr_wait_sectors > 0) {
+ cdtvcr_wait_sectors--;
+ if (cdtvcr_wait_sectors == 0)
+ cdtvcr_cmd_done();
+ }
+ }
subqcnt--;
- if (subqcnt < 0) {
+ if (subqcnt <= 0) {
write_comm_pipe_u32 (&requests, 0x0101, 1);
- subqcnt = 75;
+ subqcnt = (int)(maxvpos * vblank_hz / 75);
// want subcodes but not playing?
if (cdtvcr_4510_ram[CDTVCR_CD_SUBCODES] && !cdtvcr_4510_ram[CDTVCR_CD_PLAYING]) {
// just return fake stuff, for some reason cdtv-cr driver requires something
- // that looks validg, even when not playing or it gets in infinite loop
+ // that looks valid, even when not playing or it gets in infinite loop
uae_u8 dst[SUB_CHANNEL_SIZE];
// regenerate Q-subchannel
uae_u8 *s = dst + 12;
setsubchannel(dst);
}
}
+
}
static void open_unit (void)
_T("scsi%d_a3000"), _T("scsi%d_a4000t"), _T("scsi%d_cdtv"), _T("scsi%d_cpuboard"),
_T("scsram"), _T("scide")
};
+static const TCHAR *z3mapping[] = {
+ _T("auto"),
+ _T("uae"),
+ _T("real"),
+ NULL
+};
static const TCHAR *obsolete[] = {
_T("accuracy"), _T("gfx_opengl"), _T("gfx_32bit_blits"), _T("32bit_blits"),
_T("gfx_immediate_blits"), _T("gfx_ntsc"), _T("win32"), _T("gfx_filter_bits"),
_T("serial_hardware_dtrdsr"), _T("gfx_filter_upscale"),
_T("gfx_correct_aspect"), _T("gfx_autoscale"), _T("parallel_sampler"), _T("parallel_ascii_emulation"),
_T("avoid_vid"), _T("avoid_dga"), _T("z3chipmem_size"), _T("state_replay_buffer"), _T("state_replay"),
+ _T("z3realmapping"), _T("force_0x10000000_z3"),
_T("gfx_filter_vert_zoom"),_T("gfx_filter_horiz_zoom"),
_T("gfx_filter_vert_zoom_mult"), _T("gfx_filter_horiz_zoom_mult"),
cfgfile_write (f, _T("floppy_speed"), _T("%d"), p->floppy_speed);
cfgfile_write (f, _T("floppy_volume"), _T("%d"), p->dfxclickvolume);
cfgfile_dwrite (f, _T("floppy_channel_mask"), _T("0x%x"), p->dfxclickchannelmask);
+ cfgfile_write (f, _T("cd_speed"), _T("%d"), p->cd_speed);
cfgfile_write_bool (f, _T("parallel_on_demand"), p->parallel_demand);
cfgfile_write_bool (f, _T("serial_on_demand"), p->serial_demand);
cfgfile_write_bool (f, _T("serial_hardware_ctsrts"), p->serial_hwctsrts);
cfgfile_dwrite_bool (f, _T("z3_autoconfig"), p->cs_z3autoconfig);
cfgfile_dwrite (f, _T("chipset_hacks"), _T("0x%x"), p->cs_hacks);
- cfgfile_dwrite_bool (f, _T("z3realmapping"), p->jit_direct_compatible_memory);
- cfgfile_dwrite_bool (f, _T("force_0x10000000_z3"), p->force_0x10000000_z3);
+ cfgfile_dwrite_str (f, _T("z3mapping"), z3mapping[p->z3_mapping_mode]);
cfgfile_dwrite_bool (f, _T("fastmem_autoconfig"), p->fastmem_autoconfig);
if (p->fastmem_size < 0x100000 && p->fastmem_size)
cfgfile_write (f, _T("fastmem_size_k"), _T("%d"), p->fastmem_size / 1024);
|| cfgfile_yesno (option, value, _T("z3_autoconfig"), &p->cs_z3autoconfig)
|| cfgfile_yesno (option, value, _T("agnus_bltbusybug"), &p->cs_agnusbltbusybug)
|| cfgfile_yesno (option, value, _T("fastmem_autoconfig"), &p->fastmem_autoconfig)
- || cfgfile_yesno (option, value, _T("z3realmapping"), &p->jit_direct_compatible_memory)
- || cfgfile_yesno (option, value, _T("force_0x10000000_z3"), &p->force_0x10000000_z3)
|| cfgfile_yesno (option, value, _T("gfxcard_hardware_vblank"), &p->rtg_hardwareinterrupt)
|| cfgfile_yesno (option, value, _T("gfxcard_hardware_sprite"), &p->rtg_hardwaresprite)
|| cfgfile_yesno (option, value, _T("synchronize_clock"), &p->tod_hack)
|| cfgfile_strval(option, value, _T("cpuboard_type"), &p->cpuboard_type, cpuboards, 0)
|| cfgfile_intval(option, value, _T("rtg_modes"), &p->picasso96_modeflags, 1)
|| cfgfile_intval (option, value, _T("floppy_speed"), &p->floppy_speed, 1)
+ || cfgfile_intval (option, value, _T("cd_speed"), &p->cd_speed, 1)
|| cfgfile_intval (option, value, _T("floppy_write_length"), &p->floppy_write_length, 1)
|| cfgfile_intval (option, value, _T("floppy_random_bits_min"), &p->floppy_random_bits_min, 1)
|| cfgfile_intval (option, value, _T("floppy_random_bits_max"), &p->floppy_random_bits_max, 1)
|| cfgfile_strval (option, value, _T("monitoremu"), &p->monitoremu, specialmonitors, 0)
|| cfgfile_strval (option, value, _T("waiting_blits"), &p->waiting_blits, waitblits, 0)
|| cfgfile_strval (option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2, autoext2, 0)
+ || cfgfile_strval (option, value, _T("z3mapping"), &p->z3_mapping_mode, z3mapping, 0)
|| cfgfile_strboolval (option, value, _T("comp_flushmode"), &p->comp_hardflush, flushmode, 0))
return 1;
p->ghostscript_parameters[0] = 0;
p->uae_hide = 0;
p->uae_hide_autoconfig = false;
- p->jit_direct_compatible_memory = true;
- p->force_0x10000000_z3 = false;
+ p->z3_mapping_mode = Z3MAPPING_AUTO;
p->mountitems = 0;
for (i = 0; i < MOUNT_CONFIG_SIZE; i++) {
p->floppy_random_bits_max = 3;
p->dfxclickvolume = 33;
p->dfxclickchannelmask = 0xffff;
+ p->cd_speed = 100;
p->statecapturebuffersize = 100;
p->statecapturerate = 5 * 50;
cr->locked = false;
_tcscpy (cr->label, _T("NTSC"));
+ savestate_state = 0;
+
target_default_options (p, type);
zfile_fclose (default_file);
toscr_1 (diff, fetchmode);
thisline_decision.plfright += hpos - thisline_decision.plfright;
}
- toscr_nr_planes_shifter = np;
- if (isocs7planes ()) {
- if (toscr_nr_planes_shifter < 6)
- toscr_nr_planes_shifter = 6;
- }
}
static void update_denise (int hpos)
{
UAE_DLHANDLE result;
#ifdef WINUAE
- extern HMODULE WIN32_LoadLibrary(const TCHAR *name);
- result = WIN32_LoadLibrary(path);
+ result = uae_dlopen_plugin(path);
#elif _WIN32
result = LoadLibrary(path);
#else
write_log("uae_dlopen failed: %s\n", error);
}
#endif
+ if (result)
+ uae_dlopen_patch_common(result);
return result;
}
#include "uae/log.h"
-void uae_patch_library_common(UAE_DLHANDLE handle)
+void uae_dlopen_patch_common(UAE_DLHANDLE handle)
{
+ write_log(_T("DLOPEN: Patching common functions\n"));
void *ptr;
-
ptr = uae_dlsym(handle, "uae_log");
if (ptr) *((uae_log_function *) ptr) = &uae_log;
}
if (regs.halted && ppc_state)
return false;
#endif
- return p->jit_direct_compatible_memory || cpuboard_memorytype(p) == BOARD_MEMORY_BLIZZARD_12xx;
+ return p->z3_mapping_mode == Z3MAPPING_AUTO || p->z3_mapping_mode == Z3MAPPING_UAE || cpuboard_memorytype(p) == BOARD_MEMORY_BLIZZARD_12xx;
}
/* Ugly hack for >2M chip RAM in single pool
} else {
- if (expamem_z3_sum < 0x10000000) {
+ if (expamem_z3_sum < Z3BASE_UAE) {
expamem_z3_sum = currprefs.z3autoconfig_start;
- if (currprefs.mbresmem_high_size >= 128 * 1024 * 1024 && expamem_z3_sum == 0x10000000)
+ if (currprefs.mbresmem_high_size >= 128 * 1024 * 1024 && expamem_z3_sum == Z3BASE_UAE)
expamem_z3_sum += (currprefs.mbresmem_high_size - 128 * 1024 * 1024) + 16 * 1024 * 1024;
if (!expamem_z3hack(&currprefs))
- expamem_z3_sum = 0x40000000;
- if (expamem_z3_sum == 0x10000000) {
+ expamem_z3_sum = Z3BASE_REAL;
+ if (expamem_z3_sum == Z3BASE_UAE) {
expamem_z3_sum += currprefs.z3chipmem_size;
}
}
currprefs.rtgmem_type = changed_prefs.rtgmem_type;
currprefs.z3chipmem_size = changed_prefs.z3chipmem_size;
- z3chipmem_bank.start = 0x10000000;
+ z3chipmem_bank.start = Z3BASE_UAE;
z3fastmem_bank.start = currprefs.z3autoconfig_start;
if (currprefs.mbresmem_high_size >= 128 * 1024 * 1024)
z3chipmem_bank.start += (currprefs.mbresmem_high_size - 128 * 1024 * 1024) + 16 * 1024 * 1024;
if (!expamem_z3hack(&currprefs))
- z3fastmem_bank.start = 0x40000000;
- if (z3fastmem_bank.start == 0x40000000) {
+ z3fastmem_bank.start = Z3BASE_REAL;
+ if (z3fastmem_bank.start == Z3BASE_REAL) {
if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
z3fastmem_bank.start += 0x01000000;
z3fastmem_bank.start = expansion_startaddress(z3fastmem_bank.start, currprefs.z3fastmem_size);
}
}
- if (z3fastmem_bank.start == 0x10000000) {
+ if (z3fastmem_bank.start == Z3BASE_UAE) {
if (currprefs.mbresmem_high_size >= 128 * 1024 * 1024)
z3fastmem_bank.start += (currprefs.mbresmem_high_size - 128 * 1024 * 1024) + 16 * 1024 * 1024;
z3fastmem_bank.start += currprefs.z3chipmem_size;
break;
}
} else if (type == HD_CONTROLLER_TYPE_PCMCIA_SRAM) {
- gayle_add_pcmcia_sram_unit (uci->rootdir, uci->readonly);
+ gayle_add_pcmcia_sram_unit (uci);
added = true;
} else if (type == HD_CONTROLLER_TYPE_PCMCIA_IDE) {
- gayle_add_pcmcia_ide_unit (uci->rootdir, uci);
+ gayle_add_pcmcia_ide_unit (uci);
added = true;
}
if (added)
return 0;
}
+int hardfile_added (struct uaedev_config_info *ci)
+{
+ if (ci->controller_type == HD_CONTROLLER_TYPE_PCMCIA_IDE) {
+ return gayle_add_pcmcia_ide_unit(ci);
+ } else if (ci->controller_type == HD_CONTROLLER_TYPE_PCMCIA_SRAM) {
+ return gayle_add_pcmcia_sram_unit(ci);
+ }
+ return 0;
+}
+
int hardfile_media_change (struct hardfiledata *hfd, struct uaedev_config_info *ci, bool inserted, bool timer)
{
if (!hfd)
}
}
+static void remode_ide_unit(int ch)
+{
+ struct ide_hdf *ide;
+
+ ide = idedrive[ch];
+ if (!ide)
+ return;
+ hdf_hd_close(&ide->hdhfd);
+ scsi_free(ide->scsi);
+ ide->scsi = NULL;
+}
+
static struct ide_hdf *add_ide_unit (int ch, struct uaedev_config_info *ci)
{
struct ide_hdf *ide;
pcmcia_sram->hfd.drive_empty = 1;
}
}
+ remode_ide_unit(PCMCIA_IDE_ID * 2);
if (pcmcia_card)
gayle_cs_change (GAYLE_CS_CCDET, 0);
return 1;
}
-int gayle_add_pcmcia_sram_unit (const TCHAR *path, int readonly)
+int gayle_add_pcmcia_sram_unit (struct uaedev_config_info *uci)
{
- return initpcmcia (path, readonly, PCMCIA_SRAM, 1, NULL);
+ return initpcmcia (uci->rootdir, uci->readonly, PCMCIA_SRAM, 1, NULL);
}
-int gayle_add_pcmcia_ide_unit (const TCHAR *path, struct uaedev_config_info *uci)
+int gayle_add_pcmcia_ide_unit (struct uaedev_config_info *uci)
{
- return initpcmcia (path, 0, PCMCIA_IDE, 1, uci);
+ return initpcmcia (uci->rootdir, 0, PCMCIA_IDE, 1, uci);
}
-int gayle_modify_pcmcia_sram_unit (const TCHAR *path, int readonly, int insert)
+int gayle_modify_pcmcia_sram_unit (struct uaedev_config_info *uci, int insert)
{
if (insert)
- return initpcmcia (path, readonly, PCMCIA_SRAM, pcmcia_sram ? 0 : 1, NULL);
+ return initpcmcia (uci->rootdir, uci->readonly, PCMCIA_SRAM, pcmcia_sram ? 0 : 1, NULL);
else
return freepcmcia (0);
}
-int gayle_modify_pcmcia_ide_unit (const TCHAR *path, struct uaedev_config_info *uci, int insert)
+int gayle_modify_pcmcia_ide_unit (struct uaedev_config_info *uci, int insert)
{
if (insert)
- return initpcmcia (path, 0, PCMCIA_IDE, pcmcia_sram ? 0 : 1, uci);
+ return initpcmcia (uci->rootdir, 0, PCMCIA_IDE, pcmcia_sram ? 0 : 1, uci);
else
return freepcmcia (0);
}
struct hardfiledata *hfd;
if (uci->ci.controller_type == HD_CONTROLLER_TYPE_PCMCIA_SRAM) {
- gayle_modify_pcmcia_sram_unit (uci->ci.rootdir, uci->ci.readonly, insert);
+ gayle_modify_pcmcia_sram_unit (&uci->ci, insert);
return;
} else if (uci->ci.controller_type == HD_CONTROLLER_TYPE_PCMCIA_IDE) {
- gayle_modify_pcmcia_ide_unit (uci->ci.rootdir, &uci->ci, insert);
+ gayle_modify_pcmcia_ide_unit (&uci->ci, insert);
return;
}
hfd = get_hardfile_data (fsid);
extern void hardfile_do_disk_change (struct uaedev_config_data *uci, bool insert);
extern void hardfile_send_disk_change (struct hardfiledata *hfd, bool insert);
extern int hardfile_media_change (struct hardfiledata *hfd, struct uaedev_config_info *ci, bool inserted, bool timer);
+extern int hardfile_added (struct uaedev_config_info *ci);
void hdf_hd_close(struct hd_hardfiledata *hfd);
int hdf_hd_open(struct hd_hardfiledata *hfd);
extern void gayle_hsync (void);
extern void gayle_free (void);
extern int gayle_add_ide_unit (int ch, struct uaedev_config_info *ci);
-extern int gayle_modify_pcmcia_sram_unit (const TCHAR *path, int readonly, int insert);
-extern int gayle_modify_pcmcia_ide_unit (const TCHAR *path, struct uaedev_config_info*, int insert);
-extern int gayle_add_pcmcia_sram_unit (const TCHAR *path, int readonly);
-extern int gayle_add_pcmcia_ide_unit (const TCHAR *path, struct uaedev_config_info*);
+extern int gayle_modify_pcmcia_sram_unit (struct uaedev_config_info*, int insert);
+extern int gayle_modify_pcmcia_ide_unit (struct uaedev_config_info*, int insert);
+extern int gayle_add_pcmcia_sram_unit (struct uaedev_config_info*);
+extern int gayle_add_pcmcia_ide_unit (struct uaedev_config_info*);
extern void gayle_free_units (void);
extern void rethink_gayle (void);
extern void gayle_map_pcmcia (void);
void free_shm (void);
bool preinit_shm (void);
extern bool canbang;
+extern bool jit_direct_compatible_memory;
+
+#define Z3BASE_UAE 0x10000000
+#define Z3BASE_REAL 0x40000000
#ifdef ADDRESS_SPACE_24BIT
#define MEMORY_BANKS 256
struct romconfig roms[MAX_BOARD_ROMS];
};
+#define Z3MAPPING_AUTO 0
+#define Z3MAPPING_UAE 1
+#define Z3MAPPING_REAL 2
struct uae_prefs {
int floppy_random_bits_min;
int floppy_random_bits_max;
int floppy_auto_ext2;
+ int cd_speed;
bool tod_hack;
uae_u32 maprom;
bool rom_readwrite;
bool clipboard_sharing;
bool native_code;
bool uae_hide_autoconfig;
- bool jit_direct_compatible_memory;
- bool force_0x10000000_z3;
+ int z3_mapping_mode;
int mountitems;
struct uaedev_config_data mountconfig[MOUNT_CONFIG_SIZE];
void *uae_dlsym(UAE_DLHANDLE handle, const char *symbol);
void uae_dlclose(UAE_DLHANDLE handle);
-void uae_patch_library_common(UAE_DLHANDLE handle);
+/* UAE plugin support functions */
+
+UAE_DLHANDLE uae_dlopen_plugin(const TCHAR *name);
+void uae_dlopen_patch_common(UAE_DLHANDLE handle);
#endif /* UAE_DLOPEN_H */
#ifdef UAE
+void uae_ppc_get_model(const TCHAR **model, uint32_t *hid1);
void uae_ppc_doze(void);
void uae_ppc_crash(void);
void uae_ppc_cpu_reboot(void);
#define QEMU_UAE_VERSION_MAJOR 3
/* The qemu-uae minor version must be at least this */
-#define QEMU_UAE_VERSION_MINOR 3
+#define QEMU_UAE_VERSION_MINOR 4
UAE_DECLARE_IMPORT_FUNCTION(
void, qemu_uae_version, int *major, int *minor, int *revision)
p->comptrustlong = 1;
p->comptrustnaddr = 1;
}
- if (!p->jit_direct_compatible_memory && !p->comptrustbyte) {
- error_log(_T("JIT direct compatible memory option is disabled, disabling JIT direct."));
- p->comptrustbyte = 1;
- p->comptrustlong = 1;
- p->comptrustlong = 1;
- p->comptrustnaddr = 1;
- }
}
void fixup_prefs (struct uae_prefs *p)
}
static bool needmman (void)
{
- if (!currprefs.jit_direct_compatible_memory)
+ if (!jit_direct_compatible_memory)
return false;
#ifdef _WIN32
return true;
do_interrupt (7);
}
+static void m68k_reset_sr(void)
+{
+ SET_XFLG ((regs.sr >> 4) & 1);
+ SET_NFLG ((regs.sr >> 3) & 1);
+ SET_ZFLG ((regs.sr >> 2) & 1);
+ SET_VFLG ((regs.sr >> 1) & 1);
+ SET_CFLG (regs.sr & 1);
+ regs.t1 = (regs.sr >> 15) & 1;
+ regs.t0 = (regs.sr >> 14) & 1;
+ regs.s = (regs.sr >> 13) & 1;
+ regs.m = (regs.sr >> 12) & 1;
+ regs.intmask = (regs.sr >> 8) & 7;
+ /* set stack pointer */
+ if (regs.s)
+ m68k_areg (regs, 7) = regs.isp;
+ else
+ m68k_areg (regs, 7) = regs.usp;
+}
static void m68k_reset2(bool hardreset)
{
regs.ipl = regs.ipl_pin = 0;
#ifdef SAVESTATE
if (isrestore ()) {
+ m68k_reset_sr();
m68k_setpc_normal (regs.pc);
- SET_XFLG ((regs.sr >> 4) & 1);
- SET_NFLG ((regs.sr >> 3) & 1);
- SET_ZFLG ((regs.sr >> 2) & 1);
- SET_VFLG ((regs.sr >> 1) & 1);
- SET_CFLG (regs.sr & 1);
- regs.t1 = (regs.sr >> 15) & 1;
- regs.t0 = (regs.sr >> 14) & 1;
- regs.s = (regs.sr >> 13) & 1;
- regs.m = (regs.sr >> 12) & 1;
- regs.intmask = (regs.sr >> 8) & 7;
- /* set stack pointer */
- if (regs.s)
- m68k_areg (regs, 7) = regs.isp;
- else
- m68k_areg (regs, 7) = regs.usp;
return;
} else {
m68k_reset_delay = currprefs.reset_delay;
regs.chipset_latch_write = restore_u32 ();
}
+ m68k_reset_sr();
+
write_log (_T("CPU: %d%s%03d, PC=%08X\n"),
model / 1000, flags & 1 ? _T("EC") : _T(""), model % 1000, regs.pc);
static SYSTEM_INFO si;
int maxmem;
uae_u32 natmem_size;
+bool jit_direct_compatible_memory;
static uae_u8 *virtualallocwithlock (LPVOID addr, SIZE_T size, DWORD allocationtype, DWORD protect)
{
set_expamem_z3_hack_override(false);
z3offset = 0;
- if ((changed_prefs.z3autoconfig_start == 0x10000000 || changed_prefs.z3autoconfig_start == 0x40000000) && !changed_prefs.force_0x10000000_z3 && cpuboard_memorytype(&changed_prefs) != BOARD_MEMORY_BLIZZARD_12xx) {
+ if (changed_prefs.z3_mapping_mode != Z3MAPPING_UAE && cpuboard_memorytype(&changed_prefs) != BOARD_MEMORY_BLIZZARD_12xx) {
if (1 && natmem_size > 0x40000000 && natmem_size - 0x40000000 >= (totalsize - 0x10000000 - ((changed_prefs.z3chipmem_size + align) & ~align)) && changed_prefs.z3chipmem_size <= 512 * 1024 * 1024) {
- changed_prefs.z3autoconfig_start = currprefs.z3autoconfig_start = 0x40000000;
- z3offset += 0x40000000 - 0x10000000 - ((changed_prefs.z3chipmem_size + align) & ~align);
+ changed_prefs.z3autoconfig_start = currprefs.z3autoconfig_start = Z3BASE_REAL;
+ z3offset += Z3BASE_REAL - Z3BASE_UAE - ((changed_prefs.z3chipmem_size + align) & ~align);
if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000)
z3offset += 0x01000000;
set_expamem_z3_hack_override(true);
startbarrier = 0;
- write_log(_T("Z3 autoconfig option automatically disabled\n"));
+ write_log(_T("Z3 REAL mapping. JIT direct compatible.\n"));
+ jit_direct_compatible_memory = true;
+ } else if (changed_prefs.z3_mapping_mode == Z3MAPPING_AUTO) {
+ changed_prefs.z3autoconfig_start = currprefs.z3autoconfig_start = Z3BASE_UAE;
+ jit_direct_compatible_memory = true;
+ write_log(_T("Z3 UAE mapping.\n"));
} else {
- changed_prefs.z3autoconfig_start = currprefs.z3autoconfig_start = 0x10000000;
+ changed_prefs.z3autoconfig_start = currprefs.z3autoconfig_start = Z3BASE_REAL;
+ write_log(_T("Z3 REAL mapping. Not JIT direct compatible.\n"));
+ jit_direct_compatible_memory = false;
}
+ } else {
+ currprefs.z3autoconfig_start = changed_prefs.z3autoconfig_start = Z3BASE_UAE;
+ jit_direct_compatible_memory = true;
+ write_log(_T("Z3 UAE mapping.\n"));
}
p96mem_offset = NULL;
p96mem_size = z3rtgmem_size;
p96base_offset = 0;
if (changed_prefs.rtgmem_size && gfxboard_is_z3 (changed_prefs.rtgmem_type)) {
- p96base_offset = natmemsize + startbarrier + z3offset;
+ if (changed_prefs.z3autoconfig_start == Z3BASE_UAE)
+ p96base_offset = natmemsize + startbarrier + z3offset;
+ else
+ p96base_offset = expansion_startaddress(natmemsize + startbarrier + z3offset, changed_prefs.rtgmem_size);
} else if (changed_prefs.rtgmem_size && !gfxboard_is_z3 (changed_prefs.rtgmem_type)) {
p96base_offset = getz2rtgaddr (changed_prefs.rtgmem_size);
}
if (p96base_offset) {
- if (changed_prefs.jit_direct_compatible_memory) {
+ if (jit_direct_compatible_memory) {
p96mem_offset = natmem_offset + p96base_offset;
} else {
// calculate Z3 alignment (argh, I thought only Z2 needed this..)
- uae_u32 addr = 0x40000000;
+ uae_u32 addr = Z3BASE_REAL;
if (currprefs.cpuboard_type == BOARD_WARPENGINE_A4000) {
addr = expansion_startaddress(addr, 0x01000000);
addr += 0x01000000;
write_log (_T("NATMEM: P96 special area: 0x%p-0x%p (%08x %dM)\n"),
p96mem_offset, (uae_u8*)p96mem_offset + changed_prefs.rtgmem_size,
changed_prefs.rtgmem_size, changed_prefs.rtgmem_size >> 20);
- canbang = changed_prefs.jit_direct_compatible_memory ? 1 : 0;
+ canbang = jit_direct_compatible_memory ? 1 : 0;
if (p96mem_size)
natmem_offset_end = p96mem_offset + p96mem_size;
else
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\..\prowizard\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
#define IDC_NEW_HD 1341
#define IDC_PORT0 1342
#define IDC_NEW_FSARCH 1342
+#define IDC_NEW_FS2 1342
#define IDC_PORT1 1343
#define IDC_NEW_CD 1344
#define IDC_NEW_CD2 1345
#define IDC_WINDOWEDTEXT 1512
#define IDC_MAPDRIVES_LIMIT 1512
#define IDC_HEIGHTTEXT 1513
-#define IDC_MAPDRIVES_NET2 1513
+#define IDC_CD_SPEED 1513
#define IDC_SETTINGSTEXT 1514
#define IDC_REFRESHTEXT 1515
#define IDC_SETTINGSTEXT2 1515
#define IDC_CD_SELECT 1807
#define IDC_FASTMEMAUTOCONFIG 1808
#define IDC_RTG_DISPLAYSELECT 1809
-#define IDC_Z3REALMAPPING 1809
#define IDC_MISCLIST 1810
#define IDC_STATENAME 1811
#define IDC_SAMPLER_STEREO 1812
#define IDC_DA_SLIDER 1841
#define IDC_CPUBOARD_TYPE 1842
#define IDC_CPUBOARDMEM 1843
+#define IDC_Z3MAPPING 1844
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
EDITTEXT IDC_MBRAM2,326,171,40,12,ES_CENTER | ES_READONLY
CONTROL "",IDC_FASTMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,251,193,68,20
EDITTEXT IDC_FASTRAM2,326,196,40,12,ES_CENTER | ES_READONLY
- CONTROL "JIT Direct compatible Z3 memory mapping",IDC_Z3REALMAPPING,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,220,186,10
COMBOBOX IDC_CPUBOARD_TYPE,8,257,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Second Z2 Fast RAM board:",IDC_STATIC,129,194,116,15,SS_CENTERIMAGE
RTEXT "Accelerator board memory:",IDC_STATIC,138,257,104,15,SS_CENTERIMAGE
CONTROL "",IDC_CPUBOARDMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,251,253,68,20
EDITTEXT IDC_CPUBOARDRAM,326,256,40,12,ES_CENTER | ES_READONLY
+ COMBOBOX IDC_Z3MAPPING,249,220,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Z3 mapping mode:",IDC_STATIC,149,220,93,15,SS_CENTERIMAGE
END
IDD_CPU DIALOGEX 0, 0, 396, 292
EXSTYLE WS_EX_CONTEXTHELP
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- CONTROL "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,2,393,153
- PUSHBUTTON "Add &Directory or Archive...",IDC_NEW_FS,1,157,128,15
- PUSHBUTTON "Add &Hardfile...",IDC_NEW_HF,135,157,126,15
- PUSHBUTTON "Add Ha&rd Drive...",IDC_NEW_HD,267,157,127,15
- PUSHBUTTON "Add SCSI/IDE CD Drive",IDC_NEW_CD,1,176,128,15
- PUSHBUTTON "Add SCSI Tape Drive",IDC_NEW_TAPE,135,176,126,15
- PUSHBUTTON "&Properties",IDC_EDIT,267,176,60,15
- PUSHBUTTON "Remove",IDC_REMOVE,334,176,60,15
- GROUPBOX "Options",IDC_STATIC,1,193,393,72
- CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,201,11
+ CONTROL "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,2,393,149
+ PUSHBUTTON "Add &Directory or Archive...",IDC_NEW_FS,1,153,128,15
+ PUSHBUTTON "Add &Hardfile...",IDC_NEW_HF,135,153,126,15
+ PUSHBUTTON "Add Ha&rd Drive...",IDC_NEW_HD,267,153,127,15
+ PUSHBUTTON "Add SCSI/IDE CD Drive",IDC_NEW_CD,1,172,128,15
+ PUSHBUTTON "Add SCSI Tape Drive",IDC_NEW_TAPE,135,172,126,15
+ PUSHBUTTON "&Properties",IDC_EDIT,267,172,60,15
+ PUSHBUTTON "Remove",IDC_REMOVE,334,172,60,15
+ GROUPBOX "Options",IDC_STATIC,1,189,393,66
+ CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,200,201,11
CONTROL "Include removable drives..",IDC_MAPDRIVES_REMOVABLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,219,201,11
- CONTROL "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,233,201,11
- CONTROL "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,247,201,11
- CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,206,167,11
- CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,219,167,11
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,213,201,11
+ CONTROL "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,227,201,11
+ CONTROL "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,241,201,11
+ CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,200,167,11
+ CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,213,167,11
CONTROL "Automount removable drives [] Windows side insert or removal will immediately mount/remove it on Amiga side.",IDC_MAPDRIVES_AUTO,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,233,167,11
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,227,167,11
CONTROL "Limit size of directory drives to 1G [] Workaround for example old installers that calculate free space incorrectly if drive is large.",IDC_MAPDRIVES_LIMIT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,247,167,11
- GROUPBOX "Optical media options",IDC_STATIC,1,269,393,47
- LTEXT "CD drive/image",IDC_STATIC,5,283,70,10,SS_CENTERIMAGE
- PUSHBUTTON "Select image file",IDC_CD_SELECT,177,281,98,15
- COMBOBOX IDC_CD_TYPE,282,282,71,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Eject",IDC_CD_EJECT,360,281,30,15
- COMBOBOX IDC_CD_TEXT,5,300,386,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,241,167,11
+ GROUPBOX "Optical media options",IDC_STATIC,1,256,393,59
+ LTEXT "CD drive/image",IDC_STATIC,5,268,70,10,SS_CENTERIMAGE
+ PUSHBUTTON "Select image file",IDC_CD_SELECT,177,266,98,15
+ COMBOBOX IDC_CD_TYPE,282,267,71,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Eject",IDC_CD_EJECT,360,266,30,15
+ COMBOBOX IDC_CD_TEXT,5,285,386,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ CONTROL "CDTV/CDTV-CR/CD32 turbo CD read speed",IDC_CD_SPEED,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,301,201,11
END
IDD_SOUND DIALOGEX 0, 0, 396, 288
return m;
}
+HMODULE uae_dlopen_plugin(const TCHAR *name)
+{
+ HMODULE h;
+ TCHAR path[MAX_DPATH];
+ _tcscpy(path, name);
+ _tcscat(path, _T(".dll"));
+ h = WIN32_LoadLibrary(path);
+ return h;
+}
+
int isdllversion (const TCHAR *name, int version, int revision, int subver, int subrev)
{
DWORD dwVersionHandle, dwFileVersionInfoSize;
#define LANG_DLL_FULL_VERSION_MATCH 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("22")
+#define WINUAEBETA _T("23")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2014, 10, 25)
+#define WINUAEDATE MAKEBD(2014, 11, 1)
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
ew (hDlg, IDC_FASTMEM2, fast);
ew (hDlg, IDC_FASTRAM2, fast);
ew (hDlg, IDC_FASTMEMAUTOCONFIG, fast);
- ew (hDlg, IDC_Z3REALMAPPING, z3);
+ ew (hDlg, IDC_Z3MAPPING, z3);
ew (hDlg, IDC_FASTTEXT, fast);
ew (hDlg, IDC_GFXCARDTEXT, z3);
ew (hDlg, IDC_MBRAM1, z3);
SendDlgItemMessage (hDlg, IDC_MBMEM1, TBM_SETRANGE, TRUE, MAKELONG (MIN_MB_MEM, MAX_MBL_MEM));
SendDlgItemMessage (hDlg, IDC_MBMEM2, TBM_SETRANGE, TRUE, MAKELONG (MIN_MB_MEM, MAX_MBH_MEM));
CheckDlgButton(hDlg, IDC_FASTMEMAUTOCONFIG, workprefs.fastmem_autoconfig);
- CheckDlgButton(hDlg, IDC_Z3REALMAPPING, workprefs.jit_direct_compatible_memory);
+ SendDlgItemMessage (hDlg, IDC_Z3MAPPING, CB_RESETCONTENT, 0, 0);
+ SendDlgItemMessage (hDlg, IDC_Z3MAPPING, CB_ADDSTRING, 0, (LPARAM)_T("Automatic (*)"));
+ SendDlgItemMessage(hDlg, IDC_Z3MAPPING, CB_ADDSTRING, 0, (LPARAM)_T("UAE"));
+ SendDlgItemMessage(hDlg, IDC_Z3MAPPING, CB_ADDSTRING, 0, (LPARAM)_T("Real"));
+ SendDlgItemMessage (hDlg, IDC_Z3MAPPING, CB_SETCURSEL, workprefs.z3_mapping_mode, 0);
SendDlgItemMessage (hDlg, IDC_CPUBOARD_TYPE, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage (hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("-"));
SendDlgItemMessage(hDlg, IDC_CPUBOARD_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("Blizzard 1230 IV"));
case WM_USER:
workprefs.fastmem_autoconfig = ischecked (hDlg, IDC_FASTMEMAUTOCONFIG);
- workprefs.jit_direct_compatible_memory = ischecked (hDlg, IDC_Z3REALMAPPING);
fix_values_memorydlg ();
values_to_memorydlg (hDlg);
enable_for_memorydlg (hDlg);
if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS) {
switch (LOWORD (wParam))
{
+ case IDC_Z3MAPPING:
+ v = SendDlgItemMessage (hDlg, IDC_Z3MAPPING, CB_GETCURSEL, 0, 0L);
+ if (v != CB_ERR) {
+ workprefs.z3_mapping_mode = v;
+ }
+ break;
case IDC_CPUBOARD_TYPE:
v = SendDlgItemMessage (hDlg, IDC_CPUBOARD_TYPE, CB_GETCURSEL, 0, 0L);
if (v != CB_ERR) {
}
}
workprefs.fastmem_autoconfig = ischecked (hDlg, IDC_FASTMEMAUTOCONFIG);
- workprefs.jit_direct_compatible_memory = ischecked (hDlg, IDC_Z3REALMAPPING);
recursive--;
break;
uci = add_filesys_config (&workprefs, entry, &ci);
if (uci) {
struct hardfiledata *hfd = get_hardfile_data (uci->configoffset);
- hardfile_media_change (hfd, &ci, true, false);
+ if (hfd)
+ hardfile_media_change (hfd, &ci, true, false);
+ else
+ hardfile_added(&ci);
}
}
uci = add_filesys_config (&workprefs, entry, ¤t_hfdlg.ci);
if (uci) {
struct hardfiledata *hfd = get_hardfile_data (uci->configoffset);
- hardfile_media_change (hfd, ¤t_hfdlg.ci, true, false);
+ if (hfd)
+ hardfile_media_change (hfd, ¤t_hfdlg.ci, true, false);
+ else
+ hardfile_added(¤t_hfdlg.ci);
}
}
workprefs.win32_norecyclebin = ischecked (hDlg, IDC_NORECYCLEBIN);
break;
+ case IDC_CD_SPEED:
+ workprefs.cd_speed = ischecked (hDlg, IDC_CD_SPEED) ? 0 : 100;
+ break;
}
return 0;
}
CheckDlgButton (hDlg, IDC_NOUAEFSDB, workprefs.filesys_no_uaefsdb);
CheckDlgButton (hDlg, IDC_NORECYCLEBIN, workprefs.win32_norecyclebin);
CheckDlgButton (hDlg, IDC_MAPDRIVES_LIMIT, workprefs.filesys_limit != 0);
+ CheckDlgButton (hDlg, IDC_CD_SPEED, workprefs.cd_speed == 0);
InitializeListView (hDlg);
setautocomplete (hDlg, IDC_CD_TEXT);
addhistorymenu (hDlg, workprefs.cdslots[0].name, IDC_CD_TEXT, HISTORY_CD, true);
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
- <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>MSVCRT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;Dwmapi.dll;Iphlpapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>ws2_32.lib;ddraw.lib;dxguid.lib;winmm.lib;comctl32.lib;version.lib;vfw32.lib;msacm32.lib;dsound.lib;dinput8.lib;d3d9.lib;d3dx9.lib;setupapi.lib;wininet.lib;dxerr.lib;shlwapi.lib;zlibstat.lib;portaudio_x64.lib;packet.lib;wpcap.lib;openal32.lib;libpng15.lib;lglcd.lib;wtsapi32.lib;enet_x64.lib;prowizard_x64.lib;lzmalib.lib;libFLAC_static.lib;avrt.lib;hid.lib;Iphlpapi.lib;luastatic.lib;libmpeg2_ff.lib;softfloat.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(SolutionDir)\..\lib\</AdditionalLibraryDirectories>
- <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DelayLoadDLLs>wpcap.dll;packet.dll;d3dx9_43.dll;openal32.dll;portaudio_x64.dll;ws2_32.dll;msacm32.dll;wtsapi32.dll;dsound.dll;avrt.dll;Dwmapi.lib;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(Platform)\$(Configuration)\winuae.pdb</ProgramDatabaseFile>
<ClCompile Include="..\..\qemuvga\esp.cpp" />
<ClCompile Include="..\..\qemuvga\lsi53c710.cpp" />
<ClCompile Include="..\..\qemuvga\lsi53c895a.cpp" />
+ <ClCompile Include="..\..\qemuvga\qemu.cpp" />
<ClCompile Include="..\..\qemuvga\qemuuaeglue.cpp" />
<ClCompile Include="..\..\qemuvga\vga.cpp" />
<ClCompile Include="..\..\scp.cpp" />
<ClCompile Include="..\..\cdtvcr.cpp">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\..\qemuvga\qemu.cpp">
+ <Filter>qemu</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\resources\35floppy.ico">
- restore only single input target to default.
+Beta 23:
+
+- Dragging vhd file to harddrives panel now adds it as a HDF, not a directory if it does not contain any known
+ filesystem or RDB identifiers.
+- PCMCIA IDE was always mounted without drive since drive attribute update long time ago.
+- PCMCIA IDE and SRAM can be added (card inserted) after emulation has been started.
+- Replaced "JIT direct compatible" option in memory panel with more useful Z3 mapping option:
+ Auto = Use OS mapping if possible, fall back to UAE hack if JIT direct enabled and not enough adddress space.
+ UAE = Always use UAE hack mapping (0x10000000). NOTE: not compatible with non-m68k operating systems. This mode
+ was always forced until 282b1.
+ Real = Always use OS mapping (0x40000000 with alignment support), disable JIT direct if not enough address space.
+- Fixed missing graphics in Disposable Hero title screen in non-cycle exact modes.
+- Load config with statefile set, load another config without statefile, GUI shows no statefile selected but
+ when starting emulation statefile was still loaded.
+- CDTV-CR CD read speed is now limited to 1x/2x.
+- Added CD turbo data read speed mode, affects CDTV/CDTV-CR/CD32 emulation only. SCSI CD is always in turbo mode.
+ Checkbox in CD/Harddrives panel.
+- QEMU PPC module update, now all extra dependencies are statically linked. External dlls are not
+ needed anymore (whole plugins\qemu can be deleted). Must be located at <winuae path>\plugins\qemu-uae.dll
+
Beta 22:
- CDTV-CR CD unit was initialized even when CDTV-CR emulation was not enabled. Broke CD access on configurations
#define TRACE(format, ...) write_log(_T("PPC: ") format, ## __VA_ARGS__)
-#ifdef WINUAE
-#ifdef WIN64
-#define QEMU_LIBRARY_PATH _T("qemu\\x64\\qemu-uae.dll")
-#else
-#define QEMU_LIBRARY_PATH _T("qemu\\qemu-uae.dll")
-#endif
-#else
-#define QEMU_LIBRARY_PATH _T("qemu-uae.dll")
-#endif
-
#if SPINLOCK_DEBUG
static volatile int spinlock_cnt;
#endif
static volatile bool ppc_access;
static volatile int ppc_cpu_lock_state;
static bool ppc_init_done;
-static bool ppc_cpu_init_done;
static int ppc_implementation;
static bool ppc_paused;
//static uint64_t PPCCALL dummy_ppc_cpu_get_dec(void) { return 0; }
//static void PPCCALL dummy_ppc_cpu_do_dec(int value) { }
-static void PPCCALL dummy_ppc_cpu_version(int *major, int *minor, int *revision)
-{
- *major = QEMU_UAE_VERSION_MAJOR;
- *minor = QEMU_UAE_VERSION_MINOR;
- *revision = 0;
-}
-
static void PPCCALL dummy_ppc_cpu_pause(int pause)
{
}
/* Functions typedefs for PPC implementation */
-typedef void (PPCCALL *ppc_cpu_version_function)(int *major, int *minor, int *revision);
typedef bool (PPCCALL *ppc_cpu_init_function)(const char *model, uint32_t hid1);
typedef bool (PPCCALL *ppc_cpu_init_pvr_function)(uint32_t pvr);
typedef void (PPCCALL *ppc_cpu_close_function)(void);
/* Common */
ppc_cpu_atomic_raise_ext_exception_function atomic_raise_ext_exception;
ppc_cpu_atomic_cancel_ext_exception_function atomic_cancel_ext_exception;
- ppc_cpu_run_continuous_function run_continuous;
/* PearPC */
+ ppc_cpu_run_continuous_function run_continuous;
ppc_cpu_init_pvr_function init_pvr;
ppc_cpu_pause_function pause;
ppc_cpu_close_function close;
ppc_cpu_do_dec_function do_dec;
/* QEMU */
- ppc_cpu_version_function version;
ppc_cpu_init_function init;
ppc_cpu_map_memory_function map_memory;
ppc_cpu_check_state_function check_state;
write_log(_T("PPC: Loading QEmu implementation\n"));
memset(&impl, 0, sizeof(impl));
- UAE_DLHANDLE handle = uae_dlopen(QEMU_LIBRARY_PATH);
+ UAE_DLHANDLE handle = uae_qemu_uae_init();
if (!handle) {
gui_message(_T("PPC: Error loading qemu-uae library\n"));
return false;
/* Retrieve function pointers from library */
- impl.version = (ppc_cpu_version_function) uae_dlsym(handle, "ppc_cpu_version");
- //impl.init = (ppc_cpu_init_function) uae_dlsym(handle, "ppc_cpu_init");
impl.init = (ppc_cpu_init_function) uae_dlsym(handle, "ppc_cpu_init");
//impl.free = (ppc_cpu_free_function) uae_dlsym(handle, "ppc_cpu_free");
//impl.stop = (ppc_cpu_stop_function) uae_dlsym(handle, "ppc_cpu_stop");
impl.external_interrupt = (qemu_uae_ppc_external_interrupt_function) uae_dlsym(handle, "qemu_uae_ppc_external_interrupt");
impl.map_memory = (ppc_cpu_map_memory_function) uae_dlsym(handle, "ppc_cpu_map_memory");
- //impl.set_pc = (ppc_cpu_set_pc_function) uae_dlsym(handle, "ppc_cpu_set_pc");
impl.run_continuous = (ppc_cpu_run_continuous_function) uae_dlsym(handle, "ppc_cpu_run_continuous");
- //impl.run_single = (ppc_cpu_run_single_function) uae_dlsym(handle, "ppc_cpu_run_single");
- //impl.get_dec = (ppc_cpu_get_dec_function) uae_dlsym(handle, "ppc_cpu_get_dec");
- //impl.do_dec = (ppc_cpu_do_dec_function) uae_dlsym(handle, "ppc_cpu_do_dec");
- //impl.pause = (ppc_cpu_pause_function) uae_dlsym(handle, "ppc_cpu_pause");
impl.check_state = (ppc_cpu_check_state_function) uae_dlsym(handle, "ppc_cpu_check_state");
impl.set_state = (ppc_cpu_set_state_function) uae_dlsym(handle, "ppc_cpu_set_state");
impl.reset = (ppc_cpu_reset_function) uae_dlsym(handle, "ppc_cpu_reset");
impl.in_cpu_thread = (qemu_uae_ppc_in_cpu_thread_function) uae_dlsym(handle, "qemu_uae_ppc_in_cpu_thread");
impl.lock = (qemu_uae_lock_function) uae_dlsym(handle, "qemu_uae_lock");
- /* Check major version (=) and minor version (>=) */
+ // FIXME: not needed, handled internally by uae_dlopen_plugin
+ // uae_dlopen_patch_common(handle);
- int major = 0, minor = 0, revision = 0;
- if (impl.version) {
- impl.version(&major, &minor, &revision);
- }
- if (major != QEMU_UAE_VERSION_MAJOR) {
- gui_message(_T("PPC: Wanted qemu-uae version %d.x (got %d.x)\n"),
- QEMU_UAE_VERSION_MAJOR, major);
- return false;
- }
- if (minor < QEMU_UAE_VERSION_MINOR) {
- gui_message(_T("PPC: Wanted qemu-uae version >= %d.%d (got %d.%d)\n"),
- QEMU_UAE_VERSION_MAJOR, QEMU_UAE_VERSION_MINOR,
- major, minor);
- return false;
- }
-
- // FIXME: not needed, handled internally by uae_dlopen_plugin
- // uae_dlopen_patch_common(handle);
-
- uae_patch_library_common(handle);
- uae_patch_library_ppc(handle);
- return true;
+ uae_patch_library_ppc(handle);
+ return true;
#else
return false;
#endif
free((void*)r.name);
}
-static void cpu_init(void)
+void uae_ppc_get_model(const TCHAR **model, uint32_t *hid1)
{
- const TCHAR *model;
- uint32_t hid1;
-
if (currprefs.ppc_model[0]) {
/* Override PPC CPU model. See qemu/target-ppc/cpu-models.c for
* a list of valid CPU model identifiers */
- model = currprefs.ppc_model;
+ *model = currprefs.ppc_model;
} else {
/* Set default CPU model based on accelerator board */
if (currprefs.cpuboard_type == BOARD_BLIZZARDPPC) {
- model = _T("603ev");
+ *model = _T("603ev");
} else {
- model = _T("604e");
+ *model = _T("604e");
}
}
if (currprefs.cpuboard_type == BOARD_BLIZZARDPPC) {
- hid1 = 0xc0000000; // 4x
+ *hid1 = 0xc0000000; // 4x
} else {
- hid1 = 0xa0000000; // 4x
+ *hid1 = 0xa0000000; // 4x
}
+}
- if (impl.init) {
- char *models = ua(model);
- impl.init(models, hid1);
- free(models);
- } else if (impl.init_pvr) {
+static void cpu_init(void)
+{
+ if (using_pearpc()) {
+ const TCHAR *model;
+ uint32_t hid1;
+ uae_ppc_get_model(&model, &hid1);
uint32_t pvr = 0;
if (_tcsicmp(model, _T("603ev")) == 0) {
pvr = BLIZZPPC_PVR;
- }
- else if (_tcsicmp(model, _T("604e")) == 0) {
+ } else if (_tcsicmp(model, _T("604e")) == 0) {
pvr = CSPPC_PVR;
- }
- else {
+ } else {
pvr = CSPPC_PVR;
write_log(_T("PPC: Unrecognized model \"%s\", using PVR 0x%08x\n"), model, pvr);
}
write_log(_T("PPC: Calling ppc_cpu_init with PVR 0x%08x\n"), pvr);
impl.init_pvr(pvr);
+ return;
}
+ /* QEMU: CPU has already been initialized by qemu_uae_init */
}
static void uae_ppc_cpu_reset(void)
{
+ static bool ppc_cpu_init_done;
+
TRACE(_T("uae_ppc_cpu_reset\n"));
initialize();
static void *ppc_thread(void *v)
{
- uae_ppc_cpu_reset();
- impl.run_continuous();
+ if (using_qemu()) {
+ write_log(_T("PPC: Warning - ppc_thread started with QEMU impl\n"));
+ } else {
+ uae_ppc_cpu_reset();
+ impl.run_continuous();
- if (using_pearpc()) {
if (ppc_state == PPC_STATE_ACTIVE || ppc_state == PPC_STATE_SLEEP)
ppc_state = PPC_STATE_STOP;
write_log(_T("ppc_cpu_run() exited.\n"));
if (!ppc_thread_running) {
write_log(_T("Starting PPC thread.\n"));
ppc_thread_running = true;
- uae_start_thread(NULL, ppc_thread, NULL, NULL);
+ if (using_qemu()) {
+ uae_ppc_cpu_reset();
+ //qemu_uae_ppc_start();
+ impl.set_state(PPC_CPU_STATE_RUNNING);
+ //set_and_wait_for_state(PPC_CPU_STATE_RUNNING, 0);
+ } else {
+ uae_start_thread(NULL, ppc_thread, NULL, NULL);
+ }
} else if (using_qemu()) {
write_log(_T("PPC: Thread already running, resetting\n"));
uae_ppc_cpu_reset();
--- /dev/null
+#include "sysconfig.h"
+#include "sysdeps.h"
+
+#include "uae/dlopen.h"
+#include "uae/ppc.h"
+#include "uae/qemu.h"
+
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_version)
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_init)
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_start)
+
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_slirp_init)
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_slirp_input)
+
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_ppc_init)
+UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_ppc_in_cpu_thread)
+
+static void init_ppc(UAE_DLHANDLE handle)
+{
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_ppc_init);
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_ppc_in_cpu_thread);
+
+ if (qemu_uae_ppc_init) {
+ const TCHAR *model;
+ uint32_t hid1;
+ uae_ppc_get_model(&model, &hid1);
+ char *model_s = ua(model);
+ qemu_uae_ppc_init(model_s, hid1);
+ free(model_s);
+ }
+}
+
+#ifndef WINUAE
+static void init_slirp(UAE_DLHANDLE handle)
+{
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_slirp_init);
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_slirp_input);
+ UAE_EXPORT_FUNCTION(handle, uae_slirp_output);
+
+ if (qemu_uae_slirp_init) {
+ qemu_uae_slirp_init();
+ }
+}
+#endif
+
+UAE_DLHANDLE uae_qemu_uae_init(void)
+{
+ static bool initialized;
+ static UAE_DLHANDLE handle;
+ if (initialized) {
+ return handle;
+ }
+ initialized = true;
+
+ handle = uae_dlopen(_T("qemu-uae"));
+ if (!handle) {
+ gui_message(_T("Error loading qemu-uae plugin\n"));
+ return handle;
+ }
+ write_log(_T("Loaded qemu-uae library at %p\n"), handle);
+
+ /* Check major version (=) and minor version (>=) */
+
+ qemu_uae_version = (qemu_uae_version_function) uae_dlsym(
+ handle, "qemu_uae_version");
+
+ int major = 0, minor = 0, revision = 0;
+ if (qemu_uae_version) {
+ qemu_uae_version(&major, &minor, &revision);
+ }
+ if (major != QEMU_UAE_VERSION_MAJOR) {
+ gui_message(
+ _T("PPC: Wanted qemu-uae version %d.x (got %d.x)\n"),
+ QEMU_UAE_VERSION_MAJOR, major);
+ handle = NULL;
+ return handle;
+ }
+ if (minor < QEMU_UAE_VERSION_MINOR) {
+ gui_message(
+ _T("PPC: Wanted qemu-uae version >= %d.%d (got %d.%d)\n"),
+ QEMU_UAE_VERSION_MAJOR, QEMU_UAE_VERSION_MINOR,
+ major, minor);
+ handle = NULL;
+ return handle;
+ }
+
+ /* Retrieve function pointers from library */
+
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_init);
+ UAE_IMPORT_FUNCTION(handle, qemu_uae_start);
+
+ if (qemu_uae_init) {
+ qemu_uae_init();
+ } else {
+ gui_message(_T("qemu_uae_init not found"));
+ handle = NULL;
+ return handle;
+ }
+
+ init_ppc(handle);
+
+#ifndef WINUAE
+ init_slirp(handle);
+#endif
+
+ if (qemu_uae_start) {
+ qemu_uae_start();
+ } else {
+ gui_message(_T("qemu_uae_start not found"));
+ handle = NULL;
+ return handle;
+ }
+
+ return handle;
+}
return ZFILE_HDF;
if (strcasecmp (ext, _T("hdz")) == 0)
return ZFILE_HDF;
+ if (strcasecmp (ext, _T("vhd")) == 0)
+ return ZFILE_HDF;
}
return ZFILE_UNKNOWN;
}