diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/cpu/alto2/a2roms.h | 2 | ||||
-rw-r--r-- | src/emu/cpu/e132xs/e132xs.c | 2 | ||||
-rw-r--r-- | src/emu/input.c | 12 | ||||
-rw-r--r-- | src/emu/sound/disc_sys.inc | 4 | ||||
-rw-r--r-- | src/emu/sound/fmopl.c | 10 | ||||
-rw-r--r-- | src/emu/sound/ym2413.c | 10 | ||||
-rw-r--r-- | src/emu/sound/ymf262.c | 10 | ||||
-rw-r--r-- | src/lib/formats/bbc_dsk.c | 53 | ||||
-rw-r--r-- | src/lib/formats/bbc_dsk.h | 33 | ||||
-rw-r--r-- | src/lib/formats/td0_dsk.c | 18 | ||||
-rw-r--r-- | src/mess/drivers/atarist.c | 3 | ||||
-rw-r--r-- | src/mess/drivers/bbc.c | 62 | ||||
-rw-r--r-- | src/mess/drivers/nascom1.c | 9 | ||||
-rw-r--r-- | src/mess/drivers/smc777.c | 20 | ||||
-rw-r--r-- | src/mess/includes/atarist.h | 3 | ||||
-rw-r--r-- | src/mess/includes/bbc.h | 4 | ||||
-rw-r--r-- | src/mess/machine/bbc.c | 98 | ||||
-rw-r--r-- | src/osd/windows/window.c | 4 |
18 files changed, 122 insertions, 235 deletions
diff --git a/src/emu/cpu/alto2/a2roms.h b/src/emu/cpu/alto2/a2roms.h index f1ffba032da..abd218344c9 100644 --- a/src/emu/cpu/alto2/a2roms.h +++ b/src/emu/cpu/alto2/a2roms.h @@ -30,7 +30,7 @@ typedef struct { } prom_load_t; #define ZERO 0 -#define KEEP ~0 +#define KEEP ~0U #define AMAP_DEFAULT {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} #define AMAP_CONST_PROM {3,2,1,4,5,6,7,0,} diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index fb156aae200..5c8cdf66b65 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -835,7 +835,7 @@ static const INT32 immediate_values[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 0, 0, 0, 32, 64, 128, 0x80000000, + 16, 0, 0, 0, 32, 64, 128, -2147483648 /*0x80000000 */, -8, -7, -6, -5, -4, -3, -2, -1 }; diff --git a/src/emu/input.c b/src/emu/input.c index 28337c7cf81..96fa1458368 100644 --- a/src/emu/input.c +++ b/src/emu/input.c @@ -139,7 +139,7 @@ static const code_string_table devclass_token_table[] = { DEVICE_CLASS_MOUSE, "MOUSECODE" }, { DEVICE_CLASS_LIGHTGUN, "GUNCODE" }, { DEVICE_CLASS_JOYSTICK, "JOYCODE" }, - { ~0, "UNKCODE" } + { ~0U, "UNKCODE" } }; // friendly strings for device classes @@ -149,7 +149,7 @@ static const code_string_table devclass_string_table[] = { DEVICE_CLASS_MOUSE, "Mouse" }, { DEVICE_CLASS_LIGHTGUN, "Gun" }, { DEVICE_CLASS_JOYSTICK, "Joy" }, - { ~0, "Unk" } + { ~0U, "Unk" } }; // token strings for item modifiers @@ -161,7 +161,7 @@ static const code_string_table modifier_token_table[] = { ITEM_MODIFIER_RIGHT, "RIGHT" }, { ITEM_MODIFIER_UP, "UP" }, { ITEM_MODIFIER_DOWN, "DOWN" }, - { ~0, "" } + { ~0U, "" } }; // friendly strings for item modifiers @@ -173,7 +173,7 @@ static const code_string_table modifier_string_table[] = { ITEM_MODIFIER_RIGHT, "Right" }, { ITEM_MODIFIER_UP, "Up" }, { ITEM_MODIFIER_DOWN, "Down" }, - { ~0, "" } + { ~0U, "" } }; // token strings for item classes @@ -182,7 +182,7 @@ static const code_string_table itemclass_token_table[] = { ITEM_CLASS_SWITCH, "SWITCH" }, { ITEM_CLASS_ABSOLUTE, "ABSOLUTE" }, { ITEM_CLASS_RELATIVE, "RELATIVE" }, - { ~0, "" } + { ~0U, "" } }; // token strings for standard item ids @@ -411,7 +411,7 @@ static const code_string_table itemid_token_table[] = { ITEM_ID_ADD_RELATIVE15,"ADDREL15" }, { ITEM_ID_ADD_RELATIVE16,"ADDREL16" }, - { ~0, NULL } + { ~0U, NULL } }; diff --git a/src/emu/sound/disc_sys.inc b/src/emu/sound/disc_sys.inc index b3c89188cad..402482bd156 100644 --- a/src/emu/sound/disc_sys.inc +++ b/src/emu/sound/disc_sys.inc @@ -28,8 +28,8 @@ *************************************/ // FIXME -//#undef I64FMT -//#define I64FMT "ll" +#undef I64FMT +#define I64FMT "ll" DISCRETE_START( dso_csvlog ) diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c index 98eda602c10..a681de4744c 100644 --- a/src/emu/sound/fmopl.c +++ b/src/emu/sound/fmopl.c @@ -344,7 +344,7 @@ static const int slot_array[32]= /* table is 3dB/octave , DV converts this into 6dB/octave */ /* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */ #define DV (0.1875/2.0) -static const UINT32 ksl_tab[8*16]= +static const double ksl_tab[8*16]= { /* OCT 0 */ 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, @@ -511,7 +511,7 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), /* multiple table */ #define ML 2 -static const UINT8 mul_tab[16]= { +static const double mul_tab[16]= { /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */ 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML, 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML @@ -1299,7 +1299,7 @@ static void OPL_initalize(FM_OPL *OPL) logerror("FMOPL.C: ksl_tab[oct=%2i] =",i); for (j=0; j<16; j++) { - logerror("%08x ", ksl_tab[i*16+j] ); + logerror("%08x ", (UINT32) ksl_tab[i*16+j] ); } logerror("\n"); } @@ -1388,7 +1388,7 @@ INLINE void set_mul(FM_OPL *OPL,int slot,int v) OPL_CH *CH = &OPL->P_CH[slot/2]; OPL_SLOT *SLOT = &CH->SLOT[slot&1]; - SLOT->mul = mul_tab[v&0x0f]; + SLOT->mul = (UINT8)mul_tab[v&0x0f]; SLOT->KSR = (v&0x10) ? 0 : 2; SLOT->eg_type = (v&0x20); SLOT->vib = (v&0x40); @@ -1674,7 +1674,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v) CH->block_fnum = block_fnum; - CH->ksl_base = ksl_tab[block_fnum>>6]; + CH->ksl_base = (UINT32) ksl_tab[block_fnum>>6]; CH->fc = OPL->fn_tab[block_fnum&0x03ff] >> (7-block); /* BLK 2,1,0 bits -> bits 3,2,1 of kcode */ diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c index 3e33f478a41..94d039bae9d 100644 --- a/src/emu/sound/ym2413.c +++ b/src/emu/sound/ym2413.c @@ -280,7 +280,7 @@ struct YM2413 /* table is 3dB/octave, DV converts this into 6dB/octave */ /* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */ #define DV (0.1875/1.0) -static const UINT32 ksl_tab[8*16]= +static const double ksl_tab[8*16]= { /* OCT 0 */ 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, @@ -447,7 +447,7 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), /* multiple table */ #define ML 2 -static const UINT8 mul_tab[16]= { +static const double mul_tab[16]= { /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */ 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML, 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML @@ -1367,7 +1367,7 @@ static void OPLL_initalize(YM2413 *chip, device_t *device) logerror("ym2413.c: ksl_tab[oct=%2i] =",i); for (j=0; j<16; j++) { - logerror("%08x ", ksl_tab[i*16+j] ); + logerror("%08x ", (UINT32)ksl_tab[i*16+j] ); } logerror("\n"); } @@ -1470,7 +1470,7 @@ INLINE void set_mul(YM2413 *chip,int slot,int v) OPLL_CH *CH = &chip->P_CH[slot/2]; OPLL_SLOT *SLOT = &CH->SLOT[slot&1]; - SLOT->mul = mul_tab[v&0x0f]; + SLOT->mul = (UINT8)mul_tab[v&0x0f]; SLOT->KSR = (v&0x10) ? 0 : 2; SLOT->eg_type = (v&0x20); SLOT->vib = (v&0x40); @@ -1839,7 +1839,7 @@ static void OPLLWriteReg(YM2413 *chip, int r, int v) /* BLK 2,1,0 bits -> bits 3,2,1 of kcode, FNUM MSB -> kcode LSB */ CH->kcode = (block_fnum&0x0f00)>>8; - CH->ksl_base = ksl_tab[block_fnum>>5]; + CH->ksl_base = (UINT32) ksl_tab[block_fnum>>5]; block_fnum = block_fnum * 2; block = (block_fnum&0x1c00) >> 10; diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c index aeb5df4c682..0f04a97eee1 100644 --- a/src/emu/sound/ymf262.c +++ b/src/emu/sound/ymf262.c @@ -297,7 +297,7 @@ static const int slot_array[32]= /* table is 3dB/octave , DV converts this into 6dB/octave */ /* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */ #define DV (0.1875/2.0) -static const UINT32 ksl_tab[8*16]= +static const double ksl_tab[8*16]= { /* OCT 0 */ 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, @@ -464,7 +464,7 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), /* multiple table */ #define ML 2 -static const UINT8 mul_tab[16]= { +static const double mul_tab[16]= { /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */ 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML, 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML @@ -1345,7 +1345,7 @@ static void OPL3_initalize(OPL3 *chip) logerror("YMF262.C: ksl_tab[oct=%2i] =",i); for (j=0; j<16; j++) { - logerror("%08x ", ksl_tab[i*16+j] ); + logerror("%08x ", (UINT32) ksl_tab[i*16+j] ); } logerror("\n"); } @@ -1438,7 +1438,7 @@ INLINE void set_mul(OPL3 *chip,int slot,int v) OPL3_CH *CH = &chip->P_CH[slot/2]; OPL3_SLOT *SLOT = &CH->SLOT[slot&1]; - SLOT->mul = mul_tab[v&0x0f]; + SLOT->mul = (UINT8)mul_tab[v&0x0f]; SLOT->KSR = (v&0x10) ? 0 : 2; SLOT->eg_type = (v&0x20); SLOT->vib = (v&0x40); @@ -1959,7 +1959,7 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v) CH->block_fnum = block_fnum; - CH->ksl_base = ksl_tab[block_fnum>>6]; + CH->ksl_base = (UINT32) ksl_tab[block_fnum>>6]; CH->fc = chip->fn_tab[block_fnum&0x03ff] >> (7-block); /* BLK 2,1,0 bits -> bits 3,2,1 of kcode */ diff --git a/src/lib/formats/bbc_dsk.c b/src/lib/formats/bbc_dsk.c deleted file mode 100644 index dfa21213e20..00000000000 --- a/src/lib/formats/bbc_dsk.c +++ /dev/null @@ -1,53 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Dirk Best -/*************************************************************************** - - BBC Micro - - Disk image format - -***************************************************************************/ - -#include "bbc_dsk.h" - -bbc_format::bbc_format() : wd177x_format(formats) -{ -} - -const char *bbc_format::name() const -{ - return "bbc"; -} - -const char *bbc_format::description() const -{ - return "BBC Micro disk image"; -} - -const char *bbc_format::extensions() const -{ - return "bbc,img,ssd,dsd"; -} - -const bbc_format::format bbc_format::formats[] = -{ - { // 100k single sided single density - floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, - 4000, 10, 40, 1, 256, {}, 0, {}, 16, 11, 19 - }, - { // 200k double sided single density - floppy_image::FF_525, floppy_image::DSSD, floppy_image::FM, - 4000, 10, 40, 2, 256, {}, 0, {}, 16, 11, 19 - }, - { // 200k single sided double density - floppy_image::FF_525, floppy_image::SSQD, floppy_image::FM, - 4000, 10, 80, 1, 256, {}, 0, {}, 16, 11, 19 - }, - { // 400k double sided double density - floppy_image::FF_525, floppy_image::DSQD, floppy_image::FM, - 4000, 10, 80, 2, 256, {}, 0, {}, 16, 11, 19 - }, - {} -}; - -const floppy_format_type FLOPPY_BBC_FORMAT = &floppy_image_format_creator<bbc_format>; diff --git a/src/lib/formats/bbc_dsk.h b/src/lib/formats/bbc_dsk.h deleted file mode 100644 index e2520781a15..00000000000 --- a/src/lib/formats/bbc_dsk.h +++ /dev/null @@ -1,33 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Dirk Best -/*************************************************************************** - - BBC Micro - - Disk image format - -***************************************************************************/ - -#pragma once - -#ifndef __BBC_DSK_H__ -#define __BBC_DSK_H__ - -#include "wd177x_dsk.h" - -class bbc_format : public wd177x_format -{ -public: - bbc_format(); - - virtual const char *name() const; - virtual const char *description() const; - virtual const char *extensions() const; - -private: - static const format formats[]; -}; - -extern const floppy_format_type FLOPPY_BBC_FORMAT; - -#endif // __BBC_DSK_H__ diff --git a/src/lib/formats/td0_dsk.c b/src/lib/formats/td0_dsk.c index f66a0552efd..185bb21cfed 100644 --- a/src/lib/formats/td0_dsk.c +++ b/src/lib/formats/td0_dsk.c @@ -16,6 +16,7 @@ #include <string.h> #include <assert.h> +#include "pool.h" #include "flopimg.h" #define BUFSZ 512 // new input buffer @@ -95,13 +96,28 @@ struct td0dsk_t struct floppy_image_legacy { struct io_generic io; + + const struct FloppyFormat *floppy_option; + struct FloppyCallbacks format; + + /* loaded track stuff */ + int loaded_track_head; + int loaded_track_index; + UINT32 loaded_track_size; + void *loaded_track_data; + UINT8 loaded_track_status; + UINT8 flags; + + /* tagging system */ + object_pool *tags; + void *tag_data; }; static struct td0dsk_tag *get_tag(floppy_image_legacy *floppy) { struct td0dsk_tag *tag; - tag = (td0dsk_tag *)floppy_tag(floppy); + tag = (td0dsk_tag *)floppy_tag((floppy_image_legacy *)floppy); return tag; } diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c index 7a3934ea371..024d82626ab 100644 --- a/src/mess/drivers/atarist.c +++ b/src/mess/drivers/atarist.c @@ -40,7 +40,7 @@ static const int IKBD_MOUSE_XYA[3][4] = { { 0, 0, 0, 0 }, { 1, 1, 0, 0 }, { 0, 1, 1, 0 } }; static const int IKBD_MOUSE_XYB[3][4] = { { 0, 0, 0, 0 }, { 0, 1, 1, 0 }, { 1, 1, 0, 0 } }; -static const int DMASOUND_RATE[] = { Y2/640/8, Y2/640/4, Y2/640/2, Y2/640 }; +static const int DMASOUND_RATE[] = { (int)(Y2/640/8), (int)(Y2/640/4), (int)(Y2/640/2), (int)(Y2/640) }; //************************************************************************** @@ -1927,7 +1927,6 @@ void st_state::state_save() save_item(NAME(m_acia_midi_irq)); } - //------------------------------------------------- // MACHINE_START( st ) //------------------------------------------------- diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c index 5a4df8785ac..aa1ae726ac3 100644 --- a/src/mess/drivers/bbc.c +++ b/src/mess/drivers/bbc.c @@ -57,7 +57,6 @@ /* Devices */ #include "imagedev/flopdrv.h" -#include "formats/bbc_dsk.h" #include "formats/basicdsk.h" #include "imagedev/cassette.h" #include "formats/uef_cas.h" @@ -610,19 +609,6 @@ static const floppy_interface bbc_floppy_interface = "floppy_5_25" }; -FLOPPY_FORMATS_MEMBER( bbc_state::floppy_formats ) - FLOPPY_BBC_FORMAT -FLOPPY_FORMATS_END - -static SLOT_INTERFACE_START( bbc_floppies ) - SLOT_INTERFACE("sssd", FLOPPY_525_SSSD) - SLOT_INTERFACE("sd", FLOPPY_525_SD) - SLOT_INTERFACE("ssdd", FLOPPY_525_SSDD) - SLOT_INTERFACE("dd", FLOPPY_525_DD) - SLOT_INTERFACE("ssqd", FLOPPY_525_SSQD) - SLOT_INTERFACE("qd", FLOPPY_525_QD) -SLOT_INTERFACE_END - WRITE_LINE_MEMBER(bbc_state::econet_clk_w) { m_adlc->rxc_w(state); @@ -774,14 +760,12 @@ static MACHINE_CONFIG_DERIVED( bbcb, bbca ) MCFG_I8271_IRQ_CALLBACK(WRITELINE(bbc_state, bbc_i8271_interrupt)) MCFG_I8271_FLOPPIES(FLOPPY_0, FLOPPY_1) - MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface) - - MCFG_WD1770x_ADD("wd177x", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) + MCFG_DEVICE_ADD("wd177x", WD1770, 0) + MCFG_WD17XX_DEFAULT_DRIVE2_TAGS + MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) + MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("wd177x:0", bbc_floppies, "qd", bbc_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd177x:1", bbc_floppies, "qd", bbc_state::floppy_formats) + MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface) /* software lists */ MCFG_DEVICE_REMOVE("cass_ls_a") @@ -838,14 +822,12 @@ static MACHINE_CONFIG_DERIVED( bbcb_us, bbca ) MCFG_I8271_IRQ_CALLBACK(WRITELINE(bbc_state, bbc_i8271_interrupt)) MCFG_I8271_FLOPPIES(FLOPPY_0, FLOPPY_1) - MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface) + MCFG_DEVICE_ADD("wd177x", WD1770, 0) + MCFG_WD17XX_DEFAULT_DRIVE2_TAGS + MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) + MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) - MCFG_WD1770x_ADD("wd177x", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) - - MCFG_FLOPPY_DRIVE_ADD("wd177x:0", bbc_floppies, "qd", bbc_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd177x:1", bbc_floppies, "qd", bbc_state::floppy_formats) + MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface) /* software lists */ MCFG_DEVICE_REMOVE("cass_ls_a") @@ -870,8 +852,6 @@ static MACHINE_CONFIG_DERIVED( bbcbp, bbcb ) /* fdc */ MCFG_DEVICE_REMOVE("i8271") - MCFG_DEVICE_REMOVE(FLOPPY_0) - MCFG_DEVICE_REMOVE(FLOPPY_1) MACHINE_CONFIG_END @@ -1001,12 +981,12 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) MCFG_VIA6522_IRQ_HANDLER(WRITELINE(bbc_state, bbcb_via_user_irq_w)) /* fdc */ - MCFG_WD1770x_ADD("wd177x", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) + MCFG_DEVICE_ADD("wd177x", WD1770, 0) + MCFG_WD17XX_DEFAULT_DRIVE2_TAGS + MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) + MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) - MCFG_FLOPPY_DRIVE_ADD("wd177x:0", bbc_floppies, "qd", bbc_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd177x:1", bbc_floppies, "qd", bbc_state::floppy_formats) + MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bbc_floppy_interface) /* econet */ MCFG_DEVICE_ADD("mc6854", MC6854, 0) @@ -1088,14 +1068,10 @@ static MACHINE_CONFIG_DERIVED( bbcmc, bbcm ) /* fdc */ MCFG_DEVICE_REMOVE("wd177x") - -// MCFG_WD1772x_ADD("wd177x", XTAL_16MHz / 2) - MCFG_WD1770x_ADD("wd177x", XTAL_16MHz / 2) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) - - MCFG_FLOPPY_DRIVE_ADD("wd177x:0", bbc_floppies, "qd", bbc_state::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd177x:1", bbc_floppies, "qd", bbc_state::floppy_formats) + MCFG_DEVICE_ADD("wd177x", WD1772, 0) + MCFG_WD17XX_DEFAULT_DRIVE2_TAGS + MCFG_WD17XX_INTRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_intrq_w)) + MCFG_WD17XX_DRQ_CALLBACK(WRITELINE(bbc_state, bbc_wd177x_drq_w)) /* software lists */ MCFG_SOFTWARE_LIST_REMOVE("cart_ls_m") diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c index 446b54fee60..ac1bde10eb7 100644 --- a/src/mess/drivers/nascom1.c +++ b/src/mess/drivers/nascom1.c @@ -72,7 +72,8 @@ public: DECLARE_READ8_MEMBER(nascom1_port_01_r); DECLARE_WRITE8_MEMBER(nascom1_port_01_w); DECLARE_READ8_MEMBER(nascom1_port_02_r); - virtual DECLARE_DRIVER_INIT(nascom); + // FIXME + /*virtual*/ DECLARE_DRIVER_INIT(nascom); void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height); DECLARE_READ8_MEMBER(nascom1_hd6402_si); DECLARE_WRITE8_MEMBER(nascom1_hd6402_so); @@ -112,9 +113,9 @@ public: DECLARE_WRITE_LINE_MEMBER(ram_disable_w); DECLARE_WRITE_LINE_MEMBER(ram_disable_cpm_w); - - virtual DECLARE_DRIVER_INIT(nascom); - virtual DECLARE_DRIVER_INIT(nascomc); + // FIXME + /*virtual*/ DECLARE_DRIVER_INIT(nascom); + /*virtual*/ DECLARE_DRIVER_INIT(nascomc); UINT32 screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id); diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c index 7c20dd29067..05089f3b07d 100644 --- a/src/mess/drivers/smc777.c +++ b/src/mess/drivers/smc777.c @@ -910,30 +910,30 @@ static const UINT8 smc777_keytable[2][0xa0] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* numpad */ 0x38, 0x39, 0x2f, 0x2a, 0x2d, 0x2b, 0x0d, 0x2e, - -1, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* A - G */ + 0xff, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* A - G */ 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* H - O */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* P - W */ - 0x78, 0x79, 0x7a, 0x2d, 0x5d, 0x60, -1, -1, /* X - Z */ + 0x78, 0x79, 0x7a, 0x2d, 0x5d, 0x60, 0xff, 0xff, /* X - Z */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0 - 7*/ - 0x38, 0x39, 0x3b, 0x5c, 0x2c, 0x2e, 0x2f, -1, /* 8 - 9 */ - 0x0d, 0x20, 0x08, 0x09, 0x1b, 0x0f, 0x11, -1, + 0x38, 0x39, 0x3b, 0x5c, 0x2c, 0x2e, 0x2f, 0xff, /* 8 - 9 */ + 0x0d, 0x20, 0x08, 0x09, 0x1b, 0x0f, 0x11, 0xff, 0x17, 0x1c, 0x16, 0x19, 0x14, 0x0e, 0x12, 0x03, - 0x01, 0x02, 0x04, 0x06, 0x0b, -1, -1, -1, + 0x01, 0x02, 0x04, 0x06, 0x0b, 0xff, 0xff, 0xff, }, /* shift */ { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* numpad */ 0x38, 0x39, 0x2f, 0x2a, 0x2d, 0x2b, 0x0d, 0x2e, - -1, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0xff, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* H - O */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* P - W */ - 0x58, 0x59, 0x5a, 0x5f, 0x7d, 0x7e, -1, -1, /* X - Z */ + 0x58, 0x59, 0x5a, 0x5f, 0x7d, 0x7e, 0xff, 0xff, /* X - Z */ 0x29, 0x21, 0x40, 0x23, 0x24, 0x25, 0x5e, 0x26, - 0x2a, 0x28, 0x3a, 0x7c, 0x3c, 0x3e, 0x3f, -1, - 0x0d, 0x20, 0x08, 0x09, 0x1b, 0x0f, 0x11, -1, + 0x2a, 0x28, 0x3a, 0x7c, 0x3c, 0x3e, 0x3f, 0xff, + 0x0d, 0x20, 0x08, 0x09, 0x1b, 0x0f, 0x11, 0xff, 0x17, 0x1c, 0x16, 0x19, 0x14, 0x0e, 0x12, 0x03, - 0x15, 0x18, 0x12, 0x05, 0x03, -1, -1, -1, /* F1 - F5 */ + 0x15, 0x18, 0x12, 0x05, 0x03, 0xff, 0xff, 0xff, /* F1 - F5 */ } }; diff --git a/src/mess/includes/atarist.h b/src/mess/includes/atarist.h index 42435619f25..d9b3d8be175 100644 --- a/src/mess/includes/atarist.h +++ b/src/mess/includes/atarist.h @@ -332,7 +332,8 @@ public: int m_monochrome; required_device<palette_device> m_palette; - virtual DECLARE_WRITE_LINE_MEMBER( write_monochrome ); + // make GCC 5.1 happy.. FIXME + /*virtual*/ DECLARE_WRITE_LINE_MEMBER( write_monochrome ); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); diff --git a/src/mess/includes/bbc.h b/src/mess/includes/bbc.h index 499283e8ec3..d86172860b9 100644 --- a/src/mess/includes/bbc.h +++ b/src/mess/includes/bbc.h @@ -20,7 +20,7 @@ #include "machine/mc6854.h" #include "machine/ram.h" #include "machine/i8271.h" -#include "machine/wd_fdc.h" +#include "machine/wd17xx.h" #include "machine/upd7002.h" #include "video/mc6845.h" #include "video/saa5050.h" @@ -80,8 +80,6 @@ public: m_palette(*this, "palette") { } - DECLARE_FLOPPY_FORMATS(floppy_formats); - DECLARE_WRITE8_MEMBER(bbc_page_selecta_w); DECLARE_WRITE8_MEMBER(bbc_memorya1_w); DECLARE_WRITE8_MEMBER(bbc_page_selectb_w); diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index 5c1f7fcfe18..cbfef40e40b 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -17,7 +17,7 @@ #include "cpu/m6502/m6502.h" #include "sound/tms5220.h" #include "machine/6522via.h" -#include "machine/wd_fdc.h" +#include "machine/wd17xx.h" #include "imagedev/flopdrv.h" #include "includes/bbc.h" #include "machine/mc146818.h" @@ -1606,28 +1606,20 @@ WRITE_LINE_MEMBER(bbc_state::bbc_wd177x_drq_w) WRITE8_MEMBER(bbc_state::bbc_wd177x_status_w) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - floppy_image_device *floppy0 = machine().device<floppy_connector>("wd177x:0")->get_device(); - floppy_image_device *floppy1 = machine().device<floppy_connector>("wd177x:1")->get_device(); - floppy_image_device *floppy = NULL; - + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); m_drive_control = data; - // bit 0, 1: drive select - if (BIT(data, 0)) floppy = floppy0; - if (BIT(data, 1)) floppy = floppy1; - - fdc->set_floppy(floppy); + /* set drive */ + if ((data>>0) & 0x01) fdc->set_drive(0); + if ((data>>1) & 0x01) fdc->set_drive(1); - // bit 2: side select - if (floppy) - floppy->ss_w(BIT(data, 2)); + /* set side */ + fdc->set_side((data>>2) & 0x01); - // bit 3: density + /* set density */ fdc->dden_w(BIT(data, 3)); - // bit 4: interrupt enable - m_1770_IntEnabled = !BIT(data, 4); + m_1770_IntEnabled=(((data>>4) & 0x01)==0); } @@ -1635,7 +1627,7 @@ WRITE8_MEMBER(bbc_state::bbc_wd177x_status_w) READ8_MEMBER(bbc_state::bbc_wd1770_read) { int retval=0xff; - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); switch (offset) { case 4: @@ -1653,22 +1645,22 @@ READ8_MEMBER(bbc_state::bbc_wd1770_read) default: break; } - //logerror("wd177x read: $%02X $%02X\n", offset,retval); + logerror("wd177x read: $%02X $%02X\n", offset,retval); return retval; } WRITE8_MEMBER(bbc_state::bbc_wd1770_write) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - //logerror("wd177x write: $%02X $%02X\n", offset,data); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); + logerror("wd177x write: $%02X $%02X\n", offset,data); switch (offset) { case 0: bbc_wd177x_status_w(space, 0, data); break; case 4: - fdc->cmd_w(space, 0, data); + fdc->command_w(space, 0, data); break; case 5: fdc->track_w(space, 0, data); @@ -1723,34 +1715,26 @@ AM_RANGE(0xfc00, 0xfdff) AM_READWRITE(bbc_opus_read , bbc_opus_write ) WRITE8_MEMBER(bbc_state::bbc_opus_status_w) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - floppy_image_device *floppy0 = machine().device<floppy_connector>("wd177x:0")->get_device(); - floppy_image_device *floppy1 = machine().device<floppy_connector>("wd177x:1")->get_device(); - floppy_image_device *floppy = NULL; - + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); m_drive_control = data; - // bit 1, 2: drive select - if (BIT(data, 1)) floppy = floppy0; - if (BIT(data, 2)) floppy = floppy1; - - fdc->set_floppy(floppy); + /* set drive */ + if ((data>>1) & 0x01) fdc->set_drive(0); + if ((data>>2) & 0x01) fdc->set_drive(1); - // bit 0: side select - if (floppy) - floppy->ss_w(BIT(data, 0)); + /* set side */ + fdc->set_side((data>>0) & 0x01); - // bit 5: density + /* set density */ fdc->dden_w(BIT(data, 5)); - // bit 4: interrupt enable - m_1770_IntEnabled = BIT(data, 4); + m_1770_IntEnabled=(data>>4) & 0x01; } READ8_MEMBER(bbc_state::bbc_opus_read) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - //logerror("wd177x read: $%02X\n", offset); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); + logerror("wd177x read: $%02X\n", offset); if (m_DFSType==6) { @@ -1778,8 +1762,8 @@ READ8_MEMBER(bbc_state::bbc_opus_read) WRITE8_MEMBER(bbc_state::bbc_opus_write) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - //logerror("wd177x write: $%02X $%02X\n", offset,data); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); + logerror("wd177x write: $%02X $%02X\n", offset,data); if (m_DFSType==6) { @@ -1788,7 +1772,7 @@ WRITE8_MEMBER(bbc_state::bbc_opus_write) switch (offset) { case 0xf8: - fdc->cmd_w(space, 0, data); + fdc->command_w(space, 0, data); break; case 0xf9: fdc->track_w(space, 0, data); @@ -1826,7 +1810,7 @@ BBC MASTER DISC SUPPORT READ8_MEMBER(bbc_state::bbcm_wd1770_read) { int retval=0xff; - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); switch (offset) { case 0: @@ -1850,12 +1834,12 @@ READ8_MEMBER(bbc_state::bbcm_wd1770_read) WRITE8_MEMBER(bbc_state::bbcm_wd1770_write) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); //logerror("wd177x write: $%02X $%02X\n", offset,data); switch (offset) { case 0: - fdc->cmd_w(space, 0, data); + fdc->command_w(space, 0, data); break; case 1: fdc->track_w(space, 0, data); @@ -1879,28 +1863,22 @@ READ8_MEMBER(bbc_state::bbcm_wd1770l_read) WRITE8_MEMBER(bbc_state::bbcm_wd1770l_write) { - wd1770_t *fdc = machine().device<wd1770_t>("wd177x"); - floppy_image_device *floppy0 = machine().device<floppy_connector>("wd177x:0")->get_device(); - floppy_image_device *floppy1 = machine().device<floppy_connector>("wd177x:1")->get_device(); - floppy_image_device *floppy = NULL; - + wd1770_device *fdc = machine().device<wd1770_device>("wd177x"); m_drive_control = data; - // bit 0, 1: drive select - if (BIT(data, 0)) floppy = floppy0; - if (BIT(data, 1)) floppy = floppy1; + /* set drive */ + if ((data>>0) & 0x01) fdc->set_drive(0); + if ((data>>1) & 0x01) fdc->set_drive(1); - fdc->set_floppy(floppy); + /* set side */ + fdc->set_side((data>>4) & 0x01); - // bit 4: side select - if (floppy) - floppy->ss_w(BIT(data, 4)); - - // bit 5: density + /* set density */ fdc->dden_w(BIT(data, 5)); // m_1770_IntEnabled=(((data>>4) & 0x01)==0); m_1770_IntEnabled=1; + } diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 6ca2e6bb420..1bb225f3e0b 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -39,7 +39,9 @@ extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks); extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks); extern int drawd3d_init(running_machine &machine, osd_draw_callbacks *callbacks); +#if defined(USE_BGFX) extern int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks); +#endif #if (USE_OPENGL) extern int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks); #endif @@ -227,8 +229,10 @@ bool windows_osd_interface::window_init() } if (video_config.mode == VIDEO_MODE_GDI) drawgdi_init(machine(), &draw); +#if defined(USE_BGFX) if (video_config.mode == VIDEO_MODE_BGFX) drawbgfx_init(machine(), &draw); +#endif if (video_config.mode == VIDEO_MODE_NONE) drawnone_init(machine(), &draw); #if (USE_OPENGL) |