Skip to content

Commit

Permalink
Merge branch 'libppuc' into not_smooth
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Dec 30, 2023
2 parents 39a1b23 + daff1b9 commit 40c9cdc
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 34 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/ppuc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: win-x64
platform-name: x64
libpinmame: libpinmame-${{ needs.version.outputs.version }}.dll
ppuc: ppuc.exe
type: pc
# - os: windows-latest
# platform: win-x64
# platform-name: x64
# libpinmame: libpinmame-${{ needs.version.outputs.version }}.dll
# ppuc: ppuc.exe
# type: pc
- os: macos-13
platform: osx-x64
libpinmame: libpinmame.${{ needs.version.outputs.version }}.dylib
Expand All @@ -76,30 +76,34 @@ jobs:
steps:
- name: Checkout pinmame
uses: actions/checkout@v3
- name: Checkout libserum
uses: actions/checkout@v3
with:
repository: zesinger/libserum
path: libserum
- run: mv libserum ../libserum
# - name: Checkout libserum
# uses: actions/checkout@v3
# with:
# repository: zesinger/libserum
# path: libserum
# - if: matrix.type == 'pc'
# run: mv libserum ../libserum
- name: Checkout libserialport
uses: actions/checkout@v3
with:
repository: PPUC/libserialport
path: libserialport
- run: mv libserialport ../libserialport
- if: matrix.type == 'pc'
run: mv libserialport ../libserialport
- name: Checkout libzedmd
uses: actions/checkout@v3
with:
repository: PPUC/libzedmd
path: libzedmd
- run: mv libzedmd ../libzedmd
- if: matrix.type == 'pc'
run: mv libzedmd ../libzedmd
- name: Checkout libppuc
uses: actions/checkout@v3
with:
repository: PPUC/libppuc
path: libppuc
- run: mv libppuc ../libppuc
- if: matrix.type == 'pc'
run: mv libppuc ../libppuc
- if: matrix.os == 'ubuntu-latest' && matrix.type != 'raspi'
run: |
sudo apt-get update
Expand All @@ -114,11 +118,6 @@ jobs:
vcpkgTriplet: ${{ matrix.platform-name }}-windows
vcpkgDirectory: deps/vcpkg
vcpkgGitCommitId: ce99c947b64ea3c0e274e18cc3035ca727681089
# - if: matrix.os == 'windows-latest'
# run: |
# curl -sL -H "Authorization: Token ${{ secrets.GH_PAT }}" https://api.github.com/repos/upx/upx/actions/artifacts/${{ env.UPX_ARTIFACT }}/zip -o upx.zip
# 7z x upx.zip -oupx
# rm upx.zip
- if: matrix.os == 'windows-latest'
run: |
curl -L https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win64.zip -o upx.zip
Expand Down Expand Up @@ -159,6 +158,10 @@ jobs:
copy_repository_path: /opt/pinmame
copy_artifact_path: tmp
commands: |
#mv libserum ../libserum
mv libserialport ../libserialport
mv libzedmd ../libzedmd
mv libppuc ../libppuc
apt-get update -y --allow-releaseinfo-change
apt-get install --no-install-recommends -y libasound2-dev libsdl2.dev libsdl2-mixer-dev libi2c-dev
apt-get install --no-install-recommends -y cmake zlib1g-dev libopenal-dev libyaml-cpp-dev libusb-1.0-0-dev
Expand Down
2 changes: 0 additions & 2 deletions cmake/ppuc/CMakeLists_linux-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ add_compile_definitions(
PINMAME_NO_UNUSED
LIBPINMAME
SAM_INCLUDE_COLORED
PPUC_SUPPORT
SERUM_SUPPORT
NAME="LIBPINMAME"

LSB_FIRST
Expand Down
2 changes: 0 additions & 2 deletions cmake/ppuc/CMakeLists_linux-x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ add_compile_definitions(
PINMAME_NO_UNUSED
LIBPINMAME
SAM_INCLUDE_COLORED
PPUC_SUPPORT
SERUM_SUPPORT
NAME="LIBPINMAME"

LSB_FIRST
Expand Down
2 changes: 0 additions & 2 deletions cmake/ppuc/CMakeLists_osx-x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ add_compile_definitions(
PINMAME
PINMAME_NO_UNUSED
LIBPINMAME
PPUC_SUPPORT
SAM_INCLUDE_COLORED
SERUM_SUPPORT

LSB_FIRST
)
Expand Down
2 changes: 0 additions & 2 deletions cmake/ppuc/CMakeLists_win-x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ add_compile_definitions(
PINMAME_NO_UNUSED
LIBPINMAME
SAM_INCLUDE_COLORED
PPUC_SUPPORT
SERUM_SUPPORT

LSB_FIRST
_CRT_SECURE_NO_WARNINGS
Expand Down
7 changes: 5 additions & 2 deletions src/ppuc/ppuc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,10 @@ int main(int argc, char *argv[])
{
if (opt_debug)
zedmd.EnableDebug();
// zedmd.EnablePreUpscaling();

zedmd.DisablePreUpscaling();
//zedmd.EnablePreUpscaling();

t_zedmd = std::thread(ZeDmdThread);
}
#endif
Expand Down Expand Up @@ -744,7 +747,7 @@ int main(int argc, char *argv[])
PinmameSetConfig(&config);

PinmameSetDmdMode(PINMAME_DMD_MODE_RAW);
//PinmameSetSoundMode(PINMAME_SOUND_MODE_ALTSOUND);
// PinmameSetSoundMode(PINMAME_SOUND_MODE_ALTSOUND);
PinmameSetHandleKeyboard(0);
PinmameSetHandleMechanics(0);

Expand Down
12 changes: 8 additions & 4 deletions src/wpc/wpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
// TODO/PROC: Make variables out of these defines. Values depend on "-proc" switch.
#define WPC_SOLSMOOTH 1 /* Don't smooth values on real hardware */
#define WPC_LAMPSMOOTH 1
#define WPC_DISPLAYSMOOTH 1
#define WPC_DISPLAYSMOOTH 1 /* Smooth the display over this number of VBLANKS (=60Hz/X) */
#if defined(PPUC_SUPPORT)
#define WPC_MODSOLSMOOTH 1 /* Modulated solenoids - History length to smooth over (depends on WPC_IRQFREQ) */
#define WPC_MODSOLSAMPLE 1 /* Modulated solenoid sampling rate (every n IRQs, depends on WPC_IRQFREQ) */
#endif
#else
#define WPC_SOLSMOOTH 4 /* Smooth the Solenoids over this number of VBLANKS (=60Hz/X) */
#define WPC_LAMPSMOOTH 2 /* Smooth the lamps over this number of VBLANKS (=60Hz/X) */
Expand Down Expand Up @@ -605,7 +609,7 @@ static INTERRUPT_GEN(wpc_vblank) {
1 ||
#endif
#ifdef PROC_SUPPORT
coreGlobals.p_rocEn ||
coreGlobals.p_rocEn ||
#endif
(wpclocals.vblankCount % WPC_VBLANKDIV) == 0) /*-- update switches --*/
core_updateSw((core_gameData->gen & GENWPC_HASFLIPTRON) ? TRUE : (wpc_data[WPC_GILAMPS] & 0x80));
Expand Down Expand Up @@ -1056,7 +1060,7 @@ static INTERRUPT_GEN(wpc_irq) {
{
int i;
wpclocals.modsol_sample = 0;

// Messy mappings to duplicate what the core does, see core_getSol()
for (i = 0; i < 32; i++)
{
Expand Down Expand Up @@ -1207,7 +1211,7 @@ static MACHINE_INIT(wpc) {
//Sound board initialization
sndbrd_0_init(core_gameData->gen == GEN_WPC95DCS ? SNDBRD_DCS : SNDBRD_DCS95, 1, memory_region(DCS_ROMREGION),NULL,NULL);
}

// Reset GI dimming timers
wpclocals.last_zc_time = timer_get_time();
for (int ii = 0,tmp= wpclocals.gi_zc_state; ii < CORE_MAXGI; ii++, tmp >>= 1) {
Expand Down

0 comments on commit 40c9cdc

Please sign in to comment.