Skip to content

Commit

Permalink
harmless leftovers, NFC
Browse files Browse the repository at this point in the history
..also replace BasicBitmap's custom memcpy with the builtin one
  • Loading branch information
toxieainc committed Nov 28, 2023
1 parent bc2334f commit 9f8f2e4
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 29 deletions.
12 changes: 7 additions & 5 deletions ext/basicbitmap/BasicBitmap_SSE2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,16 +617,18 @@ static void* memcpy_fast(void *destination, const void *source, size_t size)
{
unsigned char *dst = (unsigned char*)destination;
const unsigned char *src = (const unsigned char*)source;
static size_t cachesize = 0x200000; // L2-cache size
size_t padding;

// small memory copy
if (size <= 128) {
return memcpy_tiny(dst, src, size);
}

#if 1
memcpy(dst, src, size);
#else
static const size_t cachesize = 0x200000; // L2-cache size
// align destination to 16 bytes boundary
padding = (16 - (((size_t)dst) & 15)) & 15;
size_t padding = (16 - (((size_t)dst) & 15)) & 15;
if (padding > 0) {
__m128i head = _mm_loadu_si128((const __m128i*)src);
Expand Down Expand Up @@ -717,7 +719,7 @@ static void* memcpy_fast(void *destination, const void *source, size_t size)
}
memcpy_tiny(dst, src, size);

#endif
return destination;
}

Expand Down Expand Up @@ -1721,7 +1723,7 @@ int BasicBitmap_SSE2_AVX_Enable()

