Skip to content

Commit

Permalink
fixed raspi build
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Dec 30, 2023
1 parent 88561b9 commit daff1b9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/ppuc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,29 @@ jobs:
# with:
# repository: zesinger/libserum
# path: libserum
# - run: mv libserum ../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 Down Expand Up @@ -154,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
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 daff1b9

Please sign in to comment.