OSDN Git Service

[General][CMAKE] Integrate all devices to upstream 2015-12-17.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 20 Dec 2015 15:01:30 +0000 (00:01 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 20 Dec 2015 15:01:30 +0000 (00:01 +0900)
[BUILD][CMAKE] Enable to build: FM-7/77/AV series, BABBAGE2nd, tk80bs and X1 series.

103 files changed:
source/build-cmake/babbage2nd/CMakeLists.txt
source/build-cmake/cmake/config_commonsource.cmake
source/build-cmake/cmake/config_x1.cmake
source/build-cmake/fm77/CMakeLists.txt
source/build-cmake/fm77av/CMakeLists.txt
source/build-cmake/fm77av40/CMakeLists.txt
source/build-cmake/tk80bs/CMakeLists.txt
source/build-cmake/x1/CMakeLists.txt
source/build-cmake/x1turbo/CMakeLists.txt
source/build-cmake/x1turboz/CMakeLists.txt
source/build-cmake/x1twin/CMakeLists.txt
source/src/qt/common/qt_gldraw.cpp
source/src/qt/common/qt_glutil.cpp
source/src/qt/machines/x1/CMakeLists.txt [moved from source/src/qt/machines/x1turboz/CMakeLists.txt with 92% similarity]
source/src/qt/machines/x1/MainWindow.cpp [moved from source/src/qt/machines/x1turboz/MainWindow.cpp with 100% similarity]
source/src/qt/machines/x1/menuclasses.h [moved from source/src/qt/machines/x1turboz/menuclasses.h with 100% similarity]
source/src/qt/osd_console.cpp
source/src/vm/fm7/sound.cpp
source/src/vm/fmgen/psg.cpp
source/src/vm/gamegear/gamegear.h
source/src/vm/gamegear/mastersystem.h
source/src/vm/hc20/hc20.cpp
source/src/vm/hc20/hc20.h
source/src/vm/hc20/memory.cpp
source/src/vm/hd46505.cpp
source/src/vm/huc6280.cpp
source/src/vm/i286.cpp
source/src/vm/i386.cpp
source/src/vm/i386.h
source/src/vm/i8080.cpp
source/src/vm/i8080.h
source/src/vm/i86.cpp
source/src/vm/i86.h
source/src/vm/io.h
source/src/vm/j3100/j3100.cpp
source/src/vm/j3100/j3100.h
source/src/vm/j3100/keyboard.cpp
source/src/vm/j3100/keyboard.h
source/src/vm/j3100/system.h
source/src/vm/jr100/jr100.cpp
source/src/vm/jx/display.cpp
source/src/vm/ld700.cpp
source/src/vm/m6502.h
source/src/vm/mame/emu/cpu/i386/i386priv.h
source/src/vm/mame/emu/cpu/i86/i286.c
source/src/vm/mame/emu/cpu/vtlb.c
source/src/vm/mame/emu/cpu/vtlb.h
source/src/vm/mb8877.cpp
source/src/vm/mb8877.h
source/src/vm/mc6800.cpp
source/src/vm/mc6809.cpp
source/src/vm/mc6820.cpp
source/src/vm/mcs48.h
source/src/vm/msx/memory.cpp
source/src/vm/msx/msx.cpp
source/src/vm/msx/msx.h
source/src/vm/multi8/cmt.h
source/src/vm/mycomz80a/display.cpp
source/src/vm/mycomz80a/display.h
source/src/vm/mz2500/mz2500.h
source/src/vm/mz2500/mz80b.h
source/src/vm/mz2800/mz2800.cpp
source/src/vm/mz700/mz700.cpp
source/src/vm/mz700/mz700.h
source/src/vm/mz80k/mz80k.cpp
source/src/vm/mz80k/mz80k.h
source/src/vm/pc6001/floppy.h
source/src/vm/pc6001/memory.cpp
source/src/vm/pc6001/memory.h
source/src/vm/pc6001/pc6001.cpp
source/src/vm/pc6001/pc6001.h
source/src/vm/pc6001/psub.h
source/src/vm/pc6001/sub.cpp
source/src/vm/pc8801/pc88.cpp
source/src/vm/pc8801/pc88.h
source/src/vm/pc8801/pc8801.cpp
source/src/vm/pc8801/pc8801.h
source/src/vm/pc9801/cmt.cpp
source/src/vm/pc9801/cmt.h
source/src/vm/pc9801/floppy.cpp
source/src/vm/pc9801/floppy.h
source/src/vm/pc9801/pc9801.cpp
source/src/vm/pc9801/pc9801.h
source/src/vm/pc98ha/floppy.h
source/src/vm/pc98ha/pc98ha.cpp
source/src/vm/pc98ha/pc98ha.h
source/src/vm/phc20/phc20.h
source/src/vm/tk80bs/display.cpp
source/src/vm/tk80bs/tk80bs.h
source/src/vm/tms9918a.cpp
source/src/vm/upd4991a.cpp
source/src/vm/upd7752.h
source/src/vm/upd7801.cpp
source/src/vm/v99x8.cpp
source/src/vm/v99x8.h
source/src/vm/vm.h
source/src/vm/x1/iobus.cpp
source/src/vm/x1/x1.cpp
source/src/vm/x1/x1.h
source/src/vm/ym2203.cpp
source/src/vm/z80.cpp
source/src/vm/z80dma.cpp
source/src/vm/z80sio.cpp

index 70af731..08df1bc 100644 (file)
@@ -14,17 +14,9 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 
 
 project (emubabbage2nd)
-
 set(EXEC_TARGET emubabbage2nd)
-
-set(LOCAL_LIBS    qt_babbage2nd
-                  qt_gui
-                  qt_osd
-                  vm_babbage2nd
-                  vm_vm
-                  common_common
-                   )
-
+set(VM_NAME babbage2nd)
+set(USE_FMGEN OFF)
 set(VMFILES_BASE
   z80.cpp
   z80ctc.cpp
@@ -51,16 +43,4 @@ add_definitions(-D_BABBAGE2ND)
 set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/babbage2nd.qrc)
 
 
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/babbage2nd)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/machines/babbage2nd)
-
 include(config_commonsource)
-
-
-add_subdirectory(../../src/vm/babbage2nd vm/babbage2nd)
-add_subdirectory(../../src/qt/machines/babbage2nd qt/bababge2nd)
-     
-add_subdirectory(../../src/qt/common qt/common)
index f327ace..cc96e62 100644 (file)
@@ -115,6 +115,7 @@ if(DEFINED VM_NAME)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/${VM_NAME})
   if(USE_FMGEN)
     include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/fmgen)
+    set(FMGEN_LIB vm_fmgen)
   endif()
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/machines/${VM_NAME})
 endif()
@@ -142,8 +143,9 @@ set(LOCAL_LIBS
                    qt_${VM_NAME}
                   qt_gui
                   vm_${VM_NAME}
+                  ${VM_APPEND_LIBS}
                   vm_vm
-                  vm_fmgen
+                  ${FMGEN_LIB}
                   qt_osd
                   ${DEBUG_LIBS}
                   common_common
index 4a672b0..428a757 100644 (file)
@@ -8,20 +8,8 @@ cmake_policy(SET CMP0011 NEW)
 
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 
-project (emux1turboz)
-
-set(EXEC_TARGET emux1turboz)
-
-set(LOCAL_LIBS    
-                  qt_osd
-                  vm_x1
-                  vm_vm
-                  common_common
-                  vm_fmgen
-                  qt_x1turboz
-                  qt_gui
-                   )
-
+set(VM_NAME x1)
+set(USE_FMGEN ON)
 set(VMFILES
                   z80.cpp
                   mcs48.cpp
@@ -85,16 +73,16 @@ endif()
 
 
 if(USE_CMT_SOUND)
-add_definitions(-DDATAREC_SOUND)
+  add_definitions(-DDATAREC_SOUND)
 endif()
-
-#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/x1)
 if(BUILD_X1TWIN)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/pcengine)
 set(VM_APPEND_LIBS vm_pcengine)
 endif()
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/fmgen)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/machines/x1turboz)
 
 include(config_commonsource)
+if(BUILD_X1TWIN)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/pcengine)
+ add_subdirectory(../../src/vm/pcengine vm/pcengine)
+endif()
+   
 
index f699c6a..821de46 100644 (file)
@@ -14,11 +14,4 @@ project (emufm77)
 set(BUILD_FM77 ON CACHE BOOL "Build for FM77")
 
 include(config_emufm7)
-
 include(config_commonsource)
-
-add_subdirectory(../../src/vm/fm7 vm/fm7)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/fm7 qt/fm7)
-                           
-add_subdirectory(../../src/qt/common qt/common)
index 65ece58..c8ff029 100644 (file)
@@ -11,16 +11,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 
 project (emufm77av)
 
-
 set(BUILD_FM77AV ON CACHE BOOL "Build for FM77AV")
 
 include(config_emufm7)
-
 include(config_commonsource)
-
-add_subdirectory(../../src/vm/fm7 vm/fm7)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/fm7 qt/fm7)
-                           
-add_subdirectory(../../src/qt/common qt/common)
-
index 385c165..f5581b6 100644 (file)
@@ -14,11 +14,4 @@ project (emufm77av)
 set(BUILD_FM77AV40 ON CACHE BOOL "Build for FM77AV40")
 
 include(config_emufm7)
-
 include(config_commonsource)
-
-add_subdirectory(../../src/vm/fm7 vm/fm7)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/fm7 qt/fm7)
-                           
-add_subdirectory(../../src/qt/common qt/common)
index 480fb69..6628a96 100644 (file)
@@ -12,16 +12,10 @@ message("")
 
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 
-
 project (emutk80bs)
 
-set(LOCAL_LIBS            qt_osd
-                  qt_tk80bs
-                  qt_gui
-                  vm_tk80bs
-                  vm_vm
-                  common_common                   
-                   )
+set(VM_NAME tk80bs)
+set(USE_FMGEN OFF)
 
 set(VMFILES_BASE
                   i8080.cpp
@@ -39,7 +33,6 @@ set(VMFILES_BASE
 set(BUILD_SHARED_LIBS OFF)
 set(USE_OPENMP ON CACHE BOOL "Build using OpenMP")
 set(USE_OPENGL ON CACHE BOOL "Build using OpenGL")
-set(XM7_VERSION 3)
 set(WITH_DEBUGGER ON CACHE BOOL "Build with debugger.")
 
 include(detect_target_cpu)
@@ -53,13 +46,4 @@ add_definitions(-D_TK80BS)
 set(EXEC_TARGET emutk80bs)
 set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/tk80bs.qrc)
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/tk80bs)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/machines/tk80bs)
-
 include(config_commonsource)