int result = 0;
if (_x86_cpu_feature(26)) {
_internal_hook_memcpy = memcpy_fast;
_internal_hook_memcpy = NULL; //memcpy_fast; // should not be necessary anymore nowadays

BasicBitmap::SetDriver(32, NormalBlit_32, false);
BasicBitmap::SetDriver(24, NormalBlit_24, false);
Expand Down
5 changes: 4 additions & 1 deletion release/VPMAlias.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ tennmnfb_c27,mnfb_c27
elektraapredator,elektraa
thething,ali
LABYRINTH,skatebll
freefallp,freefall
freefallp,freefall
beetljui,ironmaid
stestc, stest
startreb4,startreb
10 changes: 7 additions & 3 deletions release/pinmame.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ What does it do?
Note however, that you can still activate switches with your keyboard, see the display animations,
and listen to/record the pinball game sounds with the pure PinMAME package itself.

Games supported (a bit outdated, at least since version 2.1 :/ )
---------------
Games supported (incomplete) (a bit outdated, at least since version 2.1 :/ )
----------------------------
Williams/Bally WPC: All games from Dr. Dude (1990) to Cactus Canyon (1998)
Williams/Bally System 11: All games from High Speed (1986) to Dr.Dude (1990)
Williams System 9: All games from Space Shuttle (1984) to Comet (1985)
Expand Down Expand Up @@ -353,7 +353,7 @@ Changing the Look of the DMD
Sound Command Mode
------------------
PinMAME has the ability to let you trigger sound commands manually. This
will let you play any sound the pinball game can make. Hit the 'F4' key to
will let you play any sound the pinball game can output. Hit the 'F4' key to
turn Sound Command Mode on or off. Follow the instructions on screen to
generate sounds.

Expand All @@ -371,6 +371,10 @@ Sound Command Mode
For some games the sound command history is displayed. It can be useful
to find out how certain sounds are generated by the hardware.

Note that some machines do not offer this functionality, either due
to the way these work (e.g. Stern SAM does the mixing internally)
or due to the implementation being incomplete/unfinished.

Recording Sounds to a Wave File
-------------------------------
PinMAME can record the sound output to a wave file for you to play back
Expand Down
2 changes: 1 addition & 1 deletion release/sounds.dat
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dcs:
# ------------
# 55aaXXYY = Set Volume
# XX = 47 to FF step 08
# YY = FF - XX ... reason unknown.
# YY = ~XX (for verification?)
# ------------
:55aa47b8:Set volume (8)
:55aa4fb0:Set volume (9)
Expand Down
3 changes: 2 additions & 1 deletion release/whatsnew.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Version 3.6 (XX XXth, 2023) - "Sounds good III"
without having to create them in a live game
- Ability to playback recorded sound commands via standalone AltSound driver
preserving original game timing (currently dev only feature)
- Ability to stop

Updated LISY support to 5.28-90 (Linux for Gottlieb System1 & System80, Bally, Atari, Williams and 'Home' Pinballs)
Updated LISY support to 5.28-91 (Linux for Gottlieb System1 & System80, Bally, Atari, Williams and 'Home' Pinballs)

Fix Capcom crashes in 64bit builds

Expand Down
25 changes: 12 additions & 13 deletions src/lisy/lisy_w.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,6 @@ void
lisy_S3_cmos_setting(void) {
int i, ret;
UINT8 data[29];
UINT8 old_data[29];
unsigned char action;

//calculate decimal values out of 4bit bcd data in CMOS
Expand All @@ -1211,16 +1210,16 @@ lisy_S3_cmos_setting(void) {

if (ls80dbg.bitv.basic) {
printf("current CMOS values\n");
printf("(0x100) Williams check value 0x5a: 0x%x%x\n", lisy_s4_CMOS[0] & 0x0f , lisy_s4_CMOS[1] & 0x0f );
printf("(0x100) Williams check value 0x5a: 0x%x%x\n", lisy_s4_CMOS[0] & 0x0f, lisy_s4_CMOS[1] & 0x0f );
//0xff means disabled
printf("(0x102)");
if( data[1] == 165) printf("Replay1: disabled\n"); else printf("Replay1: %d0.000\n",data[1]);
printf("(0x104)");
if( data[2] == 165) printf("Replay1: disabled\n"); else printf("Replay2: %d0.000\n",data[2]);
if( data[2] == 165) printf("Replay2: disabled\n"); else printf("Replay2: %d0.000\n",data[2]);
printf("(0x106)");
if( data[3] == 165) printf("Replay1: disabled\n"); else printf("Replay3: %d0.000\n",data[3]);
if( data[3] == 165) printf("Replay3: disabled\n"); else printf("Replay3: %d0.000\n",data[3]);
printf("(0x108)");
if( data[4] == 165) printf("Replay1: disabled\n"); else printf("Replay4: %d0.000\n",data[4]);
if( data[4] == 165) printf("Replay4: disabled\n"); else printf("Replay4: %d0.000\n",data[4]);
printf("(0x10A)Max Credits: %d\n",data[5]);
printf("(0x10C)Match: %d\n",data[6]);
printf("(0x10E)Play: %d\n",data[7]);
Expand Down Expand Up @@ -1313,11 +1312,11 @@ printf("get setting %d: %d\n",42+i,data[i]);
printf("(0x102)");
if( data[1] == 165) printf("Replay1: disabled\n"); else printf("Replay1: %d0.000\n",data[1]);
printf("(0x104)");
if( data[2] == 165) printf("Replay1: disabled\n"); else printf("Replay2: %d0.000\n",data[2]);
if( data[2] == 165) printf("Replay2: disabled\n"); else printf("Replay2: %d0.000\n",data[2]);
printf("(0x106)");
if( data[3] == 165) printf("Replay1: disabled\n"); else printf("Replay3: %d0.000\n",data[3]);
if( data[3] == 165) printf("Replay3: disabled\n"); else printf("Replay3: %d0.000\n",data[3]);
printf("(0x108)");
if( data[4] == 165) printf("Replay1: disabled\n"); else printf("Replay4: %d0.000\n",data[4]);
if( data[4] == 165) printf("Replay4: disabled\n"); else printf("Replay4: %d0.000\n",data[4]);
printf("(0x10A)Max Credits: %d\n",data[5]);
printf("(0x10C)Match: %d\n",data[6]);
printf("(0x10E)Play: %d\n",data[7]);
Expand Down Expand Up @@ -1364,9 +1363,9 @@ lisy_w_switch_handler(void) {
static unsigned char first = 1;
static int simulate_coin_flag = 0;

//on first call read alls wicthes from APC
//on first call read all switches from APC
if (first) {
//get the switch status from APC andf set internal pinmame matrix
//get the switch status from APC and set internal pinmame matrix
for (i = 1; i <= 64; i++)
core_setSw(i, lisy_api_get_switch_status(i));

Expand Down Expand Up @@ -1644,7 +1643,7 @@ lisy_w_solenoid_handler(void) {
return;
}

//did something changed?
//did something change?
if (mysol != coreGlobals.solenoids) {
//check all solenoids
for (bitpos = 0; bitpos <= 31; bitpos++) {
Expand All @@ -1669,7 +1668,7 @@ lisy_w_solenoid_handler(void) {
continue;
}

//special case riverboard gambler, ignor sol14 & sol15 in this case ( wheel )
//special case riverboard gambler, ignore sol14 & sol15 in this case ( wheel )
//as it is handled directly above
//special case Riverboat Gambler 'wheel' via Sol14 & 15
if ((lisymini_game.typeno == LISYW_TYPE_SYS11RG) && ((sol_no == 14) || (sol_no == 15))) {
Expand Down Expand Up @@ -2036,7 +2035,7 @@ lisy_w_sound_handler(unsigned char board, unsigned char data) {
}

old_data = data;
//use command play index and let do APC the work ;-)
//use command play index and let do APC the work ;-)
lisy_api_sound_play_index(board, data);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ppuc/ppuc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ int main (int argc, char *argv[]) {
const ALCchar *defaultDeviceName = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
ALCdevice *device = alcOpenDevice(defaultDeviceName);
if (!device) {
printf("failed to alcOpenDevice to %s\n", defaultDeviceName);
printf("failed to alcOpenDevice for %s\n", defaultDeviceName);
return 1;
}

Expand Down
2 changes: 2 additions & 0 deletions src/sound/s14001a.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ and off as it normally does during speech). Once START has gone low-high-low, th
#include "streams.h"

#define BOOL bool
#ifndef FALSE
#define FALSE false
#define TRUE true
#endif

UINT8 *m_SpeechRom;
int stream;
Expand Down
2 changes: 1 addition & 1 deletion src/windows/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ char *rc_get_home_dir(void)
}
if (!(s=malloc(strlen(pw->pw_dir)+1)))
{
fprintf(stderr, "error: malloc faild for homedir string\n");
fprintf(stderr, "error: malloc failed for homedir string\n");
return NULL;
}
strcpy(s, pw->pw_dir);
Expand Down
2 changes: 1 addition & 1 deletion src/wpc/byvidpin.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ MACHINE_DRIVER_END
/*GRANNY & THE GATORS HARDWARE*/
MACHINE_DRIVER_START(byVP2)
MDRV_IMPORT_FROM(byVP1)
MDRV_CPU_REPLACE("vcpu", M6809, 8000000/4)
MDRV_CPU_REPLACE("vcpu", M6809, 8000000/4) // MAME mentions 'needs verification'
MDRV_CPU_MEMORY(byVPGG_video_readmem, byVPGG_video_writemem)
MDRV_SCREEN_SIZE(256,256) // 256x192 + matrices
MDRV_VISIBLE_AREA(0, 255, 0, 255)
Expand Down
8 changes: 7 additions & 1 deletion src/wpc/indergames.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CORE_GAMEDEFNV(canasta,"Canasta '86'",1986,"Inder (Spain)",gl_mINDER1,0)

#define init_canastfp init_canasta
#define input_ports_canastfp input_ports_canasta
INDER_ROMSTART(canastfp, "c860.bin", CRC(b1f79e52) SHA1(8e9c616f9be19d056da2f86778539d62c0885bac),
INDER_ROMSTART(canastfp,"c860.bin", CRC(b1f79e52) SHA1(8e9c616f9be19d056da2f86778539d62c0885bac),
"c861_fp.bin", CRC(673c2592) SHA1(f1cc931e5c54e01f41025fafb87e91acc0828adf))
INDER_ROMEND
CORE_CLONEDEFNV(canastfp,canasta,"Canasta '86' (Free Play)",1986,"Inder (Spain)",gl_mINDER1,0)
Expand Down Expand Up @@ -167,6 +167,12 @@ CORE_CLONEDEFNV(corsarfp,corsario,"Corsario (Free Play)",1989,"Inder (Spain)",gl
/*-------------------------------------------------------------------
/ Mundial 90 (1990)
/ Soon after the launch of Mundial 90, Inder detected a bug on the
/ program ROM that could cause the catapult frame to break, so they
/ sent a letter (dated June 1990) with an updated program ROM and
/ recalling the buggy one. It is unclear if the supported set is the
/ fixed or the older one, as it matches one dumped from an EEPROM
/ with an original Inder label dated 18-April-1990.
/-------------------------------------------------------------------*/
INITGAME(mundial, inderDisp7a, 0, 0,0x10,0,0,0)
INDER_ROMSTART1(mundial,"mundial.cpu", CRC(b615e69b) SHA1(d129eb6f2943af40ddffd0da1e7a711b58f65b3c))
Expand Down
2 changes: 1 addition & 1 deletion src/wpc/s3games.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "core.h"
#include "wmssnd.h"
#include "sndbrd.h"
#include "s4.h" //*System 3 Is Nearly Identical to 4, so we share functions*/
#include "s4.h" // System 3 Is Nearly Identical to 4, so we share functions

#define s3_mS3 s4_mS4 // ""

Expand Down

0 comments on commit 9f8f2e4

Please sign in to comment.