From 60a3acb9705b7296fca190914f4c88650ec33de1 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 25 Sep 2022 22:23:29 -0400 Subject: [PATCH] Move UTF8_xxx string literal macros to new header in lib/util --- scripts/src/lib.lua | 1 + src/devices/bus/abckb/abc800kb.cpp | 2 + src/devices/bus/abckb/abc99.cpp | 3 ++ src/devices/bus/adamnet/kb.cpp | 2 + src/devices/bus/pc_kbd/ec1841.cpp | 2 + src/devices/bus/pc_kbd/pcat84.cpp | 2 + src/devices/bus/pc_kbd/pcxt83.cpp | 2 + src/devices/bus/sg1000_exp/sk1100.cpp | 1 + src/devices/bus/uts_kbd/400kbd.cpp | 2 + src/emu/emucore.h | 41 -------------------- src/frontend/mame/ui/devopt.cpp | 2 + src/frontend/mame/ui/info.cpp | 2 + src/frontend/mame/ui/ui.cpp | 2 + src/frontend/mame/ui/videoopt.cpp | 2 + src/lib/util/utf8.h | 54 +++++++++++++++++++++++++++ src/mame/acorn/accomm.cpp | 1 + src/mame/acorn/acrnsys.cpp | 1 + src/mame/acorn/acrnsys1.cpp | 1 + src/mame/acorn/atom.cpp | 1 + src/mame/acorn/bbc.cpp | 2 + src/mame/act/victor9k_kb.cpp | 2 + src/mame/agat/agatkeyb.cpp | 1 + src/mame/amstrad/amstrad.cpp | 1 + src/mame/amstrad/pc1512kb.cpp | 1 + src/mame/apple/apple2.cpp | 2 + src/mame/apple/apple2e.cpp | 2 + src/mame/apple/apple2gs.cpp | 2 + src/mame/apple/apple3.cpp | 2 + src/mame/apple/tk2000.cpp | 2 + src/mame/atari/atarist.cpp | 2 + src/mame/atari/pofo_kbd.cpp | 2 + src/mame/ausnz/poly.cpp | 1 + src/mame/ausnz/super80.cpp | 2 + src/mame/bondwell/bw12.cpp | 1 + src/mame/canon/canon_s80.cpp | 1 + src/mame/casio/pb1000.cpp | 2 + src/mame/commodore/cbm2.cpp | 2 + src/mame/comx/comx35.cpp | 1 + src/mame/ddr/huebler.cpp | 1 + src/mame/ddr/jtc.cpp | 1 + src/mame/epson/hx20.cpp | 1 + src/mame/epson/px8.cpp | 2 + src/mame/grundy/newbrain.cpp | 2 + src/mame/handheld/hh_cops1.cpp | 2 + src/mame/handheld/hh_rw5000.cpp | 2 + src/mame/handheld/hh_tms1k.cpp | 2 + src/mame/isc/compucolor.cpp | 1 + src/mame/kyocera/kyocera.cpp | 3 ++ src/mame/matsushita/jr100.cpp | 4 ++ src/mame/matsushita/jr200.cpp | 4 ++ src/mame/memotech/mtx.cpp | 2 + src/mame/misc/neoprint.cpp | 2 + src/mame/nec/pc8001.cpp | 1 + src/mame/nec/pc8401a.cpp | 2 + src/mame/nec/pc8801.cpp | 2 + src/mame/nokia/mm1kb.cpp | 1 + src/mame/osborne/vixen.cpp | 1 + src/mame/pc/europc_kbd.cpp | 2 + src/mame/pc/kb_poisk1.h | 2 + src/mame/positron/positron.cpp | 2 + src/mame/psion/psion5.cpp | 2 + src/mame/samsung/spc1500.cpp | 2 + src/mame/sanyo/mbc55x_kbd.cpp | 2 + src/mame/sanyo/phc25.cpp | 2 + src/mame/sharp/mz2000.cpp | 2 + src/mame/siemens/pcd_kbd.cpp | 2 + src/mame/sinclair/ql.cpp | 2 + src/mame/skeleton/aaa.cpp | 4 ++ src/mame/skeleton/blw700i.cpp | 8 +++- src/mame/skeleton/eurit.cpp | 4 ++ src/mame/skeleton/gm1000.cpp | 1 + src/mame/skeleton/itt3030.cpp | 6 ++- src/mame/skeleton/shine.cpp | 4 ++ src/mame/skeleton/squale.cpp | 2 + src/mame/svi/svi318.cpp | 2 + src/mame/ta/alphatpc16.cpp | 49 ++++++++++++------------ src/mame/tangerine/microtan.cpp | 2 + src/mame/tangerine/oric.cpp | 2 + src/mame/telenova/compiskb.cpp | 2 + src/mame/telercas/tmc600.cpp | 2 + src/mame/televideo/tv910.cpp | 4 ++ src/mame/televideo/tv950kb.cpp | 3 +- src/mame/thomson/thomson.cpp | 2 + src/mame/ti/exelv.cpp | 2 + src/mame/ti/ti74.cpp | 2 + src/mame/tiki/tiki100.cpp | 2 + src/mame/tomy/tutor.cpp | 2 + src/mame/trainer/amico2k.cpp | 2 + src/mame/trs/lnw80.cpp | 1 + src/mame/trs/max80.cpp | 5 +++ src/mame/trs/meritum.cpp | 2 + src/mame/trs/radionic.cpp | 2 + src/mame/trs/trs80.cpp | 1 + src/mame/trs/trs80m2kb.cpp | 2 + src/mame/trs/trs80m3.cpp | 2 + src/mame/ussr/pyl601.cpp | 2 + src/mame/visual/v102_kbd.cpp | 2 + src/mame/visual/v1050.cpp | 2 + src/mame/vtech/crvision.cpp | 1 + src/mame/vtech/laser3k.cpp | 4 ++ src/mame/vtech/lcmate2.cpp | 4 ++ src/mame/vtech/pc4.cpp | 2 + src/mame/wang/wangpckb.cpp | 2 + src/mame/wyse/wy50kb.cpp | 2 + src/mame/xerox/x820kb.cpp | 2 + src/mame/yamaha/ymtx81z.cpp | 2 + 106 files changed, 287 insertions(+), 71 deletions(-) create mode 100644 src/lib/util/utf8.h diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua index bb3c14b0535..c82010cfa32 100644 --- a/scripts/src/lib.lua +++ b/scripts/src/lib.lua @@ -124,6 +124,7 @@ end MAME_DIR .. "src/lib/util/unzip.cpp", MAME_DIR .. "src/lib/util/unzip.h", MAME_DIR .. "src/lib/util/un7z.cpp", + MAME_DIR .. "src/lib/util/utf8.h", MAME_DIR .. "src/lib/util/utilfwd.h", MAME_DIR .. "src/lib/util/vbiparse.cpp", MAME_DIR .. "src/lib/util/vbiparse.h", diff --git a/src/devices/bus/abckb/abc800kb.cpp b/src/devices/bus/abckb/abc800kb.cpp index 571a62d5a6e..39f00d3347c 100644 --- a/src/devices/bus/abckb/abc800kb.cpp +++ b/src/devices/bus/abckb/abc800kb.cpp @@ -71,6 +71,8 @@ XR22-050-3B Pinout #include "emu.h" #include "abc800kb.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp index 3273e625a4b..b1a5c6a0a6d 100644 --- a/src/devices/bus/abckb/abc99.cpp +++ b/src/devices/bus/abckb/abc99.cpp @@ -54,8 +54,11 @@ Notes: #include "emu.h" #include "abc99.h" + #include "speaker.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/devices/bus/adamnet/kb.cpp b/src/devices/bus/adamnet/kb.cpp index 046ceba61f4..840bb898e25 100644 --- a/src/devices/bus/adamnet/kb.cpp +++ b/src/devices/bus/adamnet/kb.cpp @@ -9,6 +9,8 @@ #include "emu.h" #include "kb.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/devices/bus/pc_kbd/ec1841.cpp b/src/devices/bus/pc_kbd/ec1841.cpp index a7cc897cb8a..c9f5aa57f98 100644 --- a/src/devices/bus/pc_kbd/ec1841.cpp +++ b/src/devices/bus/pc_kbd/ec1841.cpp @@ -34,6 +34,8 @@ #include "emu.h" #include "ec1841.h" +#include "utf8.h" + //#define LOG_GENERAL (1U << 0) //defined in logmacro.h already #define LOG_KEYBOARD (1U << 1) diff --git a/src/devices/bus/pc_kbd/pcat84.cpp b/src/devices/bus/pc_kbd/pcat84.cpp index a3796a7408a..d45588eea34 100644 --- a/src/devices/bus/pc_kbd/pcat84.cpp +++ b/src/devices/bus/pc_kbd/pcat84.cpp @@ -27,6 +27,8 @@ #include "emu.h" #include "pcat84.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/devices/bus/pc_kbd/pcxt83.cpp b/src/devices/bus/pc_kbd/pcxt83.cpp index 728d858845f..f155e9c853c 100644 --- a/src/devices/bus/pc_kbd/pcxt83.cpp +++ b/src/devices/bus/pc_kbd/pcxt83.cpp @@ -19,6 +19,8 @@ #include "emu.h" #include "pcxt83.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/devices/bus/sg1000_exp/sk1100.cpp b/src/devices/bus/sg1000_exp/sk1100.cpp index 95884acfb30..e5a2ae238c9 100644 --- a/src/devices/bus/sg1000_exp/sk1100.cpp +++ b/src/devices/bus/sg1000_exp/sk1100.cpp @@ -19,6 +19,7 @@ TODO: #include "emu.h" #include "sk1100.h" #include "softlist_dev.h" +#include "utf8.h" diff --git a/src/devices/bus/uts_kbd/400kbd.cpp b/src/devices/bus/uts_kbd/400kbd.cpp index 50e05d4eddf..37d54c7d670 100644 --- a/src/devices/bus/uts_kbd/400kbd.cpp +++ b/src/devices/bus/uts_kbd/400kbd.cpp @@ -27,6 +27,8 @@ #include "cpu/mcs48/mcs48.h" +#include "utf8.h" + DEFINE_DEVICE_TYPE(UTS_400_KEYBOARD, uts_400_keyboard_device, "uts_400kbd", "UTS 400-Format Keyboard (F3621-04-000)") diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 41a32dc8ffe..af78cb98565 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -199,47 +199,6 @@ constexpr int ROT270 = ORIENTATION_SWAP_XY | ORIENTATION_FLIP_Y; /// \} -// these are UTF-8 encoded strings for common characters -#define UTF8_NBSP "\xc2\xa0" /* non-breaking space */ - -#define UTF8_MULTIPLY "\xc3\x97" /* multiplication sign */ -#define UTF8_DIVIDE "\xc3\xb7" /* division sign */ -#define UTF8_SQUAREROOT "\xe2\x88\x9a" /* square root symbol */ -#define UTF8_PLUSMINUS "\xc2\xb1" /* plusminus symbol */ - -#define UTF8_POW_2 "\xc2\xb2" /* superscript 2 */ -#define UTF8_POW_X "\xcb\xa3" /* superscript x */ -#define UTF8_POW_Y "\xca\xb8" /* superscript y */ -#define UTF8_PRIME "\xca\xb9" /* prime symbol */ -#define UTF8_DEGREES "\xc2\xb0" /* degrees symbol */ - -#define UTF8_SMALL_PI "\xcf\x80" /* Greek small letter pi */ -#define UTF8_CAPITAL_SIGMA "\xce\xa3" /* Greek capital letter sigma */ -#define UTF8_CAPITAL_DELTA "\xce\x94" /* Greek capital letter delta */ - -#define UTF8_MACRON "\xc2\xaf" /* macron symbol */ -#define UTF8_NONSPACE_MACRON "\xcc\x84" /* nonspace macron, use after another char */ - -#define a_RING "\xc3\xa5" /* small a with a ring */ -#define a_UMLAUT "\xc3\xa4" /* small a with an umlaut */ -#define o_UMLAUT "\xc3\xb6" /* small o with an umlaut */ -#define u_UMLAUT "\xc3\xbc" /* small u with an umlaut */ -#define e_ACUTE "\xc3\xa9" /* small e with an acute */ -#define n_TILDE "\xc3\xb1" /* small n with a tilde */ - -#define A_RING "\xc3\x85" /* capital A with a ring */ -#define A_UMLAUT "\xc3\x84" /* capital A with an umlaut */ -#define O_UMLAUT "\xc3\x96" /* capital O with an umlaut */ -#define U_UMLAUT "\xc3\x9c" /* capital U with an umlaut */ -#define E_ACUTE "\xc3\x89" /* capital E with an acute */ -#define N_TILDE "\xc3\x91" /* capital N with a tilde */ - -#define UTF8_LEFT "\xe2\x86\x90" /* cursor left */ -#define UTF8_RIGHT "\xe2\x86\x92" /* cursor right */ -#define UTF8_UP "\xe2\x86\x91" /* cursor up */ -#define UTF8_DOWN "\xe2\x86\x93" /* cursor down */ - - //************************************************************************** // COMMON MACROS diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp index 0f20c35486f..1fc1e83564f 100644 --- a/src/frontend/mame/ui/devopt.cpp +++ b/src/frontend/mame/ui/devopt.cpp @@ -15,6 +15,8 @@ #include "romload.h" #include "screen.h" +#include "utf8.h" + namespace ui { diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index da1bc11eb77..5c031d1fe01 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -21,6 +21,8 @@ #include "softlist.h" #include "speaker.h" +#include "utf8.h" + #include #include #include diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 3299448a1f4..878e175d22a 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -46,6 +46,8 @@ #include "../osd/modules/lib/osdlib.h" #include "../osd/modules/lib/osdobj_common.h" +#include "utf8.h" + #include #include #include diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp index 253271beb4f..67881db6cd0 100644 --- a/src/frontend/mame/ui/videoopt.cpp +++ b/src/frontend/mame/ui/videoopt.cpp @@ -14,6 +14,8 @@ #include "rendlay.h" #include "rendutil.h" +#include "utf8.h" + namespace ui { diff --git a/src/lib/util/utf8.h b/src/lib/util/utf8.h new file mode 100644 index 00000000000..092e39c0351 --- /dev/null +++ b/src/lib/util/utf8.h @@ -0,0 +1,54 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles, Curt Coder, hap +/*************************************************************************** + + utf8.h + + UTF-8 string literals. + +***************************************************************************/ + +#ifndef MAME_LIB_UTIL_UTF8_H +#define MAME_LIB_UTIL_UTF8_H + +// these are UTF-8 encoded strings for common characters +#define UTF8_NBSP "\xc2\xa0" /* non-breaking space */ + +#define UTF8_MULTIPLY "\xc3\x97" /* multiplication sign */ +#define UTF8_DIVIDE "\xc3\xb7" /* division sign */ +#define UTF8_SQUAREROOT "\xe2\x88\x9a" /* square root symbol */ +#define UTF8_PLUSMINUS "\xc2\xb1" /* plusminus symbol */ + +#define UTF8_POW_2 "\xc2\xb2" /* superscript 2 */ +#define UTF8_POW_X "\xcb\xa3" /* superscript x */ +#define UTF8_POW_Y "\xca\xb8" /* superscript y */ +#define UTF8_PRIME "\xca\xb9" /* prime symbol */ +#define UTF8_DEGREES "\xc2\xb0" /* degrees symbol */ + +#define UTF8_SMALL_PI "\xcf\x80" /* Greek small letter pi */ +#define UTF8_CAPITAL_SIGMA "\xce\xa3" /* Greek capital letter sigma */ +#define UTF8_CAPITAL_DELTA "\xce\x94" /* Greek capital letter delta */ + +#define UTF8_MACRON "\xc2\xaf" /* macron symbol */ +#define UTF8_NONSPACE_MACRON "\xcc\x84" /* nonspace macron, use after another char */ + +#define a_RING "\xc3\xa5" /* small a with a ring */ +#define a_UMLAUT "\xc3\xa4" /* small a with an umlaut */ +#define o_UMLAUT "\xc3\xb6" /* small o with an umlaut */ +#define u_UMLAUT "\xc3\xbc" /* small u with an umlaut */ +#define e_ACUTE "\xc3\xa9" /* small e with an acute */ +#define n_TILDE "\xc3\xb1" /* small n with a tilde */ + +#define A_RING "\xc3\x85" /* capital A with a ring */ +#define A_UMLAUT "\xc3\x84" /* capital A with an umlaut */ +#define O_UMLAUT "\xc3\x96" /* capital O with an umlaut */ +#define U_UMLAUT "\xc3\x9c" /* capital U with an umlaut */ +#define E_ACUTE "\xc3\x89" /* capital E with an acute */ +#define N_TILDE "\xc3\x91" /* capital N with a tilde */ + +#define UTF8_LEFT "\xe2\x86\x90" /* cursor left */ +#define UTF8_RIGHT "\xe2\x86\x92" /* cursor right */ +#define UTF8_UP "\xe2\x86\x91" /* cursor up */ +#define UTF8_DOWN "\xe2\x86\x93" /* cursor down */ + +#endif // MAME_LIB_UTIL_UTF8_H diff --git a/src/mame/acorn/accomm.cpp b/src/mame/acorn/accomm.cpp index 22a5865c606..14bb28621ae 100644 --- a/src/mame/acorn/accomm.cpp +++ b/src/mame/acorn/accomm.cpp @@ -44,6 +44,7 @@ #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" #include "accomm.lh" diff --git a/src/mame/acorn/acrnsys.cpp b/src/mame/acorn/acrnsys.cpp index 04dc578c34d..07779589a20 100644 --- a/src/mame/acorn/acrnsys.cpp +++ b/src/mame/acorn/acrnsys.cpp @@ -65,6 +65,7 @@ #include "bus/centronics/ctronics.h" #include "bus/acorn/bus.h" #include "softlist_dev.h" +#include "utf8.h" namespace { diff --git a/src/mame/acorn/acrnsys1.cpp b/src/mame/acorn/acrnsys1.cpp index cbefa37c026..af84fb30161 100644 --- a/src/mame/acorn/acrnsys1.cpp +++ b/src/mame/acorn/acrnsys1.cpp @@ -53,6 +53,7 @@ Note that left-most digit is not wired up, and therefore will always be blank. #include "machine/timer.h" #include "imagedev/cassette.h" #include "speaker.h" +#include "utf8.h" #include "acrnsys1.lh" diff --git a/src/mame/acorn/atom.cpp b/src/mame/acorn/atom.cpp index 129ccec3cbd..59e2dc01809 100644 --- a/src/mame/acorn/atom.cpp +++ b/src/mame/acorn/atom.cpp @@ -122,6 +122,7 @@ Hardware: PPIA 8255 #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" /*************************************************************************** PARAMETERS diff --git a/src/mame/acorn/bbc.cpp b/src/mame/acorn/bbc.cpp index f35c9449ed6..fd2d4ea22dc 100644 --- a/src/mame/acorn/bbc.cpp +++ b/src/mame/acorn/bbc.cpp @@ -55,6 +55,8 @@ #include "formats/uef_cas.h" #include "formats/csw_cas.h" +#include "utf8.h" + #include "bbc.lh" #include "bbcm.lh" diff --git a/src/mame/act/victor9k_kb.cpp b/src/mame/act/victor9k_kb.cpp index 5d533af2235..42c319c642a 100644 --- a/src/mame/act/victor9k_kb.cpp +++ b/src/mame/act/victor9k_kb.cpp @@ -337,6 +337,8 @@ Y11 104 103 102 101 100 99 98 97 kN/A k. k00 k0 RGHT LEFT PAUS #include "emu.h" #include "victor9k_kb.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/mame/agat/agatkeyb.cpp b/src/mame/agat/agatkeyb.cpp index c4d80ce3fd7..f6ba09d6c45 100644 --- a/src/mame/agat/agatkeyb.cpp +++ b/src/mame/agat/agatkeyb.cpp @@ -10,6 +10,7 @@ #include "agatkeyb.h" #include "machine/keyboard.ipp" +#include "utf8.h" /*************************************************************************** diff --git a/src/mame/amstrad/amstrad.cpp b/src/mame/amstrad/amstrad.cpp index 61fb4761f07..479bbc86651 100644 --- a/src/mame/amstrad/amstrad.cpp +++ b/src/mame/amstrad/amstrad.cpp @@ -111,6 +111,7 @@ Some bugs left : #include "machine/ram.h" #include "softlist.h" #include "speaker.h" +#include "utf8.h" #define MANUFACTURER_NAME 0x07 #define TV_REFRESH_RATE 0x10 diff --git a/src/mame/amstrad/pc1512kb.cpp b/src/mame/amstrad/pc1512kb.cpp index 91dc17bea62..febc7d917f9 100644 --- a/src/mame/amstrad/pc1512kb.cpp +++ b/src/mame/amstrad/pc1512kb.cpp @@ -9,6 +9,7 @@ #include "emu.h" #include "pc1512kb.h" +#include "utf8.h" //************************************************************************** diff --git a/src/mame/apple/apple2.cpp b/src/mame/apple/apple2.cpp index 19cf94e1763..1217a51e1ec 100644 --- a/src/mame/apple/apple2.cpp +++ b/src/mame/apple/apple2.cpp @@ -61,6 +61,8 @@ II Plus: RAM options reduced to 16/32/48 KB. #include "formats/ap2_dsk.h" +#include "utf8.h" + namespace { diff --git a/src/mame/apple/apple2e.cpp b/src/mame/apple/apple2e.cpp index 4e7e30a66a1..d5fe78f5edf 100644 --- a/src/mame/apple/apple2e.cpp +++ b/src/mame/apple/apple2e.cpp @@ -152,6 +152,8 @@ MIG RAM page 2 $CE02 is the speaker/slot bitfield and $CE03 is the paddle/accele #include "formats/ap2_dsk.h" #include "formats/ap_dsk35.h" +#include "utf8.h" + namespace { diff --git a/src/mame/apple/apple2gs.cpp b/src/mame/apple/apple2gs.cpp index 61f0a3809f3..c30678b1f2d 100644 --- a/src/mame/apple/apple2gs.cpp +++ b/src/mame/apple/apple2gs.cpp @@ -85,6 +85,8 @@ #include "formats/ap_dsk35.h" #include "formats/ap2_dsk.h" +#include "utf8.h" + namespace { diff --git a/src/mame/apple/apple3.cpp b/src/mame/apple/apple3.cpp index cd29758cbc7..4b2ee822fba 100644 --- a/src/mame/apple/apple3.cpp +++ b/src/mame/apple/apple3.cpp @@ -29,6 +29,8 @@ #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + void apple3_state::apple3_map(address_map &map) { map(0x0000, 0xffff).rw(FUNC(apple3_state::apple3_memory_r), FUNC(apple3_state::apple3_memory_w)); diff --git a/src/mame/apple/tk2000.cpp b/src/mame/apple/tk2000.cpp index 2924d234f44..426106b244a 100644 --- a/src/mame/apple/tk2000.cpp +++ b/src/mame/apple/tk2000.cpp @@ -37,6 +37,8 @@ #include "formats/ap2_dsk.h" +#include "utf8.h" + namespace { diff --git a/src/mame/atari/atarist.cpp b/src/mame/atari/atarist.cpp index fdc49ef8b77..88d6f2cd7b3 100644 --- a/src/mame/atari/atarist.cpp +++ b/src/mame/atari/atarist.cpp @@ -53,6 +53,8 @@ #include "formats/dfi_dsk.h" #include "formats/ipf_dsk.h" +#include "utf8.h" + //************************************************************************** // CONSTANTS / MACROS diff --git a/src/mame/atari/pofo_kbd.cpp b/src/mame/atari/pofo_kbd.cpp index 2b2010c6652..35c5f56c6b7 100644 --- a/src/mame/atari/pofo_kbd.cpp +++ b/src/mame/atari/pofo_kbd.cpp @@ -7,6 +7,8 @@ #include "machine/keyboard.ipp" +#include "utf8.h" + DEFINE_DEVICE_TYPE(POFO_KEYBOARD, pofo_keyboard_device, "pofo_keyboard", "Atari Portfolio keyboard"); pofo_keyboard_device::pofo_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : diff --git a/src/mame/ausnz/poly.cpp b/src/mame/ausnz/poly.cpp index e91b9869d1a..46449fe23d0 100644 --- a/src/mame/ausnz/poly.cpp +++ b/src/mame/ausnz/poly.cpp @@ -34,6 +34,7 @@ #include "poly.h" #include "formats/flex_dsk.h" #include "softlist_dev.h" +#include "utf8.h" void poly_state::poly_bank(address_map &map) diff --git a/src/mame/ausnz/super80.cpp b/src/mame/ausnz/super80.cpp index a4c1999d72f..50c9113bb32 100644 --- a/src/mame/ausnz/super80.cpp +++ b/src/mame/ausnz/super80.cpp @@ -213,6 +213,8 @@ ToDo: #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + #include "super80.lh" diff --git a/src/mame/bondwell/bw12.cpp b/src/mame/bondwell/bw12.cpp index 6ecf5fae5c2..be39a356ad7 100644 --- a/src/mame/bondwell/bw12.cpp +++ b/src/mame/bondwell/bw12.cpp @@ -32,6 +32,7 @@ #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" /* diff --git a/src/mame/canon/canon_s80.cpp b/src/mame/canon/canon_s80.cpp index 5a5000df2b9..86c5f5006b2 100644 --- a/src/mame/canon/canon_s80.cpp +++ b/src/mame/canon/canon_s80.cpp @@ -153,6 +153,7 @@ Notes: #include "video/hd44780.h" #include "emupal.h" #include "screen.h" +#include "utf8.h" namespace { diff --git a/src/mame/casio/pb1000.cpp b/src/mame/casio/pb1000.cpp index e6e06a02817..9a4f9218ce6 100644 --- a/src/mame/casio/pb1000.cpp +++ b/src/mame/casio/pb1000.cpp @@ -36,6 +36,8 @@ #include "bus/generic/carts.h" #include "bus/generic/slot.h" +#include "utf8.h" + class pb1000_state : public driver_device { diff --git a/src/mame/commodore/cbm2.cpp b/src/mame/commodore/cbm2.cpp index 5c9e7ee069e..52dbc52afdd 100644 --- a/src/mame/commodore/cbm2.cpp +++ b/src/mame/commodore/cbm2.cpp @@ -39,6 +39,8 @@ #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + #define PLA1_TAG "u78" #define PLA2_TAG "u88" #define MOS6567_TAG "u23" diff --git a/src/mame/comx/comx35.cpp b/src/mame/comx/comx35.cpp index d2a440f744c..6aa3d71d827 100644 --- a/src/mame/comx/comx35.cpp +++ b/src/mame/comx/comx35.cpp @@ -21,6 +21,7 @@ #include "formats/imageutl.h" #include "screen.h" #include "softlist_dev.h" +#include "utf8.h" /*************************************************************************** PARAMETERS diff --git a/src/mame/ddr/huebler.cpp b/src/mame/ddr/huebler.cpp index 02651a584f8..a6984ac46fc 100644 --- a/src/mame/ddr/huebler.cpp +++ b/src/mame/ddr/huebler.cpp @@ -39,6 +39,7 @@ Cassette considerations #include "huebler.h" #include "speaker.h" #include "screen.h" +#include "utf8.h" /* Keyboard */ diff --git a/src/mame/ddr/jtc.cpp b/src/mame/ddr/jtc.cpp index 6dee793afa4..312b83e0497 100644 --- a/src/mame/ddr/jtc.cpp +++ b/src/mame/ddr/jtc.cpp @@ -28,6 +28,7 @@ To Do: #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" #define UB8830D_TAG "ub8830d" #define CENTRONICS_TAG "centronics" diff --git a/src/mame/epson/hx20.cpp b/src/mame/epson/hx20.cpp index e578ad7f989..22297641210 100644 --- a/src/mame/epson/hx20.cpp +++ b/src/mame/epson/hx20.cpp @@ -43,6 +43,7 @@ #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" //************************************************************************** diff --git a/src/mame/epson/px8.cpp b/src/mame/epson/px8.cpp index 04314f805f7..4da56549a01 100644 --- a/src/mame/epson/px8.cpp +++ b/src/mame/epson/px8.cpp @@ -40,6 +40,8 @@ #include "px8.lh" +#include "utf8.h" + /*************************************************************************** CONSTANTS diff --git a/src/mame/grundy/newbrain.cpp b/src/mame/grundy/newbrain.cpp index 4613b6d0a33..65b220b3ed3 100644 --- a/src/mame/grundy/newbrain.cpp +++ b/src/mame/grundy/newbrain.cpp @@ -53,6 +53,8 @@ #include "speaker.h" #include "screen.h" +#include "utf8.h" + #include "newbrain.lh" #include "newbraina.lh" diff --git a/src/mame/handheld/hh_cops1.cpp b/src/mame/handheld/hh_cops1.cpp index 62134295653..2cd2aaf0699 100644 --- a/src/mame/handheld/hh_cops1.cpp +++ b/src/mame/handheld/hh_cops1.cpp @@ -25,6 +25,8 @@ TODO: #include "speaker.h" +#include "utf8.h" + // internal artwork #include "cambrp.lh" #include "mbaskb.lh" diff --git a/src/mame/handheld/hh_rw5000.cpp b/src/mame/handheld/hh_rw5000.cpp index 0424ccad720..eb85d570585 100644 --- a/src/mame/handheld/hh_rw5000.cpp +++ b/src/mame/handheld/hh_rw5000.cpp @@ -27,6 +27,8 @@ ROM source notes when dumped from another model, but confident it's the same: #include "speaker.h" +#include "utf8.h" + // internal artwork #include "autorace.lh" #include "gravity.lh" diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index f73c36bef23..dbf944390db 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -221,6 +221,8 @@ on Joerg Woerner's datamath.org: http://www.datamath.org/IC_List.htm #include "screen.h" #include "speaker.h" +#include "utf8.h" + // internal artwork #include "t7in1ss.lh" #include "alphie.lh" diff --git a/src/mame/isc/compucolor.cpp b/src/mame/isc/compucolor.cpp index e7a4d303c94..f355adff500 100644 --- a/src/mame/isc/compucolor.cpp +++ b/src/mame/isc/compucolor.cpp @@ -31,6 +31,7 @@ #include "emupal.h" #include "screen.h" #include "softlist_dev.h" +#include "utf8.h" #define I8080_TAG "ua2" #define TMS5501_TAG "ud2" diff --git a/src/mame/kyocera/kyocera.cpp b/src/mame/kyocera/kyocera.cpp index b7e8f4981a8..efe7eb4030d 100644 --- a/src/mame/kyocera/kyocera.cpp +++ b/src/mame/kyocera/kyocera.cpp @@ -61,9 +61,12 @@ #include "emu.h" #include "kyocera.h" + #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + /* Read/Write Handlers */ uint8_t pc8201_state::bank_r() diff --git a/src/mame/matsushita/jr100.cpp b/src/mame/matsushita/jr100.cpp index 0680cff4eb8..a19c8fe71ab 100644 --- a/src/mame/matsushita/jr100.cpp +++ b/src/mame/matsushita/jr100.cpp @@ -54,16 +54,20 @@ TODO: ****************************************************************************/ #include "emu.h" + #include "cpu/m6800/m6800.h" #include "imagedev/cassette.h" #include "imagedev/snapquik.h" #include "machine/6522via.h" #include "machine/timer.h" #include "sound/spkrdev.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + namespace { diff --git a/src/mame/matsushita/jr200.cpp b/src/mame/matsushita/jr200.cpp index 0babb34d2d6..5a17659fbc9 100644 --- a/src/mame/matsushita/jr200.cpp +++ b/src/mame/matsushita/jr200.cpp @@ -57,12 +57,16 @@ TODO: ****************************************************************************/ #include "emu.h" + #include "cpu/m6800/m6800.h" #include "sound/beep.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + class jr200_state : public driver_device { diff --git a/src/mame/memotech/mtx.cpp b/src/mame/memotech/mtx.cpp index a78e8f4776e..1ce110d434e 100644 --- a/src/mame/memotech/mtx.cpp +++ b/src/mame/memotech/mtx.cpp @@ -29,6 +29,8 @@ #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + /*************************************************************************** MEMORY MAPS diff --git a/src/mame/misc/neoprint.cpp b/src/mame/misc/neoprint.cpp index 2ef9d10163e..27eec4dd9c0 100644 --- a/src/mame/misc/neoprint.cpp +++ b/src/mame/misc/neoprint.cpp @@ -33,6 +33,8 @@ #include "screen.h" #include "speaker.h" +#include "utf8.h" + namespace { diff --git a/src/mame/nec/pc8001.cpp b/src/mame/nec/pc8001.cpp index 93b690da374..6c9a8c7aefb 100644 --- a/src/mame/nec/pc8001.cpp +++ b/src/mame/nec/pc8001.cpp @@ -42,6 +42,7 @@ #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" WRITE_LINE_MEMBER( pc8001_base_state::crtc_reverse_w ) { diff --git a/src/mame/nec/pc8401a.cpp b/src/mame/nec/pc8401a.cpp index 4a57f8726f4..c7cb1c4ea27 100644 --- a/src/mame/nec/pc8401a.cpp +++ b/src/mame/nec/pc8401a.cpp @@ -35,6 +35,8 @@ #include "bus/rs232/rs232.h" +#include "utf8.h" + /* Fake Keyboard */ void pc8401a_state::scan_keyboard() diff --git a/src/mame/nec/pc8801.cpp b/src/mame/nec/pc8801.cpp index ebb81447def..44e73160b56 100644 --- a/src/mame/nec/pc8801.cpp +++ b/src/mame/nec/pc8801.cpp @@ -108,6 +108,8 @@ #include "softlist_dev.h" +#include "utf8.h" + #define PC8801FH_OSC1 XTAL(28'636'363) #define PC8801FH_OSC2 XTAL(42'105'200) diff --git a/src/mame/nokia/mm1kb.cpp b/src/mame/nokia/mm1kb.cpp index 9b7c2080223..0f08c79ffa2 100644 --- a/src/mame/nokia/mm1kb.cpp +++ b/src/mame/nokia/mm1kb.cpp @@ -10,6 +10,7 @@ #include "mm1kb.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" diff --git a/src/mame/osborne/vixen.cpp b/src/mame/osborne/vixen.cpp index 2be61dd5cfa..96b04d48b01 100644 --- a/src/mame/osborne/vixen.cpp +++ b/src/mame/osborne/vixen.cpp @@ -70,6 +70,7 @@ Notes: #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" namespace { diff --git a/src/mame/pc/europc_kbd.cpp b/src/mame/pc/europc_kbd.cpp index a1b0d3030f0..c76a97dfccf 100644 --- a/src/mame/pc/europc_kbd.cpp +++ b/src/mame/pc/europc_kbd.cpp @@ -24,6 +24,8 @@ #include "cpu/m6805/m68705.h" +#include "utf8.h" + //************************************************************************** // LLE KEYBOARD DEVICE //************************************************************************** diff --git a/src/mame/pc/kb_poisk1.h b/src/mame/pc/kb_poisk1.h index 21e206059f0..9481b4d304d 100644 --- a/src/mame/pc/kb_poisk1.h +++ b/src/mame/pc/kb_poisk1.h @@ -10,6 +10,8 @@ * F12 - XXX */ +#include "utf8.h" + INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_START("Y1") PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') // scancode 0x55 diff --git a/src/mame/positron/positron.cpp b/src/mame/positron/positron.cpp index 17ec3eeb60f..5342979ee2c 100644 --- a/src/mame/positron/positron.cpp +++ b/src/mame/positron/positron.cpp @@ -40,6 +40,8 @@ #include "screen.h" #include "speaker.h" +#include "utf8.h" + // Debugging #define VERBOSE 0 diff --git a/src/mame/psion/psion5.cpp b/src/mame/psion/psion5.cpp index 64b58cc3f1c..bb99adbc767 100644 --- a/src/mame/psion/psion5.cpp +++ b/src/mame/psion/psion5.cpp @@ -18,6 +18,8 @@ #include "psion5.h" +#include "utf8.h" + #define LOG_UNKNOWNS (1 << 0) #define LOG_IRQ (1 << 1) #define LOG_DISPLAY (1 << 2) diff --git a/src/mame/samsung/spc1500.cpp b/src/mame/samsung/spc1500.cpp index e109d8ab2d4..4c52b8116b7 100644 --- a/src/mame/samsung/spc1500.cpp +++ b/src/mame/samsung/spc1500.cpp @@ -239,6 +239,8 @@ TODO: #include "formats/spc1000_cas.h" +#include "utf8.h" + namespace { diff --git a/src/mame/sanyo/mbc55x_kbd.cpp b/src/mame/sanyo/mbc55x_kbd.cpp index cf530d64e41..a3c56f46417 100644 --- a/src/mame/sanyo/mbc55x_kbd.cpp +++ b/src/mame/sanyo/mbc55x_kbd.cpp @@ -22,6 +22,8 @@ #include "cpu/mcs48/mcs48.h" #include "machine/keyboard.ipp" +#include "utf8.h" + //************************************************************************** // DEVICE TYPE DEFINITION //************************************************************************** diff --git a/src/mame/sanyo/phc25.cpp b/src/mame/sanyo/phc25.cpp index 78c310bbabd..1fa46b65554 100644 --- a/src/mame/sanyo/phc25.cpp +++ b/src/mame/sanyo/phc25.cpp @@ -45,6 +45,8 @@ RUN #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + /* Read/Write Handlers */ diff --git a/src/mame/sharp/mz2000.cpp b/src/mame/sharp/mz2000.cpp index cbb5a6e4aa6..b2e44400696 100644 --- a/src/mame/sharp/mz2000.cpp +++ b/src/mame/sharp/mz2000.cpp @@ -37,6 +37,8 @@ #include "formats/2d_dsk.h" #include "formats/mz_cas.h" +#include "utf8.h" + #define MASTER_CLOCK 17.73447_MHz_XTAL / 5 /* TODO: was 4 MHz, but otherwise cassette won't work due of a bug with MZF support ... */ diff --git a/src/mame/siemens/pcd_kbd.cpp b/src/mame/siemens/pcd_kbd.cpp index 83e8adb303e..356dfdc26b4 100644 --- a/src/mame/siemens/pcd_kbd.cpp +++ b/src/mame/siemens/pcd_kbd.cpp @@ -7,6 +7,8 @@ #include "sound/spkrdev.h" #include "speaker.h" +#include "utf8.h" + DEFINE_DEVICE_TYPE(PCD_KEYBOARD, pcd_keyboard_device, "pcd_kbd", "Siemens PC-D Keyboard") ROM_START( pcd_keyboard ) diff --git a/src/mame/sinclair/ql.cpp b/src/mame/sinclair/ql.cpp index 1a443e048d1..8b1d6081713 100644 --- a/src/mame/sinclair/ql.cpp +++ b/src/mame/sinclair/ql.cpp @@ -89,6 +89,8 @@ #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + #define SCREEN_TAG "screen" diff --git a/src/mame/skeleton/aaa.cpp b/src/mame/skeleton/aaa.cpp index c69323d927d..83fc4b23bac 100644 --- a/src/mame/skeleton/aaa.cpp +++ b/src/mame/skeleton/aaa.cpp @@ -7,14 +7,18 @@ Skeleton driver for Ann Arbor Ambassador terminal. ************************************************************************************************************************************/ #include "emu.h" + #include "bus/rs232/rs232.h" #include "cpu/z80/z80.h" #include "machine/74259.h" #include "machine/input_merger.h" #include "machine/scn_pci.h" #include "machine/nvram.h" + #include "screen.h" +#include "utf8.h" + class aaa_state : public driver_device { public: diff --git a/src/mame/skeleton/blw700i.cpp b/src/mame/skeleton/blw700i.cpp index 496b2e78055..62feb52b936 100644 --- a/src/mame/skeleton/blw700i.cpp +++ b/src/mame/skeleton/blw700i.cpp @@ -14,12 +14,16 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/h8/h83003.h" -#include "machine/nvram.h" #include "machine/at28c16.h" +#include "machine/nvram.h" +#include "machine/timer.h" + #include "screen.h" #include "speaker.h" -#include "machine/timer.h" + +#include "utf8.h" class lw700i_state : public driver_device { diff --git a/src/mame/skeleton/eurit.cpp b/src/mame/skeleton/eurit.cpp index 1bb12cfc320..8fe65e434d8 100644 --- a/src/mame/skeleton/eurit.cpp +++ b/src/mame/skeleton/eurit.cpp @@ -7,12 +7,16 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/m37710/m37710.h" #include "machine/am79c30.h" #include "video/hd44780.h" + #include "emupal.h" #include "screen.h" +#include "utf8.h" + class eurit_state : public driver_device { public: diff --git a/src/mame/skeleton/gm1000.cpp b/src/mame/skeleton/gm1000.cpp index a7fa3a80860..76e2c75b6a0 100644 --- a/src/mame/skeleton/gm1000.cpp +++ b/src/mame/skeleton/gm1000.cpp @@ -13,6 +13,7 @@ #include "video/hd44780.h" #include "emupal.h" #include "screen.h" +#include "utf8.h" namespace { diff --git a/src/mame/skeleton/itt3030.cpp b/src/mame/skeleton/itt3030.cpp index 358bfcc453c..d0d53336263 100644 --- a/src/mame/skeleton/itt3030.cpp +++ b/src/mame/skeleton/itt3030.cpp @@ -192,6 +192,7 @@ Beeper Circuit, all ICs shown: #include "emu.h" + #include "cpu/mcs48/mcs48.h" //Keyboard MCU ... talks to the 8278 on the keyboard circuit #include "cpu/z80/z80.h" #include "imagedev/floppy.h" @@ -200,12 +201,15 @@ Beeper Circuit, all ICs shown: #include "machine/wd_fdc.h" #include "sound/beep.h" #include "video/tms9927.h" //Display hardware + #include "emupal.h" #include "screen.h" #include "softlist_dev.h" #include "speaker.h" + #include "formats/itt3030_dsk.h" -#include "debugger.h" + +#include "utf8.h" #define MAIN_CLOCK XTAL_4.194MHz diff --git a/src/mame/skeleton/shine.cpp b/src/mame/skeleton/shine.cpp index 4299785e21f..6218cac3b0d 100644 --- a/src/mame/skeleton/shine.cpp +++ b/src/mame/skeleton/shine.cpp @@ -19,6 +19,7 @@ but the syntax has yet to be worked out. BAUD [0-9] is allowed but what is it do ************************************************************************************/ #include "emu.h" + #include "cpu/m6502/m6502.h" #include "imagedev/cassette.h" #include "imagedev/floppy.h" @@ -29,10 +30,13 @@ but the syntax has yet to be worked out. BAUD [0-9] is allowed but what is it do #include "sound/spkrdev.h" #include "video/mc6847.h" #include "bus/centronics/ctronics.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + class shine_state : public driver_device { diff --git a/src/mame/skeleton/squale.cpp b/src/mame/skeleton/squale.cpp index 1f3fc1d60fe..19695481447 100644 --- a/src/mame/skeleton/squale.cpp +++ b/src/mame/skeleton/squale.cpp @@ -95,6 +95,8 @@ TODO #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + #define MAIN_CLOCK 14_MHz_XTAL #define AY_CLOCK MAIN_CLOCK / 8 /* 1.75 Mhz */ diff --git a/src/mame/svi/svi318.cpp b/src/mame/svi/svi318.cpp index 12b095ac0c3..b79938c7dec 100644 --- a/src/mame/svi/svi318.cpp +++ b/src/mame/svi/svi318.cpp @@ -27,6 +27,8 @@ #include "formats/svi_cas.h" +#include "utf8.h" + //************************************************************************** // CONSTANTS & MACROS diff --git a/src/mame/ta/alphatpc16.cpp b/src/mame/ta/alphatpc16.cpp index 12de988b9bd..781bbec942d 100644 --- a/src/mame/ta/alphatpc16.cpp +++ b/src/mame/ta/alphatpc16.cpp @@ -58,10 +58,13 @@ via the PC 16 Terminal, operates independently after programming), connects to t #include "sound/beep.h" #include "cpu/mcs48/mcs48.h" #include "cpu/z80/z80.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + namespace { @@ -77,10 +80,7 @@ public: m_wdfdc(*this, "wdfdc"), m_ram(*this, RAM_TAG), m_z80(*this, "z80"), - m_flop0(*this, "wdfdc:0"), - m_flop1(*this, "wdfdc:1"), - m_flop2(*this, "wdfdc:2"), - m_flop3(*this, "wdfdc:3"), + m_flop(*this, "wdfdc:%u", 0), m_keys(*this, "KEYS.%u", 0) { } @@ -115,10 +115,7 @@ private: required_device m_wdfdc; required_device m_ram; required_device m_z80; - required_device m_flop0; - required_device m_flop1; - required_device m_flop2; - required_device m_flop3; + required_device_array m_flop; required_ioport_array<8> m_keys; u8 m_p1 = 0, m_p2 = 0, m_data = 0, m_p40 = 0; @@ -128,7 +125,7 @@ private: void alphatpc16_state::machine_start() { m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); - m_wdfdc->set_floppy(m_flop0->get_device()); + m_wdfdc->set_floppy(m_flop[0]->get_device()); m_bsy = false; m_req = false; @@ -171,16 +168,16 @@ u8 alphatpc16_state::p00_r() switch(m_p40 & 0xf0) { case 0x00: - ret |= m_flop0->get_device()->exists() << 3; + ret |= m_flop[0]->get_device()->exists() << 3; break; case 0x10: - ret |= m_flop1->get_device()->exists() << 3; + ret |= m_flop[1]->get_device()->exists() << 3; break; case 0x20: - ret |= m_flop2->get_device()->exists() << 3; + ret |= m_flop[2]->get_device()->exists() << 3; break; case 0x40: - ret |= m_flop3->get_device()->exists() << 3; + ret |= m_flop[3]->get_device()->exists() << 3; break; } return ret; @@ -191,20 +188,20 @@ void alphatpc16_state::p40_w(u8 data) switch(data & 0xf0) { case 0x00: - m_wdfdc->set_floppy(m_flop0->get_device()); - m_flop0->get_device()->ss_w(BIT(data, 2)); + m_wdfdc->set_floppy(m_flop[0]->get_device()); + m_flop[0]->get_device()->ss_w(BIT(data, 2)); break; case 0x10: - m_wdfdc->set_floppy(m_flop1->get_device()); - m_flop1->get_device()->ss_w(BIT(data, 2)); + m_wdfdc->set_floppy(m_flop[1]->get_device()); + m_flop[1]->get_device()->ss_w(BIT(data, 2)); break; case 0x20: - m_wdfdc->set_floppy(m_flop2->get_device()); - m_flop2->get_device()->ss_w(BIT(data, 2)); + m_wdfdc->set_floppy(m_flop[2]->get_device()); + m_flop[2]->get_device()->ss_w(BIT(data, 2)); break; case 0x40: - m_wdfdc->set_floppy(m_flop3->get_device()); - m_flop3->get_device()->ss_w(BIT(data, 2)); + m_wdfdc->set_floppy(m_flop[3]->get_device()); + m_flop[3]->get_device()->ss_w(BIT(data, 2)); break; } m_p40 = data; @@ -503,11 +500,11 @@ void alphatpc16_state::alphatpc16(machine_config &config) m_z80->set_addrmap(AS_PROGRAM, &alphatpc16_state::apc16_z80_map); m_z80->set_addrmap(AS_IO, &alphatpc16_state::apc16_z80_io); WD1770(config, m_wdfdc, 8_MHz_XTAL); - FLOPPY_CONNECTOR(config, m_flop0, atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); - dynamic_cast(m_flop0.target())->set_fixed(true); - FLOPPY_CONNECTOR(config, m_flop1, atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); - FLOPPY_CONNECTOR(config, m_flop2, atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); - FLOPPY_CONNECTOR(config, m_flop3, atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, m_flop[0], atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); + dynamic_cast(m_flop[0].target())->set_fixed(true); + FLOPPY_CONNECTOR(config, m_flop[1], atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, m_flop[2], atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, m_flop[3], atpc16_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); i8741a_device& i8741(I8741A(config, "i8741", 4.608_MHz_XTAL)); i8741.p1_in_cb().set(FUNC(alphatpc16_state::p1_r)); diff --git a/src/mame/tangerine/microtan.cpp b/src/mame/tangerine/microtan.cpp index f631a519921..7577f2037a3 100644 --- a/src/mame/tangerine/microtan.cpp +++ b/src/mame/tangerine/microtan.cpp @@ -63,6 +63,8 @@ #include "screen.h" #include "softlist_dev.h" +#include "utf8.h" + void microtan_state::mt65_map(address_map &map) { diff --git a/src/mame/tangerine/oric.cpp b/src/mame/tangerine/oric.cpp index cd8b16d9b35..bd16f31a4d3 100644 --- a/src/mame/tangerine/oric.cpp +++ b/src/mame/tangerine/oric.cpp @@ -38,6 +38,8 @@ #include "screen.h" #include "speaker.h" +#include "utf8.h" + #include "formats/oric_dsk.h" #include "formats/oric_tap.h" diff --git a/src/mame/telenova/compiskb.cpp b/src/mame/telenova/compiskb.cpp index 0ecb0a99193..c20d71434fb 100644 --- a/src/mame/telenova/compiskb.cpp +++ b/src/mame/telenova/compiskb.cpp @@ -11,6 +11,8 @@ #include "speaker.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/mame/telercas/tmc600.cpp b/src/mame/telercas/tmc600.cpp index 9bb07fb41f5..65ad4d3d5ea 100644 --- a/src/mame/telercas/tmc600.cpp +++ b/src/mame/telercas/tmc600.cpp @@ -97,6 +97,8 @@ Notes: #include "emu.h" #include "tmc600.h" +#include "utf8.h" + uint8_t tmc600_state::rtc_r() { m_rtc_int = m_vismac_reg_latch >> 3; diff --git a/src/mame/televideo/tv910.cpp b/src/mame/televideo/tv910.cpp index 3ef568eb70f..30b3c43abad 100644 --- a/src/mame/televideo/tv910.cpp +++ b/src/mame/televideo/tv910.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "emu.h" + #include "bus/rs232/rs232.h" #include "cpu/m6502/m6502.h" #include "machine/input_merger.h" @@ -31,9 +32,12 @@ #include "machine/mos6551.h" #include "sound/beep.h" #include "video/mc6845.h" + #include "screen.h" #include "speaker.h" +#include "utf8.h" + #define ACIA_TAG "acia" #define CRTC_TAG "crtc" #define RS232_TAG "rs232" diff --git a/src/mame/televideo/tv950kb.cpp b/src/mame/televideo/tv950kb.cpp index 77614c30af3..f36aecc0cde 100644 --- a/src/mame/televideo/tv950kb.cpp +++ b/src/mame/televideo/tv950kb.cpp @@ -2,12 +2,13 @@ // copyright-holders:AJR /*********************************************************************************************************************************** -TeleVideo 950 101-key serial keyboard emulation. + TeleVideo 950 101-key serial keyboard emulation. ************************************************************************************************************************************/ #include "emu.h" #include "tv950kb.h" +#include "utf8.h" DEFINE_DEVICE_TYPE(TV950_KEYBOARD, tv950kb_device, "tv950kb", "TeleVideo 950 Keyboard") diff --git a/src/mame/thomson/thomson.cpp b/src/mame/thomson/thomson.cpp index fb4cf47ffe2..0bd3d83b58b 100644 --- a/src/mame/thomson/thomson.cpp +++ b/src/mame/thomson/thomson.cpp @@ -97,6 +97,8 @@ #include "formats/basicdsk.h" #include "formats/cd90_640_dsk.h" +#include "utf8.h" + /**************************** common *******************************/ diff --git a/src/mame/ti/exelv.cpp b/src/mame/ti/exelv.cpp index 82195854232..40765b98e28 100644 --- a/src/mame/ti/exelv.cpp +++ b/src/mame/ti/exelv.cpp @@ -113,6 +113,8 @@ TODO: #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + #define VERBOSE 0 #include "logmacro.h" diff --git a/src/mame/ti/ti74.cpp b/src/mame/ti/ti74.cpp index 8150a859f44..80208cfaadc 100644 --- a/src/mame/ti/ti74.cpp +++ b/src/mame/ti/ti74.cpp @@ -80,6 +80,8 @@ #include "screen.h" #include "softlist_dev.h" +#include "utf8.h" + #include "ti74.lh" #include "ti95.lh" diff --git a/src/mame/tiki/tiki100.cpp b/src/mame/tiki/tiki100.cpp index ab35fbb6ca6..0ed7af5e76b 100644 --- a/src/mame/tiki/tiki100.cpp +++ b/src/mame/tiki/tiki100.cpp @@ -34,6 +34,8 @@ #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + /* Memory Banking */ diff --git a/src/mame/tomy/tutor.cpp b/src/mame/tomy/tutor.cpp index bb566795c0e..096ac2f4a46 100644 --- a/src/mame/tomy/tutor.cpp +++ b/src/mame/tomy/tutor.cpp @@ -182,6 +182,8 @@ A=AMA, P=PRO, these keys don't exist, and so the games cannot be played. #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" + namespace { diff --git a/src/mame/trainer/amico2k.cpp b/src/mame/trainer/amico2k.cpp index 78dc197e8ae..96877b7a607 100644 --- a/src/mame/trainer/amico2k.cpp +++ b/src/mame/trainer/amico2k.cpp @@ -33,6 +33,8 @@ #include "emu.h" #include "cpu/m6502/m6502.h" #include "machine/i8255.h" +#include "utf8.h" + #include "amico2k.lh" diff --git a/src/mame/trs/lnw80.cpp b/src/mame/trs/lnw80.cpp index 5f1fa035c82..42beaec46f7 100644 --- a/src/mame/trs/lnw80.cpp +++ b/src/mame/trs/lnw80.cpp @@ -79,6 +79,7 @@ To Do / Status: #include "machine/input_merger.h" #include "formats/td0_dsk.h" #include "softlist_dev.h" +#include "utf8.h" namespace { diff --git a/src/mame/trs/max80.cpp b/src/mame/trs/max80.cpp index e5b6f0f0ae9..3406015b5aa 100644 --- a/src/mame/trs/max80.cpp +++ b/src/mame/trs/max80.cpp @@ -57,6 +57,7 @@ Status: Beeps every so often. Unable to read the disk. ***************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" //#include "machine/ram.h" #include "imagedev/floppy.h" @@ -70,13 +71,17 @@ Status: Beeps every so often. Unable to read the disk. #include "sound/beep.h" #include "machine/timer.h" #include "video/mc6845.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" + #include "formats/imd_dsk.h" //#include "formats/trs80_dsk.h" //#include "formats/dmk_dsk.h" +#include "utf8.h" + class max80_state : public driver_device { public: diff --git a/src/mame/trs/meritum.cpp b/src/mame/trs/meritum.cpp index 51a200e91fc..fe20b986d81 100644 --- a/src/mame/trs/meritum.cpp +++ b/src/mame/trs/meritum.cpp @@ -66,6 +66,8 @@ For Model III: #include "emupal.h" #include "softlist_dev.h" +#include "utf8.h" + class meritum_state : public trs80_state { public: diff --git a/src/mame/trs/radionic.cpp b/src/mame/trs/radionic.cpp index 628480496e9..008e8b92ecf 100644 --- a/src/mame/trs/radionic.cpp +++ b/src/mame/trs/radionic.cpp @@ -114,6 +114,8 @@ To Do / Status: #include "machine/clock.h" #include "bus/rs232/rs232.h" #include "softlist_dev.h" +#include "utf8.h" + #define MASTER_XTAL 12164800 diff --git a/src/mame/trs/trs80.cpp b/src/mame/trs/trs80.cpp index 154bbd19612..8af755ecefb 100644 --- a/src/mame/trs/trs80.cpp +++ b/src/mame/trs/trs80.cpp @@ -157,6 +157,7 @@ ht1080z works #include "machine/input_merger.h" #include "sound/ay8910.h" #include "softlist_dev.h" +#include "utf8.h" void trs80_state::trs80_mem(address_map &map) diff --git a/src/mame/trs/trs80m2kb.cpp b/src/mame/trs/trs80m2kb.cpp index 2aa95d29190..d1e4c5eb322 100644 --- a/src/mame/trs/trs80m2kb.cpp +++ b/src/mame/trs/trs80m2kb.cpp @@ -9,6 +9,8 @@ #include "emu.h" #include "trs80m2kb.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/mame/trs/trs80m3.cpp b/src/mame/trs/trs80m3.cpp index 17e5e80c9ce..21f1e9852d5 100644 --- a/src/mame/trs/trs80m3.cpp +++ b/src/mame/trs/trs80m3.cpp @@ -82,6 +82,8 @@ trs80m4p: Floppy not working, so machine is useless. #include "formats/trs80_dsk.h" #include "formats/dmk_dsk.h" +#include "utf8.h" + void trs80m3_state::m3_mem(address_map &map) diff --git a/src/mame/ussr/pyl601.cpp b/src/mame/ussr/pyl601.cpp index f66e5aeafc6..1cb0ffbcafc 100644 --- a/src/mame/ussr/pyl601.cpp +++ b/src/mame/ussr/pyl601.cpp @@ -50,6 +50,8 @@ The BASIC #include "formats/pyldin_dsk.h" +#include "utf8.h" + class pyl601_state : public driver_device { diff --git a/src/mame/visual/v102_kbd.cpp b/src/mame/visual/v102_kbd.cpp index e4c3c98389f..65580e38556 100644 --- a/src/mame/visual/v102_kbd.cpp +++ b/src/mame/visual/v102_kbd.cpp @@ -15,6 +15,8 @@ through software commands. #include "emu.h" #include "v102_kbd.h" +#include "utf8.h" + DEFINE_DEVICE_TYPE(V102_KEYBOARD, v102_keyboard_device, "v102_kbd", "Visual 102 Keyboard") DEFINE_DEVICE_TYPE(V550_KEYBOARD, v550_keyboard_device, "v550_kbd", "Visual 550 Keyboard") diff --git a/src/mame/visual/v1050.cpp b/src/mame/visual/v1050.cpp index a909fd33282..556a86d4f93 100644 --- a/src/mame/visual/v1050.cpp +++ b/src/mame/visual/v1050.cpp @@ -157,6 +157,8 @@ Notes: #include "softlist.h" #include "speaker.h" +#include "utf8.h" + void v1050_state::set_interrupt(int line, int state) { diff --git a/src/mame/vtech/crvision.cpp b/src/mame/vtech/crvision.cpp index d6c2ee94a5b..86dede84006 100644 --- a/src/mame/vtech/crvision.cpp +++ b/src/mame/vtech/crvision.cpp @@ -149,6 +149,7 @@ TODO: #include "crvision.h" #include "softlist_dev.h" #include "speaker.h" +#include "utf8.h" /*************************************************************************** diff --git a/src/mame/vtech/laser3k.cpp b/src/mame/vtech/laser3k.cpp index 0f767796d9d..686958d4821 100644 --- a/src/mame/vtech/laser3k.cpp +++ b/src/mame/vtech/laser3k.cpp @@ -31,16 +31,20 @@ ***************************************************************************/ #include "emu.h" + #include "cpu/m6502/m6502.h" #include "machine/bankdev.h" #include "machine/ram.h" #include "machine/kb3600.h" #include "sound/sn76496.h" #include "sound/spkrdev.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + enum { TEXT = 0, diff --git a/src/mame/vtech/lcmate2.cpp b/src/mame/vtech/lcmate2.cpp index f4a64bf1c4b..e5d13c6d502 100644 --- a/src/mame/vtech/lcmate2.cpp +++ b/src/mame/vtech/lcmate2.cpp @@ -30,15 +30,19 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" #include "machine/nvram.h" #include "machine/rp5c15.h" #include "sound/spkrdev.h" #include "video/hd44780.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "utf8.h" + class lcmate2_state : public driver_device { diff --git a/src/mame/vtech/pc4.cpp b/src/mame/vtech/pc4.cpp index cb1d22aa615..bf8e634ad7b 100644 --- a/src/mame/vtech/pc4.cpp +++ b/src/mame/vtech/pc4.cpp @@ -36,6 +36,8 @@ #include "screen.h" #include "speaker.h" +#include "utf8.h" + uint8_t pc4_state::kb_r(offs_t offset) { diff --git a/src/mame/wang/wangpckb.cpp b/src/mame/wang/wangpckb.cpp index b6bf1f62566..7e77c60829a 100644 --- a/src/mame/wang/wangpckb.cpp +++ b/src/mame/wang/wangpckb.cpp @@ -54,6 +54,8 @@ Notes: #include "speaker.h" +#include "utf8.h" + //************************************************************************** // MACROS / CONSTANTS diff --git a/src/mame/wyse/wy50kb.cpp b/src/mame/wyse/wy50kb.cpp index d6f480fa39e..0a7533fa7c2 100644 --- a/src/mame/wyse/wy50kb.cpp +++ b/src/mame/wyse/wy50kb.cpp @@ -32,6 +32,8 @@ #include "emu.h" #include "wy50kb.h" +#include "utf8.h" + DEFINE_DEVICE_TYPE(WY50_KEYBOARD, wy50_keyboard_device, "wy50kb", "WY-50 Keyboard") DEFINE_DEVICE_TYPE(WY100_KEYBOARD, wy100_keyboard_device, "wy100kb", "WY-100 Keyboard") diff --git a/src/mame/xerox/x820kb.cpp b/src/mame/xerox/x820kb.cpp index 1812a4e8d91..de9a11e356c 100644 --- a/src/mame/xerox/x820kb.cpp +++ b/src/mame/xerox/x820kb.cpp @@ -43,6 +43,8 @@ Notes: #include "emu.h" #include "x820kb.h" +#include "utf8.h" + //************************************************************************** diff --git a/src/mame/yamaha/ymtx81z.cpp b/src/mame/yamaha/ymtx81z.cpp index e280bdcb014..e237f4493ec 100644 --- a/src/mame/yamaha/ymtx81z.cpp +++ b/src/mame/yamaha/ymtx81z.cpp @@ -19,6 +19,8 @@ #include "screen.h" #include "speaker.h" +#include "utf8.h" + #include "tx81z.lh" class ymtx81z_state : public driver_device