]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
3100b4
authorToni Wilen <twilen@winuae.net>
Sun, 18 Jan 2015 13:03:16 +0000 (15:03 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 18 Jan 2015 13:03:16 +0000 (15:03 +0200)
16 files changed:
audio.cpp
cfgfile.cpp
expansion.cpp
ide.cpp
include/blkdev.h
include/options.h
include/uae.h
od-win32/fsdb_mywin32.cpp
od-win32/mman.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuae_msvc11/winuae_msvc.vcxproj
od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters
od-win32/winuaechangelog.txt
savestate.cpp
specialmonitors.cpp

index 1d9bc545c469ae73c6e48ada5bd963a13bb04b5b..a825ce0ce7800bd241ce2a81eacf734488330c10 100644 (file)
--- a/audio.cpp
+++ b/audio.cpp
@@ -1936,6 +1936,8 @@ void audio_evhandler (void)
 
 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]
index f994480ee88dbca87e0c39540c81b58896816de9..71da082fe1e745ea4309a2924bf1e58f62c52c72 100644 (file)
@@ -196,7 +196,7 @@ static const TCHAR *dongles[] =
 };
 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"),
index ca067dd3e56072eedcd90c00a881c40f4b53535e..7954150c1242c2c2489e4651e10ae63cb12a092e 100644 (file)
@@ -1183,7 +1183,10 @@ static addrbank* expamem_init_filesys (void)
        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 ();
@@ -1536,7 +1539,8 @@ static void allocate_expamem (void)
 #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
@@ -1545,8 +1549,12 @@ static void allocate_expamem (void)
        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);
@@ -2074,7 +2082,8 @@ void expansion_cleanup (void)
        mapped_free (&z3chipmem_bank);
 
 #ifdef PICASSO96
-       mapped_free (&gfxmem_bank);
+       if (currprefs.rtgmem_type < GFXBOARD_HARDWARE)
+               mapped_free (&gfxmem_bank);
 #endif
 
 #ifdef FILESYS
diff --git a/ide.cpp b/ide.cpp
index d323d9d0ff545b8ae0efb7d45899587db559e1b8..79509fe3d3963567055aa7af9e8141585246046b 100644 (file)
--- a/ide.cpp
+++ b/ide.cpp
@@ -1110,10 +1110,13 @@ void remove_ide_unit(struct ide_hdf **idetable, int ch)
                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;
        }
 }
 
index 1e416afde6f2ead7fd588cc48b72109c4e44dc88..0a17b79f709b591274dfb25bbdffd325d3517a8b 100644 (file)
@@ -192,6 +192,7 @@ extern int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
        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);
index abb37c015557ca13645aee2af34300cbf9f261fb..fc9a30e0f90c93ead5f4ebfe590fdb04c7e4d7b7 100644 (file)
@@ -108,6 +108,7 @@ struct cdslot
        TCHAR name[MAX_DPATH];
        bool inuse;
        bool delayed;
+       bool temporary;
        int type;
 };
 struct floppyslot
@@ -205,6 +206,7 @@ enum { CP_GENERIC = 1, CP_CDTV, CP_CDTVCR, CP_CD32, CP_A500, CP_A500P, CP_A600,
 #define MONITOREMU_A2024 2
 #define MONITOREMU_GRAFFITI 3
 #define MONITOREMU_HAM_E 4
+#define MONITOREMU_DCTV 5
 
 #define MAX_FILTERSHADERS 4
 
index bd84f9d5488e27e79fca7f921f83a9c211e557f5..1c5d65e6c13b75752c24b153e22bf73d5c4ceb26 100644 (file)
@@ -7,11 +7,9 @@
   */
 
 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);
@@ -26,7 +24,6 @@ extern int sleep_resolution;
 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);
index 7bddfef6558630d7d860054cb05588c192ab966f..d36f2fe7e42bc82dac72ad658e7c47fb1489c6ad 100644 (file)
@@ -1031,5 +1031,5 @@ const TCHAR *my_getfilepart(const TCHAR *filename)
        p = _tcsrchr(filename, '/');
        if (p)
                return p + 1;
-       return p;
+       return filename;
 }
