Previous 199869 Revisions Next

r34704 Wednesday 28th January, 2015 at 17:11:08 UTC by MetalliC
jvs host: fix packet encoding, similar to previous
[/trunk]makefile
[src/emu/machine]jvshost.c
[src/osd/modules/sound]sdl_sound.c

trunk/makefile
r243215r243216
931931   $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
932932   @echo Linking $@...
933933ifeq ($(TARGETOS),emscripten)
934# Emscripten's linker seems to be stricter about the ordering of .a files
934   # Emscripten's linker seems to be stricter about the ordering of .a files
935935   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@
936936else
937937   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@
trunk/src/emu/machine/jvshost.c
r243215r243216
116116   if(!size)
117117      return;
118118   UINT32 add = 1;
119   UINT8 sum = 0;
119120   for(UINT32 i=0; i<size; i++)
121      sum += buffer[i];
122   buffer[size++] = sum;
123   for(UINT32 i=0; i<size; i++)
120124      if(buffer[i] == 0xd0 || buffer[i] == 0xe0)
121125         add++;
122   UINT32 nsize = size+add;
123126   for(UINT32 i=size; i; i--) {
124127      UINT8 t = buffer[i-1];
125128      if(t == 0xd0 || t == 0xe0) {
r243215r243216
130133         buffer[i+add-1] = t;
131134   }
132135   buffer[0] = 0xe0;
133   UINT8 sum = 0;
134   for(UINT32 i=1; i<nsize; i++)
135      sum += buffer[i];
136   buffer[nsize++] = sum;
137   size = nsize;
136   size += add;
138137}
139138
140139void jvs_host::decode(UINT8 *buffer, UINT32 &size)
trunk/src/osd/modules/sound/sdl_sound.c
r243215r243216
1212#include "sound_module.h"
1313#include "modules/osdmodule.h"
1414
15#if (!defined(OSD_WINDOWS))
15#if (!defined(SDLMAME_EMSCRIPTEN)) && (!defined(OSD_WINDOWS))
1616
1717// standard sdl header
1818#include "../../sdl/sdlinc.h"


Previous 199869 Revisions Next


© 1997-2024 The MAME Team