diff --git a/3rdparty/lua-linenoise/linenoise.c b/3rdparty/lua-linenoise/linenoise.c new file mode 100644 index 00000000000..670a71c2b22 --- /dev/null +++ b/3rdparty/lua-linenoise/linenoise.c @@ -0,0 +1,198 @@ +/* vim:sts=4 sw=4 expandtab + */ + +/* +* Copyright (c) 2011-2015 Rob Hoelz +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is furnished +* to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include "linenoise.h" + +#define LN_COMPLETION_TYPE "linenoiseCompletions*" + +static int completion_func_ref; +static lua_State *completion_state; + +static int handle_ln_error(lua_State *L) +{ + lua_pushnil(L); + return 1; +} + +static int handle_ln_ok(lua_State *L) +{ + lua_pushboolean(L, 1); + return 1; +} + +static void completion_callback_wrapper(const char *line, linenoiseCompletions *completions) +{ + lua_State *L = completion_state; + + lua_rawgeti(L, LUA_REGISTRYINDEX, completion_func_ref); + *((linenoiseCompletions **) lua_newuserdata(L, sizeof(linenoiseCompletions *))) = completions; + luaL_getmetatable(L, LN_COMPLETION_TYPE); + lua_setmetatable(L, -2); + + lua_pushstring(L, line); + + lua_pcall(L, 2, 0, 0); +} + +static int l_linenoise(lua_State *L) +{ + const char *prompt = luaL_checkstring(L, 1); + char *line; + + completion_state = L; + line = linenoise(prompt); + completion_state = NULL; + + if(! line) { + return handle_ln_error(L); + } + lua_pushstring(L, line); + free(line); + return 1; +} + +static int lines_next(lua_State *L) +{ + lua_pushcfunction(L, l_linenoise); + lua_pushvalue(L, lua_upvalueindex(1)); + lua_call(L, 1, 1); + return 1; +} + +static int l_lines(lua_State *L) +{ + luaL_checkstring(L, 1); + lua_pushcclosure(L, lines_next, 1); + return 1; +} + +static int l_historyadd(lua_State *L) +{ + const char *line = luaL_checkstring(L, 1); + + if(! linenoiseHistoryAdd(line)) { + return handle_ln_error(L); + } + + return handle_ln_ok(L); +} + +static int l_historysetmaxlen(lua_State *L) +{ + int len = luaL_checkinteger(L, 1); + + if(! linenoiseHistorySetMaxLen(len)) { + return handle_ln_error(L); + } + + return handle_ln_ok(L); +} + +static int l_historysave(lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + + if(linenoiseHistorySave((char *) filename) < 0) { + return handle_ln_error(L); + } + return handle_ln_ok(L); +} + +static int l_historyload(lua_State *L) +{ + const char *filename = luaL_checkstring(L, 1); + + if(linenoiseHistoryLoad((char *) filename) < 0) { + return handle_ln_error(L); + } + return handle_ln_ok(L); +} + +static int l_clearscreen(lua_State *L) +{ + linenoiseClearScreen(); + return handle_ln_ok(L); +} + +static int l_setcompletion(lua_State *L) +{ + luaL_checktype(L, 1, LUA_TFUNCTION); + + lua_pushvalue(L, 1); + completion_func_ref = luaL_ref(L, LUA_REGISTRYINDEX); + linenoiseSetCompletionCallback(completion_callback_wrapper); + + return handle_ln_ok(L); +} + +static int l_addcompletion(lua_State *L) +{ + linenoiseCompletions *completions = *((linenoiseCompletions **) luaL_checkudata(L, 1, LN_COMPLETION_TYPE)); + const char *entry = luaL_checkstring(L, 2); + + linenoiseAddCompletion(completions, (char *) entry); + + return handle_ln_ok(L); +} + +luaL_Reg linenoise_funcs[] = { + { "linenoise", l_linenoise }, + { "historyadd", l_historyadd }, + { "historysetmaxlen", l_historysetmaxlen }, + { "historysave", l_historysave }, + { "historyload", l_historyload }, + { "clearscreen", l_clearscreen }, + { "setcompletion", l_setcompletion}, + { "addcompletion", l_addcompletion }, + + /* Aliases for more consistent function names */ + { "addhistory", l_historyadd }, + { "sethistorymaxlen", l_historysetmaxlen }, + { "savehistory", l_historysave }, + { "loadhistory", l_historyload }, + + { "line", l_linenoise }, + { "lines", l_lines }, + + { NULL, NULL } +}; + +int luaopen_linenoise(lua_State *L) +{ + lua_newtable(L); + + luaL_newmetatable(L, LN_COMPLETION_TYPE); + lua_pushboolean(L, 0); + lua_setfield(L, -2, "__metatable"); + lua_pop(L, 1); +#if LUA_VERSION_NUM > 501 + luaL_setfuncs(L,linenoise_funcs,0); +#else + luaL_register(L, NULL, linenoise_funcs); +#endif + return 1; +} diff --git a/3rdparty/pugixml/.gitignore b/3rdparty/pugixml/.gitignore index 567609b1234..01f9cb9fbe0 100644 --- a/3rdparty/pugixml/.gitignore +++ b/3rdparty/pugixml/.gitignore @@ -1 +1,2 @@ build/ +.vscode/ \ No newline at end of file diff --git a/3rdparty/pugixml/CMakeLists.txt b/3rdparty/pugixml/CMakeLists.txt index 018e728eaf2..3dbdd6f00e2 100644 --- a/3rdparty/pugixml/CMakeLists.txt +++ b/3rdparty/pugixml/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.6) option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) option(BUILD_TESTS "Build tests" OFF) +option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF) + set(BUILD_DEFINES "" CACHE STRING "Build defines") if(MSVC) @@ -46,16 +48,25 @@ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_C endif() set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1) +get_target_property(PUGIXML_VERSION_STRING pugixml VERSION) + +if(BUILD_PKGCONFIG) + # Install library into its own directory under LIBDIR + set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING}) +endif() install(TARGETS pugixml EXPORT pugixml-config - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -) - -install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}) install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) +if(BUILD_PKGCONFIG) + configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY) + install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) +endif() + if(BUILD_TESTS) file(GLOB TEST_SOURCES tests/*.cpp) file(GLOB FUZZ_SOURCES tests/fuzz_*.cpp) diff --git a/3rdparty/pugixml/docs/quickstart.adoc b/3rdparty/pugixml/docs/quickstart.adoc index 3fe29b103a1..fe5eac63474 100644 --- a/3rdparty/pugixml/docs/quickstart.adoc +++ b/3rdparty/pugixml/docs/quickstart.adoc @@ -25,7 +25,7 @@ The distribution contains library source, documentation (the guide you're readin The complete pugixml source consists of three files - one source file, `pugixml.cpp`, and two header files, `pugixml.hpp` and `pugiconfig.hpp`. `pugixml.hpp` is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that `pugixml.hpp` is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include `). -The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add `pugixml.cpp` to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual/install.html#install.building[read the manual] for further information. +The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add `pugixml.cpp` to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual.html#install.building[read the manual] for further information. [[dom]] == Document object model diff --git a/3rdparty/pugixml/scripts/pugixml.pc.in b/3rdparty/pugixml/scripts/pugixml.pc.in new file mode 100644 index 00000000000..3c97c28d2fa --- /dev/null +++ b/3rdparty/pugixml/scripts/pugixml.pc.in @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@ +libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@ + +Name: pugixml +Description: Light-weight, simple and fast XML parser for C++ with XPath support. +URL: http://pugixml.org/ +Version: @PUGIXML_VERSION_STRING@ +Cflags: -I${includedir} +Libs: -L${libdir} -lpugixml \ No newline at end of file diff --git a/3rdparty/pugixml/src/pugixml.hpp b/3rdparty/pugixml/src/pugixml.hpp index 9c41b14643c..c4d44e6fbee 100644 --- a/3rdparty/pugixml/src/pugixml.hpp +++ b/3rdparty/pugixml/src/pugixml.hpp @@ -72,6 +72,15 @@ # endif #endif +// If C++ is 2011 or higher, add 'override' qualifiers +#ifndef PUGIXML_OVERRIDE +# if __cplusplus >= 201103 +# define PUGIXML_OVERRIDE override +# else +# define PUGIXML_OVERRIDE +# endif +#endif + // Character interface macros #ifdef PUGIXML_WCHAR_MODE # define PUGIXML_TEXT(t) L ## t @@ -273,7 +282,7 @@ namespace pugi // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio xml_writer_file(void* file); - virtual void write(const void* data, size_t size) override; + virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE; private: void* file; @@ -288,7 +297,7 @@ namespace pugi xml_writer_stream(std::basic_ostream >& stream); xml_writer_stream(std::basic_ostream >& stream); - virtual void write(const void* data, size_t size) override; + virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE; private: std::basic_ostream >* narrow_stream; @@ -1214,7 +1223,7 @@ namespace pugi explicit xpath_exception(const xpath_parse_result& result); // Get error message - virtual const char* what() const throw() override; + virtual const char* what() const throw() PUGIXML_OVERRIDE; // Get parse result const xpath_parse_result& result() const; diff --git a/3rdparty/pugixml/tests/test.hpp b/3rdparty/pugixml/tests/test.hpp index e700826ad96..f88c909c3c2 100644 --- a/3rdparty/pugixml/tests/test.hpp +++ b/3rdparty/pugixml/tests/test.hpp @@ -78,7 +78,7 @@ struct dummy_fixture {}; { \ test_runner_##name(): test_runner(#name) {} \ \ - virtual void run() \ + virtual void run() PUGIXML_OVERRIDE \ { \ test_runner_helper_##name helper; \ helper.run(); \ diff --git a/3rdparty/pugixml/tests/test_document.cpp b/3rdparty/pugixml/tests/test_document.cpp index 73a36f561ff..c7219e1b92b 100644 --- a/3rdparty/pugixml/tests/test_document.cpp +++ b/3rdparty/pugixml/tests/test_document.cpp @@ -187,7 +187,7 @@ public: this->setg(begin, begin, end); } - typename std::basic_streambuf::int_type underflow() + typename std::basic_streambuf::int_type underflow() PUGIXML_OVERRIDE { return this->gptr() == this->egptr() ? std::basic_streambuf::traits_type::eof() : std::basic_streambuf::traits_type::to_int_type(*this->gptr()); } diff --git a/3rdparty/pugixml/tests/test_dom_traverse.cpp b/3rdparty/pugixml/tests/test_dom_traverse.cpp index 25774a585af..f977e1515ea 100644 --- a/3rdparty/pugixml/tests/test_dom_traverse.cpp +++ b/3rdparty/pugixml/tests/test_dom_traverse.cpp @@ -798,7 +798,7 @@ struct test_walker: xml_tree_walker #endif } - virtual bool begin(xml_node& node) + virtual bool begin(xml_node& node) PUGIXML_OVERRIDE { log += STR("|"); log += depthstr(); @@ -810,7 +810,7 @@ struct test_walker: xml_tree_walker return ++call_count != stop_count && xml_tree_walker::begin(node); } - virtual bool for_each(xml_node& node) + virtual bool for_each(xml_node& node) PUGIXML_OVERRIDE { log += STR("|"); log += depthstr(); @@ -822,7 +822,7 @@ struct test_walker: xml_tree_walker return ++call_count != stop_count && xml_tree_walker::end(node); } - virtual bool end(xml_node& node) + virtual bool end(xml_node& node) PUGIXML_OVERRIDE { log += STR("|"); log += depthstr(); diff --git a/3rdparty/pugixml/tests/test_write.cpp b/3rdparty/pugixml/tests/test_write.cpp index 341a4f0f971..bf45e313977 100644 --- a/3rdparty/pugixml/tests/test_write.cpp +++ b/3rdparty/pugixml/tests/test_write.cpp @@ -213,7 +213,7 @@ struct test_writer: xml_writer { std::basic_string contents; - virtual void write(const void* data, size_t size) + virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE { CHECK(size % sizeof(pugi::char_t) == 0); contents.append(static_cast(data), size / sizeof(pugi::char_t)); @@ -604,7 +604,7 @@ TEST_XML_FLAGS(write_mixed, "premid + + @@ -475,8 +477,6 @@ - - diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp index 2d88912deba..52247aac96a 100644 --- a/src/mame/machine/midwayic.cpp +++ b/src/mame/machine/midwayic.cpp @@ -700,7 +700,7 @@ void midway_ioasic_device::ioasic_reset() void midway_ioasic_device::update_ioasic_irq() { - uint16_t fifo_state = fifo_status_r(machine().driver_data()->generic_space(),0); + uint16_t fifo_state = fifo_status_r(machine().dummy_space(), 0); uint16_t irqbits = 0x2000; uint8_t new_state; diff --git a/src/mame/machine/nitedrvr.cpp b/src/mame/machine/nitedrvr.cpp index e4538038014..a7e97f5832c 100644 --- a/src/mame/machine/nitedrvr.cpp +++ b/src/mame/machine/nitedrvr.cpp @@ -252,7 +252,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_state::nitedrvr_crash_toggle_callback) if (m_crash_en && m_crash_data_en) { m_crash_data--; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_discrete->write(space, NITEDRVR_BANG_DATA, m_crash_data); // Crash Volume if (!m_crash_data) m_crash_data_en = 0; // Done counting? diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp index 4ae8d786174..3832b4b7395 100644 --- a/src/mame/machine/ti85.cpp +++ b/src/mame/machine/ti85.cpp @@ -134,12 +134,11 @@ void ti85_state::device_timer(emu_timer &timer, device_timer_id id, int param, v } } -inline void ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram) +void ti85_state::ti8x_update_bank(address_space &space, uint8_t bank, uint8_t *base, uint8_t page, bool is_ram) { - ti85_state *state = space.machine().driver_data(); static const char *const tag[] = {"bank1", "bank2", "bank3", "bank4"}; - state->membank(tag[bank&3])->set_base(base + (0x4000 * page)); + membank(tag[bank&3])->set_base(base + (0x4000 * page)); if (is_ram) space.install_write_bank(bank * 0x4000, bank * 0x4000 + 0x3fff, tag[bank&3]); diff --git a/src/mame/machine/ticket.cpp b/src/mame/machine/ticket.cpp index 133f01a5e89..81db8e0caf0 100644 --- a/src/mame/machine/ticket.cpp +++ b/src/mame/machine/ticket.cpp @@ -155,7 +155,7 @@ WRITE8_MEMBER( ticket_dispenser_device::write ) WRITE_LINE_MEMBER( ticket_dispenser_device::motor_w ) { - write(machine().driver_data()->generic_space(), 0, state ? m_active_bit : 0); + write(machine().dummy_space(), 0, state ? m_active_bit : 0); } diff --git a/src/mame/machine/williams.cpp b/src/mame/machine/williams.cpp index 4bcc94211a2..88357e63dfd 100644 --- a/src/mame/machine/williams.cpp +++ b/src/mame/machine/williams.cpp @@ -693,13 +693,13 @@ TIMER_CALLBACK_MEMBER(joust2_state::joust2_deferred_snd_cmd_w) WRITE_LINE_MEMBER(joust2_state::joust2_pia_3_cb1_w) { m_joust2_current_sound_data = (m_joust2_current_sound_data & ~0x100) | ((state << 8) & 0x100); - m_cvsd_sound->write(machine().driver_data()->generic_space(), 0, m_joust2_current_sound_data); + m_cvsd_sound->write(machine().dummy_space(), 0, m_joust2_current_sound_data); } WRITE8_MEMBER(joust2_state::joust2_snd_cmd_w) { m_joust2_current_sound_data = (m_joust2_current_sound_data & ~0xff) | (data & 0xff); - m_cvsd_sound->write(machine().driver_data()->generic_space(), 0, m_joust2_current_sound_data); + m_cvsd_sound->write(machine().dummy_space(), 0, m_joust2_current_sound_data); machine().scheduler().synchronize(timer_expired_delegate(FUNC(joust2_state::joust2_deferred_snd_cmd_w),this), m_joust2_current_sound_data); } diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 5e9fc7f3418..172d38b2ab7 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -20423,7 +20423,6 @@ megaiv // 1989 Mephisto Mega IV Schachcomputer milano // 1989 Mephisto Milano Schachcomputer monteciv // 1990 Mephisto Monte Carlo IV LE Schachcomputer polgar // 1986 Mephisto Polgar Schachcomputer -risc // Saitek 2500 14MHZ (skeleton) sexpertb // 1988 Novag Expert B Chess Computer sexpertc // 1989 Novag Super Expert C Chess Computer sfortea // 1987 Novag Super Forte A Chess Computer @@ -27603,6 +27602,7 @@ murogmbl // ??? @source:mustache.cpp mustache // (c) 1987 March +mustachei // (c) 1987 IG SPA @source:mvme147.cpp mvme147 // (c) 1989 Motorola @@ -31538,6 +31538,10 @@ rex6000 // @source:rgum.cpp rgum // +@source:risc2500.cpp +risc // +montreux // + @source:riscpc.cpp a7000 // 1995 Acorn Archimedes 7000 a7000p // 1997 Acorn Archimedes 7000+ diff --git a/src/mame/video/boogwing.cpp b/src/mame/video/boogwing.cpp index 5c0d94e0424..f969686845e 100644 --- a/src/mame/video/boogwing.cpp +++ b/src/mame/video/boogwing.cpp @@ -27,7 +27,7 @@ void boogwing_state::mix_boogwing(screen_device &screen, bitmap_rgb32 &bitmap, c bitmap_ind16 *sprite_bitmap1, *sprite_bitmap2; bitmap_ind8* priority_bitmap; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); sprite_bitmap1 = &m_sprgen1->get_sprite_temp_bitmap(); @@ -179,7 +179,7 @@ void boogwing_state::mix_boogwing(screen_device &screen, bitmap_rgb32 &bitmap, c uint32_t boogwing_state::screen_update_boogwing(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); diff --git a/src/mame/video/cbuster.cpp b/src/mame/video/cbuster.cpp index a91e9e910cf..cd72fbad4a5 100644 --- a/src/mame/video/cbuster.cpp +++ b/src/mame/video/cbuster.cpp @@ -24,7 +24,7 @@ void cbuster_state::video_start() uint32_t cbuster_state::screen_update_twocrude(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(!BIT(flip, 7)); diff --git a/src/mame/video/cninja.cpp b/src/mame/video/cninja.cpp index 94980cf1ab5..3116f59711f 100644 --- a/src/mame/video/cninja.cpp +++ b/src/mame/video/cninja.cpp @@ -123,7 +123,7 @@ void cninja_state::cninjabl_draw_sprites( screen_device &screen, bitmap_ind16 &b uint32_t cninja_state::screen_update_cninja(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); @@ -155,7 +155,7 @@ uint32_t cninja_state::screen_update_cninjabl2(screen_device &screen, bitmap_ind uint32_t cninja_state::screen_update_cninjabl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); /* force layers to be enabled */ @@ -180,7 +180,7 @@ uint32_t cninja_state::screen_update_cninjabl(screen_device &screen, bitmap_ind1 uint32_t cninja_state::screen_update_edrandy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); @@ -199,7 +199,7 @@ uint32_t cninja_state::screen_update_edrandy(screen_device &screen, bitmap_ind16 uint32_t cninja_state::screen_update_robocop2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); @@ -256,7 +256,7 @@ VIDEO_START_MEMBER(cninja_state,mutantf) uint32_t cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); diff --git a/src/mame/video/combatsc.cpp b/src/mame/video/combatsc.cpp index 2c1d609d111..ea839d681b9 100644 --- a/src/mame/video/combatsc.cpp +++ b/src/mame/video/combatsc.cpp @@ -357,7 +357,7 @@ WRITE8_MEMBER(combatsc_state::combatsc_scrollram_w) void combatsc_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const uint8_t *source, int circuit, bitmap_ind8 &priority_bitmap, uint32_t pri_mask ) { k007121_device *k007121 = circuit ? m_k007121_2 : m_k007121_1; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int base_color = (circuit * 4) * 16 + (k007121->ctrlram_r(space, 6) & 0x10) * 2; k007121->sprites_draw(bitmap, cliprect, m_gfxdecode->gfx(circuit), *m_palette, source, base_color, 0, 0, priority_bitmap, pri_mask); @@ -368,7 +368,7 @@ uint32_t combatsc_state::screen_update_combatsc(screen_device &screen, bitmap_in { int i; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); if (m_k007121_1->ctrlram_r(space, 1) & 0x02) { m_bg_tilemap[0]->set_scroll_rows(32); diff --git a/src/mame/video/contra.cpp b/src/mame/video/contra.cpp index cedc44e7335..2de1f8062ad 100644 --- a/src/mame/video/contra.cpp +++ b/src/mame/video/contra.cpp @@ -265,7 +265,7 @@ WRITE8_MEMBER(contra_state::contra_K007121_ctrl_1_w) void contra_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int bank ) { k007121_device *k007121 = bank ? m_k007121_2 : m_k007121_1; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int base_color = (k007121->ctrlram_r(space, 6) & 0x30) * 2; const uint8_t *source; @@ -279,7 +279,7 @@ void contra_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, uint32_t contra_state::screen_update_contra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t ctrl_1_0 = m_k007121_1->ctrlram_r(space, 0); uint8_t ctrl_1_2 = m_k007121_1->ctrlram_r(space, 2); uint8_t ctrl_2_0 = m_k007121_2->ctrlram_r(space, 0); diff --git a/src/mame/video/darkseal.cpp b/src/mame/video/darkseal.cpp index 69f3d8a66d2..f7cea12a8da 100644 --- a/src/mame/video/darkseal.cpp +++ b/src/mame/video/darkseal.cpp @@ -60,7 +60,7 @@ void darkseal_state::video_start() uint32_t darkseal_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen2->pf_control_r(space, 0, 0xffff); flip_screen_set(!BIT(flip, 7)); diff --git a/src/mame/video/dassault.cpp b/src/mame/video/dassault.cpp index 40cc383cfc1..07f5e0bf2d2 100644 --- a/src/mame/video/dassault.cpp +++ b/src/mame/video/dassault.cpp @@ -75,7 +75,7 @@ void dassault_state::mixdassaultlayer(bitmap_rgb32 &bitmap, bitmap_ind16* sprite /* are the priorities 100% correct? they're the same as they were before conversion to DECO52 sprite device, but if (for example) you walk to the side of the crates in the first part of the game you appear over them... */ uint32_t dassault_state::screen_update_dassault(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); diff --git a/src/mame/video/dec0.cpp b/src/mame/video/dec0.cpp index e517f450ee9..1f828d558e7 100644 --- a/src/mame/video/dec0.cpp +++ b/src/mame/video/dec0.cpp @@ -127,7 +127,7 @@ uint32_t dec0_automat_state::screen_update_automat(screen_device &screen, bitmap // layer enables seem different... where are they? // the bootleg doesn't write these registers, I think they're hardcoded?, so fake them for compatibility with our implementation.. - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_tilegen1->pf_control_0_w(space,0,0x0003, 0x00ff); // 8x8 m_tilegen1->pf_control_0_w(space,1,0x0003, 0x00ff); m_tilegen1->pf_control_0_w(space,2,0x0000, 0x00ff); @@ -194,7 +194,7 @@ uint32_t dec0_automat_state::screen_update_secretab(screen_device &screen, bitma // layer enables seem different... where are they? // the bootleg doesn't write these registers, I think they're hardcoded?, so fake them for compatibility with our implementation.. - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_tilegen1->pf_control_0_w(space,0,0x0003, 0x00ff); // 8x8 m_tilegen1->pf_control_0_w(space,1,0x0003, 0x00ff); m_tilegen1->pf_control_0_w(space,2,0x0000, 0x00ff); diff --git a/src/mame/video/deco32.cpp b/src/mame/video/deco32.cpp index 6a1d652457d..beea4ddaa30 100644 --- a/src/mame/video/deco32.cpp +++ b/src/mame/video/deco32.cpp @@ -233,7 +233,7 @@ VIDEO_START_MEMBER(dragngun_state,lockload) uint32_t deco32_state::screen_update_captaven(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/dietgo.cpp b/src/mame/video/dietgo.cpp index 28dddd0315f..db2afdee85d 100644 --- a/src/mame/video/dietgo.cpp +++ b/src/mame/video/dietgo.cpp @@ -5,7 +5,7 @@ uint32_t dietgo_state::screen_update_dietgo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/dkong.cpp b/src/mame/video/dkong.cpp index 4eb1f54361d..91f5123ef53 100644 --- a/src/mame/video/dkong.cpp +++ b/src/mame/video/dkong.cpp @@ -708,7 +708,7 @@ void dkong_state::radarscp_step(int line_cnt) */ /* Now mix with SND02 (sound 2) line - on 74ls259, bit2 */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_rflip_sig = m_dev_6h->bit2_r(space, 0) & m_lfsr_5I; /* blue background generation */ diff --git a/src/mame/video/fastlane.cpp b/src/mame/video/fastlane.cpp index ffce0ad3613..94add71d39b 100644 --- a/src/mame/video/fastlane.cpp +++ b/src/mame/video/fastlane.cpp @@ -139,7 +139,7 @@ uint32_t fastlane_state::screen_update_fastlane(screen_device &screen, bitmap_in finalclip1 &= cliprect; /* set scroll registers */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); xoffs = m_k007121->ctrlram_r(space, 0); for (i = 0; i < 32; i++) m_layer0->set_scrollx(i, m_k007121_regs[0x20 + i] + xoffs - 40); diff --git a/src/mame/video/flkatck.cpp b/src/mame/video/flkatck.cpp index 40aa4928999..e2ca207badf 100644 --- a/src/mame/video/flkatck.cpp +++ b/src/mame/video/flkatck.cpp @@ -129,7 +129,7 @@ uint32_t flkatck_state::screen_update_flkatck(screen_device &screen, bitmap_ind1 rectangle clip[2]; const rectangle &visarea = screen.visible_area(); - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); if (m_flipscreen) { clip[0] = visarea; diff --git a/src/mame/video/funkyjet.cpp b/src/mame/video/funkyjet.cpp index a2838d86176..f18380faaf2 100644 --- a/src/mame/video/funkyjet.cpp +++ b/src/mame/video/funkyjet.cpp @@ -13,7 +13,7 @@ uint32_t funkyjet_state::screen_update_funkyjet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/gradius3.cpp b/src/mame/video/gradius3.cpp index 79def9f9175..762be53a29f 100644 --- a/src/mame/video/gradius3.cpp +++ b/src/mame/video/gradius3.cpp @@ -98,7 +98,7 @@ WRITE16_MEMBER(gradius3_state::gradius3_gfxram_w) uint32_t gradius3_state::screen_update_gradius3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* TODO: this kludge enforces the char banks. For some reason, they don't work otherwise. */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_k052109->write(space, 0x1d80, 0x10); m_k052109->write(space, 0x1f00, 0x32); diff --git a/src/mame/video/groundfx.cpp b/src/mame/video/groundfx.cpp index dd3dd01bbfd..d6444f792bc 100644 --- a/src/mame/video/groundfx.cpp +++ b/src/mame/video/groundfx.cpp @@ -197,7 +197,7 @@ void groundfx_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co uint32_t groundfx_state::screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t scclayer[3]; uint16_t priority; diff --git a/src/mame/video/gtia.cpp b/src/mame/video/gtia.cpp index 8dfd8b4c5c6..6b7162da6a7 100644 --- a/src/mame/video/gtia.cpp +++ b/src/mame/video/gtia.cpp @@ -250,7 +250,7 @@ void gtia_device::device_reset() /* reset the GTIA read/write/helper registers */ for (int i = 0; i < 32; i++) - write(machine().driver_data()->generic_space(), i, 0); + write(machine().dummy_space(), i, 0); if (is_ntsc()) m_r.pal = 0xff; diff --git a/src/mame/video/hcastle.cpp b/src/mame/video/hcastle.cpp index 0fe7390a66b..998334b32e6 100644 --- a/src/mame/video/hcastle.cpp +++ b/src/mame/video/hcastle.cpp @@ -182,7 +182,7 @@ WRITE8_MEMBER(hcastle_state::hcastle_pf2_control_w) void hcastle_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, uint8_t *sbank, int bank ) { k007121_device *k007121 = bank ? m_k007121_2 : m_k007121_1; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int base_color = (k007121->ctrlram_r(space, 6) & 0x30) * 2; int bank_base = (bank == 0) ? 0x4000 * (m_gfx_bank & 1) : 0; @@ -193,7 +193,7 @@ void hcastle_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect uint32_t hcastle_state::screen_update_hcastle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t ctrl_1_0 = m_k007121_1->ctrlram_r(space, 0); uint8_t ctrl_1_1 = m_k007121_1->ctrlram_r(space, 1); diff --git a/src/mame/video/labyrunr.cpp b/src/mame/video/labyrunr.cpp index dbae3a8f523..9f6bcb1deed 100644 --- a/src/mame/video/labyrunr.cpp +++ b/src/mame/video/labyrunr.cpp @@ -158,7 +158,7 @@ WRITE8_MEMBER(labyrunr_state::labyrunr_vram2_w) uint32_t labyrunr_state::screen_update_labyrunr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t ctrl_0 = m_k007121->ctrlram_r(space, 0); rectangle finalclip0, finalclip1; diff --git a/src/mame/video/model2.cpp b/src/mame/video/model2.cpp index 205955beaa0..b6ce47a42d2 100644 --- a/src/mame/video/model2.cpp +++ b/src/mame/video/model2.cpp @@ -275,13 +275,11 @@ struct raster_state * *******************************************/ -static void model2_3d_init( running_machine &machine, uint16_t *texture_rom ) +void model2_state::model2_3d_init( uint16_t *texture_rom ) { - model2_state *state = machine.driver_data(); + m_raster = auto_alloc_clear(machine(), ()); - state->m_raster = auto_alloc_clear( machine, () ); - - state->m_raster->texture_rom = texture_rom; + m_raster->texture_rom = texture_rom; } /******************************************* @@ -290,10 +288,9 @@ static void model2_3d_init( running_machine &machine, uint16_t *texture_rom ) * *******************************************/ -void model2_3d_set_zclip( running_machine &machine, uint8_t clip ) +WRITE32_MEMBER(model2_state::model2_3d_zclip_w) { - model2_state *state = machine.driver_data(); - state->m_raster->master_z_clip = clip; + m_raster->master_z_clip = data; } /******************************************* @@ -1194,14 +1191,13 @@ struct geo_state * *******************************************/ -static void geo_init( running_machine &machine, uint32_t *polygon_rom ) +void model2_state::geo_init( uint32_t *polygon_rom ) { - model2_state *state = machine.driver_data(); - state->m_geo = auto_alloc_clear(machine, ()); - state->m_geo->state = state; + m_geo = auto_alloc_clear(machine(), ()); + m_geo->state = this; - state->m_geo->raster = state->m_raster; - state->m_geo->polygon_rom = polygon_rom; + m_geo->raster = m_raster; + m_geo->polygon_rom = polygon_rom; } /******************************************* @@ -2595,10 +2591,10 @@ VIDEO_START_MEMBER(model2_state,model2) m_poly = auto_alloc(machine(), model2_renderer(*this)); /* initialize the hardware rasterizer */ - model2_3d_init( machine(), (uint16_t*)memregion("user3")->base() ); + model2_3d_init( (uint16_t*)memregion("user3")->base() ); /* initialize the geometry engine */ - geo_init( machine(), (uint32_t*)memregion("user2")->base() ); + geo_init( (uint32_t*)memregion("user2")->base() ); /* init various video-related pointers */ m_palram = make_unique_clear(0x2000); diff --git a/src/mame/video/pktgaldx.cpp b/src/mame/video/pktgaldx.cpp index 3542ceac7de..0e3a39022f4 100644 --- a/src/mame/video/pktgaldx.cpp +++ b/src/mame/video/pktgaldx.cpp @@ -7,7 +7,7 @@ uint32_t pktgaldx_state::screen_update_pktgaldx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/rohga.cpp b/src/mame/video/rohga.cpp index 15a4ab12498..73886784c1b 100644 --- a/src/mame/video/rohga.cpp +++ b/src/mame/video/rohga.cpp @@ -21,7 +21,7 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w) uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); @@ -124,7 +124,7 @@ void rohga_state::mixwizdfirelayer(bitmap_rgb32 &bitmap, const rectangle &clipre uint32_t rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); uint16_t priority = m_decocomn->priority_r(space, 0, 0xffff); @@ -160,7 +160,7 @@ uint32_t rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 uint32_t rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); /* draw sprite gfx to temp bitmaps */ diff --git a/src/mame/video/slapshot.cpp b/src/mame/video/slapshot.cpp index ab40578ca9a..c58de8242e8 100644 --- a/src/mame/video/slapshot.cpp +++ b/src/mame/video/slapshot.cpp @@ -448,7 +448,7 @@ a bg layer given priority over some sprites. uint32_t slapshot_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t tilepri[5]; uint8_t spritepri[4]; diff --git a/src/mame/video/sprint4.cpp b/src/mame/video/sprint4.cpp index ad909dd1b56..3ae0f5219c9 100644 --- a/src/mame/video/sprint4.cpp +++ b/src/mame/video/sprint4.cpp @@ -134,7 +134,7 @@ void sprint4_state::screen_eof_sprint4(screen_device &screen, bool state) /* update sound status */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_discrete->write(space, SPRINT4_MOTOR_DATA_1, videoram[0x391] & 15); m_discrete->write(space, SPRINT4_MOTOR_DATA_2, videoram[0x393] & 15); m_discrete->write(space, SPRINT4_MOTOR_DATA_3, videoram[0x395] & 15); diff --git a/src/mame/video/sshangha.cpp b/src/mame/video/sshangha.cpp index 1c517929835..a586dfcb531 100644 --- a/src/mame/video/sshangha.cpp +++ b/src/mame/video/sshangha.cpp @@ -39,7 +39,7 @@ uint32_t sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rg m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true); // flip screen - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/subs.cpp b/src/mame/video/subs.cpp index 2dffdcf4f9c..513ab9ff8c6 100644 --- a/src/mame/video/subs.cpp +++ b/src/mame/video/subs.cpp @@ -109,7 +109,7 @@ uint32_t subs_state::screen_update_left(screen_device &screen, bitmap_ind16 &bit } /* Update sound */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_discrete->write(space, SUBS_LAUNCH_DATA, m_spriteram[5] & 0x0f); // Launch data m_discrete->write(space, SUBS_CRASH_DATA, m_spriteram[5] >> 4); // Crash/explode data return 0; diff --git a/src/mame/video/supbtime.cpp b/src/mame/video/supbtime.cpp index aa85a40328b..95ae2ce5c9c 100644 --- a/src/mame/video/supbtime.cpp +++ b/src/mame/video/supbtime.cpp @@ -24,7 +24,7 @@ End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimj) uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/taito_b.cpp b/src/mame/video/taito_b.cpp index a70ed366489..5935e46ba21 100644 --- a/src/mame/video/taito_b.cpp +++ b/src/mame/video/taito_b.cpp @@ -258,7 +258,7 @@ void taitob_state::draw_framebuffer( bitmap_ind16 &bitmap, const rectangle &clip { rectangle myclip = cliprect; int x, y; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t video_control = m_tc0180vcu->get_videoctrl(space, 0); uint8_t framebuffer_page = m_tc0180vcu->get_fb_page(space, 0); @@ -361,7 +361,7 @@ g_profiler.stop(); uint32_t taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t video_control = m_tc0180vcu->get_videoctrl(space, 0); if ((video_control & 0x20) == 0) @@ -397,7 +397,7 @@ uint32_t taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 uint32_t taitob_state::screen_update_realpunc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); const pen_t *palette = m_palette->pens(); uint8_t video_control = m_tc0180vcu->get_videoctrl(space, 0); int x, y; @@ -486,7 +486,7 @@ void taitob_state::screen_eof_taitob(screen_device &screen, bool state) // rising edge if (state) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t video_control = m_tc0180vcu->get_videoctrl(space, 0); uint8_t framebuffer_page = m_tc0180vcu->get_fb_page(space, 0); diff --git a/src/mame/video/taito_f2.cpp b/src/mame/video/taito_f2.cpp index c8a9da5844f..4600a3afa18 100644 --- a/src/mame/video/taito_f2.cpp +++ b/src/mame/video/taito_f2.cpp @@ -1016,7 +1016,7 @@ uint32_t taitof2_state::screen_update_taitof2(screen_device &screen, bitmap_ind1 uint32_t taitof2_state::screen_update_taitof2_pri(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int layer[3]; taitof2_handle_sprite_buffering(); @@ -1061,7 +1061,7 @@ void taitof2_state::draw_roz_layer( screen_device &screen, bitmap_ind16 &bitmap, uint32_t taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int tilepri[3]; int rozpri; int layer[3]; @@ -1130,7 +1130,7 @@ uint32_t taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bit /* Thunderfox */ uint32_t taitof2_state::screen_update_taitof2_thundfox(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); int tilepri[2][3]; int spritepri[4]; int layer[2][3]; @@ -1267,7 +1267,7 @@ and it changes these (and the sprite pri settings) a lot. uint32_t taitof2_state::screen_update_taitof2_metalb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5], invlayer[4]; uint16_t priority; @@ -1318,7 +1318,7 @@ uint32_t taitof2_state::screen_update_taitof2_metalb(screen_device &screen, bitm /* Deadconx, Footchmp */ uint32_t taitof2_state::screen_update_taitof2_deadconx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t tilepri[5]; uint8_t spritepri[4]; diff --git a/src/mame/video/taito_h.cpp b/src/mame/video/taito_h.cpp index d8ff7e48e79..b8384c36aef 100644 --- a/src/mame/video/taito_h.cpp +++ b/src/mame/video/taito_h.cpp @@ -76,7 +76,7 @@ void taitoh_state::syvalion_draw_sprites( bitmap_ind16 &bitmap, const rectangle /* Y chain size is 16/32?/64/64? pixels. X chain size is always 64 pixels. */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); static const int size[] = { 1, 2, 4, 4 }; int x0, y0, x, y, dx, ex, zx; int ysize; @@ -169,7 +169,7 @@ void taitoh_state::recordbr_draw_sprites( bitmap_ind16 &bitmap, const rectangle /* Y chain size is 16/32?/64/64? pixels. X chain size is always 64 pixels. */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); static const int size[] = { 1, 2, 4, 4 }; int x0, y0, x, y, dx, dy, ex, ey, zx, zy; int ysize; @@ -281,7 +281,7 @@ void taitoh_state::dleague_draw_sprites( bitmap_ind16 &bitmap, const rectangle & /* Y chain size is 16/32?/64/64? pixels. X chain size is always 64 pixels. */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); static const int size[] = { 1, 2, 4, 4 }; int x0, y0, x, y, dx, ex, zx; int ysize; diff --git a/src/mame/video/taito_o.cpp b/src/mame/video/taito_o.cpp index 12c2197d6e7..6756262b41b 100644 --- a/src/mame/video/taito_o.cpp +++ b/src/mame/video/taito_o.cpp @@ -31,7 +31,7 @@ void taitoo_state::parentj_draw_sprites( bitmap_ind16 &bitmap, const rectangle & /* Y chain size is 16/32?/64/64? pixels. X chain size is always 64 pixels. */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); static const int size[] = { 1, 2, 4, 4 }; int x0, y0, x, y, dx, dy, ex, ey, zx, zy; int ysize; diff --git a/src/mame/video/taitoair.cpp b/src/mame/video/taitoair.cpp index 9c6e7d80aec..81597a912f1 100644 --- a/src/mame/video/taitoair.cpp +++ b/src/mame/video/taitoair.cpp @@ -84,7 +84,7 @@ int taitoair_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec /* Y chain size is 16/32?/64/64? pixels. X chain size is always 64 pixels. */ //const uint16_t stop_values[4] = { 0xc00, 0, 0, 0 }; - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); static const int size[] = { 1, 2, 4, 4 }; int x0, y0, x, y, dx, dy, ex, ey, zx, zy; int ysize; diff --git a/src/mame/video/triplhnt.cpp b/src/mame/video/triplhnt.cpp index 93a46f5bce6..b4d2be82e17 100644 --- a/src/mame/video/triplhnt.cpp +++ b/src/mame/video/triplhnt.cpp @@ -119,7 +119,7 @@ uint32_t triplhnt_state::screen_update_triplhnt(screen_device &screen, bitmap_in draw_sprites(bitmap, cliprect); - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_discrete->write(space, TRIPLHNT_BEAR_ROAR_DATA, m_playfield_ram[0xfa] & 15); m_discrete->write(space, TRIPLHNT_SHOT_DATA, m_playfield_ram[0xfc] & 15); return 0; diff --git a/src/mame/video/tumblep.cpp b/src/mame/video/tumblep.cpp index 2fdf832e4b7..ee209b12120 100644 --- a/src/mame/video/tumblep.cpp +++ b/src/mame/video/tumblep.cpp @@ -21,7 +21,7 @@ to switch between 8*8 tiles and 16*16 tiles. uint32_t tumblep_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); flip_screen_set(BIT(flip, 7)); diff --git a/src/mame/video/ultratnk.cpp b/src/mame/video/ultratnk.cpp index 810a7017cb3..48a207f1e96 100644 --- a/src/mame/video/ultratnk.cpp +++ b/src/mame/video/ultratnk.cpp @@ -139,7 +139,7 @@ void ultratnk_state::screen_eof_ultratnk(screen_device &screen, bool state) /* update sound status */ - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); m_discrete->write(space, ULTRATNK_MOTOR_DATA_1, videoram[0x391] & 15); m_discrete->write(space, ULTRATNK_MOTOR_DATA_2, videoram[0x393] & 15); } diff --git a/src/mame/video/undrfire.cpp b/src/mame/video/undrfire.cpp index f129e4d54ba..c14c66328d7 100644 --- a/src/mame/video/undrfire.cpp +++ b/src/mame/video/undrfire.cpp @@ -347,7 +347,7 @@ void undrfire_state::draw_sprites_cbombers(screen_device &screen, bitmap_ind16 & uint32_t undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t scclayer[3]; uint16_t priority; @@ -488,7 +488,7 @@ uint32_t undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_in uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t scclayer[3]; uint16_t priority; diff --git a/src/mame/video/vaportra.cpp b/src/mame/video/vaportra.cpp index 6c1c3ff02b7..56ff437dbb3 100644 --- a/src/mame/video/vaportra.cpp +++ b/src/mame/video/vaportra.cpp @@ -51,7 +51,7 @@ WRITE16_MEMBER(vaportra_state::vaportra_palette_24bit_b_w) uint32_t vaportra_state::screen_update_vaportra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff); int pri = m_priority[0] & 0x03; diff --git a/src/mame/video/xmen.cpp b/src/mame/video/xmen.cpp index 8931559b038..9cc6991194b 100644 --- a/src/mame/video/xmen.cpp +++ b/src/mame/video/xmen.cpp @@ -151,7 +151,7 @@ void xmen_state::screen_eof_xmen6p(screen_device &screen, bool state) cliprect.set(0, 64 * 8 - 1, 2 * 8, 30 * 8 - 1); - address_space &space = machine().driver_data()->generic_space(); + address_space &space = machine().dummy_space(); if (m_screen->frame_number() & 0x01) { /* copy the desired spritelist to the chip */