\ No newline at end of file
index db98ad051a5e98e37251afa736e27df6fa1da1bd..b660ff901db88c4a3b93abb0f45463f7207b45bc 100644 (file)
@@ -432,13 +432,13 @@ static int doinit_shm (void)
        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 &&
@@ -466,6 +466,7 @@ void free_shm (void)
 {
        resetmem (true);
        clear_shm ();
+       ortgmem_type = -1;
 }
 
 void mapped_free (addrbank *ab)
@@ -502,8 +503,8 @@ 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;
        }
index 8085514350aa65df4e600fac962fdb9d92885886..4dcad6ad0af1dfac5bb2062828dd87d04ce8bed1 100644 (file)
 #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")
index 83af888a998e455130057116985efe197b1cf3df..dd6f068cd9b7f9eadf85e25a53888c77d5829a26 100644 (file)
@@ -7165,6 +7165,7 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR
                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);
index 3086bd3483dd7511e3ad87dea5c01ee3af3a7d7b..836b0c4e6849a43a31875be78f466cfa7a7298e7 100644 (file)
     <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" />
index 0e20e6c68d92fc5c5187fa0282d64d5c6829bbb5..142b59334737f1955b1891086152f5a1fd882be2 100644 (file)
     <ClCompile Include="..\..\idecontrollers.cpp">
       <Filter>common</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\devices.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\resources\35floppy.ico">
index 48f4eb82edb4adc80763427b1f2954d9b43f150c..5cd865dd8a96c93ac2ebe2b71f5df35c6f2f8932 100644 (file)
@@ -1,4 +1,33 @@
 
+
+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.
index fe283ce09a0539099d32887bd7cf6adce3e515fc..b6bd33f4350cbc8c7b9d6d5a6256a5705cde8ce6 100644 (file)
@@ -65,6 +65,7 @@
 #include "disk.h"
 #include "threaddep/thread.h"
 #include "a2091.h"
+#include "devices.h"
 
 int savestate_state = 0;
 static int savestate_first_capture;
@@ -520,14 +521,7 @@ void restore_state (const TCHAR *filename)
        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;
index c9398e42667f8677868415a8cbbc5b34f7d6dbd3..4f9f5ebba050227d332fb3750570177a04cd284b 100755 (executable)
@@ -12,6 +12,7 @@ static bool automatic;
 static int monitor;
 
 extern unsigned int bplcon0;
+extern int interlace_seen;
 
 static uae_u8 graffiti_palette[256 * 4];
 
@@ -93,11 +94,65 @@ static void clearmonitor(struct vidbuffer *dst)
        }
 }
 
+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;
@@ -124,13 +179,13 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
        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;
@@ -139,9 +194,14 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                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);
@@ -166,8 +226,6 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                                oddeven = 0;
 
                        if (oddeven) {
-                               if (val)
-                                       zeroline = false;
                                if (getpalette) {
                                        graffiti_palette[pcnt] = val;
                                        pcnt++;
@@ -208,6 +266,10 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                                        }
                                        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];
@@ -216,6 +278,15 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                                                ((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];
+                                               }
+                                       }
                                }
                        }
 
@@ -227,6 +298,8 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                        // 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;
@@ -234,8 +307,9 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst)
                        was_active = mode_active;
                if (zeroline) {
                        if (prevzeroline) {
-                               mode_active = false;
+                               mode_active = 0;
                                pcnt = 0;
+                               cookiestartx = 10000;
                        }
                        prevzeroline = true;
                } else {
@@ -288,6 +362,10 @@ static bool graffiti(struct vidbuffer *src, struct vidbuffer *dst)
 
        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;
@@ -332,7 +410,7 @@ static bool graffiti(struct vidbuffer *src, struct vidbuffer *dst)
                                                        command = false;
                                                        dbl = 1;
                                                        waitline = 2;
-                                                       if (cmd & 16) {
+                                                       if (0 && (cmd & 16)) {
                                                                hires = true;
                                                                xadd /= 2;
                                                                xpixadd /= 2;
@@ -619,9 +697,19 @@ static bool emulate_specialmonitors2(struct vidbuffer *src, struct vidbuffer *ds
        } 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;
 }