Skip to content

Commit

Permalink
Initial Mikey implementation (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
laoo authored Jan 18, 2023
1 parent 115e701 commit c250212
Show file tree
Hide file tree
Showing 10 changed files with 817 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ endif()

project(libvgmMain VERSION 0.1 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 14)

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/libs/cmake_modules/")

include(GNUInstallDirs)
Expand Down
7 changes: 7 additions & 0 deletions emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ option(SNDEMU_ES5506_ALL "Sound Device ES5505/ES5506: all cores" OFF)
option(SNDEMU_X1_010_ALL "Sound Device X1-010: all cores" OFF)
option(SNDEMU_C352_ALL "Sound Device C352: all cores" OFF)
option(SNDEMU_GA20_ALL "Sound Device Irem GA20: all cores" OFF)
option(SNDEMU_MIKEY_ALL "Sound Device Mikey: all cores" OFF)

# console/computer presets
option(SNDEMU__PRESET_SMS "Sound Dev. Preset: Sega Master System/Game Gear" OFF)
Expand Down Expand Up @@ -137,6 +138,7 @@ if(SNDEMU__ALL)
set(SNDEMU_X1_010_ALL ON)
set(SNDEMU_C352_ALL ON)
set(SNDEMU_GA20_ALL ON)
set(SNDEMU_MIKEY_ALL ON)
endif()


Expand Down Expand Up @@ -599,6 +601,11 @@ if(SNDEMU_GA20_ALL)
set(EMU_FILES ${EMU_FILES} cores/iremga20.c)
set(EMU_CORE_HEADERS ${EMU_CORE_HEADERS} cores/iremga20.h)
endif()
if(SNDEMU_MIKEY_ALL)
set(EMU_DEFS ${EMU_DEFS} " SNDDEV_MIKEY")
set(EMU_FILES ${EMU_FILES} cores/mikey.cpp)
set(EMU_CORE_HEADERS ${EMU_CORE_HEADERS} cores/mikey.h)
endif()


add_library(${PROJECT_NAME} ${LIBRARY_TYPE} ${EMU_FILES})
Expand Down
1 change: 1 addition & 0 deletions emu/EmuCores.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
#define FCC_NRS_ 0x4E525300 // NewRisingSun
#define FCC_VBEL 0x5642454C // Valley Bell
#define FCC_CTR_ 0x43545200 // superctr
#define FCC_LAOO 0x4c414f4f // laoo

#endif // __EMUCORES_H__
1 change: 1 addition & 0 deletions emu/SoundDevs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@
#define DEVID_X1_010 0x26
#define DEVID_C352 0x27
#define DEVID_GA20 0x28
#define DEVID_MIKEY 0x29

#endif // __SOUNDDEVS_H__
12 changes: 12 additions & 0 deletions emu/SoundEmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#define SNDDEV_X1_010
#define SNDDEV_C352
#define SNDDEV_GA20
#define SNDDEV_MIKEY
#endif

#ifdef SNDDEV_SN76496
Expand Down Expand Up @@ -162,6 +163,9 @@
#ifdef SNDDEV_GA20
#include "cores/iremga20.h"
#endif
#ifdef SNDDEV_MIKEY
#include "cores/mikey.h"
#endif

const DEV_DEF** SndEmu_GetDevDefList(UINT8 deviceID)
{
Expand Down Expand Up @@ -330,6 +334,10 @@ const DEV_DEF** SndEmu_GetDevDefList(UINT8 deviceID)
#ifdef SNDDEV_GA20
case DEVID_GA20:
return devDefList_GA20;
#endif
#ifdef SNDDEV_MIKEY
case DEVID_MIKEY:
return devDefList_Mikey;
#endif
default:
return NULL;
Expand Down Expand Up @@ -662,6 +670,10 @@ const char* SndEmu_GetDevName(UINT8 deviceID, UINT8 opts, const DEV_GEN_CFG* dev
#ifdef SNDDEV_GA20
case DEVID_GA20:
return "GA20";
#endif
#ifdef SNDDEV_MIKEY
case DEVID_MIKEY:
return "MIKEY";
#endif
default:
return NULL;
Expand Down
Loading

0 comments on commit c250212

Please sign in to comment.