-
-add_subdirectory(../../src/vm/tk80bs vm/tk80bs)
-add_subdirectory(../../src/qt/machines/tk80bs qt/tk80bs)
-    
-add_subdirectory(../../src/qt/common qt/common)
index fbde83a..6112495 100644 (file)
@@ -16,13 +16,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 project (emux1)
 
 set(BUILD_X1 ON CACHE BOOL "Build for X1")
+
 include(config_x1)
 
-add_subdirectory(../../src/vm/x1 vm/x1)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/x1turboz qt/x1turboz)
-if(BUILD_X1TWIN)
-  add_subdirectory(../../src/vm/pcengine vm/pcengine)
-endif()
-     
-add_subdirectory(../../src/qt/common qt/common)
index 369a13a..192c1c2 100644 (file)
@@ -18,11 +18,3 @@ project (emux1turbo)
 set(BUILD_X1TURBO ON CACHE BOOL "Build for X1 Turbo")
 include(config_x1)
 
-add_subdirectory(../../src/vm/x1 vm/x1)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/x1turboz qt/x1turboz)
-if(BUILD_X1TWIN)
-  add_subdirectory(../../src/vm/pcengine vm/pcengine)
-endif()
-   
-add_subdirectory(../../src/qt/common qt/common)
index 47c5703..c398fdb 100644 (file)
@@ -12,17 +12,7 @@ message("")
 
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
 
-
 project (emux1turboz)
 
 set(BUILD_X1TURBOZ ON CACHE BOOL "Build for X1 TurboZ")
 include(config_x1)
-
-add_subdirectory(../../src/vm/x1 vm/x1)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/x1turboz qt/x1turboz)
-if(BUILD_X1TWIN)
-  add_subdirectory(../../src/vm/pcengine vm/pcengine)
-endif()
-     
-add_subdirectory(../../src/qt/common qt/common)
index 7da2944..1cb429d 100644 (file)
@@ -16,12 +16,3 @@ project (emux1twin)
 
 set(BUILD_X1TWIN ON CACHE BOOL "Build for X1 Twin")
 include(config_x1)
-
-add_subdirectory(../../src/vm/x1 vm/x1)
-add_subdirectory(../../src/vm/fmgen vm/fmgen)
-add_subdirectory(../../src/qt/machines/x1turboz qt/x1turboz)
-if(BUILD_X1TWIN)
-  add_subdirectory(../../src/vm/pcengine vm/pcengine)
-endif()
-     
-add_subdirectory(../../src/qt/common qt/common)
index 79365c7..ec659f6 100644 (file)
@@ -509,7 +509,6 @@ void GLDrawClass::resizeGL(int width, int height)
 #endif
 #if defined(MAX_BUTTONS)
        updateButtonTexture();
-       }
 #endif
        redraw_required = true;
        AGAR_DebugLog(AGAR_LOG_DEBUG, "ResizeGL: %dx%d", width , height);
index d11cb29..9742728 100644 (file)
@@ -243,12 +243,12 @@ void GLDrawClass::InitFBO(void)
        main_shader = new QOpenGLShaderProgram(this);
        if(main_shader != NULL) {
                main_shader->addShaderFromSourceFile(QOpenGLShader::Vertex, ":/vertex_shader.glsl");
-#if defined(ONE_BOARD_MICRO_COMPUTER) || defined(MAX_BUTTONS)
-               main_shader->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/chromakey_fragment_shader.glsl");
-#else
+//#if defined(ONE_BOARD_MICRO_COMPUTER) || defined(MAX_BUTTONS)
+//             main_shader->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/chromakey_fragment_shader.glsl");
+//#else
                main_shader->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/fragment_shader.glsl");
                //main_shader->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/filtered_fragment_shader.glsl");
-#endif         
+//#endif               
                main_shader->link();
        }
        grids_shader_horizonal = new QOpenGLShaderProgram(this);
similarity index 92%
rename from source/src/qt/machines/x1turboz/CMakeLists.txt
rename to source/src/qt/machines/x1/CMakeLists.txt
index 53a5e29..3a2603d 100644 (file)
@@ -8,7 +8,7 @@ if(USE_QT_5)
 else()
   QT4_WRAP_CPP(s_qt_x1turboz_headers_MOC ${s_qt_x1turboz_headers})
 endif()
-add_library(qt_x1turboz
+add_library(qt_x1
          MainWindow.cpp
          ${s_qt_x1turboz_headers_MOC}
 )
index 36ea810..1a896aa 100644 (file)
@@ -90,5 +90,7 @@ void OSD::do_close_debugger_console()
 
 void OSD::do_close_debugger_thread()
 {
+#if defined(USE_DEBUGGER)
        emu->close_debugger();
+#endif 
 }
index 9aa6f75..bbd3b85 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-//#include "../beep.h"
 #include "../pcm1bit.h"
 #include "../datarec.h"
 #include "../ym2203.h"
@@ -41,8 +40,6 @@ void FM7_MAINIO::reset_sound(void)
                        for(j = 0; j < 3; j++) {
                                opn[i]->SetReg(0x28, j | 0xfe);
                        }
-                       //opn[i]->write_signal(SIG_YM2203_PORT_A, 0xff, 0xff);
-                       //opn[i]->write_signal(SIG_YM2203_PORT_B, 0xff, 0xff);
                }
           
        }
@@ -214,25 +211,22 @@ void FM7_MAINIO::set_opn(int index, uint8 val)
        opn_data[index] = val;
        switch(opn_cmdreg[index]){
                case 0: // High inpedance
-                       break;
                case 1: // Read Data
                        break;
                case 2: // Write Data
                        write_opn_reg(index, opn_address[index], opn_data[index]);
                        break;
                case 3: // Register address
-                       if(index != 3) {
-                               opn_address[index] = val & 0xff;
-                       } else {
+                       if(index == 3) {
                                opn_address[index] = val & 0x0f;
+                       } else {
+                               opn_address[index] = val;
+                               if((val > 0x2c) && (val < 0x30)) {
+                                       opn_data[index] = 0;
+                                       opn[index]->write_io8(0, val);
+                                       opn[index]->write_io8(1, 0);
+                               }
                        }
-                       if((val > 0x2c) && (val < 0x30)) {
-                               opn_data[index] = 0;
-                               opn[index]->write_io8(0, opn_address[index]);
-                               opn[index]->write_io8(1, 0);
-                       }
-                       //opn[index]->write_io8(0, opn_address[index]);
-                       //printf("OPN %d REG ADDR=%02x\n", index, opn_address[index]);
                        break;
           
        }
@@ -251,8 +245,6 @@ uint8 FM7_MAINIO::get_opn(int index)
        if(opn[index] == NULL) return val;
        switch(opn_cmdreg[index]) {
                case 0:
-                       //val = 0xff;
-                       //break;
                case 1:
                case 2:
                case 3:
@@ -303,24 +295,22 @@ void FM7_MAINIO::set_opn_cmd(int index, uint8 cmd)
                        }
                        break;
                case 2:
-                       //opn[index]->SetReg(opn_address[index], opn_data[index]);
                        write_opn_reg(index, opn_address[index], opn_data[index]);
                        break;
-               case 3:
-                       if(index != 3) {
-                               opn_address[index] = val & 0xff;
-                       } else {
+               case 3: // Register address
+                       if(index == 3) {
                                opn_address[index] = val & 0x0f;
-                       }
-                       if((val > 0x2c) && (val < 0x30)) {
-                               opn_data[index] = 0;
-                               opn[index]->write_io8(0, opn_address[index]);
-                               opn[index]->write_io8(1, 0);
+                       } else {
+                               opn_address[index] = val;
+                               if((val > 0x2c) && (val < 0x30)) {
+                                       opn_data[index] = 0;
+                                       opn[index]->write_io8(0, val);
+                                       opn[index]->write_io8(1, 0);
+                               }
                        }
                        break;
                case 4:
                        opn_stat[index] = opn[index]->read_io8(0) & 0x03;
-                       //if(index != 3) val = opn_stat[index];
                        break;
                default:
                        break;
index a717413..cf30cf1 100644 (file)
@@ -134,7 +134,8 @@ void PSG::MakeEnvelopTable()
                2,2, 2,0, 2,1, 2,3, 1,1, 1,3, 1,2, 1,0,
        };
        static uint8 table2[4] = {  0,  0, 31, 31 };
-       static uint8 table3[4] = {  0,  1, 255,  0 }; // -1 will embed bugs except some compilers.
+       //static uint8 table3[4] = {  0,  1, 255,  0 }; // -1 will embed bugs except some compilers.
+       static uint8 table3[4] = {  0,  1, -1,  0 }; // -1 will embed bugs except some compilers.
 
        uint* ptr = enveloptable[0];
 
index 6209130..da7a499 100644 (file)
 #define TMS9918A_VRAM_SIZE             0x4000
 #define TMS9918A_LIMIT_SPRITES
 #define MAX_DRIVE                              1
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT SCREEN_WIDTH
-#define WINDOW_HEIGHT_ASPECT SCREEN_HEIGHT 
-
 
 // device informations for win32
 #define USE_CART1
index 168321d..841c94a 100644 (file)
 #define TMS9918A_VRAM_SIZE             0x4000
 #define TMS9918A_LIMIT_SPRITES
 ///#define MAX_DRIVE                   1
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT SCREEN_WIDTH
-#define WINDOW_HEIGHT_ASPECT SCREEN_HEIGHT 
 
 // device informations for win32
 #define USE_CART1
index f213dba..f9643ed 100644 (file)
@@ -268,7 +268,6 @@ bool VM::disk_inserted(int drv)
        return fdc_tf20->disk_inserted(drv);
 }
 
-
 void VM::set_disk_protected(int drv, bool value)
 {
        fdc_tf20->set_disk_protected(drv, value);
@@ -299,7 +298,6 @@ bool VM::tape_inserted()
        return memory->tape_inserted();
 }
 
-
 bool VM::now_skip()
 {
        return event->now_skip();
index 907a9ae..7d881aa 100644 (file)
@@ -127,7 +127,6 @@ public:
        void rec_tape(const _TCHAR* file_path);
        void close_tape();
        bool tape_inserted();
-       
        bool now_skip();
        
        void update_config();
index 75b8611..d578503 100644 (file)
@@ -735,7 +735,6 @@ void MEMORY::send_to_main(uint8 val)
        d_cpu->write_signal(SIG_MC6801_SIO_RECV, val, 0xff);
 }
 
