OSDN Git Service

[VM][UPD7220] .
authorK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 11 Apr 2019 19:08:30 +0000 (04:08 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Thu, 11 Apr 2019 19:08:30 +0000 (04:08 +0900)
source/src/vm/upd7220.cpp
source/src/vm/upd7220.h

index 6baa94c..d243587 100644 (file)
@@ -654,6 +654,7 @@ uint32_t UPD7220::read_io8(uint32_t addr)
                val |= vsync ? STAT_VSYNC : 0;
                //val |= (cmd_fifo->empty()) ? STAT_EMPTY : 0;
                val |= STAT_EMPTY;
+               //val |= ((cmd_ready) ? STAT_EMPTY : 0);
                val |= (cmd_fifo->full()) ? STAT_FULL : 0;
                val |= (!(fo->empty())) ? STAT_DRDY : 0;
                // clear busy stat
index aedb741..8b2516e 100644 (file)
@@ -314,7 +314,7 @@ inline void UPD7220::finish_pset()
 {
        if(!first_load) {
                write_vram(before_addr, cache_val);
-               wrote_bytes++;
+               //wrote_bytes++;
        }
        first_load = true;
        before_addr = 0xffffffff;
@@ -342,7 +342,7 @@ inline bool UPD7220::draw_pset_diff(int x, int y)
        if((first_load) || (addr != before_addr)) {
                if(!(first_load)) {
                        write_vram(before_addr, cache_val);
-                       wrote_bytes++;
+                       //wrote_bytes++;
                }
                cache_val = read_vram(addr);
        } else if((x < 0) || (y < 0) || (x >= (width << 3)) || (y >= height)) {
@@ -358,6 +358,7 @@ inline bool UPD7220::draw_pset_diff(int x, int y)
                bit = 1 << (x & 7);
        }
        uint8_t cur = cache_val;
+       wrote_bytes++; // OK?
 
        switch(mod) {
        case 0: // replace