void audio_hsync (void)
{
+ if (!currprefs.produce_sound)
+ return;
if (!isaudio ())
return;
if (audio_work_to_do > 0 && currprefs.sound_auto && !audio_extra_channels[0] && !audio_extra_channels[1]
};
static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl"), _T("spti"), _T("aspi"), 0 };
static const TCHAR *cdconmodes[] = { _T(""), _T("uae"), _T("ide"), _T("scsi"), _T("cdtv"), _T("cd32"), 0 };
-static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a2024"), _T("graffiti"), _T("ham_e"), 0 };
+static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a2024"), _T("graffiti"), _T("ham_e"), _T("dctv"), 0 };
static const TCHAR *rtgtype[] = {
_T("ZorroII"), _T("ZorroIII"),
_T("PicassoII"),
uae_u8 diagarea[] = { 0x90, 0x00, /* da_Config, da_Flags */
0x02, 0x00, /* da_Size */
FILESYS_DIAGPOINT >> 8, FILESYS_DIAGPOINT & 0xff,
- FILESYS_BOOTPOINT >> 8, FILESYS_BOOTPOINT & 0xff
+ FILESYS_BOOTPOINT >> 8, FILESYS_BOOTPOINT & 0xff,
+ 0, 14, // Name offset
+ 0, 0, 0, 0,
+ 'U', 'A', 'E', 0
};
expamem_init_clear ();
#ifdef PICASSO96
if (gfxmem_bank.allocated != currprefs.rtgmem_size) {
mapped_free (&gfxmem_bank);
- mapped_malloc_dynamic (&currprefs.rtgmem_size, &changed_prefs.rtgmem_size, &gfxmem_bank, 1, currprefs.rtgmem_type ? _T("z3_gfx") : _T("z2_gfx"));
+ if (currprefs.rtgmem_type < GFXBOARD_HARDWARE)
+ mapped_malloc_dynamic (&currprefs.rtgmem_size, &changed_prefs.rtgmem_size, &gfxmem_bank, 1, currprefs.rtgmem_type ? _T("z3_gfx") : _T("z2_gfx"));
memory_hardreset (1);
}
#endif
if (savestate_state == STATE_RESTORE) {
if (fastmem_bank.allocated > 0) {
restore_ram (fast_filepos, fastmem_bank.baseaddr);
+ if (!fastmem_bank.start) {
+ // old statefile compatibility support
+ fastmem_bank.start = 0x00200000;
+ }
map_banks (&fastmem_bank, fastmem_bank.start >> 16, currprefs.fastmem_size >> 16,
- fastmem_bank.allocated);
+ fastmem_bank.allocated);
}
if (fastmem2_bank.allocated > 0) {
restore_ram (fast2_filepos, fastmem2_bank.baseaddr);
mapped_free (&z3chipmem_bank);
#ifdef PICASSO96
- mapped_free (&gfxmem_bank);
+ if (currprefs.rtgmem_type < GFXBOARD_HARDWARE)
+ mapped_free (&gfxmem_bank);
#endif
#ifdef FILESYS
return;
ide = idetable[ch];
if (ide) {
+ struct ide_thread_state *its;
hdf_hd_close(&ide->hdhfd);
scsi_free(ide->scsi);
xfree(ide->secbuf);
+ its = ide->its;
memset(ide, 0, sizeof(struct ide_hdf));
+ ide->its = its;
}
}
uae_u8 *scsi_data, int *data_len, uae_u8 *r, int *reply_len, uae_u8 *s, int *sense_len, bool atapi);
extern void blkdev_vsync (void);
+extern void restore_blkdev_start(void);
extern int msf2lsn (int msf);
extern int lsn2msf (int lsn);
TCHAR name[MAX_DPATH];
bool inuse;
bool delayed;
+ bool temporary;
int type;
};
struct floppyslot
#define MONITOREMU_A2024 2
#define MONITOREMU_GRAFFITI 3
#define MONITOREMU_HAM_E 4
+#define MONITOREMU_DCTV 5
#define MAX_FILTERSHADERS 4
*/
extern void do_start_program (void);
-extern void do_leave_program (void);
extern void start_program (void);
extern void leave_program (void);
extern void real_main (int, TCHAR **);
-extern void virtualdevice_init (void);
extern void usage (void);
extern void sleep_millis (int ms);
extern void sleep_millis_main (int ms);
extern void uae_reset (int, int);
extern void uae_quit (void);
extern void uae_restart (int, const TCHAR*);
-extern void reset_all_systems (void);
extern void target_reset (void);
extern void target_addtorecent (const TCHAR*, int);
extern void target_run (void);
p = _tcsrchr(filename, '/');
if (p)
return p + 1;
- return p;
+ return filename;
}
\ No newline at end of file
return canbang;
}
+static uae_u32 oz3fastmem_size, oz3fastmem2_size;
+static uae_u32 oz3chipmem_size;
+static uae_u32 ortgmem_size;
+static int ortgmem_type = -1;
+
bool init_shm (void)
{
- static uae_u32 oz3fastmem_size, oz3fastmem2_size;
- static uae_u32 oz3chipmem_size;
- static uae_u32 ortgmem_size;
- static int ortgmem_type;
-
if (
oz3fastmem_size == changed_prefs.z3fastmem_size &&
oz3fastmem2_size == changed_prefs.z3fastmem2_size &&
{
resetmem (true);
clear_shm ();
+ ortgmem_type = -1;
}
void mapped_free (addrbank *ab)
if (!(ab->flags & ABFLAG_DIRECTMAP)) {
if (!(ab->flags & ABFLAG_NOALLOC)) {
xfree(ab->baseaddr);
- ab->baseaddr = NULL;
}
+ ab->baseaddr = NULL;
write_log(_T("mapped_free nondirect %s\n"), ab->name);
return;
}
#define LANG_DLL_FULL_VERSION_MATCH 1
#if WINUAEPUBLICBETA
-#define WINUAEBETA _T("3")
+#define WINUAEBETA _T("4")
#else
#define WINUAEBETA _T("")
#endif
-#define WINUAEDATE MAKEBD(2015, 1, 11)
+#define WINUAEDATE MAKEBD(2015, 1, 18)
//#define WINUAEEXTRA _T("AmiKit Preview")
//#define WINUAEEXTRA _T("Amiga Forever Edition")
SendDlgItemMessage (hDlg, IDC_MONITOREMU, CB_ADDSTRING, 0, (LPARAM)_T("A2024"));
SendDlgItemMessage (hDlg, IDC_MONITOREMU, CB_ADDSTRING, 0, (LPARAM)_T("Graffiti"));
SendDlgItemMessage (hDlg, IDC_MONITOREMU, CB_ADDSTRING, 0, (LPARAM)_T("HAM-E"));
+ //SendDlgItemMessage (hDlg, IDC_MONITOREMU, CB_ADDSTRING, 0, (LPARAM)_T("DCTV"));
#ifndef AGA
ew (hDlg, IDC_AGA, FALSE);
<ClCompile Include="..\..\cpuemu_40.cpp" />
<ClCompile Include="..\..\cpummu30.cpp" />
<ClCompile Include="..\..\def_icons.cpp" />
+ <ClCompile Include="..\..\devices.cpp" />
<ClCompile Include="..\..\dlopen.cpp" />
<ClCompile Include="..\..\ethernet.cpp" />
<ClCompile Include="..\..\events.cpp" />
<ClCompile Include="..\..\idecontrollers.cpp">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\..\devices.cpp">
+ <Filter>common</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\resources\35floppy.ico">
+
+Beta 4:
+
+- HAM-E images updated only every other line in doubled modes.
+- Graffiti didn't sync correctly if config was not AGA.
+- Restart button crashed if hardware RTG was enabled.
+- PCMCIA IDE didn't work anymore (b2)
+- .pkd file extension inside archive wasn't autodetected.
+- Disk/CD insert status message file name was shown as "null" if file was inside archive root.
+- HD and tape SCSI emulation unsupported LUN sense data was overwritten with default ILLEGAL FIELD IN CDB sense data.
+- CD SCSI emulator didn't check for non-zero LUNs.
+- Return SCSI-1 HD inquiry data only if A590/A2091.
+- Show also REQUEST SENSE command and data if scsi emulation logging is enabled.
+- 68000 prefetch mode DIVS/DIVU timing update didn't work, always returned 4 cycles due to missing parenthesis.
+- Switching chip ram and/or slow ram size usually crashed after reset if ECS Agnus was selected.
+- Some very old statefiles had Z2 fast ram with zeroed autoconfig address, added workaround (broke during 2.9 betas)
+- Added fl <lines to wait> or fl <absolute line> <absolute hpos> and fc <CCKs to wait> break points to debugger.
+- Z3 space memory mapping was not initialized if only non-RAM/VRAM Z3 expansions are configured.
+- Clock sync feature update, previously only 50Hz CIA-A TOD rate was fully accurate.
+- Load CDTV/CD32 state file, load other state file: CDTV/CD32 CD was still mounted.
+- Yet another bitplane DMA sequencer emulation rewrite and cleanups. Still some bitplane DMA on/off switch edge cases remaining
+ Switch on bitplane DMA near end the scanline: following line starts DMA for one "block" only, next line works normally.
+ This needs more real hardware testing to find exact conditions.
+- Source cleanup, moved all kinds of device init/free/interrupt check codes to common file from non-related source
+ files.
+- Added name to UAE Boot ROM DiagArea. (May be visible in some system info/diagnostics software)
+- HALT status was not cleared when loading new state file.
+
+
Beta 3:
- Bitplane DMA sequencer emulation rewritten yet again to again match better with real hardware behavior.
#include "disk.h"
#include "threaddep/thread.h"
#include "a2091.h"
+#include "devices.h"
int savestate_state = 0;
static int savestate_first_capture;
savestate_file = f;
restore_header (chunk);
xfree (chunk);
- restore_cia_start ();
- changed_prefs.bogomem_size = 0;
- changed_prefs.chipmem_size = 0;
- changed_prefs.fastmem_size = 0;
- changed_prefs.z3fastmem_size = 0;
- changed_prefs.z3fastmem2_size = 0;
- changed_prefs.mbresmem_low_size = 0;
- changed_prefs.mbresmem_high_size = 0;
+ devices_restore_start();
z3num = 0;
for (;;) {
name[0] = 0;
static int monitor;
extern unsigned int bplcon0;
+extern int interlace_seen;
static uae_u8 graffiti_palette[256 * 4];
}
}
+static bool dctv(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines, int oddlines)
+{
+ int y, x, vdbl, hdbl;
+ int ystart, yend, isntsc;
+ int xadd;
+
+ isntsc = (beamcon0 & 0x20) ? 0 : 1;
+ if (!(currprefs.chipset_mask & CSMASK_ECS_AGNUS))
+ isntsc = currprefs.ntscmode ? 1 : 0;
+
+ vdbl = gfxvidinfo.ychange;
+ hdbl = gfxvidinfo.xchange;
+
+ xadd = ((1 << 1) / hdbl) * src->pixbytes;
+
+ ystart = isntsc ? VBLANK_ENDLINE_NTSC : VBLANK_ENDLINE_PAL;
+ yend = isntsc ? MAXVPOS_NTSC : MAXVPOS_PAL;
+
+ oddlines = 1;
+
+ uae_u8 r, g, b;
+ for (y = ystart; y < yend; y += 2) {
+ int yoff = (((y * 2 + oddlines) - src->yoffset) / vdbl);
+ if (yoff < 0)
+ continue;
+ if (yoff >= src->inheight)
+ continue;
+ uae_u8 *line = src->bufmem + yoff * src->rowbytes;
+ uae_u8 *dstline = dst->bufmem + (((y * 2 + oddlines) - dst->yoffset) / vdbl) * dst->rowbytes;
+
+ for (x = 1; x < src->inwidth; x += 2) {
+ uae_u8 *s = line + ((x << 1) / hdbl) * src->pixbytes;
+ uae_u8 *d = dstline + ((x << 1) / hdbl) * dst->pixbytes;
+ uae_u8 *s2 = s + src->rowbytes;
+ uae_u8 *d2 = d + dst->rowbytes;
+ uae_u8 newval = FIRGB(src, s);
+
+ r = newval << 4;
+ g = newval << 4;
+ b = newval << 4;
+
+ PRGB(dst, d, r, g, b);
+ PRGB(dst, d + dst->pixbytes, r, g, b);
+ PRGB(dst, d + dst->rowbytes, r, g, b);
+ PRGB(dst, d + dst->rowbytes + dst->pixbytes, r, g, b);
+
+
+ }
+ }
+ dst->nativepositioning = true;
+ return true;
+}
+
+
static const uae_u8 ham_e_magic_cookie[] = { 0xa2, 0xf5, 0x84, 0xdc, 0x6d, 0xb0, 0x7f };
static const uae_u8 ham_e_magic_cookie_reg = 0x14;
static const uae_u8 ham_e_magic_cookie_ham = 0x18;
-static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
+static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines, int oddlines)
{
int y, x, vdbl, hdbl;
int ystart, yend, isntsc;
bool cookie_line = false;
int cookiestartx = 10000;
for (y = ystart; y < yend; y++) {
- int yoff = (((y << VRES_MAX) - src->yoffset) / vdbl);
+ int yoff = (((y * 2 + oddlines) - src->yoffset) / vdbl);
if (yoff < 0)
continue;
if (yoff >= src->inheight)
continue;
uae_u8 *line = src->bufmem + yoff * src->rowbytes;
- uae_u8 *dstline = dst->bufmem + (((y << VRES_MAX) - dst->yoffset) / vdbl) * dst->rowbytes;
+ uae_u8 *dstline = dst->bufmem + (((y * 2 + oddlines) - dst->yoffset) / vdbl) * dst->rowbytes;
bool getpalette = false;
uae_u8 prev = 0;
for (x = 0; x < src->inwidth; x++) {
uae_u8 *s = line + ((x << 1) / hdbl) * src->pixbytes;
uae_u8 *d = dstline + ((x << 1) / hdbl) * dst->pixbytes;
-
- uae_u8 val = prev | FIRGB(src, s);
- if (val == ham_e_magic_cookie[0]) {
+ uae_u8 *s2 = s + src->rowbytes;
+ uae_u8 *d2 = d + dst->rowbytes;
+ uae_u8 newval = FIRGB(src, s);
+ uae_u8 val = prev | newval;
+
+ if (newval)
+ zeroline = false;
+ if (val == ham_e_magic_cookie[0] && x + sizeof ham_e_magic_cookie + 1 < src->inwidth) {
int i;
for (i = 1; i <= sizeof ham_e_magic_cookie; i++) {
uae_u8 val2 = (FIRGB(src, s + (i * 2 - 1) * xadd) << 4) | FIRGB(src, s + (i * 2 + 0) * xadd);
oddeven = 0;
if (oddeven) {
- if (val)
- zeroline = false;
if (getpalette) {
graffiti_palette[pcnt] = val;
pcnt++;
}
PRGB(dst, d - dst->pixbytes, r, g, b);
PRGB(dst, d, r, g, b);
+ if (doublelines) {
+ PRGB(dst, d2 - dst->pixbytes, r, g, b);
+ PRGB(dst, d2, r, g, b);
+ }
} else {
if (dst->pixbytes == 4) {
((uae_u32*)d)[-1] = ((uae_u32*)s)[-1];
((uae_u16*)d)[-1] = ((uae_u16*)s)[-1];
((uae_u16*)d)[0] = ((uae_u16*)s)[0];
}
+ if (doublelines) {
+ if (dst->pixbytes == 4) {
+ ((uae_u32*)d2)[-1] = ((uae_u32*)s2)[-1];
+ ((uae_u32*)d2)[0] = ((uae_u32*)s2)[0];
+ } else {
+ ((uae_u16*)d2)[-1] = ((uae_u16*)s2)[-1];
+ ((uae_u16*)d2)[0] = ((uae_u16*)s2)[0];
+ }
+ }
}
}
// Erase magic cookie. I assume real HAM-E would erase it
// because not erasing it would look really ugly.
memset(dstline, 0, dst->outwidth * dst->pixbytes);
+ if (doublelines)
+ memset(dstline + dst->rowbytes, 0, dst->outwidth * dst->pixbytes);
}
cookie_line = false;
was_active = mode_active;
if (zeroline) {
if (prevzeroline) {
- mode_active = false;
+ mode_active = 0;
pcnt = 0;
+ cookiestartx = 10000;
}
prevzeroline = true;
} else {
xstart = 0x1c * 2 + 1;
xend = 0xf0 * 2 + 1;
+ if (!(currprefs.chipset_mask & CSMASK_AGA)) {
+ xstart++;
+ xend++;
+ }
srcbuf = src->bufmem + (((ystart << VRES_MAX) - src->yoffset) / gfxvidinfo.ychange) * src->rowbytes + (((xstart << RES_MAX) - src->xoffset) / gfxvidinfo.xchange) * src->pixbytes;
srcend = src->bufmem + (((yend << VRES_MAX) - src->yoffset) / gfxvidinfo.ychange) * src->rowbytes;
command = false;
dbl = 1;
waitline = 2;
- if (cmd & 16) {
+ if (0 && (cmd & 16)) {
hires = true;
xadd /= 2;
xpixadd /= 2;
} else if (currprefs.monitoremu == MONITOREMU_GRAFFITI) {
automatic = false;
return graffiti(src, dst);
+ } else if (currprefs.monitoremu == MONITOREMU_DCTV) {
+ automatic = false;
+ return dctv(src, dst, false, 0);
} else if (currprefs.monitoremu == MONITOREMU_HAM_E) {
+ bool v;
automatic = false;
- return ham_e(src, dst);
+ if (interlace_seen) {
+ v = ham_e(src, dst, false, 0);
+ v |= ham_e(src, dst, false, 1);
+ } else {
+ v = ham_e(src, dst, true, 0);
+ }
+ return v;
}
return false;
}