-
 void MEMORY::play_tape(const _TCHAR* file_path)
 {
        close_tape();
index 7d55b44..5ec8618 100644 (file)
@@ -148,7 +148,7 @@ void HD46505::event_vline(int v, int clock)
 {
        // if vt_disp == 0, raise vblank for one line
        bool new_vblank = ((v < vt_disp) || (v == 0 && vt_disp == 0));
-       //printf("VBLANK: LINE=%d BLANK=%d\n", v, (new_vblank) ? 1: 0);
+
        // display
        if(outputs_disp.count) {
                set_display(new_vblank);
index 380081f..482ac9d 100644 (file)
@@ -263,7 +263,7 @@ bool HUC6280::load_state(FILEIO* state_fio)
                return false;
        }
        state_fio->Fread(opaque, sizeof(h6280_Regs), 1);
-       
+
        // post process   
        h6280_Regs *cpustate = (h6280_Regs *)opaque;
        cpustate->program = d_mem;
index 90affe6..282fa45 100644 (file)
@@ -129,7 +129,6 @@ typedef UINT32      offs_t;
 /* Highly useful macro for compile-time knowledge of an array size */
 #define ARRAY_LENGTH(x)     (sizeof(x) / sizeof(x[0]))
 
-
 #if defined(HAS_I86) || defined(HAS_I88) || defined(HAS_I186) || defined(HAS_V30)
 #define cpu_state i8086_state
 #include "mame/emu/cpu/i86/i86.c"
@@ -422,7 +421,7 @@ bool I286::load_state(FILEIO* state_fio)
        }
        state_fio->Fread(opaque, sizeof(cpu_state), 1);
        
-        // post process
+       // post process
        cpu_state *cpustate = (cpu_state *)opaque;
        cpustate->pic = d_pic;
        cpustate->program = d_mem;
index 52d626e..e61e804 100644 (file)
@@ -478,7 +478,6 @@ int I386::get_shutdown_flag()
        return cpustate->shutdown;
 }
 
-
 #define STATE_VERSION  1
 
 void I386::save_state(FILEIO* state_fio)
@@ -519,4 +518,3 @@ bool I386::load_state(FILEIO* state_fio)
        return true;
 }
 
-
index 35d277f..1b19a18 100644 (file)
@@ -90,7 +90,7 @@ public:
 #endif
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-
+       
        // unique function
        void set_context_mem(DEVICE* device)
        {
index 9127d23..7a55987 100644 (file)
@@ -1545,9 +1545,6 @@ void I8080::OP(uint8 code)
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
                __assume(0);
-#else
-       default:
-               break;
 #endif
        }
 }
@@ -1903,7 +1900,6 @@ int I8080::debug_dasm(uint32 pc, _TCHAR *buffer, size_t buffer_len)
 }
 #endif
 
-
 #define STATE_VERSION  1
 
 void I8080::save_state(FILEIO* state_fio)
index ebf9f57..88d0d68 100644 (file)
@@ -241,9 +241,9 @@ public:
        void debug_regs_info(_TCHAR *buffer, size_t buffer_len);
        int debug_dasm(uint32 pc, _TCHAR *buffer, size_t buffer_len);
 #endif
-       
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
+       
        // unique function
        void set_context_mem(DEVICE* device)
        {
index 9c5833f..29cfe59 100644 (file)
@@ -964,10 +964,6 @@ void I86::rotate_shift_byte(unsigned ModRM, unsigned count)
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
                default:
                        __assume(0);
-#else
-               default:
-                       //__assume(0);
-                       break;
 #endif
                }
        } else {
@@ -1030,10 +1026,6 @@ void I86::rotate_shift_byte(unsigned ModRM, unsigned count)
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
                default:
                        __assume(0);
-#else
-               default:
-                       //__assume(0);
-                       break;
 #endif
                }
        }
@@ -1102,10 +1094,6 @@ void I86::rotate_shift_word(unsigned ModRM, unsigned count)
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
                default:
                        __assume(0);
-#else
-               default:
-                       //__assume(0);
-                       break;
 #endif
                }
        } else {
@@ -1166,8 +1154,9 @@ void I86::rotate_shift_word(unsigned ModRM, unsigned count)
                        PutbackRMWord(ModRM, dst);
                        break;
                default:
-                       //__assume(0);
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
                        break;
+#endif
                }
        }
 }
@@ -1473,8 +1462,9 @@ void I86::instruction(uint8 code)
        case 0xfd: _std(); break;
        case 0xfe: _fepre(); break;
        case 0xff: _ffpre(); break;
-       default: _add_br8(); break;
-       //default: __assume(0);
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+       default: __assume(0);
+#endif
        }
 }
 
@@ -3156,9 +3146,10 @@ inline void I86::_80pre()    /* Opcode 0x80 */
                SUBB(dst, src);
                icount -= (ModRM >= 0xc0) ? timing.alu_ri8 : timing.alu_mi8_ro;
                break;
-       default:
-               //__assume(0);
-               break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+       default:
+               __assume(0);
+#endif
        }
 }
 
@@ -3211,9 +3202,10 @@ inline void I86::_81pre()    /* Opcode 0x81 */
                SUBW(dst, src);
                icount -= (ModRM >= 0xc0) ? timing.alu_ri16 : timing.alu_mi16_ro;
                break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-              break;
+               __assume(0);
+#endif
        }
 }
 
@@ -3265,9 +3257,10 @@ inline void I86::_82pre()    /* Opcode 0x82 */
                SUBB(dst, src);
                icount -= (ModRM >= 0xc0) ? timing.alu_ri8 : timing.alu_mi8_ro;
                break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
@@ -3319,9 +3312,10 @@ inline void I86::_83pre()    /* Opcode 0x83 */
                SUBW(dst, src);
                icount -= (ModRM >= 0xc0) ? timing.alu_r16i8 : timing.alu_m16i8_ro;
                break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
@@ -3432,9 +3426,10 @@ inline void I86::_mov_sregw()    /* Opcode 0x8e */
        case 6:
        case 7:
                break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
@@ -4537,9 +4532,10 @@ inline void I86::_f6pre()    /* Opcode 0xf6 */
                }
                break;
                
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
@@ -4662,9 +4658,10 @@ inline void I86::_f7pre()    /* Opcode 0xf7 */
                }
                break;
                
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
@@ -4807,9 +4804,10 @@ inline void I86::_ffpre()    /* Opcode 0xff */
        case 7:  /* invalid ??? */
                icount -= 10;
                break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
        default:
-               //__assume(0);
-               break;
+               __assume(0);
+#endif
        }
 }
 
index 9472342..7ac6b68 100644 (file)
 #include "../emu.h"
 #include "device.h"
 
-#ifndef TRUE
-# define TRUE 1
-#endif
-#ifndef FALSE
-# define FALSE 0
-#endif
-
 #define SIG_I86_TEST   0
 
 #ifdef USE_DEBUGGER
@@ -73,7 +66,7 @@ private:
        unsigned ea;
        uint16 eo;              /* effective offset of the address (before segment is added) */
        uint8 ea_seg;           /* effective segment of the address */
-
+       
        /* ---------------------------------------------------------------------------
        opecode
        --------------------------------------------------------------------------- */
index 7141c5f..8b36152 100644 (file)
@@ -58,7 +58,7 @@ public:
                }
 #ifdef _IO_DEBUG_LOG
                cpu_index = 0;
-#endif    
+#endif
        }
        ~IO() {}
        
index 4bfa750..3fb971d 100644 (file)
@@ -255,12 +255,6 @@ DEVICE* VM::get_device(int id)
        return NULL;
 }
 
-   
-void VM::register_frame_event(DEVICE* dev)
-{
-       this->event->register_frame_event(dev);
-}
-
 // ----------------------------------------------------------------------------
 // drive virtual machine
 // ----------------------------------------------------------------------------
index 5a8ffc2..5351caa 100644 (file)
@@ -159,7 +159,6 @@ public:
        bool now_skip();
        
        void update_config();
-       void register_frame_event(DEVICE* dev);
        
        // ----------------------------------------
        // for each device
index 824586a..e5a076e 100644 (file)
@@ -38,7 +38,6 @@ void KEYBOARD::reset()
        cmd_param->clear();
        cmd_byte = 0x00;
        kbic_status = 0x12;
-       cmd_byte = 0x00;
 }
 
 void KEYBOARD::write_io8(uint32 addr, uint32 data)
index 21e9f43..02ce784 100644 (file)
@@ -30,8 +30,9 @@ private:
        FIFO* cmd_param;
        uint8 cmd_byte;
        uint8 kbic_status;
-
+       
        void process_cmd();
