Skip to content

Commit

Permalink
Start on library/research functionality, introducing db usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Dec 22, 2024
1 parent c20e1a9 commit 09c1ee6
Show file tree
Hide file tree
Showing 49 changed files with 312,526 additions and 386 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
bit operands limit usability quite a bit)
- New non-CHIP-8 mode: COSMAC VIP now supports running native VIP programs
- Memory panel now has a checkbox to detach it from auto-following the `I` register
- Support for more fonts in generic CHIP-8 variants
- [Desktop only] Library/Research screen and database integration allows for easier research on existing roms
and interpreters, all information about programs, and even the binaries themselves are now kept
in a local SQLite3 file in the configuration directory (<10MB for all known programs combined)

### Changed

Expand Down Expand Up @@ -49,6 +53,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Due to an change in the gui library the toggle buttons in the find bar of the editor didn't work
- Loading of Octo source that didn't compile without error was not possible
- MegaChip audio suppressed the last sample of a non looping sound
- SUPER-CHIP v1.1 collision handling was broken
- Syzygy was wrongly classified as CHIP-8, it's author declares it as CHIP-48 and it is working
with CHIP-48 or SCHIP, switched to CHIP-48 (thanks to `@juan_tigre` for the find).

## [1.1.8] - 2024-01-01

Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.0...3.21)

project(cadmium VERSION 1.9.90 LANGUAGES C CXX)
cmake_policy(VERSION 3.16)
cmake_policy(VERSION 3.21)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()

set(CMAKE_SKIP_INSTALL_RULES YES)

include(cmake/BuildSettings.cmake)
include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake)
Expand Down
63 changes: 40 additions & 23 deletions cmake/BuildSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@ if(EMSCRIPTEN)
add_compile_options(-fexceptions)
add_compile_definitions(WEB_WITH_FETCHING)
add_link_options(-fexceptions)
set(DATABASE_DEFAULT OFF)
else()
set(PLATFORM "Desktop")
if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -static" CACHE STRING "Linker Flags for MinGW Builds" FORCE)
endif()
set(DATABASE_DEFAULT ON)
endif()

option(CADMIUM_WITH_DATABASE "Compile Cadmium with a database functionality, this links sqlite into Cadmium" ${DATABASE_DEFAULT})

include(CheckIncludeFile)
check_include_file(bcm_host.h HAS_BCMHOST)
if(HAS_BCMHOST AND NOT GRAPHICS)
Expand All @@ -72,6 +76,7 @@ option(WEB_WITH_CLIPBOARD "Build emscripten version supporting real clipboard (e

include(FetchContent)

set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
if(RAYLIB_BRANCH_NAME STREQUAL HEAD)
set(RAYLIB_BRANCH_NAME raylib-cadmium-1.0.6)
endif()
Expand All @@ -82,27 +87,43 @@ FetchContent_Declare(
#GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG ${RAYLIB_BRANCH_NAME}
GIT_SHALLOW TRUE
EXCLUDE_FROM_ALL
)
FetchContent_GetProperties(raylib)
if (NOT raylib_POPULATED)
set(FETCHCONTENT_QUIET NO)
FetchContent_Populate(raylib)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR} EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(raylib)

if(PLATFORM STREQUAL "Desktop")
set(LIBRESSL_TESTS OFF CACHE BOOL "" FORCE)
set(LIBRESSL_APPS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
libressl
URL "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.0.0.tar.gz"
URL_MD5 4775b6b187a93c527eeb95a13e6ebd64
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(libressl)
#target_compile_definitions(crypto PUBLIC LIBRESSL_TESTS=OFF LIBRESSL_APPS=OFF)
#target_compile_definitions(ssl PUBLIC LIBRESSL_TESTS=OFF LIBRESSL_APPS=OFF)
#target_compile_definitions(tls PUBLIC LIBRESSL_TESTS=OFF LIBRESSL_APPS=OFF)

FetchContent_Declare(
CppHttplib
GIT_REPOSITORY "https://github.com/yhirose/cpp-httplib.git"
GIT_TAG "v0.18.3"
GIT_SHALLOW TRUE
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(CppHttplib)
include_directories(${cpphttplib_INCLUDE_DIR})
endif()

FetchContent_Declare(
DocTest
GIT_REPOSITORY "https://github.com/doctest/doctest.git"
GIT_TAG "v2.4.9"
GIT_SHALLOW TRUE
DocTest
GIT_REPOSITORY "https://github.com/doctest/doctest.git"
GIT_TAG "v2.4.9"
GIT_SHALLOW TRUE
EXCLUDE_FROM_ALL
)
FetchContent_GetProperties(DocTest)
if(NOT doctest_POPULATED)
FetchContent_Populate(doctest)
add_subdirectory(${doctest_SOURCE_DIR} ${doctest_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

FetchContent_MakeAvailable(DocTest)
include_directories(${DOCTEST_INCLUDE_DIR})

FetchContent_Declare(
Expand All @@ -111,13 +132,9 @@ FetchContent_Declare(
GIT_TAG "main"
GIT_SHALLOW TRUE
)
FetchContent_GetProperties(Chiplet)
if(NOT chiplet_POPULATED)
FetchContent_Populate(Chiplet)
include(${chiplet_SOURCE_DIR}/cmake/code-coverage.cmake)
add_subdirectory(${chiplet_SOURCE_DIR} ${chiplet_BINARY_DIR})
include_directories(${chiplet_SOURCE_DIR}/external)
endif()
FetchContent_MakeAvailable(Chiplet)
include_directories(${chiplet_SOURCE_DIR}/external)
include(${chiplet_SOURCE_DIR}/cmake/code-coverage.cmake)

FetchContent_Declare(
Chip8TestSuite
Expand Down
6 changes: 2 additions & 4 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
#add_subdirectory(fmt)

add_subdirectory(miniz)
add_subdirectory(sqlite3)
add_subdirectory(rlguipp)

add_library(c_octo INTERFACE)
target_include_directories(c_octo INTERFACE c-octo/src)

add_library(rlguipp INTERFACE)
target_include_directories(rlguipp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(rlguipp INTERFACE raylib)

add_library(jsct STATIC jsct/JsClipboardTricks.cpp jsct/JsClipboardTricks.h)
target_include_directories(jsct PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7 changes: 7 additions & 0 deletions external/rlguipp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(RlGuiPp)

add_library(rlguipp STATIC rlguipp.cpp rlguipp.hpp raygui4.h rlunicode.h dm_property_list.h)
target_include_directories(rlguipp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
target_link_libraries(rlguipp PUBLIC raylib_static)

2 changes: 2 additions & 0 deletions src/icons.h → external/rlguipp/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// Copyright (c) 2019-2022 raylib technologies (@raylibtech) //
// //
//////////////////////////////////////////////////////////////////////////////////
#pragma once

#define RAYGUI_CUSTOM_ICONS // Custom icons set required
//----------------------------------------------------------------------------------
// Defines and Macros
Expand Down
Loading

0 comments on commit 09c1ee6

Please sign in to comment.