summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/formats')
-rw-r--r--src/lib/formats/a26_cas.c1
-rw-r--r--src/lib/formats/a5105_dsk.c3
-rw-r--r--src/lib/formats/abc800_dsk.c3
-rw-r--r--src/lib/formats/ace_tap.c3
-rw-r--r--src/lib/formats/adam_cas.c2
-rw-r--r--src/lib/formats/adam_dsk.c3
-rw-r--r--src/lib/formats/ami_dsk.c2
-rw-r--r--src/lib/formats/ap_dsk35.c2
-rw-r--r--src/lib/formats/apf_apt.c2
-rw-r--r--src/lib/formats/apollo_dsk.c3
-rw-r--r--src/lib/formats/applix_dsk.c3
-rw-r--r--src/lib/formats/apridisk.c2
-rw-r--r--src/lib/formats/asst128_dsk.c3
-rw-r--r--src/lib/formats/atari_dsk.c2
-rw-r--r--src/lib/formats/atarist_dsk.c2
-rw-r--r--src/lib/formats/atom_tap.c2
-rw-r--r--src/lib/formats/bw12_dsk.c3
-rw-r--r--src/lib/formats/bw2_dsk.c3
-rw-r--r--src/lib/formats/cassimg.c2
-rw-r--r--src/lib/formats/cbm_crt.c7
-rw-r--r--src/lib/formats/cbm_crt.h1
-rw-r--r--src/lib/formats/cbm_tap.c2
-rw-r--r--src/lib/formats/ccvf_dsk.c5
-rw-r--r--src/lib/formats/cgen_cas.c2
-rw-r--r--src/lib/formats/coco_cas.c2
-rw-r--r--src/lib/formats/coco_dsk.c2
-rw-r--r--src/lib/formats/comx35_dsk.c3
-rw-r--r--src/lib/formats/concept_dsk.c3
-rw-r--r--src/lib/formats/coupedsk.c3
-rw-r--r--src/lib/formats/cpis_dsk.c3
-rw-r--r--src/lib/formats/cqm_dsk.c1
-rw-r--r--src/lib/formats/csw_cas.c1
-rw-r--r--src/lib/formats/d64_dsk.c4
-rw-r--r--src/lib/formats/d64_dsk.h2
-rw-r--r--src/lib/formats/d67_dsk.c3
-rw-r--r--src/lib/formats/d71_dsk.c3
-rw-r--r--src/lib/formats/d80_dsk.c3
-rw-r--r--src/lib/formats/d81_dsk.c3
-rw-r--r--src/lib/formats/d82_dsk.c3
-rw-r--r--src/lib/formats/d88_dsk.c4
-rw-r--r--src/lib/formats/dcp_dsk.c3
-rw-r--r--src/lib/formats/dfi_dsk.c12
-rw-r--r--src/lib/formats/dim_dsk.c5
-rw-r--r--src/lib/formats/dip_dsk.c3
-rw-r--r--src/lib/formats/dmk_dsk.c3
-rw-r--r--src/lib/formats/dmv_dsk.c3
-rw-r--r--src/lib/formats/dsk_dsk.c3
-rw-r--r--src/lib/formats/ep64_dsk.c3
-rw-r--r--src/lib/formats/esq16_dsk.c3
-rw-r--r--src/lib/formats/esq8_dsk.c3
-rw-r--r--src/lib/formats/excali64_dsk.c3
-rw-r--r--src/lib/formats/fc100_cas.c2
-rw-r--r--src/lib/formats/fdd_dsk.c3
-rw-r--r--src/lib/formats/fdi_dsk.c1
-rw-r--r--src/lib/formats/flex_dsk.c2
-rw-r--r--src/lib/formats/flopimg.c4
-rw-r--r--src/lib/formats/fm7_cas.c2
-rw-r--r--src/lib/formats/fmsx_cas.c2
-rw-r--r--src/lib/formats/fmtowns_dsk.c3
-rw-r--r--src/lib/formats/g64_dsk.c12
-rw-r--r--src/lib/formats/gtp_cas.c2
-rw-r--r--src/lib/formats/hect_dsk.c2
-rw-r--r--src/lib/formats/hect_tap.c2
-rw-r--r--src/lib/formats/hxcmfm_dsk.c3
-rw-r--r--src/lib/formats/imd_dsk.c6
-rw-r--r--src/lib/formats/ioprocs.c1
-rw-r--r--src/lib/formats/ipf_dsk.c2
-rw-r--r--src/lib/formats/iq151_dsk.c3
-rw-r--r--src/lib/formats/itt3030_dsk.c3
-rw-r--r--src/lib/formats/kaypro_dsk.c3
-rw-r--r--src/lib/formats/kc85_dsk.c3
-rw-r--r--src/lib/formats/kc_cas.c2
-rw-r--r--src/lib/formats/kim1_cas.c2
-rw-r--r--src/lib/formats/lviv_lvt.c2
-rw-r--r--src/lib/formats/m20_dsk.c3
-rw-r--r--src/lib/formats/m5_dsk.c3
-rw-r--r--src/lib/formats/mbee_cas.c2
-rw-r--r--src/lib/formats/mfi_dsk.c3
-rw-r--r--src/lib/formats/mm_dsk.c3
-rw-r--r--src/lib/formats/msx_dsk.c2
-rw-r--r--src/lib/formats/mz_cas.c1
-rw-r--r--src/lib/formats/nanos_dsk.c3
-rw-r--r--src/lib/formats/naslite_dsk.c3
-rw-r--r--src/lib/formats/nes_dsk.c1
-rw-r--r--src/lib/formats/nfd_dsk.c3
-rw-r--r--src/lib/formats/orao_cas.c2
-rw-r--r--src/lib/formats/oric_dsk.c2
-rw-r--r--src/lib/formats/oric_tap.c2
-rw-r--r--src/lib/formats/p6001_cas.c2
-rw-r--r--src/lib/formats/pasti_dsk.c2
-rw-r--r--src/lib/formats/pc98_dsk.c1
-rw-r--r--src/lib/formats/pc98fdi_dsk.c2
-rw-r--r--src/lib/formats/pc_dsk.c1
-rw-r--r--src/lib/formats/phc25_cas.c2
-rw-r--r--src/lib/formats/pmd_cas.c2
-rw-r--r--src/lib/formats/primoptp.c2
-rw-r--r--src/lib/formats/pyldin_dsk.c2
-rw-r--r--src/lib/formats/ql_dsk.c3
-rw-r--r--src/lib/formats/rk_cas.c2
-rw-r--r--src/lib/formats/rx50_dsk.c3
-rw-r--r--src/lib/formats/sc3000_bit.c2
-rw-r--r--src/lib/formats/sf7000_dsk.c3
-rw-r--r--src/lib/formats/smx_dsk.c3
-rw-r--r--src/lib/formats/sol_cas.c2
-rw-r--r--src/lib/formats/sorc_cas.c2
-rw-r--r--src/lib/formats/sorc_dsk.c1
-rw-r--r--src/lib/formats/sord_cas.c1
-rw-r--r--src/lib/formats/spc1000_cas.c2
-rw-r--r--src/lib/formats/st_dsk.c3
-rw-r--r--src/lib/formats/svi_cas.c2
-rw-r--r--src/lib/formats/svi_dsk.c1
-rw-r--r--src/lib/formats/tandy2k_dsk.c3
-rw-r--r--src/lib/formats/td0_dsk.c2
-rw-r--r--src/lib/formats/thom_cas.c1
-rw-r--r--src/lib/formats/thom_dsk.c1
-rw-r--r--src/lib/formats/ti99_dsk.c7
-rw-r--r--src/lib/formats/tiki100_dsk.c3
-rw-r--r--src/lib/formats/trd_dsk.c3
-rw-r--r--src/lib/formats/trs_cas.c2
-rw-r--r--src/lib/formats/trs_dsk.c1
-rw-r--r--src/lib/formats/tvc_cas.c2
-rw-r--r--src/lib/formats/tvc_dsk.c3
-rw-r--r--src/lib/formats/tzx_cas.c2
-rw-r--r--src/lib/formats/uef_cas.c1
-rw-r--r--src/lib/formats/upd765_dsk.c2
-rw-r--r--src/lib/formats/vg5k_cas.c2
-rw-r--r--src/lib/formats/victor9k_dsk.c4
-rw-r--r--src/lib/formats/victor9k_dsk.h2
-rw-r--r--src/lib/formats/vt_cas.c2
-rw-r--r--src/lib/formats/vt_dsk.c1
-rw-r--r--src/lib/formats/vtech1_dsk.c2
-rw-r--r--src/lib/formats/wd177x_dsk.c2
-rw-r--r--src/lib/formats/x07_cas.c2
-rw-r--r--src/lib/formats/x1_tap.c2
-rw-r--r--src/lib/formats/xdf_dsk.c3
-rw-r--r--src/lib/formats/z80ne_dsk.c1
-rw-r--r--src/lib/formats/zx81_p.c2
137 files changed, 252 insertions, 102 deletions
diff --git a/src/lib/formats/a26_cas.c b/src/lib/formats/a26_cas.c
index 5d557626912..7ee425fd1af 100644
--- a/src/lib/formats/a26_cas.c
+++ b/src/lib/formats/a26_cas.c
@@ -4,6 +4,7 @@ Atari 2600 SuperCharger support
*/
+#include <assert.h>
#include "formats/a26_cas.h"
diff --git a/src/lib/formats/a5105_dsk.c b/src/lib/formats/a5105_dsk.c
index 61586f93851..33d7f15e1fd 100644
--- a/src/lib/formats/a5105_dsk.c
+++ b/src/lib/formats/a5105_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/a5105_dsk.h"
a5105_format::a5105_format() : upd765_format(formats)
diff --git a/src/lib/formats/abc800_dsk.c b/src/lib/formats/abc800_dsk.c
index b1d0db2c640..5686d502382 100644
--- a/src/lib/formats/abc800_dsk.c
+++ b/src/lib/formats/abc800_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/abc800_dsk.h"
abc800_format::abc800_format() : wd177x_format(formats)
diff --git a/src/lib/formats/ace_tap.c b/src/lib/formats/ace_tap.c
index b57dcb03cd7..8d6d4694b05 100644
--- a/src/lib/formats/ace_tap.c
+++ b/src/lib/formats/ace_tap.c
@@ -7,6 +7,9 @@ For more information see:
- http://www.jupiter-ace.co.uk/doc_AceTapeFormat.html
********************************************************************/
+
+#include <assert.h>
+
#include "ace_tap.h"
diff --git a/src/lib/formats/adam_cas.c b/src/lib/formats/adam_cas.c
index 1e8e328b517..83f873c5f00 100644
--- a/src/lib/formats/adam_cas.c
+++ b/src/lib/formats/adam_cas.c
@@ -1,4 +1,6 @@
+#include <assert.h>
+
#include "cassimg.h"
#include "adam_cas.h"
diff --git a/src/lib/formats/adam_dsk.c b/src/lib/formats/adam_dsk.c
index 1b966a3395b..e78e94a4763 100644
--- a/src/lib/formats/adam_dsk.c
+++ b/src/lib/formats/adam_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/adam_dsk.h"
adam_format::adam_format() : wd177x_format(formats)
diff --git a/src/lib/formats/ami_dsk.c b/src/lib/formats/ami_dsk.c
index 230310c4995..a222208d46d 100644
--- a/src/lib/formats/ami_dsk.c
+++ b/src/lib/formats/ami_dsk.c
@@ -8,6 +8,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/ami_dsk.h"
adf_format::adf_format() : floppy_image_format_t()
diff --git a/src/lib/formats/ap_dsk35.c b/src/lib/formats/ap_dsk35.c
index 8eee2ee0dab..f218c996abd 100644
--- a/src/lib/formats/ap_dsk35.c
+++ b/src/lib/formats/ap_dsk35.c
@@ -99,7 +99,7 @@
#include <stdio.h>
#include <assert.h>
-#include "emu.h"
+#include "emu.h" // logerror
#include "ap_dsk35.h"
struct apple35_tag
diff --git a/src/lib/formats/apf_apt.c b/src/lib/formats/apf_apt.c
index 58582ef5dc8..b609a109ef6 100644
--- a/src/lib/formats/apf_apt.c
+++ b/src/lib/formats/apf_apt.c
@@ -34,6 +34,8 @@ e. A checksum byte (8-bit addition)
********************************************************************/
+#include <assert.h>
+
#include "formats/apf_apt.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/apollo_dsk.c b/src/lib/formats/apollo_dsk.c
index eec6e24beb2..2770122a5c9 100644
--- a/src/lib/formats/apollo_dsk.c
+++ b/src/lib/formats/apollo_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/apollo_dsk.h"
apollo_format::apollo_format() : upd765_format(formats)
diff --git a/src/lib/formats/applix_dsk.c b/src/lib/formats/applix_dsk.c
index c90b93a5203..726f11daed9 100644
--- a/src/lib/formats/applix_dsk.c
+++ b/src/lib/formats/applix_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/applix_dsk.h"
applix_format::applix_format() : wd177x_format(formats)
diff --git a/src/lib/formats/apridisk.c b/src/lib/formats/apridisk.c
index 016d41e6210..0416add4405 100644
--- a/src/lib/formats/apridisk.c
+++ b/src/lib/formats/apridisk.c
@@ -4,7 +4,7 @@
***************************************************************************/
-#include "emu.h"
+#include "emu.h" // fatalerror
#include "apridisk.h"
#include "imageutl.h"
#include "coretmpl.h"
diff --git a/src/lib/formats/asst128_dsk.c b/src/lib/formats/asst128_dsk.c
index feffad34c08..fe64cc725ee 100644
--- a/src/lib/formats/asst128_dsk.c
+++ b/src/lib/formats/asst128_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/asst128_dsk.h"
asst128_format::asst128_format() : upd765_format(formats)
diff --git a/src/lib/formats/atari_dsk.c b/src/lib/formats/atari_dsk.c
index 3e721adc0ff..cbfbcc3d21f 100644
--- a/src/lib/formats/atari_dsk.c
+++ b/src/lib/formats/atari_dsk.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/atari_dsk.h"
static FLOPPY_IDENTIFY( atari_dsk_identify )
diff --git a/src/lib/formats/atarist_dsk.c b/src/lib/formats/atarist_dsk.c
index 7901ba2a55d..aa0761465bf 100644
--- a/src/lib/formats/atarist_dsk.c
+++ b/src/lib/formats/atarist_dsk.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/atarist_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/atom_tap.c b/src/lib/formats/atom_tap.c
index a5a76a8733e..99335fa4230 100644
--- a/src/lib/formats/atom_tap.c
+++ b/src/lib/formats/atom_tap.c
@@ -38,6 +38,8 @@
*/
+#include <assert.h>
+
#include "atom_tap.h"
#include "uef_cas.h"
/***************************************************************************
diff --git a/src/lib/formats/bw12_dsk.c b/src/lib/formats/bw12_dsk.c
index e497225bc08..06c8be72347 100644
--- a/src/lib/formats/bw12_dsk.c
+++ b/src/lib/formats/bw12_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/bw12_dsk.h"
bw12_format::bw12_format() : upd765_format(formats)
diff --git a/src/lib/formats/bw2_dsk.c b/src/lib/formats/bw2_dsk.c
index e5f66b5fe05..3dc46e9b225 100644
--- a/src/lib/formats/bw2_dsk.c
+++ b/src/lib/formats/bw2_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/bw2_dsk.h"
bw2_format::bw2_format() : upd765_format(formats)
diff --git a/src/lib/formats/cassimg.c b/src/lib/formats/cassimg.c
index 20ccbc99407..7de195315ef 100644
--- a/src/lib/formats/cassimg.c
+++ b/src/lib/formats/cassimg.c
@@ -6,8 +6,8 @@
*********************************************************************/
-#include <assert.h>
#include <string.h>
+#include <assert.h>
#include "imageutl.h"
#include "cassimg.h"
diff --git a/src/lib/formats/cbm_crt.c b/src/lib/formats/cbm_crt.c
index 6ce4cc992d8..abfd85ed5c1 100644
--- a/src/lib/formats/cbm_crt.c
+++ b/src/lib/formats/cbm_crt.c
@@ -39,6 +39,9 @@
*********************************************************************/
+#include "emu.h" // fatalerror
+#include "astring.h"
+#include "corefile.h"
#include "cbm_crt.h"
@@ -202,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/cbm_crt.h b/src/lib/formats/cbm_crt.h
index bfb8732442c..8049ddacff7 100644
--- a/src/lib/formats/cbm_crt.h
+++ b/src/lib/formats/cbm_crt.h
@@ -13,7 +13,6 @@
#ifndef __CBM_CRT__
#define __CBM_CRT__
-#include "emu.h"
#include "formats/imageutl.h"
diff --git a/src/lib/formats/cbm_tap.c b/src/lib/formats/cbm_tap.c
index a78b03df117..f02b4ac1968 100644
--- a/src/lib/formats/cbm_tap.c
+++ b/src/lib/formats/cbm_tap.c
@@ -92,6 +92,8 @@ Unfortunately, I have no such a .tap file to test, so my implementation
below could be not working. FP ]
*/
+#include <assert.h>
+
#include "cbm_tap.h"
diff --git a/src/lib/formats/ccvf_dsk.c b/src/lib/formats/ccvf_dsk.c
index d8dc0117bd3..dfb43565d88 100644
--- a/src/lib/formats/ccvf_dsk.c
+++ b/src/lib/formats/ccvf_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include "emu.h" // BIT
+#include "astring.h"
#include "formats/ccvf_dsk.h"
ccvf_format::ccvf_format()
@@ -98,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/cgen_cas.c b/src/lib/formats/cgen_cas.c
index 242e833ceb2..5d29f7e2b61 100644
--- a/src/lib/formats/cgen_cas.c
+++ b/src/lib/formats/cgen_cas.c
@@ -7,6 +7,8 @@ Current state: Not working. Only the sync signal and 0x66 byte get
********************************************************************/
+#include <assert.h>
+
#include "formats/cgen_cas.h"
#define TAPE_HEADER "Colour Genie - Virtual Tape File"
diff --git a/src/lib/formats/coco_cas.c b/src/lib/formats/coco_cas.c
index 880549c96ce..efc660943e3 100644
--- a/src/lib/formats/coco_cas.c
+++ b/src/lib/formats/coco_cas.c
@@ -31,7 +31,7 @@
**************************************************************************/
-#include "emu.h"
+#include "emu.h" // PAIR
#include "coco_cas.h"
#define COCO_WAVESAMPLES_HEADER (1.0)
diff --git a/src/lib/formats/coco_dsk.c b/src/lib/formats/coco_dsk.c
index b3f2b306c43..00b785d3e8b 100644
--- a/src/lib/formats/coco_dsk.c
+++ b/src/lib/formats/coco_dsk.c
@@ -7,8 +7,8 @@
*********************************************************************/
#include <string.h>
-#include <assert.h>
#include <time.h>
+#include <assert.h>
#include "formats/coco_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/comx35_dsk.c b/src/lib/formats/comx35_dsk.c
index 860cc13b74d..aa8603f3c1c 100644
--- a/src/lib/formats/comx35_dsk.c
+++ b/src/lib/formats/comx35_dsk.c
@@ -36,7 +36,8 @@
*/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/comx35_dsk.h"
comx35_format::comx35_format() : wd177x_format(formats)
diff --git a/src/lib/formats/concept_dsk.c b/src/lib/formats/concept_dsk.c
index 3c742248043..c23a3c35675 100644
--- a/src/lib/formats/concept_dsk.c
+++ b/src/lib/formats/concept_dsk.c
@@ -10,7 +10,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "flopimg.h"
#include "formats/concept_dsk.h"
diff --git a/src/lib/formats/coupedsk.c b/src/lib/formats/coupedsk.c
index 30ddcd394a8..e57d01abadf 100644
--- a/src/lib/formats/coupedsk.c
+++ b/src/lib/formats/coupedsk.c
@@ -6,7 +6,8 @@
**************************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/coupedsk.h"
#include "flopimg.h"
diff --git a/src/lib/formats/cpis_dsk.c b/src/lib/formats/cpis_dsk.c
index 9ad24d1d236..d5a763acfb6 100644
--- a/src/lib/formats/cpis_dsk.c
+++ b/src/lib/formats/cpis_dsk.c
@@ -7,8 +7,8 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
-#include "emu.h"
#include "formats/cpis_dsk.h"
#include "formats/basicdsk.h"
@@ -106,7 +106,6 @@ LEGACY_FLOPPY_OPTIONS_END
*********************************************************************/
-#include "emu.h"
#include "formats/cpis_dsk.h"
cpis_format::cpis_format() : upd765_format(formats)
diff --git a/src/lib/formats/cqm_dsk.c b/src/lib/formats/cqm_dsk.c
index ca8ae98039b..0061af8c869 100644
--- a/src/lib/formats/cqm_dsk.c
+++ b/src/lib/formats/cqm_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "flopimg.h"
#define CQM_HEADER_SIZE 133
diff --git a/src/lib/formats/csw_cas.c b/src/lib/formats/csw_cas.c
index 39ceb594e8f..e6b51b78c1e 100644
--- a/src/lib/formats/csw_cas.c
+++ b/src/lib/formats/csw_cas.c
@@ -23,6 +23,7 @@ Offset Value Type Description
#include <string.h>
#include <zlib.h>
+#include <assert.h>
#include "uef_cas.h"
#include "csw_cas.h"
diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c
index 9c0fa259363..172918a3051 100644
--- a/src/lib/formats/d64_dsk.c
+++ b/src/lib/formats/d64_dsk.c
@@ -10,7 +10,7 @@
*********************************************************************/
-#include "emu.h"
+#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 &current_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 39ce16131de..b512e55b694 100644
--- a/src/lib/formats/d67_dsk.c
+++ b/src/lib/formats/d67_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#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 f7925526fda..af1186948c6 100644
--- a/src/lib/formats/d71_dsk.c
+++ b/src/lib/formats/d71_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#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 55a6f0d8ade..fbabbf1749e 100644
--- a/src/lib/formats/d80_dsk.c
+++ b/src/lib/formats/d80_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/d80_dsk.h"
d80_format::d80_format() : d64_format(file_formats)
diff --git a/src/lib/formats/d81_dsk.c b/src/lib/formats/d81_dsk.c
index 4c04ef51293..714b9c3cd9e 100644
--- a/src/lib/formats/d81_dsk.c
+++ b/src/lib/formats/d81_dsk.c
@@ -73,7 +73,8 @@ PER SECTOR ORGANIZATION:
*/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/d81_dsk.h"
d81_format::d81_format() : wd177x_format(formats)
diff --git a/src/lib/formats/d82_dsk.c b/src/lib/formats/d82_dsk.c
index 4d89f5e1313..dfcff3a1f27 100644
--- a/src/lib/formats/d82_dsk.c
+++ b/src/lib/formats/d82_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/d82_dsk.h"
d82_format::d82_format() : d80_format(file_formats)
diff --git a/src/lib/formats/d88_dsk.c b/src/lib/formats/d88_dsk.c
index 0d41d49db5e..abb2eac3079 100644
--- a/src/lib/formats/d88_dsk.c
+++ b/src/lib/formats/d88_dsk.c
@@ -27,7 +27,8 @@
*
*/
-#include "emu.h"
+ #include <assert.h>
+
#include "flopimg.h"
#include "imageutl.h"
@@ -390,7 +391,6 @@ FLOPPY_CONSTRUCT(d88_dsk_construct)
*********************************************************************/
-#include "emu.h"
#include "d88_dsk.h"
d88_format::d88_format()
diff --git a/src/lib/formats/dcp_dsk.c b/src/lib/formats/dcp_dsk.c
index bdcc2966036..dc05f4a4b44 100644
--- a/src/lib/formats/dcp_dsk.c
+++ b/src/lib/formats/dcp_dsk.c
@@ -20,7 +20,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "dcp_dsk.h"
dcp_format::dcp_format()
diff --git a/src/lib/formats/dfi_dsk.c b/src/lib/formats/dfi_dsk.c
index 28a774c906e..16341f55b26 100644
--- a/src/lib/formats/dfi_dsk.c
+++ b/src/lib/formats/dfi_dsk.c
@@ -11,18 +11,18 @@
* Correctly note exact index timing.
*/
-#include "emu.h"
+#include "emu.h" // fatalerror
#include "dfi_dsk.h"
#include <zlib.h>
#define NUMBER_OF_MULTIREADS 3
// threshholds for brickwall windowing
-//define MIN_CLOCKS 65
+//define DFI_MIN_CLOCKS 65
// number_please apple2 wants 40 min
-#define MIN_CLOCKS 60
+#define DFI_MIN_CLOCKS 60
//define MAX_CLOCKS 260
-#define MAX_CLOCKS 270
-#define MIN_THRESH (MIN_CLOCKS*(clock_rate/25000000))
-#define MAX_THRESH (MAX_CLOCKS*(clock_rate/25000000))
+#define DFI_MAX_CLOCKS 270
+#define MIN_THRESH (DFI_MIN_CLOCKS*(clock_rate/25000000))
+#define MAX_THRESH (DFI_MAX_CLOCKS*(clock_rate/25000000))
// constants to help guess clockrate and rpm
// constant is 25mhz / 6 revolutions per second (360rpm) = 4166667 +- 2.5%
#define REV25_MIN 4062500
diff --git a/src/lib/formats/dim_dsk.c b/src/lib/formats/dim_dsk.c
index 8287647483e..b78bec1ba31 100644
--- a/src/lib/formats/dim_dsk.c
+++ b/src/lib/formats/dim_dsk.c
@@ -7,8 +7,8 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
-#include "emu.h"
#include "dim_dsk.h"
#include "basicdsk.h"
@@ -105,13 +105,12 @@ FLOPPY_CONSTRUCT(dim_dsk_construct)
// copyright-holders:Olivier Galibert
/*********************************************************************
- formats/dim_dsk.h
+ formats/dim_dsk.c
DIM disk images
*********************************************************************/
-#include "emu.h"
#include "dim_dsk.h"
dim_format::dim_format()
diff --git a/src/lib/formats/dip_dsk.c b/src/lib/formats/dip_dsk.c
index 85f142df8fa..ae320e4cb7e 100644
--- a/src/lib/formats/dip_dsk.c
+++ b/src/lib/formats/dip_dsk.c
@@ -14,7 +14,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "dip_dsk.h"
dip_format::dip_format()
diff --git a/src/lib/formats/dmk_dsk.c b/src/lib/formats/dmk_dsk.c
index 2af453d66fa..1c87d268b48 100644
--- a/src/lib/formats/dmk_dsk.c
+++ b/src/lib/formats/dmk_dsk.c
@@ -13,7 +13,8 @@ TODO:
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "dmk_dsk.h"
diff --git a/src/lib/formats/dmv_dsk.c b/src/lib/formats/dmv_dsk.c
index 2dabe9ff05e..02469ed74d4 100644
--- a/src/lib/formats/dmv_dsk.c
+++ b/src/lib/formats/dmv_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/dmv_dsk.h"
dmv_format::dmv_format() : upd765_format(formats)
diff --git a/src/lib/formats/dsk_dsk.c b/src/lib/formats/dsk_dsk.c
index 93ae590e846..6129ff72b77 100644
--- a/src/lib/formats/dsk_dsk.c
+++ b/src/lib/formats/dsk_dsk.c
@@ -7,8 +7,8 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
-#include "emu.h"
#include "imageutl.h"
#include "flopimg.h"
@@ -264,7 +264,6 @@ FLOPPY_CONSTRUCT( dsk_dsk_construct )
return FLOPPY_ERROR_SUCCESS;
}
-#include "emu.h"
#include "dsk_dsk.h"
#define DSK_FORMAT_HEADER "MV - CPC"
diff --git a/src/lib/formats/ep64_dsk.c b/src/lib/formats/ep64_dsk.c
index ee63ee20ab9..80981bf698e 100644
--- a/src/lib/formats/ep64_dsk.c
+++ b/src/lib/formats/ep64_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/ep64_dsk.h"
ep64_format::ep64_format() : wd177x_format(formats)
diff --git a/src/lib/formats/esq16_dsk.c b/src/lib/formats/esq16_dsk.c
index 4b370cfe0bd..01b1120e677 100644
--- a/src/lib/formats/esq16_dsk.c
+++ b/src/lib/formats/esq16_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "flopimg.h"
#include "formats/esq16_dsk.h"
diff --git a/src/lib/formats/esq8_dsk.c b/src/lib/formats/esq8_dsk.c
index 8af0bc46a84..763c303d20a 100644
--- a/src/lib/formats/esq8_dsk.c
+++ b/src/lib/formats/esq8_dsk.c
@@ -10,7 +10,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "flopimg.h"
#include "formats/esq8_dsk.h"
diff --git a/src/lib/formats/excali64_dsk.c b/src/lib/formats/excali64_dsk.c
index 5de86815099..cff39939171 100644
--- a/src/lib/formats/excali64_dsk.c
+++ b/src/lib/formats/excali64_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/excali64_dsk.h"
excali64_format::excali64_format() : wd177x_format(formats)
diff --git a/src/lib/formats/fc100_cas.c b/src/lib/formats/fc100_cas.c
index 64deef962a0..415d3fb01db 100644
--- a/src/lib/formats/fc100_cas.c
+++ b/src/lib/formats/fc100_cas.c
@@ -10,6 +10,8 @@ it's all a guess.
********************************************************************/
+#include <assert.h>
+
#include "fc100_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/fdd_dsk.c b/src/lib/formats/fdd_dsk.c
index e9d76a99973..10d9958ca59 100644
--- a/src/lib/formats/fdd_dsk.c
+++ b/src/lib/formats/fdd_dsk.c
@@ -31,7 +31,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "fdd_dsk.h"
fdd_format::fdd_format()
diff --git a/src/lib/formats/fdi_dsk.c b/src/lib/formats/fdi_dsk.c
index 9bf9019f5d3..9d556f66e9a 100644
--- a/src/lib/formats/fdi_dsk.c
+++ b/src/lib/formats/fdi_dsk.c
@@ -14,6 +14,7 @@
*/
+#include <assert.h>
#include "imageutl.h"
#include "flopimg.h"
diff --git a/src/lib/formats/flex_dsk.c b/src/lib/formats/flex_dsk.c
index 975cf246ecf..34aa965643d 100644
--- a/src/lib/formats/flex_dsk.c
+++ b/src/lib/formats/flex_dsk.c
@@ -4,7 +4,7 @@
* Created on: 24/06/2014
*/
-#include "emu.h"
+ #include "emu.h" // logerror
#include "flex_dsk.h"
flex_format::flex_format()
diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c
index 2f3260366ce..5b9e5f7ee03 100644
--- a/src/lib/formats/flopimg.c
+++ b/src/lib/formats/flopimg.c
@@ -10,10 +10,10 @@
#include <string.h>
#include <stdio.h>
#include <ctype.h>
-#include <assert.h>
#include <limits.h>
+#include <assert.h>
-#include "emu.h"
+#include "emu.h" // emu_fatalerror
#include "osdcore.h"
#include "ioprocs.h"
#include "flopimg.h"
diff --git a/src/lib/formats/fm7_cas.c b/src/lib/formats/fm7_cas.c
index 32ec7390459..48b0239f738 100644
--- a/src/lib/formats/fm7_cas.c
+++ b/src/lib/formats/fm7_cas.c
@@ -2,6 +2,8 @@
* Fujitsu FM-7 series cassette handling
*/
+#include <assert.h>
+
#include "fm7_cas.h"
#define WAVE_HIGH 0x5a9e
diff --git a/src/lib/formats/fmsx_cas.c b/src/lib/formats/fmsx_cas.c
index 082be3cda3f..54b64ae4d01 100644
--- a/src/lib/formats/fmsx_cas.c
+++ b/src/lib/formats/fmsx_cas.c
@@ -1,3 +1,5 @@
+#include <assert.h>
+
#include "formats/fmsx_cas.h"
diff --git a/src/lib/formats/fmtowns_dsk.c b/src/lib/formats/fmtowns_dsk.c
index 71db43650ba..83bfd2fbd51 100644
--- a/src/lib/formats/fmtowns_dsk.c
+++ b/src/lib/formats/fmtowns_dsk.c
@@ -6,7 +6,8 @@
* Created on: 23/03/2014
*/
-#include "emu.h"
+ #include <assert.h>
+
#include "formats/fmtowns_dsk.h"
fmtowns_format::fmtowns_format() : wd177x_format(formats)
diff --git a/src/lib/formats/g64_dsk.c b/src/lib/formats/g64_dsk.c
index 5beba1ca35f..a2500b473cd 100644
--- a/src/lib/formats/g64_dsk.c
+++ b/src/lib/formats/g64_dsk.c
@@ -10,7 +10,7 @@
*********************************************************************/
-#include "emu.h"
+#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/gtp_cas.c b/src/lib/formats/gtp_cas.c
index 47baa0aba7e..0fe391e9767 100644
--- a/src/lib/formats/gtp_cas.c
+++ b/src/lib/formats/gtp_cas.c
@@ -4,6 +4,8 @@
Miodrag Milanovic
*/
+#include <assert.h>
+
#include "gtp_cas.h"
diff --git a/src/lib/formats/hect_dsk.c b/src/lib/formats/hect_dsk.c
index d3644afd536..50e112f0774 100644
--- a/src/lib/formats/hect_dsk.c
+++ b/src/lib/formats/hect_dsk.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/hect_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/hect_tap.c b/src/lib/formats/hect_tap.c
index ad67de93ecc..745cf2a0038 100644
--- a/src/lib/formats/hect_tap.c
+++ b/src/lib/formats/hect_tap.c
@@ -12,6 +12,8 @@ You can find some *.K7 file on serveral server in France
Updated 3/1/10 : use real value for timing.
********************************************************************/
+#include <assert.h>
+
#include "hect_tap.h"
diff --git a/src/lib/formats/hxcmfm_dsk.c b/src/lib/formats/hxcmfm_dsk.c
index 967f05539a3..0203f8f7e26 100644
--- a/src/lib/formats/hxcmfm_dsk.c
+++ b/src/lib/formats/hxcmfm_dsk.c
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include "emu.h"
+
+#include <assert.h>
#include "hxcmfm_dsk.h"
diff --git a/src/lib/formats/imd_dsk.c b/src/lib/formats/imd_dsk.c
index ef5478f638f..78f073fef1d 100644
--- a/src/lib/formats/imd_dsk.c
+++ b/src/lib/formats/imd_dsk.c
@@ -7,7 +7,7 @@
*********************************************************************/
#include <string.h>
-#include "emu.h"
+#include <assert.h>
#include "flopimg.h"
struct imddsk_tag
@@ -279,13 +279,13 @@ FLOPPY_CONSTRUCT( imd_dsk_construct )
// copyright-holders:Olivier Galibert
/*********************************************************************
- formats/imd_dsk.h
+ formats/imd_dsk.c
IMD disk images
*********************************************************************/
-#include "emu.h"
+#include "emu.h" // emu_fatalerror
#include "imd_dsk.h"
imd_format::imd_format()
diff --git a/src/lib/formats/ioprocs.c b/src/lib/formats/ioprocs.c
index 3c47414ae00..b1771bf3774 100644
--- a/src/lib/formats/ioprocs.c
+++ b/src/lib/formats/ioprocs.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#include "osdcore.h"
#include "ioprocs.h"
#include "corefile.h"
diff --git a/src/lib/formats/ipf_dsk.c b/src/lib/formats/ipf_dsk.c
index 7e1704f9b55..3cbd46dcb5a 100644
--- a/src/lib/formats/ipf_dsk.c
+++ b/src/lib/formats/ipf_dsk.c
@@ -1,4 +1,4 @@
-#include "emu.h"
+#include <assert.h>
#include "ipf_dsk.h"
const floppy_format_type FLOPPY_IPF_FORMAT = &floppy_image_format_creator<ipf_format>;
diff --git a/src/lib/formats/iq151_dsk.c b/src/lib/formats/iq151_dsk.c
index f0df2c19555..dcffad85751 100644
--- a/src/lib/formats/iq151_dsk.c
+++ b/src/lib/formats/iq151_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/iq151_dsk.h"
iq151_format::iq151_format() : upd765_format(formats)
diff --git a/src/lib/formats/itt3030_dsk.c b/src/lib/formats/itt3030_dsk.c
index 7e0a5709897..7fed1bf3505 100644
--- a/src/lib/formats/itt3030_dsk.c
+++ b/src/lib/formats/itt3030_dsk.c
@@ -10,7 +10,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/itt3030_dsk.h"
itt3030_format::itt3030_format() : wd177x_format(formats)
diff --git a/src/lib/formats/kaypro_dsk.c b/src/lib/formats/kaypro_dsk.c
index 3781bb3de0a..e9924ce11c9 100644
--- a/src/lib/formats/kaypro_dsk.c
+++ b/src/lib/formats/kaypro_dsk.c
@@ -16,7 +16,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/kaypro_dsk.h"
kayproii_format::kayproii_format() : upd765_format(formats)
diff --git a/src/lib/formats/kc85_dsk.c b/src/lib/formats/kc85_dsk.c
index 0787ef5e82e..84111ff1171 100644
--- a/src/lib/formats/kc85_dsk.c
+++ b/src/lib/formats/kc85_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/kc85_dsk.h"
kc85_format::kc85_format() : upd765_format(formats)
diff --git a/src/lib/formats/kc_cas.c b/src/lib/formats/kc_cas.c
index 9198a98c4d5..7791afd2e7a 100644
--- a/src/lib/formats/kc_cas.c
+++ b/src/lib/formats/kc_cas.c
@@ -13,6 +13,8 @@
********************************************************************/
+#include <assert.h>
+
#include "kc_cas.h"
#define SMPLO -32768
diff --git a/src/lib/formats/kim1_cas.c b/src/lib/formats/kim1_cas.c
index c3e048e6acc..b8433c0eea0 100644
--- a/src/lib/formats/kim1_cas.c
+++ b/src/lib/formats/kim1_cas.c
@@ -1,3 +1,5 @@
+#include <assert.h>
+
#include "kim1_cas.h"
#define SMPLO -32768
diff --git a/src/lib/formats/lviv_lvt.c b/src/lib/formats/lviv_lvt.c
index 62de1d63981..87a56a6e2c2 100644
--- a/src/lib/formats/lviv_lvt.c
+++ b/src/lib/formats/lviv_lvt.c
@@ -1,4 +1,6 @@
/* .LVT tape images */
+#include <assert.h>
+
#include "lviv_lvt.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/m20_dsk.c b/src/lib/formats/m20_dsk.c
index 0371f595d63..abd2cf1b2cb 100644
--- a/src/lib/formats/m20_dsk.c
+++ b/src/lib/formats/m20_dsk.c
@@ -13,8 +13,8 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
-#include "emu.h"
#include "m20_dsk.h"
#include "basicdsk.h"
@@ -180,7 +180,6 @@ LEGACY_FLOPPY_OPTIONS_END
*********************************************************************/
-#include "emu.h"
#include "formats/m20_dsk.h"
m20_format::m20_format()
diff --git a/src/lib/formats/m5_dsk.c b/src/lib/formats/m5_dsk.c
index fc8f9f98d43..9652eedbb72 100644
--- a/src/lib/formats/m5_dsk.c
+++ b/src/lib/formats/m5_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/m5_dsk.h"
m5_format::m5_format() : upd765_format(formats)
diff --git a/src/lib/formats/mbee_cas.c b/src/lib/formats/mbee_cas.c
index 592ae38e627..fe0a2ffbc24 100644
--- a/src/lib/formats/mbee_cas.c
+++ b/src/lib/formats/mbee_cas.c
@@ -56,6 +56,8 @@ TAP - has an ID header of TAP_DGOS_BEE or MBEE, null terminated.
********************************************************************/
+#include <assert.h>
+
#include "mbee_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/mfi_dsk.c b/src/lib/formats/mfi_dsk.c
index 13a23abe94b..2bd4b326501 100644
--- a/src/lib/formats/mfi_dsk.c
+++ b/src/lib/formats/mfi_dsk.c
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include "emu.h"
+#include <assert.h>
+
#include "mfi_dsk.h"
#include <zlib.h>
diff --git a/src/lib/formats/mm_dsk.c b/src/lib/formats/mm_dsk.c
index 53939295378..0634c0e3ede 100644
--- a/src/lib/formats/mm_dsk.c
+++ b/src/lib/formats/mm_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/mm_dsk.h"
mm1_format::mm1_format() : upd765_format(formats)
diff --git a/src/lib/formats/msx_dsk.c b/src/lib/formats/msx_dsk.c
index df1a318ab6e..11817d8ab32 100644
--- a/src/lib/formats/msx_dsk.c
+++ b/src/lib/formats/msx_dsk.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/msx_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/mz_cas.c b/src/lib/formats/mz_cas.c
index d7897ddf56f..56662f6c760 100644
--- a/src/lib/formats/mz_cas.c
+++ b/src/lib/formats/mz_cas.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <assert.h>
#include "mz_cas.h"
#ifndef VERBOSE
diff --git a/src/lib/formats/nanos_dsk.c b/src/lib/formats/nanos_dsk.c
index fd8478b5b45..1536d0677c8 100644
--- a/src/lib/formats/nanos_dsk.c
+++ b/src/lib/formats/nanos_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/nanos_dsk.h"
nanos_format::nanos_format() : upd765_format(formats)
diff --git a/src/lib/formats/naslite_dsk.c b/src/lib/formats/naslite_dsk.c
index da043358b16..342407a7c95 100644
--- a/src/lib/formats/naslite_dsk.c
+++ b/src/lib/formats/naslite_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/naslite_dsk.h"
naslite_format::naslite_format() : upd765_format(formats)
diff --git a/src/lib/formats/nes_dsk.c b/src/lib/formats/nes_dsk.c
index 99878833f27..ce62b4fba0e 100644
--- a/src/lib/formats/nes_dsk.c
+++ b/src/lib/formats/nes_dsk.c
@@ -8,6 +8,7 @@
#include <string.h>
+#include <assert.h>
#include "formats/nes_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/nfd_dsk.c b/src/lib/formats/nfd_dsk.c
index ea886e9dd3a..083d59417b2 100644
--- a/src/lib/formats/nfd_dsk.c
+++ b/src/lib/formats/nfd_dsk.c
@@ -77,7 +77,8 @@
*********************************************************************/
-#include "emu.h"
+ #include <assert.h>
+
#include "nfd_dsk.h"
nfd_format::nfd_format()
diff --git a/src/lib/formats/orao_cas.c b/src/lib/formats/orao_cas.c
index 78080b19f1b..c771b234dda 100644
--- a/src/lib/formats/orao_cas.c
+++ b/src/lib/formats/orao_cas.c
@@ -3,6 +3,8 @@
Tape support for Orao TAP format
*/
+#include <assert.h>
+
#include "orao_cas.h"
diff --git a/src/lib/formats/oric_dsk.c b/src/lib/formats/oric_dsk.c
index aaef1928f0a..340fb507c2d 100644
--- a/src/lib/formats/oric_dsk.c
+++ b/src/lib/formats/oric_dsk.c
@@ -8,7 +8,7 @@
*********************************************************************/
-#include "emu.h"
+#include "emu.h" // logerror
#include "formats/oric_dsk.h"
oric_dsk_format::oric_dsk_format()
diff --git a/src/lib/formats/oric_tap.c b/src/lib/formats/oric_tap.c
index ac6e6c0f72a..123552eea7a 100644
--- a/src/lib/formats/oric_tap.c
+++ b/src/lib/formats/oric_tap.c
@@ -1,3 +1,5 @@
+#include <assert.h>
+
#include "oric_tap.h"
#define ORIC_WAV_DEBUG 0
diff --git a/src/lib/formats/p6001_cas.c b/src/lib/formats/p6001_cas.c
index 78e5e929963..debe3f3b261 100644
--- a/src/lib/formats/p6001_cas.c
+++ b/src/lib/formats/p6001_cas.c
@@ -2,6 +2,8 @@
* NEC PC-6001 cassette format handling
*/
+#include <assert.h>
+
#include "p6001_cas.h"
#define WAVE_HIGH 0x5a9e
diff --git a/src/lib/formats/pasti_dsk.c b/src/lib/formats/pasti_dsk.c
index e78f816b8df..c39954490b8 100644
--- a/src/lib/formats/pasti_dsk.c
+++ b/src/lib/formats/pasti_dsk.c
@@ -1,4 +1,4 @@
-#include "emu.h"
+#include "emu.h" // logerror
#include "pasti_dsk.h"
// Pasti format supported using the documentation at
diff --git a/src/lib/formats/pc98_dsk.c b/src/lib/formats/pc98_dsk.c
index df527f92cc4..6ef28d01eeb 100644
--- a/src/lib/formats/pc98_dsk.c
+++ b/src/lib/formats/pc98_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "formats/pc98_dsk.h"
diff --git a/src/lib/formats/pc98fdi_dsk.c b/src/lib/formats/pc98fdi_dsk.c
index 81aeaf7a42b..83433606400 100644
--- a/src/lib/formats/pc98fdi_dsk.c
+++ b/src/lib/formats/pc98fdi_dsk.c
@@ -8,7 +8,7 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
#include "pc98fdi_dsk.h"
pc98fdi_format::pc98fdi_format()
diff --git a/src/lib/formats/pc_dsk.c b/src/lib/formats/pc_dsk.c
index 45a076cc91c..152dffed15a 100644
--- a/src/lib/formats/pc_dsk.c
+++ b/src/lib/formats/pc_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "formats/pc_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/phc25_cas.c b/src/lib/formats/phc25_cas.c
index a0d807a335c..1253bd98a3a 100644
--- a/src/lib/formats/phc25_cas.c
+++ b/src/lib/formats/phc25_cas.c
@@ -29,6 +29,8 @@ enough to make it work.
********************************************************************/
+#include <assert.h>
+
#include "phc25_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/pmd_cas.c b/src/lib/formats/pmd_cas.c
index eefb8fc9622..ba5baee1a65 100644
--- a/src/lib/formats/pmd_cas.c
+++ b/src/lib/formats/pmd_cas.c
@@ -10,6 +10,8 @@
********************************************************************/
+#include <assert.h>
+
#include "pmd_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/primoptp.c b/src/lib/formats/primoptp.c
index ad8606617d9..6373d43fd4f 100644
--- a/src/lib/formats/primoptp.c
+++ b/src/lib/formats/primoptp.c
@@ -1,6 +1,8 @@
/* .PTP Microkey Primo tape images */
+#include <assert.h>
+
#include "primoptp.h"
diff --git a/src/lib/formats/pyldin_dsk.c b/src/lib/formats/pyldin_dsk.c
index 07d75f58724..de43ab1947b 100644
--- a/src/lib/formats/pyldin_dsk.c
+++ b/src/lib/formats/pyldin_dsk.c
@@ -8,7 +8,7 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
#include "formats/pyldin_dsk.h"
pyldin_format::pyldin_format() : upd765_format(formats)
diff --git a/src/lib/formats/ql_dsk.c b/src/lib/formats/ql_dsk.c
index 5351a92c83f..b3ceb233218 100644
--- a/src/lib/formats/ql_dsk.c
+++ b/src/lib/formats/ql_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/ql_dsk.h"
ql_format::ql_format() : wd177x_format(formats)
diff --git a/src/lib/formats/rk_cas.c b/src/lib/formats/rk_cas.c
index 2a20a8499ab..150b17c8f3b 100644
--- a/src/lib/formats/rk_cas.c
+++ b/src/lib/formats/rk_cas.c
@@ -3,6 +3,8 @@
Tape support for RK format
*/
+#include <assert.h>
+
#include "rk_cas.h"
diff --git a/src/lib/formats/rx50_dsk.c b/src/lib/formats/rx50_dsk.c
index 4ece096fba6..429f22eafec 100644
--- a/src/lib/formats/rx50_dsk.c
+++ b/src/lib/formats/rx50_dsk.c
@@ -27,7 +27,8 @@
FORMAT A: /F:160 on DOS; turn MEDIACHK ON
************************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "flopimg.h"
#include "formats/rx50_dsk.h"
diff --git a/src/lib/formats/sc3000_bit.c b/src/lib/formats/sc3000_bit.c
index 4afe91371f9..f38f5a8d8c6 100644
--- a/src/lib/formats/sc3000_bit.c
+++ b/src/lib/formats/sc3000_bit.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "sc3000_bit.h"
/***************************************************************************
diff --git a/src/lib/formats/sf7000_dsk.c b/src/lib/formats/sf7000_dsk.c
index e15a42e7b41..31d0c37ab15 100644
--- a/src/lib/formats/sf7000_dsk.c
+++ b/src/lib/formats/sf7000_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/sf7000_dsk.h"
sf7000_format::sf7000_format() : upd765_format(formats)
diff --git a/src/lib/formats/smx_dsk.c b/src/lib/formats/smx_dsk.c
index 4729f65f8bb..9158a586c13 100644
--- a/src/lib/formats/smx_dsk.c
+++ b/src/lib/formats/smx_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/smx_dsk.h"
smx_format::smx_format() : wd177x_format(formats)
diff --git a/src/lib/formats/sol_cas.c b/src/lib/formats/sol_cas.c
index e5dc79cd21a..26f1bdccf00 100644
--- a/src/lib/formats/sol_cas.c
+++ b/src/lib/formats/sol_cas.c
@@ -34,6 +34,8 @@ SVT - The full explanation may be found on the Solace web site,
********************************************************************/
+#include <assert.h>
+
#include "sol_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/sorc_cas.c b/src/lib/formats/sorc_cas.c
index 99e9d46f7d9..6983dd0ba74 100644
--- a/src/lib/formats/sorc_cas.c
+++ b/src/lib/formats/sorc_cas.c
@@ -25,6 +25,8 @@ header and leader bytes.
********************************************************************/
+#include <assert.h>
+
#include "sorc_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/sorc_dsk.c b/src/lib/formats/sorc_dsk.c
index e7939456139..3c7aee10c33 100644
--- a/src/lib/formats/sorc_dsk.c
+++ b/src/lib/formats/sorc_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "sorc_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/sord_cas.c b/src/lib/formats/sord_cas.c
index cab593d66e8..a2834931a2a 100644
--- a/src/lib/formats/sord_cas.c
+++ b/src/lib/formats/sord_cas.c
@@ -7,6 +7,7 @@
**************************************************************************/
#include <string.h>
+#include <assert.h>
#include "sord_cas.h"
#define SORDM5_WAVESAMPLES_HEADER 1
diff --git a/src/lib/formats/spc1000_cas.c b/src/lib/formats/spc1000_cas.c
index b02c287d02b..b05844b6ee7 100644
--- a/src/lib/formats/spc1000_cas.c
+++ b/src/lib/formats/spc1000_cas.c
@@ -21,6 +21,8 @@ IPL: This seems a quickload format containing RAM dump, not a real tape
********************************************************************/
+#include <assert.h>
+
#include "spc1000_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/st_dsk.c b/src/lib/formats/st_dsk.c
index 72787b58a19..a30165993ea 100644
--- a/src/lib/formats/st_dsk.c
+++ b/src/lib/formats/st_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/st_dsk.h"
st_format::st_format()
diff --git a/src/lib/formats/svi_cas.c b/src/lib/formats/svi_cas.c
index edb015382ba..6b693b4d461 100644
--- a/src/lib/formats/svi_cas.c
+++ b/src/lib/formats/svi_cas.c
@@ -1,3 +1,5 @@
+#include <assert.h>
+
#include "svi_cas.h"
#define CAS_PERIOD_0 (37)
diff --git a/src/lib/formats/svi_dsk.c b/src/lib/formats/svi_dsk.c
index e94b2e2f94d..23dbb9a17e2 100644
--- a/src/lib/formats/svi_dsk.c
+++ b/src/lib/formats/svi_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "svi_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/tandy2k_dsk.c b/src/lib/formats/tandy2k_dsk.c
index cc15e75b17b..e08865c9493 100644
--- a/src/lib/formats/tandy2k_dsk.c
+++ b/src/lib/formats/tandy2k_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/tandy2k_dsk.h"
tandy2k_format::tandy2k_format() : upd765_format(formats)
diff --git a/src/lib/formats/td0_dsk.c b/src/lib/formats/td0_dsk.c
index cc5a72993a5..a9a7ed702a1 100644
--- a/src/lib/formats/td0_dsk.c
+++ b/src/lib/formats/td0_dsk.c
@@ -13,7 +13,7 @@
*/
#include <string.h>
-#include "emu.h"
+#include <assert.h>
#include "flopimg.h"
#define BUFSZ 512 // new input buffer
diff --git a/src/lib/formats/thom_cas.c b/src/lib/formats/thom_cas.c
index e48f217ead6..36fb6e4de51 100644
--- a/src/lib/formats/thom_cas.c
+++ b/src/lib/formats/thom_cas.c
@@ -7,6 +7,7 @@
**********************************************************************/
#include <math.h>
+#include <assert.h>
#include "pool.h"
#include "cassimg.h"
diff --git a/src/lib/formats/thom_dsk.c b/src/lib/formats/thom_dsk.c
index b3cf47234a2..4f7230f2421 100644
--- a/src/lib/formats/thom_dsk.c
+++ b/src/lib/formats/thom_dsk.c
@@ -9,6 +9,7 @@
*********************************************************************/
#include <string.h>
+#include <assert.h>
#include "thom_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/ti99_dsk.c b/src/lib/formats/ti99_dsk.c
index ab6c564fb79..d18ef3c4192 100644
--- a/src/lib/formats/ti99_dsk.c
+++ b/src/lib/formats/ti99_dsk.c
@@ -41,11 +41,11 @@
*
********************************************************************/
-#include "emu.h"
#include <string.h>
-#include <assert.h>
#include <time.h>
+#include <assert.h>
+#include "emu.h" // logerror
#include "imageutl.h"
#include "ti99_dsk.h"
@@ -835,6 +835,9 @@ void ti99_sdf_format::determine_sizes(io_generic *io, int& cell_size, int& secto
have_vib = true;
}
+ // Do we have a broken VIB? The Pascal disks are known to have such incomplete VIBs
+ if (heads == 0 || sector_count == 0) have_vib = false;
+
// We're also checking the size of the image
int cell_size1 = 0;
int sector_count1 = 0;
diff --git a/src/lib/formats/tiki100_dsk.c b/src/lib/formats/tiki100_dsk.c
index 4704f6e9911..1a05af7a5af 100644
--- a/src/lib/formats/tiki100_dsk.c
+++ b/src/lib/formats/tiki100_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/tiki100_dsk.h"
tiki100_format::tiki100_format() : wd177x_format(formats)
diff --git a/src/lib/formats/trd_dsk.c b/src/lib/formats/trd_dsk.c
index 6ee08e6a2c0..7cacd98fb4a 100644
--- a/src/lib/formats/trd_dsk.c
+++ b/src/lib/formats/trd_dsk.c
@@ -6,7 +6,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/trd_dsk.h"
trd_format::trd_format() : wd177x_format(formats)
diff --git a/src/lib/formats/trs_cas.c b/src/lib/formats/trs_cas.c
index 6956e488d4c..6e143200bc9 100644
--- a/src/lib/formats/trs_cas.c
+++ b/src/lib/formats/trs_cas.c
@@ -4,6 +4,8 @@ Support for TRS80 .cas cassette images
********************************************************************/
+#include <assert.h>
+
#include "formats/trs_cas.h"
#define SILENCE 0
diff --git a/src/lib/formats/trs_dsk.c b/src/lib/formats/trs_dsk.c
index 36c5a271622..ebe6090bcdc 100644
--- a/src/lib/formats/trs_dsk.c
+++ b/src/lib/formats/trs_dsk.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <assert.h>
#include "trs_dsk.h"
#include "basicdsk.h"
#include "coco_dsk.h"
diff --git a/src/lib/formats/tvc_cas.c b/src/lib/formats/tvc_cas.c
index a24b1ed79b1..a33fba687b9 100644
--- a/src/lib/formats/tvc_cas.c
+++ b/src/lib/formats/tvc_cas.c
@@ -8,6 +8,8 @@
********************************************************************/
+#include <assert.h>
+
#include "tvc_cas.h"
#define TVC64_BIT0_FREQ 1812
diff --git a/src/lib/formats/tvc_dsk.c b/src/lib/formats/tvc_dsk.c
index fdbe28365b5..8a2254cb7cc 100644
--- a/src/lib/formats/tvc_dsk.c
+++ b/src/lib/formats/tvc_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/tvc_dsk.h"
tvc_format::tvc_format() : wd177x_format(formats)
diff --git a/src/lib/formats/tzx_cas.c b/src/lib/formats/tzx_cas.c
index c7950138a09..71ad4c747f5 100644
--- a/src/lib/formats/tzx_cas.c
+++ b/src/lib/formats/tzx_cas.c
@@ -38,6 +38,8 @@ We are currently using the numbers from the TZX specification...
*/
+#include <assert.h>
+
#include "tzx_cas.h"
diff --git a/src/lib/formats/uef_cas.c b/src/lib/formats/uef_cas.c
index 60a4ade6775..6a5c8668c8e 100644
--- a/src/lib/formats/uef_cas.c
+++ b/src/lib/formats/uef_cas.c
@@ -12,6 +12,7 @@ Not nice, but it works...
#include <string.h>
#include <math.h>
+#include <assert.h>
#include <zlib.h>
#include "uef_cas.h"
diff --git a/src/lib/formats/upd765_dsk.c b/src/lib/formats/upd765_dsk.c
index 5966e1de1a3..b26da4c2d98 100644
--- a/src/lib/formats/upd765_dsk.c
+++ b/src/lib/formats/upd765_dsk.c
@@ -8,7 +8,7 @@
*********************************************************************/
-#include "emu.h"
+#include "emu.h" // emu_fatalerror
#include "formats/upd765_dsk.h"
upd765_format::upd765_format(const format *_formats)
diff --git a/src/lib/formats/vg5k_cas.c b/src/lib/formats/vg5k_cas.c
index 78e63cabb0b..ef648707fd8 100644
--- a/src/lib/formats/vg5k_cas.c
+++ b/src/lib/formats/vg5k_cas.c
@@ -5,6 +5,8 @@
Support for VG-5000 .k7 cassette images
********************************************************************/
+#include <assert.h>
+
#include "vg5k_cas.h"
diff --git a/src/lib/formats/victor9k_dsk.c b/src/lib/formats/victor9k_dsk.c
index 694ac3dbf80..020c4af46b3 100644
--- a/src/lib/formats/victor9k_dsk.c
+++ b/src/lib/formats/victor9k_dsk.c
@@ -97,7 +97,7 @@
zone.
*/
-#include "emu.h"
+#include "emu.h" // logerror, BIT, emu_fatalerror
#include "formats/victor9k_dsk.h"
victor9k_format::victor9k_format()
@@ -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 &current_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;
diff --git a/src/lib/formats/vt_cas.c b/src/lib/formats/vt_cas.c
index 4040b00d7aa..734954a2ab6 100644
--- a/src/lib/formats/vt_cas.c
+++ b/src/lib/formats/vt_cas.c
@@ -1,3 +1,5 @@
+#include <assert.h>
+
#include "formats/vt_cas.h"
/*********************************************************************
diff --git a/src/lib/formats/vt_dsk.c b/src/lib/formats/vt_dsk.c
index c4d1fdf91d8..0021b66eaa4 100644
--- a/src/lib/formats/vt_dsk.c
+++ b/src/lib/formats/vt_dsk.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#include "formats/vt_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/vtech1_dsk.c b/src/lib/formats/vtech1_dsk.c
index 4ee02c89104..d7194224ebd 100644
--- a/src/lib/formats/vtech1_dsk.c
+++ b/src/lib/formats/vtech1_dsk.c
@@ -6,6 +6,8 @@
*********************************************************************/
+#include <assert.h>
+
#include "formats/vtech1_dsk.h"
static FLOPPY_IDENTIFY( vtech1_dsk_identify )
diff --git a/src/lib/formats/wd177x_dsk.c b/src/lib/formats/wd177x_dsk.c
index 57223fecc2f..8ced951fd51 100644
--- a/src/lib/formats/wd177x_dsk.c
+++ b/src/lib/formats/wd177x_dsk.c
@@ -8,7 +8,7 @@
*********************************************************************/
-#include "emu.h"
+#include "emu.h" // emu_fatalerror
#include "formats/wd177x_dsk.h"
wd177x_format::wd177x_format(const format *_formats)
diff --git a/src/lib/formats/x07_cas.c b/src/lib/formats/x07_cas.c
index fb581f6a44c..54f46acd488 100644
--- a/src/lib/formats/x07_cas.c
+++ b/src/lib/formats/x07_cas.c
@@ -6,6 +6,8 @@
********************************************************************/
+#include <assert.h>
+
#include "x07_cas.h"
#define WAVEENTRY_LOW -32768
diff --git a/src/lib/formats/x1_tap.c b/src/lib/formats/x1_tap.c
index 3d42c41dad4..880037c8f3a 100644
--- a/src/lib/formats/x1_tap.c
+++ b/src/lib/formats/x1_tap.c
@@ -19,6 +19,8 @@
*
*/
+#include <assert.h>
+
#include "x1_tap.h"
#define WAVE_HIGH 0x5a9e
diff --git a/src/lib/formats/xdf_dsk.c b/src/lib/formats/xdf_dsk.c
index 6b81877b701..c77d685d9be 100644
--- a/src/lib/formats/xdf_dsk.c
+++ b/src/lib/formats/xdf_dsk.c
@@ -8,7 +8,8 @@
*********************************************************************/
-#include "emu.h"
+#include <assert.h>
+
#include "formats/xdf_dsk.h"
xdf_format::xdf_format() : upd765_format(formats)
diff --git a/src/lib/formats/z80ne_dsk.c b/src/lib/formats/z80ne_dsk.c
index 6394e177f4f..967fecd27f5 100644
--- a/src/lib/formats/z80ne_dsk.c
+++ b/src/lib/formats/z80ne_dsk.c
@@ -7,6 +7,7 @@
*********************************************************************/
#include <assert.h>
+
#include "z80ne_dsk.h"
#include "basicdsk.h"
#include "imageutl.h"
diff --git a/src/lib/formats/zx81_p.c b/src/lib/formats/zx81_p.c
index bfb871c3c51..e2e1e33f035 100644
--- a/src/lib/formats/zx81_p.c
+++ b/src/lib/formats/zx81_p.c
@@ -29,6 +29,8 @@ medium transfer rate is approx. 307 bps (38 bytes/sec) for files that contain
*****************************************************************************/
+#include <assert.h>
+
#include "zx81_p.h"