OSDN Git Service

[VM][General][WIP] Apply new (Upstream 2016-02-21) APIs to VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / hc80 / io.cpp
index 1711ad8..70ab628 100644 (file)
@@ -243,7 +243,7 @@ void IO::write_signal(int id, uint32 data, uint32 mask)
                if(!slbcr) {
                        bool next = ((data & mask) != 0);
                        if((bcr == 2 && ear && !next) || (bcr == 4 && !ear && next) || (bcr == 6 && ear != next)) {
-                               icrb = passed_clock(cur_clock) / 4;
+                               icrb = get_passed_clock(cur_clock) / 4;
                                isr |= BIT_ICF;
                                update_intr();
                        }
@@ -266,7 +266,7 @@ void IO::event_callback(int event_id, int err)
 {
        if(event_id == EVENT_FRC) {
                // FRC overflow event
-               cur_clock = current_clock();
+               cur_clock = get_current_clock();
                isr |= BIT_OVF;
                update_intr();
        } else if(event_id == EVENT_1SEC) {
@@ -405,7 +405,7 @@ uint32 IO::read_io8(uint32 addr)
        switch(addr & 0xff) {
        case 0x00:
                // ICRL.C (latch FRC value)
-               icrc = passed_clock(cur_clock) / 4;
+               icrc = get_passed_clock(cur_clock) / 4;
                return icrc & 0xff;
        case 0x01:
                // ICRH.C
@@ -479,7 +479,7 @@ uint32 IO::read_io8(uint32 addr)
        return 0xff;
 }
 
-uint32 IO::intr_ack()
+uint32 IO::get_intr_ack()
 {
        if(isr & BIT_7508) {
                isr &= ~BIT_7508;
@@ -1880,14 +1880,14 @@ void IO::draw_screen()
                        }
                }
                for(int y = 0; y < 64; y++) {
-                       scrntype* dest = emu->screen_buffer(y);
+                       scrntype* dest = emu->get_screen_buffer(y);
                        for(int x = 0; x < 480; x++) {
                                dest[x] = lcd[y][x] ? pd : pb;
                        }
                }
        } else {
                for(int y = 0; y < 64; y++) {
-                       scrntype* dest = emu->screen_buffer(y);
+                       scrntype* dest = emu->get_screen_buffer(y);
                        for(int x = 0; x < 480; x++) {
                                dest[x] = pb;
                        }