Skip to content

Commit

Permalink
Begin refactor of project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
fleroviux committed Aug 27, 2021
1 parent 579d5e1 commit cf4f365
Show file tree
Hide file tree
Showing 107 changed files with 114 additions and 179 deletions.
Binary file added .DS_Store
Binary file not shown.
31 changes: 2 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
cmake_minimum_required(VERSION 3.2)
project(NanoBoyAdvance)

# Must be set before project
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

project(NanoBoyAdvance CXX)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 3)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast")

option(PROFILE_GPROF "Profile with gprof" OFF)
if (PROFILE_GPROF)
add_definitions(-pg)
set(CMAKE_EXE_LINKER_FLAGS -pg)
endif()
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()

add_subdirectory(src)
add_subdirectory(src/nba)
File renamed without changes.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is also intended to be reasonably efficient, bloat-free and clean code in mod
You can download stable versions on the [releases](https://github.com/fleroviux/NanoboyAdvance/releases) page.<br>
You can download the latest nightly build [here](https://nightly.link/fleroviux/NanoBoyAdvance/workflows/build/master).

![screenshot1](screenshot.png)
![screenshot1](docs/screenshot.png)

## Running

Expand Down Expand Up @@ -41,7 +41,7 @@ See [config.toml](https://github.com/fleroviux/NanoBoyAdvance/blob/master/src/pl

## Compiling

See [COMPILING.md](https://github.com/fleroviux/NanoboyAdvance/blob/master/COMPILING.md) in the root directory of this project.
See [COMPILING.md](https://github.com/fleroviux/NanoboyAdvance/blob/master/docs/COMPILING.md) in the root directory of this project.

## Credit

Expand Down
Binary file added docs/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes
Binary file added src/.DS_Store
Binary file not shown.
121 changes: 0 additions & 121 deletions src/CMakeLists.txt

This file was deleted.

Binary file added src/nba/.DS_Store
Binary file not shown.
110 changes: 110 additions & 0 deletions src/nba/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
cmake_minimum_required(VERSION 3.2)
project(nba CXX)

add_subdirectory(../../external ${CMAKE_BINARY_DIR}/external)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(SOURCES
src/common/log.cpp
src/emulator/cartridge/backup/eeprom.cpp
src/emulator/cartridge/backup/flash.cpp
src/emulator/cartridge/gpio/gpio.cpp
src/emulator/cartridge/gpio/rtc.cpp
src/emulator/cartridge/game_db.cpp
src/emulator/config/config_toml.cpp
src/emulator/core/arm/tablegen/tablegen.cpp
src/emulator/core/hw/apu/channel/noise_channel.cpp
src/emulator/core/hw/apu/channel/quad_channel.cpp
src/emulator/core/hw/apu/channel/wave_channel.cpp
src/emulator/core/hw/apu/hle/mp2k.cpp
src/emulator/core/hw/apu/apu.cpp
src/emulator/core/hw/apu/callback.cpp
src/emulator/core/hw/apu/registers.cpp
src/emulator/core/hw/ppu/render/affine.cpp
src/emulator/core/hw/ppu/render/bitmap.cpp
src/emulator/core/hw/ppu/render/oam.cpp
src/emulator/core/hw/ppu/render/text.cpp
src/emulator/core/hw/ppu/render/window.cpp
src/emulator/core/hw/ppu/compose.cpp
src/emulator/core/hw/ppu/ppu.cpp
src/emulator/core/hw/ppu/registers.cpp
src/emulator/core/hw/dma.cpp
src/emulator/core/hw/interrupt.cpp
src/emulator/core/hw/serial.cpp
src/emulator/core/hw/timer.cpp
src/emulator/core/cpu.cpp
src/emulator/core/cpu-mmio.cpp
src/emulator/emulator.cpp)

set(HEADERS
src/common/dsp/resampler/cosine.hpp
src/common/dsp/resampler/cubic.hpp
src/common/dsp/resampler/nearest.hpp
src/common/dsp/resampler/windowed-sinc.hpp
src/common/dsp/resampler.hpp
src/common/compiler.hpp
src/common/crc32.hpp
src/common/integer.hpp
src/common/compiler.hpp
src/common/log.hpp
src/common/punning.hpp
src/common/static_for.hpp
src/emulator/cartridge/backup/backup.hpp
src/emulator/cartridge/backup/backup_file.hpp
src/emulator/cartridge/backup/eeprom.hpp
src/emulator/cartridge/backup/flash.hpp
src/emulator/cartridge/backup/sram.hpp
src/emulator/cartridge/gpio/gpio.hpp
src/emulator/cartridge/gpio/rtc.hpp
src/emulator/cartridge/game_db.hpp
src/emulator/cartridge/game_pak.hpp
src/emulator/cartridge/header.hpp
src/emulator/config/config.hpp
src/emulator/config/config_toml.hpp
src/emulator/core/arm/handlers/arithmetic.inl
src/emulator/core/arm/handlers/handler16.inl
src/emulator/core/arm/handlers/handler32.inl
src/emulator/core/arm/handlers/memory.inl
src/emulator/core/arm/tablegen/gen_arm.hpp
src/emulator/core/arm/tablegen/gen_thumb.hpp
src/emulator/core/arm/arm7tdmi.hpp
src/emulator/core/arm/memory.hpp
src/emulator/core/arm/state.hpp
src/emulator/core/hw/apu/channel/base_channel.hpp
src/emulator/core/hw/apu/channel/envelope.hpp
src/emulator/core/hw/apu/channel/fifo.hpp
src/emulator/core/hw/apu/channel/length_counter.hpp
src/emulator/core/hw/apu/channel/noise_channel.hpp
src/emulator/core/hw/apu/channel/quad_channel.hpp
src/emulator/core/hw/apu/channel/sweep.hpp
src/emulator/core/hw/apu/channel/wave_channel.hpp
src/emulator/core/hw/apu/hle/mp2k.hpp
src/emulator/core/hw/apu/apu.hpp
src/emulator/core/hw/apu/registers.hpp
src/emulator/core/hw/ppu/helper.inl
src/emulator/core/hw/ppu/ppu.hpp
src/emulator/core/hw/ppu/registers.hpp
src/emulator/core/hw/dma.hpp
src/emulator/core/hw/interrupt.hpp
src/emulator/core/hw/serial.hpp
src/emulator/core/hw/timer.hpp
src/emulator/core/cpu.hpp
src/emulator/core/cpu-memory.inl
src/emulator/core/cpu-mmio.hpp
src/emulator/core/scheduler.hpp
src/emulator/device/audio_device.hpp
src/emulator/device/input_device.hpp
src/emulator/device/video_device.hpp
src/emulator/emulator.hpp)

set(HEADERS_PUBLIC
)

add_library(nba STATIC ${SOURCES} ${HEADERS} ${HEADERS_PUBLIC})
target_include_directories(nba PRIVATE src)
target_include_directories(nba PUBLIC include)

# TODO: move the toml dependecy outside the NBA library?
target_link_libraries(nba PRIVATE fmt toml11::toml11)
Binary file added src/nba/include/.DS_Store
Binary file not shown.
Empty file added src/nba/include/nba/.gitkeep
Empty file.
Binary file added src/nba/src/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 0 additions & 27 deletions src/platform/sdl/CMakeLists.txt

This file was deleted.

0 comments on commit cf4f365

Please sign in to comment.