mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
replaced off_st usage in src/lib/formats with UINT32 to reduce libemu dependencies (nw)
This commit is contained in:
parent
f066c0aaa9
commit
151070e970
@ -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);
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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[];
|
||||
|
||||
|
@ -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)
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h" // offs_t
|
||||
#include <assert.h>
|
||||
|
||||
#include "formats/d71_dsk.h"
|
||||
|
||||
d71_format::d71_format() : d64_format(formats)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user