+       
 public:
        KEYBOARD(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
        ~KEYBOARD() {}
@@ -43,7 +44,6 @@ public:
        void write_io8(uint32 addr, uint32 data);
        uint32 read_io8(uint32 addr);
        void event_frame();
-       void process_cmd();
        
        // unique functions
        void set_context_pic(DEVICE* device)
index c00d01a..aff5e3f 100644 (file)
@@ -14,7 +14,7 @@
 #include "../../emu.h"
 #include "../device.h"
 
-#define SIG_SYSTEM_TC2O 0
+#define SIG_SYSTEM_TC2O        0
 
 class SYSTEM : public DEVICE
 {
index 9eaf44b..e3f6183 100644 (file)
@@ -236,7 +236,6 @@ void VM::push_fast_rewind()
        drec->set_remote(true);
 }
 
-
 bool VM::now_skip()
 {
        return event->now_skip();
index d5f8143..c3881d3 100644 (file)
@@ -13,7 +13,6 @@
 
 void DISPLAY::initialize()
 {
-       
        // create pc palette
        for(int i = 0; i < 16; i++) {
                int val = (i & 8) ? 127 : 0;
@@ -46,7 +45,6 @@ void DISPLAY::reset()
        status = 0x04;
 }
 
-
 void DISPLAY::write_io8(uint32 addr, uint32 data)
 {
        switch(addr) {
index 4cdf0c2..999f6eb 100644 (file)
@@ -389,7 +389,7 @@ void LD700::open_disc(const _TCHAR* file_path)
                                
                                for(int i = 0; i < 0x1000; i++) {
                                        char *top = (char *)(buffer + i), tmp[128];
-                                  if(_strnicmp(top, "chapter:", 8) == 0) {
+                                       if(_strnicmp(top, "chapter:", 8) == 0) {
                                                top += 8;
                                                for(int j = 0;;) {
                                                        char c = *top++;
@@ -418,7 +418,7 @@ void LD700::open_disc(const _TCHAR* file_path)
                                                        emu->out_debug_log("LD700: TRACK %d: %d\n", track, track_frame_raw[track]);
                                                }
                                        } else if(_strnicmp(top, "stop:", 5) == 0) {
-                                               top += 5;
+                                               top += 5;
                                                for(int j = 0;;) {
                                                        char c = *top++;
                                                        if(c >= '0' && c <= '9') {
@@ -434,7 +434,7 @@ void LD700::open_disc(const _TCHAR* file_path)
                                                        num_pauses++;
                                                }
                                        } else if(_strnicmp(top, "ENCODER=", 8) == 0) {
-                                             break;
+                                               break;
                                        }
                                }
                        }
index 4826f32..7e6e032 100644 (file)
@@ -54,9 +54,9 @@ public:
        {
                return prev_pc;
        }
-       
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
+       
        // unique functions
        void set_context_mem(DEVICE* device)
        {
index 50d830d..06b13e1 100644 (file)
@@ -21,7 +21,6 @@
 #define MMXOP(XX)       mmx_##XX
 #define SSEOP(XX)       sse_##XX
 
-
 extern int i386_dasm_one(char *buffer, UINT32 pc, const UINT8 *oprom, int mode);
 
 enum SREGS { ES, CS, SS, DS, FS, GS };
index fd6825a..5aedcf7 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "i86time.c"
 
-
 /***************************************************************************/
 /* cpu state                                                               */
 /***************************************************************************/
index c19cede..de661d7 100644 (file)
@@ -124,7 +124,7 @@ void vtlb_free(vtlb_state *vtlb)
     vtlb_fill - rcalled by the CPU core in
     response to an unmapped access
 -------------------------------------------------*/
-static int cpu_translate_i386(void *cpudevice, address_spacenum space, int intention, offs_t *address);
+//static int cpu_translate_i386(void *cpudevice, address_spacenum space, int intention, offs_t *address);
 
 int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention)
 {
index e661940..5ab0ab7 100644 (file)
@@ -84,4 +84,5 @@ void vtlb_flush_address(vtlb_state *vtlb, offs_t address);
 /* return a pointer to the base of the linear VTLB lookup table */
 const vtlb_entry *vtlb_table(vtlb_state *vtlb);
 
+
 #endif /* __VTLB_H__ */
index 565e67d..33d5098 100644 (file)
@@ -799,7 +799,7 @@ void MB8877::cmd_seek()
        seektrk = datareg;
        seektrk = (seektrk > 83) ? 83 : (seektrk < 0) ? 0 : seektrk;
        seekvct = !(datareg > trkreg);
-
+       
        register_seek_event();
 }
 
@@ -1145,7 +1145,7 @@ uint8 MB8877::search_addr()
                        track >>= 1;
                }
        }
-#endif   
+#endif
        if(!disk[drvreg]->get_track(track, sidereg)) {
                return FDC_ST_RECNFND;
        }
@@ -1219,13 +1219,9 @@ double MB8877::get_usec_to_next_trans_pos(bool delay)
                position = (position + disk[drvreg]->get_bytes_per_usec(DELAY_TIME)) % disk[drvreg]->get_track_size();
        }
        int bytes = fdc[drvreg].next_trans_position - position;
-       // Is it right?
        if(fdc[drvreg].next_am1_position < position || bytes < 0) {
                bytes += disk[drvreg]->get_track_size();
        }
-       //if(bytes < 0) {
-       //      bytes += disk[drvreg]->get_track_size();
-       //}
        double time = disk[drvreg]->get_usec_per_bytes(bytes);
        if(delay) {
                time += DELAY_TIME;
index 3e0b603..79a7b2b 100644 (file)
@@ -18,8 +18,6 @@
 #define SIG_MB8877_DRIVEREG    0
 #define SIG_MB8877_SIDEREG     1
 #define SIG_MB8877_MOTOR       2
-//#define SIG_MB8877_CMDPHASE  3
-//#define SIG_MB8877_READ_DRIVE_REG    4
 
 class DISK;
 
@@ -60,6 +58,7 @@ private:
        uint8 drvreg;
        uint8 sidereg;
        uint8 cmdtype;
+       
        // event
        int register_id[8];
        
index 8fe4136..88a7141 100644 (file)
@@ -4092,7 +4092,6 @@ void MC6800::stx_ex()
        WM16(EAD, &pX);
 }
 
-
 #define STATE_VERSION  1
 
 void MC6800::save_state(FILEIO* state_fio)
index 02c862e..7e780c1 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "mc6809.h"
 #include "mc6809_consts.h"
-#include "common.h"
+//#include "common.h"
 #ifdef USE_DEBUGGER
 #include "debugger.h"
 #endif
@@ -1295,9 +1295,7 @@ int MC6809::debug_dasm(uint32 pc, _TCHAR *buffer, size_t buffer_len)
                ops[i] = d_mem_stored->read_data8(pc + i);
        }
        int length = cpu_disassemble_m6809(buffer_tmp, pc, ops, ops);
-       //memset(buffer_tmp, 0x00, sizeof(buffer_tmp));
        my_strcpy_s(buffer, buffer_len, buffer_tmp);
-       //strncpy(buffer, buffer_tmp, (buffer_len >= 1024) ? 1023 : buffer_len);
        return length;
 }
 #endif
index bfacafe..a496ef2 100644 (file)
@@ -39,7 +39,7 @@ void MC6820::write_io8(uint32 addr, uint32 data)
                }
                break;
        case 1:
-        case 3:
+       case 3:
                if(data & 0x20) {
                        port[ch].ctrl &= ~0x40;
                }
index 5347c09..5a65298 100644 (file)
 #define MCS48_PORT_BUS 0x120   /* DB0-DB7 */
 #define MCS48_PORT_PROG        0x121   /* PROG line to 8243 expander */
 
-#ifndef TRUE
-# define TRUE 1
-#endif
-#ifndef FALSE
-# define FALSE 0
-#endif
-
 #ifdef USE_DEBUGGER
 class DEBUGGER;
 #endif
index 29ae685..4a32443 100644 (file)
@@ -41,7 +41,7 @@
 #if !defined(_PX7)
 static const struct {
        int sectors;
-       uint8 heads, names, per_track, per_fat, per_cluster;
+       byte heads, names, per_track, per_fat, per_cluster;
 } info[8] = {
        { 720,  1, 112, 9, 2, 2 },
        { 1440, 2, 112, 9, 3, 2 },
index e5616ca..ad149c4 100644 (file)
@@ -349,7 +349,6 @@ bool VM::disk_inserted(int drv)
        return memory->disk_inserted(drv);
 }
 
-
 void VM::set_disk_protected(int drv, bool value)
 {
        memory->set_disk_protected(drv, value);
@@ -360,12 +359,6 @@ bool VM::get_disk_protected(int drv)
        return memory->get_disk_protected(drv);
 }
 
-//int VM::access_lamp()
-//{
-//     //uint32 status = fdc->read_signal(0);
-//     //return (status & (1 | 4)) ? 1 : (status & (2 | 8)) ? 2 : 0;
-//     return 0;
-//}
 #endif
 
 bool VM::now_skip()
index c3e621d..1a197b2 100644 (file)
 // for Flappy Limited '85
 #define YM2203_PORT_MODE       0x80
 
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT SCREEN_WIDTH
-#define WINDOW_HEIGHT_ASPECT SCREEN_HEIGHT 
-
 // device informations for win32
 #define USE_CART1
 #define USE_CART2
 #define USE_TAPE
-#define USE_TAPE_PTR
+//#define USE_TAPE_PTR
 #if defined(_PX7)
 #define USE_LASER_DISC
 #define USE_MOVIE_PLAYER
@@ -197,7 +192,6 @@ public:
        bool disk_inserted(int drv);
        void set_disk_protected(int drv, bool value);
        bool get_disk_protected(int drv);
-       //int access_lamp();
 #endif
        bool now_skip();
        
index 7ac8cd0..38e0853 100644 (file)
@@ -20,7 +20,6 @@
 // max 256kbytes
 #define BUFFER_SIZE    0x40000
 
