Previous 15994 Revisions Next

r12781 Saturday 3rd September, 2011 at 16:18:30 UTC by Miodrag Milanović
Fixed tool compiling (no whatsnew)
[src/lib/formats]flopimg.c
[src/mess/tools/floptool]floptool.mak

src/lib/formats/flopimg.c
r12780r12781
1313#include <assert.h>
1414#include <limits.h>
1515
16#include "emu.h"
1716#include "osdcore.h"
1817#include "ioprocs.h"
1918#include "flopimg.h"
r12780r12781
972971   int idx = (track << 1) + side;
973972   if(track_size[idx] > track_alloc_size[idx]) {
974973      UINT32 new_size = track_size[idx]*11/10;
975      UINT32 *new_array = global_alloc_array(UINT32, new_size);
974      UINT32 *new_array = (UINT32*)malloc(sizeof(UINT32)*new_size);
976975      if(track_alloc_size[idx]) {
977976         memcpy(new_array, cell_data[idx], track_alloc_size[idx]*4);
978         global_free(cell_data[idx]);
977         free(cell_data[idx]);
979978      }
980979      cell_data[idx] = new_array;
981980      track_alloc_size[idx] = new_size;
r12780r12781
11991198
12001199void floppy_image_format_t::generate_track(const desc_e *desc, UINT8 track, UINT8 head, const desc_s *sect, int sect_count, int track_size, floppy_image *image)
12011200{
1202   UINT8 *buffer = global_alloc_array_clear(UINT8, (track_size+7)/8);
1203
1201   UINT8 *buffer = (UINT8*)malloc((track_size+7)/8);
1202   memset(buffer,0,(track_size+7)/8);
12041203   gen_crc_info crcs[MAX_CRC_COUNT];
12051204   collect_crcs(desc, crcs);
12061205
r12780r12781
13351334   fixup_crcs(buffer, crcs);
13361335
13371336   generate_track_from_bitstream(track, head, buffer, track_size, image);
1338   global_free(buffer);
1337   free(buffer);
13391338}
13401339
13411340void floppy_image_format_t::normalize_times(UINT32 *buffer, int bitlen)
src/mess/tools/floptool/floptool.mak
r12780r12781
3333# rules to build the floptool executable
3434#-------------------------------------------------
3535
36$(FLOPTOOL): $(FLOPTOOL_OBJS) $(FORMATS_LIB) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBEMU) $(LIBOCORE)
36$(FLOPTOOL): $(FLOPTOOL_OBJS) $(FORMATS_LIB) $(LIBEMU) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE)
3737   @echo Linking $@...
3838   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@

Previous 15994 Revisions Next


© 1998-2018 The MESS Team