OSDN Git Service

[VM][MC6809] Revert around BUSREQ. Workaround for FLICKY.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 16 May 2017 13:17:40 +0000 (22:17 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 16 May 2017 13:17:40 +0000 (22:17 +0900)
source/src/vm/mc6809_base.cpp

index a8ba645..26cb4bc 100644 (file)
@@ -284,12 +284,13 @@ int MC6809_BASE::run(int clock)
 
        if ((int_state & MC6809_HALT_BIT) != 0) {       // 0x80
                if(!busreq) write_signals(&outputs_bus_halt, 0xffffffff);
+#if 0
                if(clock < 0) {
                        int passed_icount;
                        passed_icount = max(1, extra_icount);
                        extra_icount = 0;
                        busreq = true;
-                       return passed_icount;
+                       return first_icount - passed_icount;
                } else {
                        //icount = 0;
                        icount -= extra_icount;
@@ -297,6 +298,13 @@ int MC6809_BASE::run(int clock)
                        busreq = true;
                        return first_icount - icount;
                }
+#else
+               icount = 0;
+               icount -= extra_icount;
+               extra_icount = 0;
+               busreq = true;
+               return first_icount - icount;
+#endif
        }
        if(busreq) write_signals(&outputs_bus_halt, 0x00000000);
        busreq = false;