diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e0e292 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*.EXE +*.OBJ +build +fp-info-cache +PicoGUS-backups diff --git a/README.md b/README.md index 019f2b5..f0b8989 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,29 @@ -# PiISA / PiGUS +# PicoGUS -![PiISA Logo](piisa-logo.svg) +![PicoGUS Logo](picogus-logo.svg) -ISA card emulation on the Raspberry Pi Pico's RP2040 microcontroller, and Raspberry Pi 3, 4, and CM4. Initially focusing on [Gravis Ultrasound (GUS)](https://en.wikipedia.org/wiki/Gravis_Ultrasound) sound card emulation. - -This is a work in progress in the experimentation phase. It can emulate a GUS and produce sound but things are nowhere near perfect! Please see [the Wiki](https://github.com/polpo/pigus/wiki) for current status. - -See/hear it in action on YouTube: - -[![Watch the video](https://img.youtube.com/vi/rZopvkDTv08/hqdefault.jpg)](https://youtu.be/rZopvkDTv08) - -## For Raspberry Pi Pico: +ISA card emulation on the Raspberry Pi Pico's RP2040 microcontroller. Initially focusing on [Gravis Ultrasound (GUS)](https://en.wikipedia.org/wiki/Gravis_Ultrasound) sound card emulation, hence the name PicoGUS. ![picogus-prototype](https://user-images.githubusercontent.com/1544908/182006174-71a1792d-ac5b-4c2b-8e61-94a05a0ef55c.jpg) -## For "big" Raspberry Pi: +Please see [the Wiki](https://github.com/polpo/picogus/wiki) for current status. -![pigus-prototype](https://user-images.githubusercontent.com/1544908/182006165-61aa58a7-d336-4c86-becf-883b1548bee1.jpg) +Looking for the original project, using Raspberry Pi 3/4? See the [pigus repo](htts://github.com/polpo/pigus). -## Credits +See/hear PicoGUS in action on YouTube: -The Raspberry Pi Pico project uses: +[![Watch the video](https://img.youtube.com/vi/rZopvkDTv08/hqdefault.jpg)](https://youtu.be/rZopvkDTv08) + +## Open Source Credits * [Raspberry Pi Pico C/C++ SDK](https://github.com/raspberrypi/pico-sdk) * `pico_audio_i2s` from [pico-extras](https://github.com/raspberrypi/pico-extras) * `stdio_async_uart` from [PicoCart64](https://github.com/kbeckmann/PicoCart64) -* `gus.cpp` from [DOSBox-X](https://github.com/joncampbell123/dosbox-x) +* `gus-x.cpp` adapted from [DOSBox-X](https://github.com/joncampbell123/dosbox-x) * OPL/AdLib emulation from [rp2040-doom](https://github.com/kilograham/rp2040-doom) -The Raspberry Pi project uses: - -* [circle](https://github.com/rsta2/circle) -* [circle-stdlib](https://github.com/smuehlst/circle-stdlib) -* `gus.cpp` from [DOSBox-staging](https://github.com/dosbox-staging/dosbox-staging) -* Initial PCB design and AdLib emulation based on [RPiISA](https://github.com/eigenco/RPiISA) - ## License -The hardware portions of this repository (hw/, hw-pico/ directories) are licensed under the CERN OHL version 2, permissive. +The hardware portions of this repository (hw/ directory) are licensed under the CERN OHL version 2, permissive. -The software portions of this repository (sw/, sw-pico/, pgusinit/ directories) are licensed under the GNU GPL version 2. +The software portions of this repository (sw/, pgusinit/ directories) are licensed under the GNU GPL version 2. diff --git a/picogus-logo.svg b/picogus-logo.svg new file mode 100644 index 0000000..3825b32 --- /dev/null +++ b/picogus-logo.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/CMakeLists.txt b/sw/CMakeLists.txt index caf588c..7d8d955 100644 --- a/sw/CMakeLists.txt +++ b/sw/CMakeLists.txt @@ -7,13 +7,13 @@ set(CMAKE_CXX_STANDARD 17) # Initialise pico_sdk from installed location # (note this can come from environment, CMake cache etc) -set(PICO_SDK_PATH "/Users/ian/src/pico/pico-sdk") +set(PICO_SDK_PATH "${CMAKE_SOURCE_DIR}/../../pico/pico-sdk") # Pull in Raspberry Pi Pico SDK (must be before project) include(pico_sdk_import.cmake) include(pico_extras_import.cmake) -project(sw-pico C CXX ASM) +project(picogus C CXX ASM) # set(PICO_DEOPTIMIZED_DEBUG "1") set(CMAKE_BUILD_TYPE "Release") @@ -27,9 +27,9 @@ set(PROJECT_TYPE "GUS") pico_sdk_init() # Add executable. Default name is the project name, version 0.1 -add_executable(sw-pico sw-pico.cpp) +add_executable(picogus picogus.cpp) -target_compile_definitions(sw-pico PRIVATE +target_compile_definitions(picogus PRIVATE # compile time configuration of I2S # PICO_AUDIO_I2S_MONO_INPUT=1 USE_AUDIO_I2S=1 @@ -44,24 +44,24 @@ target_compile_definitions(sw-pico PRIVATE ) if(PROJECT_TYPE STREQUAL "GUS") - target_sources(sw-pico PRIVATE gusplay.cpp pico_pic.cpp) - target_compile_definitions(sw-pico PRIVATE + target_sources(picogus PRIVATE gusplay.cpp pico_pic.cpp) + target_compile_definitions(picogus PRIVATE SOUND_GUS=1 PSRAM=1 # TEST_PSRAM=1 USE_ALARM=1 USE_SPINLOCK=1 ) - pico_generate_pio_header(sw-pico ${CMAKE_CURRENT_LIST_DIR}/psram_spi.pio) + pico_generate_pio_header(picogus ${CMAKE_CURRENT_LIST_DIR}/psram_spi.pio) endif() if(PROJECT_TYPE STREQUAL "OPL") - target_sources(sw-pico PRIVATE adlib.cpp) + target_sources(picogus PRIVATE adlib.cpp) target_link_libraries( - sw-pico + picogus opl ) - target_compile_definitions(sw-pico PRIVATE + target_compile_definitions(picogus PRIVATE SOUND_OPL=1 USE_EMU8950_OPL=1 ) @@ -69,20 +69,20 @@ if(PROJECT_TYPE STREQUAL "OPL") endif() -pico_set_program_name(sw-pico "sw-pico") -pico_set_program_version(sw-pico "0.1") +pico_set_program_name(picogus "picogus") +pico_set_program_version(picogus "0.1") -pico_enable_stdio_uart(sw-pico 0) -pico_enable_stdio_usb(sw-pico 0) -pico_enable_stdio_semihosting(sw-pico 0) +pico_enable_stdio_uart(picogus 0) +pico_enable_stdio_usb(picogus 0) +pico_enable_stdio_semihosting(picogus 0) -pico_generate_pio_header(sw-pico ${CMAKE_CURRENT_LIST_DIR}/isa_io.pio) +pico_generate_pio_header(picogus ${CMAKE_CURRENT_LIST_DIR}/isa_io.pio) add_subdirectory(stdio_async_uart) # Add the standard library to the build target_link_libraries( - sw-pico + picogus pico_stdlib pico_multicore pico_audio_i2s @@ -92,14 +92,14 @@ target_link_libraries( # Add any user requested libraries target_link_libraries( - sw-pico + picogus stdio_async_uart ) -pico_add_extra_outputs(sw-pico) +pico_add_extra_outputs(picogus) add_custom_target( program - DEPENDS sw-pico - COMMAND openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -c "program sw-pico.elf verify reset exit" + DEPENDS picogus + COMMAND openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -c "program picogus.elf verify reset exit" ) diff --git a/sw/gus.cpp b/sw/gus-staging.cpp similarity index 99% rename from sw/gus.cpp rename to sw/gus-staging.cpp index e6fa8a5..78436ab 100644 --- a/sw/gus.cpp +++ b/sw/gus-staging.cpp @@ -46,7 +46,7 @@ */ #include "pico_pic.h" -#include "gus.h" +#include "gus-staging.h" extern Gus* gus; diff --git a/sw/gus.h b/sw/gus-staging.h similarity index 100% rename from sw/gus.h rename to sw/gus-staging.h diff --git a/sw/sw-pico.cpp b/sw/picogus.cpp similarity index 100% rename from sw/sw-pico.cpp rename to sw/picogus.cpp