From: K.Ohta Date: Sun, 20 Dec 2015 15:01:30 +0000 (+0900) Subject: [General][CMAKE] Integrate all devices to upstream 2015-12-17. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=09a5cb5697856ae8a2f78d741b0e42732c077a50;p=csp-qt%2Fcommon_source_project-fm7.git [General][CMAKE] Integrate all devices to upstream 2015-12-17. [BUILD][CMAKE] Enable to build: FM-7/77/AV series, BABBAGE2nd, tk80bs and X1 series. --- diff --git a/source/build-cmake/babbage2nd/CMakeLists.txt b/source/build-cmake/babbage2nd/CMakeLists.txt index 70af731d9..08df1bcca 100644 --- a/source/build-cmake/babbage2nd/CMakeLists.txt +++ b/source/build-cmake/babbage2nd/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/cmake/config_commonsource.cmake b/source/build-cmake/cmake/config_commonsource.cmake index f327ace20..cc96e62fb 100644 --- a/source/build-cmake/cmake/config_commonsource.cmake +++ b/source/build-cmake/cmake/config_commonsource.cmake @@ -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 diff --git a/source/build-cmake/cmake/config_x1.cmake b/source/build-cmake/cmake/config_x1.cmake index 4a672b077..428a75786 100644 --- a/source/build-cmake/cmake/config_x1.cmake +++ b/source/build-cmake/cmake/config_x1.cmake @@ -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() + diff --git a/source/build-cmake/fm77/CMakeLists.txt b/source/build-cmake/fm77/CMakeLists.txt index f699c6af0..821de46f9 100644 --- a/source/build-cmake/fm77/CMakeLists.txt +++ b/source/build-cmake/fm77/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/fm77av/CMakeLists.txt b/source/build-cmake/fm77av/CMakeLists.txt index 65ece589a..c8ff02915 100644 --- a/source/build-cmake/fm77av/CMakeLists.txt +++ b/source/build-cmake/fm77av/CMakeLists.txt @@ -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) - diff --git a/source/build-cmake/fm77av40/CMakeLists.txt b/source/build-cmake/fm77av40/CMakeLists.txt index 385c16582..f5581b6fd 100644 --- a/source/build-cmake/fm77av40/CMakeLists.txt +++ b/source/build-cmake/fm77av40/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/tk80bs/CMakeLists.txt b/source/build-cmake/tk80bs/CMakeLists.txt index 480fb692b..6628a96eb 100644 --- a/source/build-cmake/tk80bs/CMakeLists.txt +++ b/source/build-cmake/tk80bs/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/x1/CMakeLists.txt b/source/build-cmake/x1/CMakeLists.txt index fbde83a10..611249590 100644 --- a/source/build-cmake/x1/CMakeLists.txt +++ b/source/build-cmake/x1/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/x1turbo/CMakeLists.txt b/source/build-cmake/x1turbo/CMakeLists.txt index 369a13aba..192c1c2a5 100644 --- a/source/build-cmake/x1turbo/CMakeLists.txt +++ b/source/build-cmake/x1turbo/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/x1turboz/CMakeLists.txt b/source/build-cmake/x1turboz/CMakeLists.txt index 47c570308..c398fdbaa 100644 --- a/source/build-cmake/x1turboz/CMakeLists.txt +++ b/source/build-cmake/x1turboz/CMakeLists.txt @@ -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) diff --git a/source/build-cmake/x1twin/CMakeLists.txt b/source/build-cmake/x1twin/CMakeLists.txt index 7da29441a..1cb429db5 100644 --- a/source/build-cmake/x1twin/CMakeLists.txt +++ b/source/build-cmake/x1twin/CMakeLists.txt @@ -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) diff --git a/source/src/qt/common/qt_gldraw.cpp b/source/src/qt/common/qt_gldraw.cpp index 79365c782..ec659f647 100644 --- a/source/src/qt/common/qt_gldraw.cpp +++ b/source/src/qt/common/qt_gldraw.cpp @@ -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); diff --git a/source/src/qt/common/qt_glutil.cpp b/source/src/qt/common/qt_glutil.cpp index d11cb29bb..974272842 100644 --- a/source/src/qt/common/qt_glutil.cpp +++ b/source/src/qt/common/qt_glutil.cpp @@ -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); diff --git a/source/src/qt/machines/x1turboz/CMakeLists.txt b/source/src/qt/machines/x1/CMakeLists.txt similarity index 92% rename from source/src/qt/machines/x1turboz/CMakeLists.txt rename to source/src/qt/machines/x1/CMakeLists.txt index 53a5e2935..3a2603d89 100644 --- a/source/src/qt/machines/x1turboz/CMakeLists.txt +++ b/source/src/qt/machines/x1/CMakeLists.txt @@ -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} ) diff --git a/source/src/qt/machines/x1turboz/MainWindow.cpp b/source/src/qt/machines/x1/MainWindow.cpp similarity index 100% rename from source/src/qt/machines/x1turboz/MainWindow.cpp rename to source/src/qt/machines/x1/MainWindow.cpp diff --git a/source/src/qt/machines/x1turboz/menuclasses.h b/source/src/qt/machines/x1/menuclasses.h similarity index 100% rename from source/src/qt/machines/x1turboz/menuclasses.h rename to source/src/qt/machines/x1/menuclasses.h diff --git a/source/src/qt/osd_console.cpp b/source/src/qt/osd_console.cpp index 36ea8102d..1a896aa93 100644 --- a/source/src/qt/osd_console.cpp +++ b/source/src/qt/osd_console.cpp @@ -90,5 +90,7 @@ void OSD::do_close_debugger_console() void OSD::do_close_debugger_thread() { +#if defined(USE_DEBUGGER) emu->close_debugger(); +#endif } diff --git a/source/src/vm/fm7/sound.cpp b/source/src/vm/fm7/sound.cpp index 9aa6f7514..bbd3b851c 100644 --- a/source/src/vm/fm7/sound.cpp +++ b/source/src/vm/fm7/sound.cpp @@ -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; diff --git a/source/src/vm/fmgen/psg.cpp b/source/src/vm/fmgen/psg.cpp index a71741340..cf30cf12c 100644 --- a/source/src/vm/fmgen/psg.cpp +++ b/source/src/vm/fmgen/psg.cpp @@ -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]; diff --git a/source/src/vm/gamegear/gamegear.h b/source/src/vm/gamegear/gamegear.h index 62091300f..da7a49974 100644 --- a/source/src/vm/gamegear/gamegear.h +++ b/source/src/vm/gamegear/gamegear.h @@ -22,11 +22,6 @@ #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 diff --git a/source/src/vm/gamegear/mastersystem.h b/source/src/vm/gamegear/mastersystem.h index 168321dff..841c94ad4 100644 --- a/source/src/vm/gamegear/mastersystem.h +++ b/source/src/vm/gamegear/mastersystem.h @@ -22,10 +22,6 @@ #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 diff --git a/source/src/vm/hc20/hc20.cpp b/source/src/vm/hc20/hc20.cpp index f213dba8f..f9643ed8f 100644 --- a/source/src/vm/hc20/hc20.cpp +++ b/source/src/vm/hc20/hc20.cpp @@ -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(); diff --git a/source/src/vm/hc20/hc20.h b/source/src/vm/hc20/hc20.h index 907a9ae77..7d881aa51 100644 --- a/source/src/vm/hc20/hc20.h +++ b/source/src/vm/hc20/hc20.h @@ -127,7 +127,6 @@ public: void rec_tape(const _TCHAR* file_path); void close_tape(); bool tape_inserted(); - bool now_skip(); void update_config(); diff --git a/source/src/vm/hc20/memory.cpp b/source/src/vm/hc20/memory.cpp index 75b8611e5..d57850365 100644 --- a/source/src/vm/hc20/memory.cpp +++ b/source/src/vm/hc20/memory.cpp @@ -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(); diff --git a/source/src/vm/hd46505.cpp b/source/src/vm/hd46505.cpp index 7d55b445b..5ec86180a 100644 --- a/source/src/vm/hd46505.cpp +++ b/source/src/vm/hd46505.cpp @@ -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); diff --git a/source/src/vm/huc6280.cpp b/source/src/vm/huc6280.cpp index 380081ffa..482ac9dfe 100644 --- a/source/src/vm/huc6280.cpp +++ b/source/src/vm/huc6280.cpp @@ -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; diff --git a/source/src/vm/i286.cpp b/source/src/vm/i286.cpp index 90affe61e..282fa4513 100644 --- a/source/src/vm/i286.cpp +++ b/source/src/vm/i286.cpp @@ -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; diff --git a/source/src/vm/i386.cpp b/source/src/vm/i386.cpp index 52d626e6e..e61e804f7 100644 --- a/source/src/vm/i386.cpp +++ b/source/src/vm/i386.cpp @@ -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; } - diff --git a/source/src/vm/i386.h b/source/src/vm/i386.h index 35d277f2d..1b19a1882 100644 --- a/source/src/vm/i386.h +++ b/source/src/vm/i386.h @@ -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) { diff --git a/source/src/vm/i8080.cpp b/source/src/vm/i8080.cpp index 9127d237f..7a5598758 100644 --- a/source/src/vm/i8080.cpp +++ b/source/src/vm/i8080.cpp @@ -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) diff --git a/source/src/vm/i8080.h b/source/src/vm/i8080.h index ebf9f57fb..88d0d685f 100644 --- a/source/src/vm/i8080.h +++ b/source/src/vm/i8080.h @@ -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) { diff --git a/source/src/vm/i86.cpp b/source/src/vm/i86.cpp index 9c5833fb6..29cfe593e 100644 --- a/source/src/vm/i86.cpp +++ b/source/src/vm/i86.cpp @@ -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 } } diff --git a/source/src/vm/i86.h b/source/src/vm/i86.h index 947234246..7ac6b68fd 100644 --- a/source/src/vm/i86.h +++ b/source/src/vm/i86.h @@ -15,13 +15,6 @@ #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 --------------------------------------------------------------------------- */ diff --git a/source/src/vm/io.h b/source/src/vm/io.h index 7141c5fec..8b361520e 100644 --- a/source/src/vm/io.h +++ b/source/src/vm/io.h @@ -58,7 +58,7 @@ public: } #ifdef _IO_DEBUG_LOG cpu_index = 0; -#endif +#endif } ~IO() {} diff --git a/source/src/vm/j3100/j3100.cpp b/source/src/vm/j3100/j3100.cpp index 4bfa750ff..3fb971d9b 100644 --- a/source/src/vm/j3100/j3100.cpp +++ b/source/src/vm/j3100/j3100.cpp @@ -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 // ---------------------------------------------------------------------------- diff --git a/source/src/vm/j3100/j3100.h b/source/src/vm/j3100/j3100.h index 5a8ffc225..5351caa08 100644 --- a/source/src/vm/j3100/j3100.h +++ b/source/src/vm/j3100/j3100.h @@ -159,7 +159,6 @@ public: bool now_skip(); void update_config(); - void register_frame_event(DEVICE* dev); // ---------------------------------------- // for each device diff --git a/source/src/vm/j3100/keyboard.cpp b/source/src/vm/j3100/keyboard.cpp index 824586a83..e5a076ed4 100644 --- a/source/src/vm/j3100/keyboard.cpp +++ b/source/src/vm/j3100/keyboard.cpp @@ -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) diff --git a/source/src/vm/j3100/keyboard.h b/source/src/vm/j3100/keyboard.h index 21e9f43c2..02ce784e0 100644 --- a/source/src/vm/j3100/keyboard.h +++ b/source/src/vm/j3100/keyboard.h @@ -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) diff --git a/source/src/vm/j3100/system.h b/source/src/vm/j3100/system.h index c00d01ab1..aff5e3f8d 100644 --- a/source/src/vm/j3100/system.h +++ b/source/src/vm/j3100/system.h @@ -14,7 +14,7 @@ #include "../../emu.h" #include "../device.h" -#define SIG_SYSTEM_TC2O 0 +#define SIG_SYSTEM_TC2O 0 class SYSTEM : public DEVICE { diff --git a/source/src/vm/jr100/jr100.cpp b/source/src/vm/jr100/jr100.cpp index 9eaf44b7f..e3f618352 100644 --- a/source/src/vm/jr100/jr100.cpp +++ b/source/src/vm/jr100/jr100.cpp @@ -236,7 +236,6 @@ void VM::push_fast_rewind() drec->set_remote(true); } - bool VM::now_skip() { return event->now_skip(); diff --git a/source/src/vm/jx/display.cpp b/source/src/vm/jx/display.cpp index d5f81434f..c3881d330 100644 --- a/source/src/vm/jx/display.cpp +++ b/source/src/vm/jx/display.cpp @@ -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) { diff --git a/source/src/vm/ld700.cpp b/source/src/vm/ld700.cpp index 4cdf0c2fe..999f6eb85 100644 --- a/source/src/vm/ld700.cpp +++ b/source/src/vm/ld700.cpp @@ -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; } } } diff --git a/source/src/vm/m6502.h b/source/src/vm/m6502.h index 4826f329e..7e6e0329e 100644 --- a/source/src/vm/m6502.h +++ b/source/src/vm/m6502.h @@ -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) { diff --git a/source/src/vm/mame/emu/cpu/i386/i386priv.h b/source/src/vm/mame/emu/cpu/i386/i386priv.h index 50d830dd6..06b13e156 100644 --- a/source/src/vm/mame/emu/cpu/i386/i386priv.h +++ b/source/src/vm/mame/emu/cpu/i386/i386priv.h @@ -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 }; diff --git a/source/src/vm/mame/emu/cpu/i86/i286.c b/source/src/vm/mame/emu/cpu/i86/i286.c index fd6825ad7..5aedcf762 100644 --- a/source/src/vm/mame/emu/cpu/i86/i286.c +++ b/source/src/vm/mame/emu/cpu/i86/i286.c @@ -22,7 +22,6 @@ #include "i86time.c" - /***************************************************************************/ /* cpu state */ /***************************************************************************/ diff --git a/source/src/vm/mame/emu/cpu/vtlb.c b/source/src/vm/mame/emu/cpu/vtlb.c index c19cedeba..de661d79b 100644 --- a/source/src/vm/mame/emu/cpu/vtlb.c +++ b/source/src/vm/mame/emu/cpu/vtlb.c @@ -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) { diff --git a/source/src/vm/mame/emu/cpu/vtlb.h b/source/src/vm/mame/emu/cpu/vtlb.h index e661940f5..5ab0ab734 100644 --- a/source/src/vm/mame/emu/cpu/vtlb.h +++ b/source/src/vm/mame/emu/cpu/vtlb.h @@ -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__ */ diff --git a/source/src/vm/mb8877.cpp b/source/src/vm/mb8877.cpp index 565e67dbe..33d50986b 100644 --- a/source/src/vm/mb8877.cpp +++ b/source/src/vm/mb8877.cpp @@ -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; diff --git a/source/src/vm/mb8877.h b/source/src/vm/mb8877.h index 3e0b603df..79a7b2b29 100644 --- a/source/src/vm/mb8877.h +++ b/source/src/vm/mb8877.h @@ -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]; diff --git a/source/src/vm/mc6800.cpp b/source/src/vm/mc6800.cpp index 8fe4136c4..88a7141e3 100644 --- a/source/src/vm/mc6800.cpp +++ b/source/src/vm/mc6800.cpp @@ -4092,7 +4092,6 @@ void MC6800::stx_ex() WM16(EAD, &pX); } - #define STATE_VERSION 1 void MC6800::save_state(FILEIO* state_fio) diff --git a/source/src/vm/mc6809.cpp b/source/src/vm/mc6809.cpp index 02c862e7c..7e780c1cf 100644 --- a/source/src/vm/mc6809.cpp +++ b/source/src/vm/mc6809.cpp @@ -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 diff --git a/source/src/vm/mc6820.cpp b/source/src/vm/mc6820.cpp index bfacafe95..a496ef210 100644 --- a/source/src/vm/mc6820.cpp +++ b/source/src/vm/mc6820.cpp @@ -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; } diff --git a/source/src/vm/mcs48.h b/source/src/vm/mcs48.h index 5347c0982..5a6529842 100644 --- a/source/src/vm/mcs48.h +++ b/source/src/vm/mcs48.h @@ -23,13 +23,6 @@ #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 diff --git a/source/src/vm/msx/memory.cpp b/source/src/vm/msx/memory.cpp index 29ae685a1..4a324439e 100644 --- a/source/src/vm/msx/memory.cpp +++ b/source/src/vm/msx/memory.cpp @@ -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 }, diff --git a/source/src/vm/msx/msx.cpp b/source/src/vm/msx/msx.cpp index e5616ca26..ad149c456 100644 --- a/source/src/vm/msx/msx.cpp +++ b/source/src/vm/msx/msx.cpp @@ -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() diff --git a/source/src/vm/msx/msx.h b/source/src/vm/msx/msx.h index c3e621db0..1a197b2e0 100644 --- a/source/src/vm/msx/msx.h +++ b/source/src/vm/msx/msx.h @@ -50,16 +50,11 @@ // 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(); diff --git a/source/src/vm/multi8/cmt.h b/source/src/vm/multi8/cmt.h index 7ac8cd0fa..38e085382 100644 --- a/source/src/vm/multi8/cmt.h +++ b/source/src/vm/multi8/cmt.h @@ -20,7 +20,6 @@ // max 256kbytes #define BUFFER_SIZE 0x40000 - class CMT : public DEVICE { private: diff --git a/source/src/vm/mycomz80a/display.cpp b/source/src/vm/mycomz80a/display.cpp index cfe911539..d143a8676 100644 --- a/source/src/vm/mycomz80a/display.cpp +++ b/source/src/vm/mycomz80a/display.cpp @@ -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) diff --git a/source/src/vm/mycomz80a/display.h b/source/src/vm/mycomz80a/display.h index 57a519558..acb3486a9 100644 --- a/source/src/vm/mycomz80a/display.h +++ b/source/src/vm/mycomz80a/display.h @@ -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); diff --git a/source/src/vm/mz2500/mz2500.h b/source/src/vm/mz2500/mz2500.h index dca4e2ac6..f5e57b89f 100644 --- a/source/src/vm/mz2500/mz2500.h +++ b/source/src/vm/mz2500/mz2500.h @@ -28,11 +28,6 @@ //#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 diff --git a/source/src/vm/mz2500/mz80b.h b/source/src/vm/mz2500/mz80b.h index 25065530b..e04a369b7 100644 --- a/source/src/vm/mz2500/mz80b.h +++ b/source/src/vm/mz2500/mz80b.h @@ -42,11 +42,6 @@ #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 // ---------------------------------------- diff --git a/source/src/vm/mz2800/mz2800.cpp b/source/src/vm/mz2800/mz2800.cpp index 4f6dea647..312e84bbc 100644 --- a/source/src/vm/mz2800/mz2800.cpp +++ b/source/src/vm/mz2800/mz2800.cpp @@ -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); diff --git a/source/src/vm/mz700/mz700.cpp b/source/src/vm/mz700/mz700.cpp index 70dff0b21..0af8890f6 100644 --- a/source/src/vm/mz700/mz700.cpp +++ b/source/src/vm/mz700/mz700.cpp @@ -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() diff --git a/source/src/vm/mz700/mz700.h b/source/src/vm/mz700/mz700.h index 4d15812af..1203f3292 100644 --- a/source/src/vm/mz700/mz700.h +++ b/source/src/vm/mz700/mz700.h @@ -45,10 +45,6 @@ #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 diff --git a/source/src/vm/mz80k/mz80k.cpp b/source/src/vm/mz80k/mz80k.cpp index caaff6e7c..aefbdb834 100644 --- a/source/src/vm/mz80k/mz80k.cpp +++ b/source/src/vm/mz80k/mz80k.cpp @@ -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(); diff --git a/source/src/vm/mz80k/mz80k.h b/source/src/vm/mz80k/mz80k.h index 5386d9f15..7161b708e 100644 --- a/source/src/vm/mz80k/mz80k.h +++ b/source/src/vm/mz80k/mz80k.h @@ -46,14 +46,9 @@ #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(); diff --git a/source/src/vm/pc6001/floppy.h b/source/src/vm/pc6001/floppy.h index 0fc00f73d..4bd3799f4 100644 --- a/source/src/vm/pc6001/floppy.h +++ b/source/src/vm/pc6001/floppy.h @@ -22,10 +22,6 @@ #include "../../emu.h" #include "../device.h" -#if defined(_USE_QT) || defined(_USE_AGAR) -typedef uint8_t byte; -#endif - class DISK; class FLOPPY : public DEVICE diff --git a/source/src/vm/pc6001/memory.cpp b/source/src/vm/pc6001/memory.cpp index 588930bf7..f12f4c620 100644 --- a/source/src/vm/pc6001/memory.cpp +++ b/source/src/vm/pc6001/memory.cpp @@ -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 diff --git a/source/src/vm/pc6001/memory.h b/source/src/vm/pc6001/memory.h index da73f468f..dc5e96cbd 100644 --- a/source/src/vm/pc6001/memory.h +++ b/source/src/vm/pc6001/memory.h @@ -24,10 +24,6 @@ #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; diff --git a/source/src/vm/pc6001/pc6001.cpp b/source/src/vm/pc6001/pc6001.cpp index e7e4be2e3..6a17bce04 100644 --- a/source/src/vm/pc6001/pc6001.cpp +++ b/source/src/vm/pc6001/pc6001.cpp @@ -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); diff --git a/source/src/vm/pc6001/pc6001.h b/source/src/vm/pc6001/pc6001.h index 718ad68fb..1381ab8fb 100644 --- a/source/src/vm/pc6001/pc6001.h +++ b/source/src/vm/pc6001/pc6001.h @@ -55,11 +55,6 @@ #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 diff --git a/source/src/vm/pc6001/psub.h b/source/src/vm/pc6001/psub.h index 246b1dc9c..5fe2bb6d9 100644 --- a/source/src/vm/pc6001/psub.h +++ b/source/src/vm/pc6001/psub.h @@ -20,10 +20,6 @@ class FILEIO; -#if defined(_USE_QT) || defined(_USE_AGAR) -typedef uint8 byte; -#endif - class PSUB : public DEVICE { private: diff --git a/source/src/vm/pc6001/sub.cpp b/source/src/vm/pc6001/sub.cpp index e9a987bba..c0b251e20 100644 --- a/source/src/vm/pc6001/sub.cpp +++ b/source/src/vm/pc6001/sub.cpp @@ -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(); diff --git a/source/src/vm/pc8801/pc88.cpp b/source/src/vm/pc8801/pc88.cpp index 32e8da648..92da57dcc 100644 --- a/source/src/vm/pc8801/pc88.cpp +++ b/source/src/vm/pc8801/pc88.cpp @@ -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) diff --git a/source/src/vm/pc8801/pc88.h b/source/src/vm/pc8801/pc88.h index 123314e34..33e14dce6 100644 --- a/source/src/vm/pc8801/pc88.h +++ b/source/src/vm/pc8801/pc88.h @@ -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() diff --git a/source/src/vm/pc8801/pc8801.cpp b/source/src/vm/pc8801/pc8801.cpp index d14b1f0d4..ac460fb17 100644 --- a/source/src/vm/pc8801/pc8801.cpp +++ b/source/src/vm/pc8801/pc8801.cpp @@ -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 diff --git a/source/src/vm/pc8801/pc8801.h b/source/src/vm/pc8801/pc8801.h index ae0fb0a1a..9a7125ca8 100644 --- a/source/src/vm/pc8801/pc8801.h +++ b/source/src/vm/pc8801/pc8801.h @@ -33,17 +33,14 @@ #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 @@ -62,12 +59,6 @@ #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 @@ -101,24 +92,17 @@ #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 diff --git a/source/src/vm/pc9801/cmt.cpp b/source/src/vm/pc9801/cmt.cpp index 5be78a0f1..3310cced9 100644 --- a/source/src/vm/pc9801/cmt.cpp +++ b/source/src/vm/pc9801/cmt.cpp @@ -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) diff --git a/source/src/vm/pc9801/cmt.h b/source/src/vm/pc9801/cmt.h index 4e912f353..61a24324f 100644 --- a/source/src/vm/pc9801/cmt.h +++ b/source/src/vm/pc9801/cmt.h @@ -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); diff --git a/source/src/vm/pc9801/floppy.cpp b/source/src/vm/pc9801/floppy.cpp index 6ec3ebad9..9d2abb089 100644 --- a/source/src/vm/pc9801/floppy.cpp +++ b/source/src/vm/pc9801/floppy.cpp @@ -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) diff --git a/source/src/vm/pc9801/floppy.h b/source/src/vm/pc9801/floppy.h index db13a37f4..c6cfa47f8 100644 --- a/source/src/vm/pc9801/floppy.h +++ b/source/src/vm/pc9801/floppy.h @@ -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) diff --git a/source/src/vm/pc9801/pc9801.cpp b/source/src/vm/pc9801/pc9801.cpp index cc89afc4c..ed107a0bd 100644 --- a/source/src/vm/pc9801/pc9801.cpp +++ b/source/src/vm/pc9801/pc9801.cpp @@ -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; diff --git a/source/src/vm/pc9801/pc9801.h b/source/src/vm/pc9801/pc9801.h index cf9f6054d..dbae178e0 100644 --- a/source/src/vm/pc9801/pc9801.h +++ b/source/src/vm/pc9801/pc9801.h @@ -33,12 +33,6 @@ #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 @@ -112,7 +106,6 @@ #define SUPPORT_VARIABLE_TIMING // device informations for win32 - #if defined(_PC98DO) #define USE_BOOT_MODE 5 #define USE_DIPSWITCH @@ -154,7 +147,6 @@ #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 diff --git a/source/src/vm/pc98ha/floppy.h b/source/src/vm/pc98ha/floppy.h index 9f69d2df6..06d0376e3 100644 --- a/source/src/vm/pc98ha/floppy.h +++ b/source/src/vm/pc98ha/floppy.h @@ -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); diff --git a/source/src/vm/pc98ha/pc98ha.cpp b/source/src/vm/pc98ha/pc98ha.cpp index 08085d39c..76c588146 100644 --- a/source/src/vm/pc98ha/pc98ha.cpp +++ b/source/src/vm/pc98ha/pc98ha.cpp @@ -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); diff --git a/source/src/vm/pc98ha/pc98ha.h b/source/src/vm/pc98ha/pc98ha.h index cbae64b12..ca0797ad7 100644 --- a/source/src/vm/pc98ha/pc98ha.h +++ b/source/src/vm/pc98ha/pc98ha.h @@ -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); diff --git a/source/src/vm/phc20/phc20.h b/source/src/vm/phc20/phc20.h index 6ff78981e..792c5a337 100644 --- a/source/src/vm/phc20/phc20.h +++ b/source/src/vm/phc20/phc20.h @@ -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" diff --git a/source/src/vm/tk80bs/display.cpp b/source/src/vm/tk80bs/display.cpp index 417540b45..0819f8c97 100644 --- a/source/src/vm/tk80bs/display.cpp +++ b/source/src/vm/tk80bs/display.cpp @@ -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; diff --git a/source/src/vm/tk80bs/tk80bs.h b/source/src/vm/tk80bs/tk80bs.h index 1f16e14de..0fecaec34 100644 --- a/source/src/vm/tk80bs/tk80bs.h +++ b/source/src/vm/tk80bs/tk80bs.h @@ -24,10 +24,6 @@ #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 diff --git a/source/src/vm/tms9918a.cpp b/source/src/vm/tms9918a.cpp index 64e1af5b4..895eed48c 100644 --- a/source/src/vm/tms9918a.cpp +++ b/source/src/vm/tms9918a.cpp @@ -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 diff --git a/source/src/vm/upd4991a.cpp b/source/src/vm/upd4991a.cpp index 95f3c1b9a..c2b93d4bd 100644 --- a/source/src/vm/upd4991a.cpp +++ b/source/src/vm/upd4991a.cpp @@ -126,7 +126,6 @@ void UPD4991A::write_to_cur_time() register_event(this, 0, 1000000.0, true, ®ister_id); } - #define STATE_VERSION 1 void UPD4991A::save_state(FILEIO* state_fio) diff --git a/source/src/vm/upd7752.h b/source/src/vm/upd7752.h index 06db1c785..868a26ca3 100644 --- a/source/src/vm/upd7752.h +++ b/source/src/vm/upd7752.h @@ -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) diff --git a/source/src/vm/upd7801.cpp b/source/src/vm/upd7801.cpp index 072b95ffd..348fdcedc 100644 --- a/source/src/vm/upd7801.cpp +++ b/source/src/vm/upd7801.cpp @@ -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); } diff --git a/source/src/vm/v99x8.cpp b/source/src/vm/v99x8.cpp index b9c5dc043..26fba6447 100644 --- a/source/src/vm/v99x8.cpp +++ b/source/src/vm/v99x8.cpp @@ -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) diff --git a/source/src/vm/v99x8.h b/source/src/vm/v99x8.h index 51a29cdde..6f0c46d8e 100644 --- a/source/src/vm/v99x8.h +++ b/source/src/vm/v99x8.h @@ -17,12 +17,6 @@ #define V99X8_NREG 48 #define V99X8_NSTAT 10 -#ifndef TRUE -# define TRUE 1 -#endif -#ifndef FALSE -# define FALSE 0 -#endif enum { diff --git a/source/src/vm/vm.h b/source/src/vm/vm.h index 87dbcb0e2..c2f8abf76 100644 --- a/source/src/vm/vm.h +++ b/source/src/vm/vm.h @@ -36,13 +36,13 @@ #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 @@ -86,11 +86,6 @@ #include "fm7/fm7.h" #endif -// FUJITSU FM77AV40SX -#ifdef _FM77AV40SX -#include "fm7/fm7.h" -#endif - // FUJITSU FM-77AV40SX #ifdef _FM77AV40SX #include "fm7/fm7.h" @@ -237,11 +232,6 @@ #endif // SHARP MZ-2200 -#ifdef _MZ2000 -#include "mz2500/mz80b.h" -#endif - -// SHARP MZ-2200 #ifdef _MZ2200 #include "mz2500/mz80b.h" #endif diff --git a/source/src/vm/x1/iobus.cpp b/source/src/vm/x1/iobus.cpp index dbed9d91f..60a6cf46d 100644 --- a/source/src/vm/x1/iobus.cpp +++ b/source/src/vm/x1/iobus.cpp @@ -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 diff --git a/source/src/vm/x1/x1.cpp b/source/src/vm/x1/x1.cpp index 6d8e1a054..fa123696a 100644 --- a/source/src/vm/x1/x1.cpp +++ b/source/src/vm/x1/x1.cpp @@ -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); diff --git a/source/src/vm/x1/x1.h b/source/src/vm/x1/x1.h index 02529a9b5..776dff7b2 100644 --- a/source/src/vm/x1/x1.h +++ b/source/src/vm/x1/x1.h @@ -78,12 +78,6 @@ #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 @@ -110,12 +103,10 @@ #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; diff --git a/source/src/vm/ym2203.cpp b/source/src/vm/ym2203.cpp index d68058ea5..1f8345830 100644 --- a/source/src/vm/ym2203.cpp +++ b/source/src/vm/ym2203.cpp @@ -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) { diff --git a/source/src/vm/z80.cpp b/source/src/vm/z80.cpp index 225dddee6..e80da4443 100644 --- a/source/src/vm/z80.cpp +++ b/source/src/vm/z80.cpp @@ -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; diff --git a/source/src/vm/z80dma.cpp b/source/src/vm/z80dma.cpp index 9e10b1c3a..19ee3de49 100644 --- a/source/src/vm/z80dma.cpp +++ b/source/src/vm/z80dma.cpp @@ -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) { diff --git a/source/src/vm/z80sio.cpp b/source/src/vm/z80sio.cpp index ffab5fc90..696279382 100644 --- a/source/src/vm/z80sio.cpp +++ b/source/src/vm/z80sio.cpp @@ -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;