diff options
author | 2015-03-20 19:08:03 +0100 | |
---|---|---|
committer | 2015-03-20 19:08:03 +0100 | |
commit | 151070e970abd344e8d8da215bc4f865e2b2b110 (patch) | |
tree | fafc7e93e77de30fa64a8becf92626585ef9ad42 /src/lib | |
parent | f066c0aaa90345212e01d3837ec39cc57471e0cf (diff) |
replaced off_st usage in src/lib/formats with UINT32 to reduce libemu dependencies (nw)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/formats/cbm_crt.c | 6 | ||||
-rw-r--r-- | src/lib/formats/ccvf_dsk.c | 4 | ||||
-rw-r--r-- | src/lib/formats/d64_dsk.c | 4 | ||||
-rw-r--r-- | src/lib/formats/d64_dsk.h | 2 | ||||
-rw-r--r-- | src/lib/formats/d67_dsk.c | 3 | ||||
-rw-r--r-- | src/lib/formats/d71_dsk.c | 3 | ||||
-rw-r--r-- | src/lib/formats/d80_dsk.c | 3 | ||||
-rw-r--r-- | src/lib/formats/d82_dsk.c | 3 | ||||
-rw-r--r-- | src/lib/formats/g64_dsk.c | 12 | ||||
-rw-r--r-- | src/lib/formats/victor9k_dsk.c | 2 | ||||
-rw-r--r-- | src/lib/formats/victor9k_dsk.h | 2 |
11 files changed, 24 insertions, 20 deletions
diff --git a/src/lib/formats/cbm_crt.c b/src/lib/formats/cbm_crt.c index 6e771fc8b0f..abfd85ed5c1 100644 --- a/src/lib/formats/cbm_crt.c +++ b/src/lib/formats/cbm_crt.c @@ -39,7 +39,7 @@ *********************************************************************/ -#include "emu.h" // offs_t, fatalerror +#include "emu.h" // fatalerror #include "astring.h" #include "corefile.h" #include "cbm_crt.h" @@ -205,8 +205,8 @@ bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, bool cbm_crt_read_data(core_file* file, UINT8 *roml, UINT8 *romh) { - offs_t roml_offset = 0; - offs_t romh_offset = 0; + UINT32 roml_offset = 0; + UINT32 romh_offset = 0; core_fseek(file, CRT_HEADER_LENGTH, SEEK_SET); diff --git a/src/lib/formats/ccvf_dsk.c b/src/lib/formats/ccvf_dsk.c index 30894e32d72..dfb43565d88 100644 --- a/src/lib/formats/ccvf_dsk.c +++ b/src/lib/formats/ccvf_dsk.c @@ -8,7 +8,7 @@ *********************************************************************/ -#include "emu.h" // offs_t +#include "emu.h" // BIT #include "astring.h" #include "formats/ccvf_dsk.h" @@ -99,7 +99,7 @@ bool ccvf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) int start = 0, end = 0; astring line; - offs_t byteoffs = 0; + UINT32 byteoffs = 0; char hex[3] = {0}; do { diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index 39f4d94ae14..172918a3051 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -10,7 +10,7 @@ *********************************************************************/ -#include "emu.h" // offs_t, emu_fatalerror, fatalerror +#include "emu.h" // emu_fatalerror, fatalerror #include "formats/d64_dsk.h" d64_format::d64_format() @@ -167,7 +167,7 @@ floppy_image_format_t::desc_e* d64_format::get_sector_desc(const format &f, int return desc; } -void d64_format::build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, offs_t error_offs, desc_s *sectors, int sector_count) const +void d64_format::build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, UINT32 error_offs, desc_s *sectors, int sector_count) const { for (int i = 0; i < sector_count; i++) { sectors[i].data = sectdata + sect_offs; diff --git a/src/lib/formats/d64_dsk.h b/src/lib/formats/d64_dsk.h index 34be1d8fd16..af462753348 100644 --- a/src/lib/formats/d64_dsk.h +++ b/src/lib/formats/d64_dsk.h @@ -64,7 +64,7 @@ protected: virtual int get_disk_id_offset(const format &f); void get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 &id2); virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); - void build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, offs_t error_offs, desc_s *sectors, int sector_count) const; + void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, UINT32 error_offs, desc_s *sectors, int sector_count) const; static const format file_formats[]; diff --git a/src/lib/formats/d67_dsk.c b/src/lib/formats/d67_dsk.c index 82adcbb3487..b512e55b694 100644 --- a/src/lib/formats/d67_dsk.c +++ b/src/lib/formats/d67_dsk.c @@ -8,7 +8,8 @@ *********************************************************************/ -#include "emu.h" // offs_t +#include <assert.h> + #include "formats/d67_dsk.h" d67_format::d67_format() : d64_format(file_formats) diff --git a/src/lib/formats/d71_dsk.c b/src/lib/formats/d71_dsk.c index 3ec66697a22..af1186948c6 100644 --- a/src/lib/formats/d71_dsk.c +++ b/src/lib/formats/d71_dsk.c @@ -8,7 +8,8 @@ *********************************************************************/ -#include "emu.h" // offs_t +#include <assert.h> + #include "formats/d71_dsk.h" d71_format::d71_format() : d64_format(formats) diff --git a/src/lib/formats/d80_dsk.c b/src/lib/formats/d80_dsk.c index 1f9c05f2f59..fbabbf1749e 100644 --- a/src/lib/formats/d80_dsk.c +++ b/src/lib/formats/d80_dsk.c @@ -8,7 +8,8 @@ *********************************************************************/ -#include "emu.h" // offs_t +#include <assert.h> + #include "formats/d80_dsk.h" d80_format::d80_format() : d64_format(file_formats) diff --git a/src/lib/formats/d82_dsk.c b/src/lib/formats/d82_dsk.c index 33ffb4977c9..dfcff3a1f27 100644 --- a/src/lib/formats/d82_dsk.c +++ b/src/lib/formats/d82_dsk.c @@ -8,7 +8,8 @@ *********************************************************************/ -#include "emu.h" // offs_t +#include <assert.h> + #include "formats/d82_dsk.h" d82_format::d82_format() : d80_format(file_formats) diff --git a/src/lib/formats/g64_dsk.c b/src/lib/formats/g64_dsk.c index fec6b6e9c3d..a2500b473cd 100644 --- a/src/lib/formats/g64_dsk.c +++ b/src/lib/formats/g64_dsk.c @@ -10,7 +10,7 @@ *********************************************************************/ -#include "emu.h" // emu_fatalerror, offs_t +#include "emu.h" // emu_fatalerror #include "formats/g64_dsk.h" #define G64_FORMAT_HEADER "GCR-1541" @@ -53,7 +53,7 @@ bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) for (int track = 0; track < track_count; track++) { - offs_t track_offset = pick_integer_le(img, TRACK_OFFSET + (track * 4), 4); + UINT32 track_offset = pick_integer_le(img, TRACK_OFFSET + (track * 4), 4); if (!track_offset) continue; @@ -61,7 +61,7 @@ bool g64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) if (track_offset > size) throw emu_fatalerror("g64_format: Track %u offset %06x out of bounds", track, track_offset); - offs_t speed_zone = pick_integer_le(img, SPEED_ZONE + (track * 4), 4); + UINT32 speed_zone = pick_integer_le(img, SPEED_ZONE + (track * 4), 4); if (speed_zone > 3) throw emu_fatalerror("g64_format: Unsupported variable speed zones on track %d", track); @@ -102,9 +102,9 @@ bool g64_format::save(io_generic *io, floppy_image *image) dynamic_buffer trackbuf(TRACK_LENGTH-2); for (int track = 0; track < 84; track++) { - offs_t tpos = TRACK_OFFSET + track * 4; - offs_t spos = SPEED_ZONE + track * 4; - offs_t dpos = TRACK_DATA + tracks_written * TRACK_LENGTH; + UINT32 tpos = TRACK_OFFSET + track * 4; + UINT32 spos = SPEED_ZONE + track * 4; + UINT32 dpos = TRACK_DATA + tracks_written * TRACK_LENGTH; io_generic_write_filler(io, 0x00, tpos, 4); io_generic_write_filler(io, 0x00, spos, 4); diff --git a/src/lib/formats/victor9k_dsk.c b/src/lib/formats/victor9k_dsk.c index 08328fd2619..020c4af46b3 100644 --- a/src/lib/formats/victor9k_dsk.c +++ b/src/lib/formats/victor9k_dsk.c @@ -237,7 +237,7 @@ floppy_image_format_t::desc_e* victor9k_format::get_sector_desc(const format &f, return desc; } -void victor9k_format::build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, desc_s *sectors, int sector_count) const +void victor9k_format::build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const { for (int i = 0; i < sector_count; i++) { sectors[i].data = sectdata + sect_offs; diff --git a/src/lib/formats/victor9k_dsk.h b/src/lib/formats/victor9k_dsk.h index c1d00052a62..22f43fa7e3b 100644 --- a/src/lib/formats/victor9k_dsk.h +++ b/src/lib/formats/victor9k_dsk.h @@ -35,7 +35,7 @@ public: virtual int identify(io_generic *io, UINT32 form_factor); void log_boot_sector(UINT8 *data); floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count); - void build_sector_description(const format &f, UINT8 *sectdata, offs_t sect_offs, desc_s *sectors, int sector_count) const; + void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const; virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image); virtual bool supports_save() const; |