-
 class CMT : public DEVICE
 {
 private:
index cfe9115..d143a86 100644 (file)
@@ -11,7 +11,6 @@
 
 void DISPLAY::initialize()
 {
-       
        // load rom image
        FILEIO* fio = new FILEIO();
        if(fio->Fopen(create_local_path(_T("FONT.ROM")), FILEIO_READ_BINARY)) {
@@ -37,7 +36,6 @@ void DISPLAY::initialize()
        register_frame_event(this);
 }
 
-
 void DISPLAY::write_io8(uint32 addr, uint32 data)
 {
        // $01: vram data
@@ -200,8 +198,6 @@ void DISPLAY::draw_80column()
        }
 }
 
-
-
 #define STATE_VERSION  1
 
 void DISPLAY::save_state(FILEIO* state_fio)
index 57a5195..acb3486 100644 (file)
@@ -39,7 +39,6 @@ public:
        
        // common functions
        void initialize();
-       
        void write_io8(uint32 addr, uint32 data);
        uint32 read_io8(uint32 addr);
        void write_signal(int id, uint32 data, uint32 mask);
index dca4e2a..f5e57b8 100644 (file)
 //#define DATAREC_FF_REW_SPEED 10
 #define SUPPORT_VARIABLE_TIMING
 
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-
 // memory wait
 #define Z80_MEMORY_WAIT
 #define Z80_IO_WAIT
index 2506553..e04a369 100644 (file)
 #define I8259_MAX_CHIPS                1
 #endif
 
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-
 // memory wait
 #define Z80_MEMORY_WAIT
 #define Z80_IO_WAIT
@@ -204,10 +199,11 @@ public:
        void push_apss_forward() {}
        void push_apss_rewind() {}
        bool now_skip();
+       
        void update_config();
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-
+       
        // ----------------------------------------
        // for each device
        // ----------------------------------------
index 4f6dea6..312e84b 100644 (file)
@@ -106,7 +106,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        pio1->set_context_port_a(crtc, SIG_CRTC_COLUMN_SIZE, 0x20, 0);
        pio1->set_context_port_a(keyboard, SIG_KEYBOARD_COLUMN, 0xff, 0);
        sio->set_context_intr(pic, SIG_I8259_CHIP0 | SIG_I8259_IR2);
-       sio->set_context_dtr(0, mouse, SIG_MOUSE_DTR, 1);
+       sio->set_context_dtr(1, mouse, SIG_MOUSE_DTR, 1);
        
        crtc->set_context_pic(pic);
        crtc->set_context_pio(pio0);
index 70dff0b..0af8890 100644 (file)
@@ -99,7 +99,6 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
 #endif
        qd = new QUICKDISK(this, emu);
 #endif
-       event->set_context_sound(drec);
        
        // set contexts
        event->set_context_cpu(cpu);
@@ -110,9 +109,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        event->set_context_sound(psg_l);
        event->set_context_sound(psg_r);
 #endif
-#if defined(DATAREC_SOUND)
        event->set_context_sound(drec);
-#endif
        // VRAM/PCG wait
        memory->set_context_cpu(cpu);
        
@@ -412,8 +409,8 @@ void VM::draw_screen()
 #if defined(_MZ800) || defined(_MZ1500)
 int VM::access_lamp()
 {
-  uint32 status = fdc->read_signal(0) | qd->read_signal(0); // 4 + 1: Nagative
-  return (status & (1 | 4)) ? 1 : (status & (2 | 8)) ? 2 : 0;
+       uint32 status = fdc->read_signal(0) | qd->read_signal(0);
+       return (status & (1 | 4)) ? 1 : (status & (2 | 8)) ? 2 : 0;
 }
 #endif
 
@@ -453,13 +450,13 @@ int VM::sound_buffer_ptr()
 void VM::play_tape(const _TCHAR* file_path)
 {
        drec->play_tape(file_path);
-       drec->write_signal(SIG_DATAREC_REMOTE, 1, 1);
+       drec->set_remote(true);
 }
 
 void VM::rec_tape(const _TCHAR* file_path)
 {
        drec->rec_tape(file_path);
-       drec->write_signal(SIG_DATAREC_REMOTE, 1, 1);
+       drec->set_remote(true);
 }
 
 void VM::close_tape()
index 4d15812..1203f32 100644 (file)
 #define MAX_DRIVE              4
 #define HAS_MB8876
 #endif
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
 
 // device informations for win32
 #if defined(_MZ700)
@@ -57,7 +53,7 @@
 #define USE_BOOT_MODE          2
 #endif
 #define USE_TAPE
-#define USE_TAPE_PTR
+//#define USE_TAPE_PTR
 #define USE_TAPE_BUTTON
 #if defined(_MZ800) || defined(_MZ1500)
 #define USE_QD1
@@ -79,7 +75,7 @@
 //#endif
 #if defined(_MZ800) || defined(_MZ1500)
 #define USE_ACCESS_LAMP
-#define USE_DISK_WRITE_PROTECT
+//#define USE_DISK_WRITE_PROTECT
 #endif
 #define USE_DEBUGGER
 #define USE_STATE
index caaff6e..aefbdb8 100644 (file)
@@ -298,6 +298,16 @@ bool VM::disk_inserted(int drv)
        return fdc->disk_inserted(drv);
 }
 
+void VM::set_disk_protected(int drv, bool value)
+{
+       fdc->set_disk_protected(drv, value);
+}
+
+bool VM::get_disk_protected(int drv)
+{
+       return fdc->get_disk_protected(drv);
+}
+
 #endif
 
 void VM::play_tape(const _TCHAR* file_path)
@@ -323,18 +333,6 @@ bool VM::tape_inserted()
        return drec->tape_inserted();
 }
 
-#if defined(SUPPORT_MZ80AIF) || defined(SUPPORT_MZ80FIO)
-void VM::set_disk_protected(int drv, bool value)
-{
-       fdc->set_disk_protected(drv, value);
-}
-
-bool VM::get_disk_protected(int drv)
-{
-       return fdc->get_disk_protected(drv);
-}
-#endif
-
 bool VM::tape_playing()
 {
        return drec->tape_playing();
index 5386d9f..7161b70 100644 (file)
 #define MAX_DRIVE              4
 #endif
 
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-
 // device informations for win32
 #define USE_TAPE
-#define USE_TAPE_PTR
+//#define USE_TAPE_PTR
 #define USE_TAPE_BUTTON
 #define NOTIFY_KEY_DOWN
 #define USE_SHIFT_NUMPAD_KEY
@@ -69,7 +64,7 @@
 #define USE_FD3
 #define USE_FD4
 #define USE_ACCESS_LAMP
-#define USE_DISK_WRITE_PROTECT
+//#define USE_DISK_WRITE_PROTECT
 #endif
 #if defined(_MZ80K)
 #define USE_MONITOR_TYPE       2
@@ -189,7 +184,6 @@ public:
        bool tape_playing();
        bool tape_recording();
        int tape_position();
-
        void push_play();
        void push_stop();
        void push_fast_forward();
index 0fc00f7..4bd3799 100644 (file)
 #include "../../emu.h"
 #include "../device.h"
 
-#if defined(_USE_QT) || defined(_USE_AGAR)
-typedef uint8_t byte;
-#endif
-
 class DISK;
 
 class FLOPPY : public DEVICE
index 588930b..f12f4c6 100644 (file)
@@ -286,7 +286,7 @@ void MEMORY::write_io8(uint32 addr, uint32 data)
                { 0x8000, 0xc000, 0x0000, 0x4000 }
        };
        uint16 port=(addr & 0x00ff);
-       uint8 Value=data;
+       byte Value=data;
        switch(port)
        {
 #ifdef _PC6001
index da73f46..dc5e96c 100644 (file)
 #include "../../emu.h"
 #include "../device.h"
 
-#if defined(_USE_QT) || defined(_USE_AGAR)
-typedef uint8_t byte;
-#endif
-
 #define SIG_MEMORY_PIO_PORT_C  0
 
 #ifndef _PC6001
@@ -89,7 +85,7 @@ private:
        uint8 *VRAM;
 //     uint8 EmptyRAM[0x2000];
        uint8 EnWrite[4];                       // MEMORY MAPPING WRITE ENABLE [N60/N66]
-       uint8 CGSW93;
+       byte CGSW93;
        bool inserted;
 #ifndef _PC6001
        byte CRTKILL;
index e7e4be2..6a17bce 100644 (file)
@@ -119,9 +119,9 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
 #ifdef USE_DEBUGGER
                cpu_sub->set_context_debugger(new DEBUGGER(this, emu));
 #endif
-#ifdef DATAREC_SOUND
-               event->set_context_sound(drec);
-#endif
+//#ifdef DATAREC_SOUND
+//             event->set_context_sound(drec);
+//#endif
                sub->set_context_pio(pio_sub);
                sub->set_context_drec(drec);
                sub->set_context_timer(timer);
index 718ad68..1381ab8 100644 (file)
 #define SCREEN_HEIGHT          400
 #define CPU_CLOCKS             3580000
 #endif
-// 4:3
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
 
 // device informations for virtual machine
 #define FRAMES_PER_SEC         60
@@ -85,7 +80,7 @@
 #define USE_FD4
 #endif
 #define USE_TAPE
-#define USE_TAPE_PTR
+//#define USE_TAPE_PTR
 #define TAPE_PC6001
 #define USE_SHIFT_NUMPAD_KEY
 #define USE_ALT_F10_KEY
@@ -97,7 +92,7 @@
 #define USE_SCANLINE
 #endif
 #define USE_ACCESS_LAMP
-#define USE_DISK_WRITE_PROTECT
+//#define USE_DISK_WRITE_PROTECT
 #define USE_DEBUGGER
 #define USE_STATE
 
index 246b1dc..5fe2bb6 100644 (file)
 
 class FILEIO;
 
-#if defined(_USE_QT) || defined(_USE_AGAR)
-typedef uint8 byte;
-#endif
-
 class PSUB : public DEVICE
 {
 private:
index e9a987b..c0b251e 100644 (file)
@@ -38,6 +38,7 @@ static const uint8 key_matrix[16][8] = {
        {0x00,  0x00,   0x00,   0x00,   0x00,   0x00,   0x00,   0x00},
        {0x00,  0x00,   0x00,   0x00,   0x00,   0x00,   0x00,   0x00},
 };
+
 void SUB::initialize()
 {
        fio = new FILEIO();
index 32e8da6..92da57d 100644 (file)
@@ -1611,44 +1611,6 @@ void PC88::write_signal(int id, uint32 data, uint32 mask)
 #endif
 }
 
-void PC88::update_config(void)
-{
-#if defined(DATAREC_SOUND) && defined(USE_MULTIPLE_SOUNDCARDS)
-       int vv;
-       cmt_mix = config.tape_sound;
-       vv = (config.sound_device_level[0] + 0x8000) >> 2;
-       if(vv >= 0x4000) {
-               cmt_volume = 0x4000;
-       } else if(vv <= 0) {
-               cmt_volume = 0;
-       } else {
-               cmt_volume = vv;
-       }
-#endif
-}
-#ifdef DATAREC_SOUND
-void PC88::mix(int32* buffer, int cnt)
-{
-       int vol = 0;
-       if(!cmt_mix) return;
-       if(cmt_play || cmt_rec) {
-               if(cmt_level_flag) {
-                       vol =  cmt_volume;
-               } else {
-                       vol = -cmt_volume;
-               }
-               if(!cmt_sound_flag) vol = 0;  
-       } else {
-               return;
-       }
-       for(int i = 0; i < cnt; i++) {
-               *buffer++ += vol;
-               *buffer++ += vol;
-       }
-}
-#endif
-
 void PC88::event_callback(int event_id, int err)
 {
        switch(event_id) {
@@ -1671,72 +1633,16 @@ void PC88::event_callback(int event_id, int err)
        case EVENT_CMT_DCD:
                // send data to sio
                usart_dcd = false;
-#ifdef DATAREC_SOUND
-               cmt_sound_data = cmt_buffer[cmt_bufptr];
-               cmt_sound_count = 0;
-               cmt_local_count = 0;
-#endif
-#ifdef DATAREC_SOUND
-               register_event(this, EVENT_CMT_SOUND, 1000000.0 / 4800.0, false, NULL);
-#endif
                if(cmt_play && cmt_bufptr < cmt_bufcnt && Port30_MTON) {
                        d_sio->write_signal(SIG_I8251_RECV, cmt_buffer[cmt_bufptr++], 0xff);
                        if(cmt_bufptr < cmt_bufcnt) {
                                register_event(this, EVENT_CMT_SEND, 5000, false, &cmt_register_id);
                                break;
                        }
-               } else {
-#ifdef DATAREC_SOUND
-                 //cmt_level_flag = false;
-                 //cmt_sound_flag = false;
-#endif
                }
                usart_dcd = true; // Jackie Chan no Spartan X
                cmt_register_id = -1;
                break;
-       case EVENT_CMT_SOUND:
-#ifdef DATAREC_SOUND
-               if(cmt_sound_count < 8) {
-                       if((cmt_sound_data & 0x80) != 0) {
-                               cmt_sound_flag = true;
-                               cmt_level_flag = ((cmt_local_count & 0x01) != 0);
-                               if(cmt_local_count & 0x01 != 0) {
-                                       cmt_sound_data <<= 1;
-                                       cmt_sound_count++;
-                                       cmt_local_count = 0;
-                               }
-                       } else {
-                               cmt_sound_flag = true;
-                               cmt_level_flag = ((cmt_local_count & 0x02) != 0);
-                               if((cmt_local_count & 0x03) == 3) {
-                                       cmt_sound_data <<= 1; 
-                                       cmt_sound_count++;
-                                       cmt_local_count = 0;
-                               }
-                       }
-                       cmt_local_count++;
-                       register_event(this, EVENT_CMT_SOUND, 1000000.0 / 4800.0, false, NULL);
-               } else if(cmt_sound_count < 11) {
-                       // STOP BIT = 1.5
-                       cmt_sound_flag = true;
-                       cmt_level_flag = true;
-                       cmt_sound_count++;
-                       register_event(this, EVENT_CMT_SOUND, 1000000.0 / 4800.0, false, NULL);
-                       
-               } else if(cmt_sound_count == 12) {
-                       // Fall down
-                       cmt_sound_flag = true;
-                       cmt_level_flag = false;
-                       cmt_sound_count++;
-                       register_event(this, EVENT_CMT_SOUND, 1000000.0 / 4800.0, false, NULL);
-               } else {
-                       cmt_sound_flag = false;
-                       cmt_level_flag = false;
-                       cmt_sound_count = 0;
-                       cmt_local_count = 0;
-               }
-#endif
-               break;
        case EVENT_BEEP:
                beep_signal = !beep_signal;
                d_pcm->write_signal(SIG_PCM1BIT_SIGNAL, ((beep_on && beep_signal) || sing_signal) ? 1 : 0, 1);
@@ -1893,12 +1799,12 @@ void PC88::play_tape(const _TCHAR* file_path)
                        if(cmt_register_id != -1) {
                                cancel_event(this, cmt_register_id);
                        }
-#ifdef DATAREC_SOUND
-                       cmt_sound_count = 0;
-                       cmt_sound_data = 0;
-                       cmt_level_flag = false;
-                       cmt_sound_flag = true;
-#endif            
+//#ifdef DATAREC_SOUND
+//                     cmt_sound_count = 0;
+//                     cmt_sound_data = 0;
+//                     cmt_level_flag = false;
+//                     cmt_sound_flag = true;
+//#endif                  
                        register_event(this, EVENT_CMT_SEND, 5000, false, &cmt_register_id);
                }
        }
@@ -2997,7 +2903,6 @@ void pc88_dmac_t::finish(int c)
        }
 }
 
 #define STATE_VERSION  5
 
 void PC88::save_state(FILEIO* state_fio)
