| 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 |
| r243215 | r243216 | |
|---|---|---|
| 931 | 931 | $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ) |
| 932 | 932 | @echo Linking $@... |
| 933 | 933 | ifeq ($(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 | |
| 935 | 935 | $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) -Wl,--start-group $^ -Wl,--end-group $(LIBS) -o $@ |
| 936 | 936 | else |
| 937 | 937 | $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $(VERSIONOBJ) $^ $(LIBS) -o $@ |
| r243215 | r243216 | |
|---|---|---|
| 116 | 116 | if(!size) |
| 117 | 117 | return; |
| 118 | 118 | UINT32 add = 1; |
| 119 | UINT8 sum = 0; | |
| 119 | 120 | for(UINT32 i=0; i<size; i++) |
| 121 | sum += buffer[i]; | |
| 122 | buffer[size++] = sum; | |
| 123 | for(UINT32 i=0; i<size; i++) | |
| 120 | 124 | if(buffer[i] == 0xd0 || buffer[i] == 0xe0) |
| 121 | 125 | add++; |
| 122 | UINT32 nsize = size+add; | |
| 123 | 126 | for(UINT32 i=size; i; i--) { |
| 124 | 127 | UINT8 t = buffer[i-1]; |
| 125 | 128 | if(t == 0xd0 || t == 0xe0) { |
| r243215 | r243216 | |
| 130 | 133 | buffer[i+add-1] = t; |
| 131 | 134 | } |
| 132 | 135 | 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; | |
| 138 | 137 | } |
| 139 | 138 | |
| 140 | 139 | void jvs_host::decode(UINT8 *buffer, UINT32 &size) |
| r243215 | r243216 | |
|---|---|---|
| 12 | 12 | #include "sound_module.h" |
| 13 | 13 | #include "modules/osdmodule.h" |
| 14 | 14 | |
| 15 | #if (!defined(OSD_WINDOWS)) | |
| 15 | #if (!defined(SDLMAME_EMSCRIPTEN)) && (!defined(OSD_WINDOWS)) | |
| 16 | 16 | |
| 17 | 17 | // standard sdl header |
| 18 | 18 | #include "../../sdl/sdlinc.h" |
| https://github.com/mamedev/mame/commit/6bccc57b7c644abdbb2c12ccd700e60095b4f608 |
| Previous | 199869 Revisions | Next |