X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=source%2Fsrc%2Fvm%2Fpc8201%2Fcmt.h;h=ddfdf86c6f7321fc8f09d0b4e28d5c261895ed52;hb=1a7386afa4c2ce25de158ba8285bc795446a8584;hp=69b56a7895152d5115a0e85f1a9449f472c92c00;hpb=ef7e2d55278936e3e2a6fea6440dd46a783137b6;p=csp-qt%2Fcommon_source_project-fm7.git diff --git a/source/src/vm/pc8201/cmt.h b/source/src/vm/pc8201/cmt.h index 69b56a789..ddfdf86c6 100644 --- a/source/src/vm/pc8201/cmt.h +++ b/source/src/vm/pc8201/cmt.h @@ -20,6 +20,8 @@ // max 256kbytes #define BUFFER_SIZE 0x40000 +namespace PC8201 { + class CMT : public DEVICE { private: @@ -27,24 +29,26 @@ private: bool is_wav, rec, remote; _TCHAR rec_file_path[_MAX_PATH]; int bufcnt; - uint8 buffer[BUFFER_SIZE]; + uint8_t buffer[BUFFER_SIZE]; int prev_signal; - uint32 prev_clock; + uint32_t prev_clock; - void write_buffer(uint8 value, int samples); + void write_buffer(uint8_t value, int samples); void put_signal(); public: - CMT(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {} + CMT(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) + { + set_device_name(_T("CMT I/F")); + } ~CMT() {} // common functions void initialize(); void release(); void reset(); - void write_signal(int id, uint32 data, uint32 mask); - void save_state(FILEIO* state_fio); - bool load_state(FILEIO* state_fio); + void write_signal(int id, uint32_t data, uint32_t mask); + bool process_state(FILEIO* state_fio, bool loading); // unique functions void rec_tape(const _TCHAR* file_path); @@ -53,7 +57,20 @@ public: { return rec; } + bool is_tape_playing() + { + return false; + } + bool is_tape_recording() + { + return rec && remote; + } + int get_tape_position() + { + return 0; + } }; +} #endif