OSDN Git Service

[General] Convert sourcecode's CRLF format: DOS(WINDOWS) to Unix, to apply patches...
[csp-qt/common_source_project-fm7.git] / source / src / vm / gamegear / mastersystem.h
index 8c45602..6ecad0a 100644 (file)
-/*\r
-       SEGA MASTER SYSTEM Emulator 'yaMASTER SYSTEM'\r
-\r
-       Author : tanam\r
-       Date   : 2013.10.20-\r
-\r
-       [ virtual machine ]\r
-*/\r
-\r
-#ifndef _MASTERSYSTEM_H_\r
-#define _MASTERSYSTEM_H_\r
-\r
-#define DEVICE_NAME            "SEGA MASTER SYSTEM"\r
-#define CONFIG_NAME            "mastersystem"\r
-\r
-// device informations for virtual machine\r
-#define FRAMES_PER_SEC                 60\r
-#define LINES_PER_FRAME                        262\r
-#define CPU_CLOCKS                             3579545\r
-#define SCREEN_WIDTH                   256\r
-#define SCREEN_HEIGHT                  192\r
-#define TMS9918A_VRAM_SIZE             0x4000\r
-#define TMS9918A_LIMIT_SPRITES\r
-///#define MAX_DRIVE                   1\r
-\r
-// device informations for win32\r
-#define USE_CART1\r
-///#define USE_FD1\r
-///#define USE_TAPE\r
-#define USE_KEY_TO_JOY\r
-#define KEY_TO_JOY_BUTTON_D    0x5a\r
-#define KEY_TO_JOY_BUTTON_1    0x58\r
-#define KEY_TO_JOY_BUTTON_2    0x43\r
-#define KEY_TO_JOY_BUTTON_3    0x0d\r
-#define USE_ALT_F10_KEY\r
-#define USE_AUTO_KEY                   5\r
-#define USE_AUTO_KEY_RELEASE   8\r
-#define USE_AUTO_KEY_CAPS\r
-///#define USE_ACCESS_LAMP\r
-#define USE_DEBUGGER\r
-\r
-#include "../../common.h"\r
-\r
-class EMU;\r
-class DEVICE;\r
-class EVENT;\r
-\r
-///class DATAREC;\r
-///class I8251;\r
-class I8255;\r
-class IO;\r
-class YM2413;\r
-class SN76489AN;\r
-class _315_5124;\r
-///class UPD765A;\r
-class Z80;\r
-\r
-class KEYBOARD;\r
-class MEMORY;\r
-class SYSTEM;\r
-\r
-class VM\r
-{\r
-protected:\r
-       EMU* emu;\r
-       \r
-       // devices\r
-       EVENT* event;\r
-       \r
-///    DATAREC* drec;\r
-///    I8251* sio;\r
-       I8255* pio_k;\r
-       I8255* pio_f;\r
-       IO* io;\r
-       YM2413* fm;\r
-       SN76489AN* psg;\r
-       _315_5124* vdp;\r
-///    UPD765A* fdc;\r
-       Z80* cpu;\r
-       \r
-       KEYBOARD* key;\r
-       MEMORY* memory;\r
-       SYSTEM* system;\r
-       \r
-public:\r
-       // ----------------------------------------\r
-       // initialize\r
-       // ----------------------------------------\r
-       \r
-       VM(EMU* parent_emu);\r
-       ~VM();\r
-       \r
-       // ----------------------------------------\r
-       // for emulation class\r
-       // ----------------------------------------\r
-       \r
-       // drive virtual machine\r
-       void reset();\r
-       void run();\r
-       \r
-#ifdef USE_DEBUGGER\r
-       // debugger\r
-       DEVICE *get_cpu(int index);\r
-#endif\r
-       \r
-       // draw screen\r
-       void draw_screen();\r
-///    int access_lamp();\r
-       \r
-       // sound generation\r
-       void initialize_sound(int rate, int samples);\r
-       uint16* create_sound(int* extra_frames);\r
-       int sound_buffer_ptr();\r
-       \r
-       // user interface\r
-       void open_cart(int drv, _TCHAR* file_path);\r
-       void close_cart(int drv);\r
-       bool cart_inserted(int drv);\r
-///    void open_disk(int drv, _TCHAR* file_path, int offset);\r
-///    void close_disk(int drv);\r
-///    bool disk_inserted(int drv);\r
-///    void play_tape(_TCHAR* file_path);\r
-///    void rec_tape(_TCHAR* file_path);\r
-///    void close_tape();\r
-///    bool tape_inserted();\r
-       bool now_skip();\r
-       \r
-       void update_config();\r
-       \r
-       // ----------------------------------------\r
-       // for each device\r
-       // ----------------------------------------\r
-       \r
-       // devices\r
-       DEVICE* get_device(int id);\r
-       DEVICE* dummy;\r
-       DEVICE* first_device;\r
-       DEVICE* last_device;\r
-};\r
-#endif\r
+/*
+       SEGA MASTER SYSTEM Emulator 'yaMASTER SYSTEM'
+
+       Author : tanam
+       Date   : 2013.10.20-
+
+       [ virtual machine ]
+*/
+
+#ifndef _MASTERSYSTEM_H_
+#define _MASTERSYSTEM_H_
+
+#define DEVICE_NAME            "SEGA MASTER SYSTEM"
+#define CONFIG_NAME            "mastersystem"
+
+// device informations for virtual machine
+#define FRAMES_PER_SEC                 60
+#define LINES_PER_FRAME                        262
+#define CPU_CLOCKS                             3579545
+#define SCREEN_WIDTH                   256
+#define SCREEN_HEIGHT                  192
+#define TMS9918A_VRAM_SIZE             0x4000
+#define TMS9918A_LIMIT_SPRITES
+///#define MAX_DRIVE                   1
+
+// device informations for win32
+#define USE_CART1
+///#define USE_FD1
+///#define USE_TAPE
+#define USE_KEY_TO_JOY
+#define KEY_TO_JOY_BUTTON_D    0x5a
+#define KEY_TO_JOY_BUTTON_1    0x58
+#define KEY_TO_JOY_BUTTON_2    0x43
+#define KEY_TO_JOY_BUTTON_3    0x0d
+#define USE_ALT_F10_KEY
+#define USE_AUTO_KEY                   5
+#define USE_AUTO_KEY_RELEASE   8
+#define USE_AUTO_KEY_CAPS
+///#define USE_ACCESS_LAMP
+#define USE_DEBUGGER
+
+#include "../../common.h"
+
+class EMU;
+class DEVICE;
+class EVENT;
+
+///class DATAREC;
+///class I8251;
+class I8255;
+class IO;
+class YM2413;
+class SN76489AN;
+class _315_5124;
+///class UPD765A;
+class Z80;
+
+class KEYBOARD;
+class MEMORY;
+class SYSTEM;
+
+class VM
+{
+protected:
+       EMU* emu;
+       
+       // devices
+       EVENT* event;
+       
+///    DATAREC* drec;
+///    I8251* sio;
+       I8255* pio_k;
+       I8255* pio_f;
+       IO* io;
+       YM2413* fm;
+       SN76489AN* psg;
+       _315_5124* vdp;
+///    UPD765A* fdc;
+       Z80* cpu;
+       
+       KEYBOARD* key;
+       MEMORY* memory;
+       SYSTEM* system;
+       
+public:
+       // ----------------------------------------
+       // initialize
+       // ----------------------------------------
+       
+       VM(EMU* parent_emu);
+       ~VM();
+       
+       // ----------------------------------------
+       // for emulation class
+       // ----------------------------------------
+       
+       // drive virtual machine
+       void reset();
+       void run();
+       
+#ifdef USE_DEBUGGER
+       // debugger
+       DEVICE *get_cpu(int index);
+#endif
+       
+       // draw screen
+       void draw_screen();
+///    int access_lamp();
+       
+       // sound generation
+       void initialize_sound(int rate, int samples);
+       uint16* create_sound(int* extra_frames);
+       int sound_buffer_ptr();
+       
+       // user interface
+       void open_cart(int drv, _TCHAR* file_path);
+       void close_cart(int drv);
+       bool cart_inserted(int drv);
+///    void open_disk(int drv, _TCHAR* file_path, int offset);
+///    void close_disk(int drv);
+///    bool disk_inserted(int drv);
+///    void play_tape(_TCHAR* file_path);
+///    void rec_tape(_TCHAR* file_path);
+///    void close_tape();
+///    bool tape_inserted();
+       bool now_skip();
+       
+       void update_config();
+       
+       // ----------------------------------------
+       // for each device
+       // ----------------------------------------
+       
+       // devices
+       DEVICE* get_device(int id);
+       DEVICE* dummy;
+       DEVICE* first_device;
+       DEVICE* last_device;
+};
+#endif