index 123314e..33e14dc 100644 (file)
@@ -25,9 +25,6 @@
 #define SIG_PC88_DATAREC_MIX   4
 #define SIG_PC88_DATAREC_VOLUME        5
 
-#if defined(_USE_QT)
-#define MAX_PATH PATH_MAX
-#endif
 
 #define CMT_BUFFER_SIZE                0x40000
 
@@ -251,14 +248,6 @@ private:
        
        // beep/sing
        bool beep_on, beep_signal, sing_signal;
-#ifdef DATAREC_SOUND
-       bool cmt_mix;
-       int  cmt_volume;
-       bool cmt_level_flag, cmt_sound_flag;
-       int cmt_sound_count;
-       int cmt_local_count;
-       uint8 cmt_sound_data;
-#endif
 #ifdef SUPPORT_PC88_PCG8100
        // pcg
        uint16 pcg_addr;
@@ -272,12 +261,7 @@ private:
 #endif
        
 public:
-       PC88(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {
-#ifdef DATAREC_SOUND
-               cmt_mix = false;
-               cmt_volume = 0x1800;
-#endif   
-       }
+       PC88(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
        ~PC88() {}
        
        // common functions
@@ -302,13 +286,9 @@ public:
        void event_frame();
        void event_vline(int v, int clock);
        uint32 intr_ack();
-#ifdef DATAREC_SOUND
-       void mix(int32 *buffer, int cnt);
-#endif
        void intr_ei();
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-       void update_config(void);
        
        // unique functions
        bool is_sr_mr()
index d14b1f0..ac460fb 100644 (file)
@@ -125,9 +125,6 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        pc88event->set_context_sound(pc88pcm1);
        pc88event->set_context_sound(pc88pcm2);
 #endif
-#ifdef DATAREC_SOUND
-       pc88event->set_context_sound(pc88);
-#endif 
        pc88->set_context_cpu(pc88cpu);
        pc88->set_context_opn(pc88opn);
 #ifdef SUPPORT_PC88_SB2
@@ -412,10 +409,6 @@ void VM::update_config()
                        device->update_config();
                }
        }
-#ifdef SUPPORT_PC88_HIGH_CLOCK
-       pc88event->set_cpu_clock(pc88cpu, (config.cpu_type != 0) ? 3993624 : 7987248);
-#endif
-   
 }
 
 #define STATE_VERSION  4
index ae0fb0a..9a7125c 100644 (file)
 #if defined(_PC8801MA)
 #define SUPPORT_PC88_DICTIONARY
 #define SUPPORT_PC88_HIGH_CLOCK
-# ifndef _CONFIGURE_WITH_CMAKE
-#  define SUPPORT_PC88_SB2
-#  define SUPPORT_PC88_OPNA
-#  define PC88_EXRAM_BANKS     4
-# endif
+#define SUPPORT_PC88_SB2
+#define SUPPORT_PC88_OPNA
+#define PC88_EXRAM_BANKS       4
 #define HAS_UPD4990A
 #endif
 #define SUPPORT_PC88_JOYSTICK
-# ifndef _CONFIGURE_WITH_CMAKE
-#  define SUPPORT_PC88_PCG8100
-# endif
+#define SUPPORT_PC88_PCG8100
+
 // device informations for virtual machine
 #define FRAMES_PER_SEC         62.422
 #define LINES_PER_FRAME        260
 #define OVERRIDE_SOUND_FREQ_48000HZ    55467
 #define SUPPORT_VARIABLE_TIMING
 
-// 4:3
-#define SCREEN_WIDTH_ASPECT 640 
-#define SCREEN_HEIGHT_ASPECT 400
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-// device informations for win32
 // device informations for win32
 #if defined(_PC8001SR)
 #define USE_BOOT_MODE          3
@@ -86,7 +77,7 @@
 #define USE_FD1
 #define USE_FD2
 #define USE_TAPE
-#define USE_TAPE_PTR
+//#define USE_TAPE_PTR
 #define TAPE_BINARY_ONLY
 #define NOTIFY_KEY_DOWN
 #define USE_SHIFT_NUMPAD_KEY
 #define USE_ACCESS_LAMP
 #define USE_DISK_WRITE_PROTECT
 
-#ifdef SUPPORT_PC88_SB2
-#  define USE_SOUND_DEVICE_TYPE        3
-#elif defined(SUPPORT_PC88_OPNA)
-#  define USE_SOUND_DEVICE_TYPE        2
+#ifdef SUPPORT_PC88_OPNA
+  #ifdef SUPPORT_PC88_SB2
+    #define USE_SOUND_DEVICE_TYPE      3
+  #else
+    #define USE_SOUND_DEVICE_TYPE      2
 #endif
 
-#if defined(DATAREC_SOUND)
-# if defined(SUPPORT_PC88_OPNA)
-#  define USE_MULTIPLE_SOUNDCARDS 3
-# else
-#  define USE_MULTIPLE_SOUNDCARDS 2
-# endif
+#if defined(SUPPORT_PC88_OPNA)
+# define USE_MULTIPLE_SOUNDCARDS 2
 #else
-# if defined(SUPPORT_PC88_OPNA)
-#  define USE_MULTIPLE_SOUNDCARDS 2
-# else
-#  define USE_MULTIPLE_SOUNDCARDS 1
-# endif
+# define USE_MULTIPLE_SOUNDCARDS 1
 #endif
 //#define USE_DEBUGGER
 #define USE_STATE
index 5be78a0..3310cce 100644 (file)
@@ -15,7 +15,6 @@ void CMT::initialize()
 {
        fio = new FILEIO();
        play = rec = remote = false;
-       buffer_size = BUFFER_SIZE;
 }
 
 void CMT::release()
@@ -58,7 +57,6 @@ void CMT::play_tape(const _TCHAR* file_path)
                int size = (fio->Ftell() + 9) & (BUFFER_SIZE - 1);
                fio->Fseek(0, FILEIO_SEEK_SET);
                memset(buffer, 0, sizeof(buffer));
-               buffer_size = size; 
                fio->Fread(buffer, sizeof(buffer), 1);
                
                // send data to sio
@@ -84,7 +82,7 @@ void CMT::close_tape()
 {
        // close file
        release_tape();
-       buffer_size = BUFFER_SIZE;
+       
        // clear sio buffer
        d_sio->write_signal(SIG_I8251_CLEAR, 0, 0);
 }
@@ -101,14 +99,6 @@ void CMT::release_tape()
        play = rec = false;
 }
 
-#ifdef DATAREC_SOUND
-void CMT::mix(int32 *buffer, int cnt)
-{
-  if(!cmt_mix) return;
-  // Not implemented yet :) 
-}    
-#endif
-
 #define STATE_VERSION  1
 
 void CMT::save_state(FILEIO* state_fio)
index 4e912f3..61a2432 100644 (file)
@@ -32,23 +32,13 @@ private:
        
        FILEIO* fio;
        int bufcnt;
-       int buffer_size;
        uint8 buffer[BUFFER_SIZE];
    
        bool play, rec, remote;
