Skip to content

Development

Samir Sinha edited this page Feb 10, 2023 · 5 revisions

Architecture

Emulator Hosts

Emulator Ports

In most cases the emulator libraries (clemens_65816 and others) require little to no changes between platforms. These libraries were written in 'C' with minimal cross-platform libraries that are contained in the external/ directory. Most of the necessary changes between platforms were related to issues between MSVC, GCC and Clang warning tolerance.

The Clemens IIGS emulator application clemens_iigs was built with some cross-platform libraries via source. These libraries are in host/ext. For the most part they support Windows, Linux, macOS and iOS.

Officially the Clemens IIGS Emulator supports Windows (10, 11) and 64-bit Linux. MacOS is in the works.

Below are steps required to port the Clemens IIGS host application.

Steps

clem_host_platform.h

clem_display.cpp

Note the below section. If the platform requires a new rendering backend, add the appropriate definition and library references in the CMakeLists.txt section below.

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    target_compile_definitions(clemens_iigs PRIVATE CK3D_BACKEND_D3D11)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    target_compile_definitions(clemens_iigs PRIVATE CK3D_BACKEND_GL)
    target_link_libraries(clemens_iigs PRIVATE asound X11 Xi Xcursor GL dl pthread uuid)
else()
    target_compile_definitions(clemens_iigs PRIVATE CK3D_BACKEND_GL)
endif()
Clone this wiki locally