From b546e841ab345555e0f2e591edb85508d30710b4 Mon Sep 17 00:00:00 2001 From: Joshua Scoggins Date: Mon, 30 Dec 2024 10:51:43 -0800 Subject: [PATCH 1/4] Initial cmakelists.txt --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..60c29f7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.17) +project(stfdecomp) + From a8a6bc190af9eb44ac86be95cb22321d2fb1bd2f Mon Sep 17 00:00:00 2001 From: Joshua Scoggins Date: Mon, 30 Dec 2024 10:59:06 -0800 Subject: [PATCH 2/4] Setup the tools being used --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60c29f7..783458f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,10 @@ cmake_minimum_required(VERSION 3.17) project(stfdecomp) +# assumes that the toolchain is on the path +set(CMAKE_C_COMPILER i960-elf-gcc) # modify as needed +set(CMAKE_CXX_COMPILER i960-elf-g++) # for completeness +set(CMAKE_ASM-ATT_COMPILER i960-elf-as) # modify as needed +set(CMAKE_LINKER i960-elf-ld) + +set(CMAKE_ASM-ATT_FLAGS "${CMAKE_ASM_FLAGS} -AKB -J") From 911ff62a86ebc51276f83f08ef5002c19da9401d Mon Sep 17 00:00:00 2001 From: Joshua Scoggins Date: Mon, 30 Dec 2024 11:05:40 -0800 Subject: [PATCH 3/4] CMakeLists.txt based off of the previous version of the toolchain --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 783458f..3aebd54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,3 +8,14 @@ set(CMAKE_ASM-ATT_COMPILER i960-elf-as) # modify as needed set(CMAKE_LINKER i960-elf-ld) set(CMAKE_ASM-ATT_FLAGS "${CMAKE_ASM_FLAGS} -AKB -J") + +add_executable(rom.bin + rom_code1.asm + ) +target_link_options(rom.bin + PRIVATE -AKB + PRIVATE --oformat binary + PRIVATE -e 0xB0 +) + + From e59fee13038e5821c846a44580797f70a6b74070 Mon Sep 17 00:00:00 2001 From: Joshua Scoggins Date: Mon, 30 Dec 2024 11:11:25 -0800 Subject: [PATCH 4/4] Added custom command --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3aebd54..a88a9f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,3 +19,15 @@ target_link_options(rom.bin ) +add_custom_command( + OUTPUT epr-19001.15 epr-19002.10 + COMMAND stfbin2rom.py + --input rom.bin + --verify + VERBATIM + DEPENDS rom.bin +) + +add_custom_target(game_code + DEPENDS epr-19001.15 epr-19002.10 +)