-#ifdef DATAREC_SOUND
-       bool cmt_mix;
-       int  cmt_volume;
-#endif
        void release_tape();
        
 public:
-       CMT(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {
-#ifdef DATAREC_SOUND
-               cmt_mix = false;
-               cmt_volume = 0x1800;
-#endif
-       }
+       CMT(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
        ~CMT() {}
        
        // common functions
@@ -57,9 +47,6 @@ public:
        void reset();
        void write_io8(uint32 addr, uint32 data);
        void write_signal(int id, uint32 data, uint32 mask);
-#ifdef DATAREC_SOUND
-       void mix(int32 *buffer, int cnt);
-#endif
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
        
index 6ec3eba..9d2abb0 100644 (file)
@@ -232,7 +232,6 @@ void FLOPPY::event_callback(int event_id, int err)
        timer_id = -1;
 }
 
-
 #define STATE_VERSION  1
 
 void FLOPPY::save_state(FILEIO* state_fio)
index db13a37..c6cfa47 100644 (file)
@@ -62,6 +62,7 @@ public:
        void event_callback(int event_id, int err);
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
+       
        // unique functions
 #if defined(SUPPORT_2HD_FDD_IF)
        void set_context_fdc_2hd(UPD765A* device)
index cc89afc..ed107a0 100644 (file)
@@ -82,14 +82,12 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        pit_clock_8mhz = false;
 #endif
 #if defined(_PC9801E)
-       cpu_type  = config.cpu_type; 
        if(config.cpu_type != 0) {
                // 8MHz -> 5MHz
                cpu_clocks = 4992030;
                pit_clock_8mhz = false;
        }
 #elif defined(_PC9801VM) || defined(_PC98DO)
-       cpu_type  = config.cpu_type; 
        if(config.cpu_type != 0) {
                // 10MHz -> 8MHz
                cpu_clocks = 7987248;
@@ -205,12 +203,6 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        } else if(sound_device_type == 2 || sound_device_type == 3) {
                event->set_context_sound(tms3631);
        }
-#if defined(SUPPORT_CMT_IF)
-       event->set_context_sound(cmt);
-#endif
-#if defined(_PC98DO)
-       //event->set_context_sound(pc88);
-#endif
        dma->set_context_memory(memory);
        // dma ch.0: sasi
        // dma ch.1: memory refresh
@@ -995,7 +987,6 @@ bool VM::disk_inserted(int drv)
        return false;
 }
 
-
 void VM::set_disk_protected(int drv, bool value)
 {
 #if defined(_PC9801) || defined(_PC9801E)
@@ -1087,100 +1078,10 @@ bool VM::tape_inserted()
        return cmt->tape_inserted();
 #endif
 }
-
-
-#endif
-
-void VM::set_mix_cmt(bool flag)
-{
-#ifdef DATAREC_SOUND
-# if defined(_PC98DO)
-       if(flag) {
-               pc88->write_signal(SIG_PC88_DATAREC_MIX, 1, 1);
-       } else {
-               pc88->write_signal(SIG_PC88_DATAREC_MIX, 0, 1);
-       }
-# else
-       if(flag) {
-               cmt->write_signal(SIG_CMT_MIX, 1, 1);
-       } else {
-               cmt->write_signal(SIG_CMT_MIX, 0, 1);
-       }
-# endif
-#endif
-}
        
