OSDN Git Service

[VM][DEVICE] Use __FASTCALL with interfaces, read_*() ,write_*(), fetch_op() and...
[csp-qt/common_source_project-fm7.git] / source / src / vm / familybasic / ppu.h
index 6fad92e..4850690 100644 (file)
 #define MIRROR_VERT    1
 #define MIRROR_4SCREEN 2
 
-class MEMORY;
+namespace FAMILYBASIC {
+       class MEMORY;
+}
 
+namespace FAMILYBASIC {
 class PPU : public DEVICE
 {
 private:
        DEVICE *d_cpu;
-       MEMORY *d_memory;
+       FAMILYBASIC::MEMORY *d_memory;
        
        scrntype_t palette_pc[64];
        uint8_t screen[240][256 + 16];  // 2*8 = side margin
@@ -60,7 +63,6 @@ private:
        void render_bg(int v);
        void render_spr(int v);
        void update_palette();
-       void decl_state_header(header_t *p);
        
 public:
        PPU(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
@@ -73,19 +75,17 @@ public:
        void initialize();
        void release();
        void reset();
-       void write_data8(uint32_t addr, uint32_t data);
-       uint32_t read_data8(uint32_t addr);
+       void __FASTCALL write_data8(uint32_t addr, uint32_t data);
+       uint32_t __FASTCALL read_data8(uint32_t addr);
        void event_vline(int v, int clock);
-       void decl_state();
-       void save_state(FILEIO* state_fio);
-       bool load_state(FILEIO* state_fio);
+       bool process_state(FILEIO* state_fio, bool loading);
        
        // unique functions
        void set_context_cpu(DEVICE* device)
        {
                d_cpu = device;
        }
-       void set_context_memory(MEMORY* device)
+       void set_context_memory(FAMILYBASIC::MEMORY* device)
        {
                d_memory = device;
        }
@@ -111,5 +111,6 @@ public:
        void set_mirroring(int mirror);
        void set_mirroring(uint32_t nt0, uint32_t nt1, uint32_t nt2, uint32_t nt3);
 };
+}
 
 #endif