-void VM::set_volume_cmt(uint32 volume)
-{
-#ifdef DATAREC_SOUND
-# if defined(_PC98DO)
-               pc88->write_signal(SIG_PC88_DATAREC_VOLUME, volume, 0xffffffff);
-# else  // _PC98DO
-               cmt->write_signal(SIG_CMT_VOLUME, volume, 0xffffffff);
-# endif // _PC98DO
-#endif
-}
-
-
-
 bool VM::now_skip()
 {
 #if defined(_PC98DO)
-       if(boot_mode != 0) {
-//             return pc88event->now_skip();
-               return pc88->now_skip();
-       } else
-#endif
-       return event->now_skip();
-}
-
-void VM::update_config()
-{
-#if defined(_PC9801E) || defined(_PC9801VM) || defined(_PC98DO)
-       if(cpu_type != config.cpu_type) {
-               uint32 pit_clocks;
-               int cpu_clocks = CPU_CLOCKS;
-#if defined(_PC9801E)
-               if(config.cpu_type != 0) {
-                       // 8MHz -> 5MHz
-                       cpu_clocks = 4992030;
-                       pit_clock_8mhz = false;
-               } else {
-                       // 5MHz -> 8MHz
-                       cpu_clocks = CPU_CLOCKS;
-                       pit_clock_8mhz = true;
-               }
-#elif defined(_PC9801VM) || defined(_PC98DO)
-               if(config.cpu_type != 0) {
-                       // 10MHz -> 8MHz
-                       cpu_clocks = 7987248;
-                       pit_clock_8mhz = true;
-               } else {
-                       cpu_clocks = CPU_CLOCKS;
-                       pit_clock_8mhz = false;
-               }
-#endif
-               uint8 prn_b  = pio_prn->read_signal(SIG_I8255_PORT_B);
-               if(pit_clock_8mhz) {
-                       prn_b |= 0x20;          // system clock is 8MHz
-                       pit_clocks = 1996812;
-               } else {
-                       prn_b &= ~0x20;
-                       pit_clocks = 2457600;
-               }
-               pio_prn->write_signal(SIG_I8255_PORT_B, prn_b, 0xff);
-               pit->set_constant_clock(0, pit_clocks);
-               pit->set_constant_clock(1, pit_clocks);
-               pit->set_constant_clock(2, pit_clocks);
-               event->set_cpu_clock(cpu, cpu_clocks);
-#if defined(_PC98DO)
-               pc88event->set_cpu_clock(pc88cpu, (config.cpu_type != 0) ? 3993624 : 7987248);
-#endif
-               cpu_type = config.cpu_type;
-       }
-#endif
-   
-#if defined(_PC98DO)
        if(boot_mode != config.boot_mode) {
                // boot mode is changed !!!
                boot_mode = config.boot_mode;
index cf9f605..dbae178 100644 (file)
 #else
 #endif
 
-// 4:3
-#define SCREEN_WIDTH_ASPECT 640 
-#define SCREEN_HEIGHT_ASPECT 400
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-
 #if defined(_PC9801) || defined(_PC9801E)
 #define SUPPORT_CMT_IF
 #define SUPPORT_2HD_FDD_IF
 #define SUPPORT_VARIABLE_TIMING
 
 // device informations for win32
-
 #if defined(_PC98DO)
 #define USE_BOOT_MODE          5
 #define USE_DIPSWITCH
 #define USE_CRT_FILTER
 #define USE_SCREEN_ROTATE
 #define USE_ACCESS_LAMP
-#define USE_DISK_WRITE_PROTECT
 #define USE_SOUND_DEVICE_TYPE  4
 #define USE_DEBUGGER
 #define USE_STATE
@@ -299,7 +291,7 @@ protected:
        uint8 fd_bios_2dd[0x1000];
 #endif
        bool pit_clock_8mhz;
-       int cpu_type;
+
        // sound
        int sound_device_type;
        
@@ -370,13 +362,10 @@ public:
        bool tape_inserted();
 #endif
        bool now_skip();
-       void set_mix_cmt(bool flag);
-       void set_volume_cmt(uint32 volume);
        
        void update_config();
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
-
        
        // ----------------------------------------
        // for each device
index 9f69d2d..06d0376 100644 (file)
@@ -29,6 +29,7 @@ private:
 public:
        FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
        ~FLOPPY() {}
+       
        // common functions
        void reset();
        void write_io8(uint32 addr, uint32 data);
index 08085d3..76c5881 100644 (file)
@@ -315,7 +315,6 @@ bool VM::disk_inserted(int drv)
        return fdc->disk_inserted(drv);
 }
 
-
 void VM::set_disk_protected(int drv, bool value)
 {
        fdc->set_disk_protected(drv, value);
index cbae64b..ca0797a 100644 (file)
@@ -48,7 +48,7 @@
 #define USE_AUTO_KEY           5
 #define USE_AUTO_KEY_RELEASE   6
 #define USE_ACCESS_LAMP
-//#define USE_DEBUGGER
+#define USE_DEBUGGER
 #define USE_STATE
 
 #include "../../common.h"
@@ -155,6 +155,7 @@ public:
        void set_disk_protected(int drv, bool value);
        bool get_disk_protected(int drv);
        bool now_skip();
+       
        void update_config();
        void save_state(FILEIO* state_fio);
        bool load_state(FILEIO* state_fio);
index 6ff7898..792c5a3 100644 (file)
@@ -28,7 +28,7 @@
 #define USE_AUTO_KEY           6
 #define USE_AUTO_KEY_RELEASE   10
 #define USE_AUTO_KEY_NO_CAPS
-//#define USE_DEBUGGER
+#define USE_DEBUGGER
 #define USE_STATE
 
 #include "../../common.h"
index 417540b..0819f8c 100644 (file)
@@ -86,8 +86,10 @@ void DISPLAY::write_signal(int id, uint32 data, uint32 mask)
 void DISPLAY::draw_screen()
 {
        // draw screen
-       scrntype color_w = (mode & 2) ? RGB_COLOR(255, 255, 255) : 0;
-       scrntype color_b = (mode & 2) ? 0 : RGB_COLOR(255, 255, 255);
+//     scrntype color_w = (mode & 2) ? RGB_COLOR(255, 255, 255) : 0;
+//     scrntype color_b = (mode & 2) ? 0 : RGB_COLOR(255, 255, 255);
+       scrntype color_w = (mode & 2) ? RGB_COLOR(255, 255, 255) : RGB_COLOR(0, 0, 0);
+       scrntype color_b = (mode & 2) ? RGB_COLOR(0, 0, 0)  : RGB_COLOR(255, 255, 255);
        int code_ofs = (mode & 1) << 8;
        int ptr = 0;
        
index 1f16e14..0fecaec 100644 (file)
 #define MEMORY_ADDR_MAX                0x10000
 #define MEMORY_BANK_SIZE       0x200
 #define IO_ADDR_MAX            0x10000
-#define SCREEN_WIDTH_ASPECT SCREEN_WIDTH 
-#define SCREEN_HEIGHT_ASPECT SCREEN_HEIGHT
-#define WINDOW_WIDTH_ASPECT 256
-#define WINDOW_HEIGHT_ASPECT 192 
 
 // device informations for win32
 #define ONE_BOARD_MICRO_COMPUTER
index 64e1af5..895eed4 100644 (file)
@@ -147,11 +147,11 @@ void TMS9918A::write_signal(int id, uint32 data, uint32 mask)
 void TMS9918A::draw_screen()
 {
 #ifdef TMS9918A_SUPER_IMPOSE
-# ifndef _USE_QT // WILLFIX
-        if(now_super_impose) {
+//# ifndef _USE_QT // WILLFIX
+       if(now_super_impose) {
                emu->get_video_buffer();
        }
-# endif
+//# endif
 #endif
        // update screen buffer
 #if SCREEN_WIDTH == 512
index 95f3c1b..c2b93d4 100644 (file)
@@ -126,7 +126,6 @@ void UPD4991A::write_to_cur_time()
        register_event(this, 0, 1000000.0, true, &register_id);
 }
 
-
 #define STATE_VERSION  1
 
 void UPD4991A::save_state(FILEIO* state_fio)
index 06db1c7..868a26c 100644 (file)
@@ -43,9 +43,6 @@
 
 typedef        int     D7752_SAMPLE;
 typedef        int     D7752_FIXED;
-#if defined(_USE_AGAR) || defined(_USE_SDL) || defined(_USE_QT)
-typedef uint8_t byte;
-#endif
 
 #define        D7752_ERR_SUCCESS               (0)
 #define        D7752_ERR_PARAM                 (-1)
index 072b95f..348fdce 100644 (file)
@@ -2516,9 +2516,10 @@ void UPD7801::OP()
        case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7:
        case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: // jr
                PC -= 0x20 - (ope & 0x1f); break;
-       default: // NOP?
-               //__assume(0);
-               break;
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+       default:
+               __assume(0);
+#endif
        }
        PSW &= ~(F_L0 | F_L1);
 }
index b9c5dc0..26fba64 100644 (file)
@@ -56,11 +56,7 @@ static int latch2;
 //#define Z80_NMI 0x0066
 
 #define        MD_BPP 32
-#if defined(USE_QT) || defined(_USE_QT) // Using Shader
-# define md_maprgb15(R,G,B) RGB_COLOR((R << 3), (G << 3), (B << 3))
-#else
-# define md_maprgb15(R,G,B) (((R)<<19)|((G)<<11)|((B)<<3))
-#endif
+#define md_maprgb15(R,G,B) RGB_COLOR((R << 3), (G << 3), (B << 3))
 #define md_video_pixbytes(n) (n*32/8)
 #define md_refresh_sync() (TRUE)
 #define        md_video_defaultopt() (0)
index 51a29cd..6f0c46d 100644 (file)
 
 #define V99X8_NREG 48
 #define V99X8_NSTAT 10
-#ifndef TRUE
-# define TRUE 1
-#endif
-#ifndef FALSE
-# define FALSE 0
-#endif
 
 enum
 {
index 87dbcb0..c2f8abf 100644 (file)
 #include "fm7/fm7.h"
 #endif
 
-// FUJITSU FM-NEW7
-#ifdef _FMNEW7
+// FUJITSU FM-7
+#ifdef _FM7
 #include "fm7/fm7.h"
 #endif
 
-// FUJITSU FM-7
-#ifdef _FM7
+// FUJITSU FM-NEW7
+#ifdef _FMNEW7
 #include "fm7/fm7.h"
 #endif
 
 #include "fm7/fm7.h"
 #endif
 
-// FUJITSU FM77AV40SX
-#ifdef _FM77AV40SX
-#include "fm7/fm7.h"
-#endif
-
 // FUJITSU FM-77AV40SX
 #ifdef _FM77AV40SX
 #include "fm7/fm7.h"
 #endif
 
 // SHARP MZ-2200
-#ifdef _MZ2000
-#include "mz2500/mz80b.h"
-#endif
-
-// SHARP MZ-2200
 #ifdef _MZ2200
 #include "mz2500/mz80b.h"
 #endif
index dbed9d9..60a6cf4 100644 (file)
@@ -125,7 +125,6 @@ void IOBUS::write_port8(uint32 addr, uint32 data, bool is_dma, int* wait)
                hireso = (vt_total > 400);
        }
 #endif
-       //printf("IO WRITE:%04x %02x CPU_PC=%04x\n", addr, data & 0xff, d_cpu->get_pc());
        if(is_dma) {
                d_io->write_dma_io8(addr, data & 0xff);
        } else {
@@ -166,7 +165,6 @@ uint32 IOBUS::read_port8(uint32 addr, bool is_dma, int* wait)
                }
                vdisp = val;
        }
-       //printf("IO READ:%04x %02x CPU_PC=%04x\n", addr, val, d_cpu->get_pc());
        switch(addr & 0xff00) {
        case 0x1900:    // sub cpu
        case 0x1b00:    // psg
index 6d8e1a0..fa12369 100644 (file)
@@ -67,7 +67,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        first_device = last_device = NULL;
        dummy = new DEVICE(this, emu);  // must be 1st device
        event = new EVENT(this, emu);   // must be 2nd device
-
+       
        drec = new DATAREC(this, emu);
        crtc = new HD46505(this, emu);
        pio = new I8255(this, emu);
@@ -120,7 +120,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
                event->set_context_cpu(cpu_sub, 6000000);
                event->set_context_cpu(cpu_kbd, 6000000);
        }
-        if(sound_device_type >= 1) {
+       if(sound_device_type >= 1) {
                event->set_context_sound(opm1);
        }
        if(sound_device_type == 2) {
@@ -128,7 +128,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
        }
        event->set_context_sound(psg);
        event->set_context_sound(drec);
-   
+       
        drec->set_context_ear(pio, SIG_I8255_PORT_B, 0x02);
        crtc->set_context_vblank(display, SIG_DISPLAY_VBLANK, 1);
        crtc->set_context_vblank(pio, SIG_I8255_PORT_B, 0x80);
@@ -153,7 +153,7 @@ VM::VM(EMU* parent_emu) : emu(parent_emu)
 //     sio->set_rx_clock(0, 9600 * 16);        // clock is from Z-80CTC ch1 (2MHz/13)
 //     sio->set_tx_clock(1, 4800 * 16);        // 4800 baud for mouse
 //     sio->set_rx_clock(1, 4800 * 16);        // clock is from Z-80CTC ch2 (2MHz/26)
-   
+       
        if(sound_device_type >= 1) {
                ctc1->set_context_zc0(ctc1, SIG_Z80CTC_TRIG_3, 1);
 //             ctc1->set_constant_clock(1, CPU_CLOCKS >> 1);
@@ -587,7 +587,7 @@ bool VM::disk_inserted(int drv)
 {
        return fdc->disk_inserted(drv);
 }
+
 void VM::set_disk_protected(int drv, bool value)
 {
        fdc->set_disk_protected(drv, value);
index 02529a9..776dff7 100644 (file)
 #define PCE_CPU_CLOCKS         7159090
 #endif
 
-// 4:3
-#define SCREEN_WIDTH_ASPECT 640 
-#define SCREEN_HEIGHT_ASPECT 400
-#define WINDOW_WIDTH_ASPECT 640 
-#define WINDOW_HEIGHT_ASPECT 480
-
 // device informations for win32
 #define USE_SPECIAL_RESET
 #ifdef _X1TURBO_FEATURE
@@ -97,7 +91,6 @@
 #define FD_BASE_NUMBER         0
 #define USE_TAPE
 #define USE_TAPE_BUTTON
-#define USE_TAPE_PTR
 #ifdef _X1TWIN
 #define USE_CART1
 #endif
 #define USE_CRT_FILTER
 #define USE_SCANLINE
 #define USE_ACCESS_LAMP
-#define USE_DISK_WRITE_PROTECT
-#define USE_SOUND_DEVICE_TYPE  3
 #define USE_SOUND_DEVICE_TYPE          3
 // CZ-8BS1 x1
 #define SOUND_DEVICE_TYPE_DEFAULT      1
-//#define USE_DEBUGGER
+#define USE_DEBUGGER
 #define USE_STATE
 
 #include "../../common.h"
@@ -166,7 +157,7 @@ protected:
        
        // devices for x1
        EVENT* event;
-
+       
        DATAREC* drec;
        HD46505* crtc;
        I8255* pio;
index d68058e..1f83458 100644 (file)
@@ -616,7 +616,7 @@ bool YM2203::load_state(FILEIO* state_fio)
        clock_busy = state_fio->FgetUint32();
        timer_event_id = state_fio->FgetInt32();
        busy = state_fio->FgetBool();
-   
+
 #ifdef SUPPORT_MAME_FM_DLL
        // post process
        if(dllchip) {
index 225ddde..e80da44 100644 (file)
@@ -1965,7 +1965,7 @@ void Z80::initialize()
                uint8 *psub = SZHVC_sub;
                uint8 *psbc = SZHVC_sub + 256 * 256;
                
-       for(int oldval = 0; oldval < 256; oldval++) {
+               for(int oldval = 0; oldval < 256; oldval++) {
                        for(int newval = 0; newval < 256; newval++) {
                                /* add or adc w/o carry set */
                                int val = newval - oldval;
index 9e10b1c..19ee3de 100644 (file)
@@ -435,8 +435,6 @@ void Z80DMA::do_dma()
 restart:
 #endif
        while(enabled && now_ready() && !(upcount == blocklen || found)) {
-               uint32 data = 0;
-               int wait_r = 0, wait_w = 0;
                if(dma_stop) {
                        if(upcount < blocklen) {
                                upcount++;
@@ -449,6 +447,8 @@ restart:
                request_bus();
                
                // read
+               uint32 data = 0;
+               int wait_r = 0, wait_w = 0;
                
                if(PORTA_IS_SOURCE) {
                        if(PORTA_MEMORY) {
index ffab5fc..6962793 100644 (file)
@@ -13,7 +13,6 @@
 #define EVENT_SEND     2
 #define EVENT_RECV     4
 
-
 //#define SIO_DEBUG
 
 #define MONOSYNC(ch)   ((port[ch].wr[4] & 0x3c) == 0x00)
@@ -225,6 +224,7 @@ void Z80SIO::write_io8(uint32 addr, uint32 data)
                                }
                                break;
                        case 0x18:
+                               // channel reset
                                CANCEL_SEND_EVENT(ch);
                                CANCEL_RECV_EVENT(ch);
                                port[ch].nextrecv_intr = false;