From b1a0e0167d8655e75275f7560958580ebce2d077 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 12 Feb 2015 10:42:02 +0100 Subject: [PATCH 01/41] ui: use per-container pixel aspect (LUA draw_text bugfix) Do not assume ui-container aspect when drawing on other containers. This fixes LUA draw_text() in multi-screens games, where the font aspect for each screen is wrongly computed on the aggregated target. Signed-off-by: Luca Bruno --- src/emu/render.c | 39 +++++++++++++++++++++++++++------------ src/emu/render.h | 2 +- src/emu/ui/ui.c | 4 ++-- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/emu/render.c b/src/emu/render.c index 2eed9176550c2..46ae77e890966 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -2483,26 +2483,41 @@ render_target *render_manager::target_by_index(int index) const // fonts //------------------------------------------------- -float render_manager::ui_aspect() +float render_manager::ui_aspect(render_container *rc) { - int orient = orientation_add(m_ui_target->orientation(), m_ui_container->orientation()); + int orient = 0; + float aspect = 1.0f; - // based on the orientation of the target, compute height/width or width/height - float aspect; - if (!(orient & ORIENTATION_SWAP_XY)) - aspect = (float)m_ui_target->height() / (float)m_ui_target->width(); - else - aspect = (float)m_ui_target->width() / (float)m_ui_target->height(); + if (rc == m_ui_container || rc == NULL) { + // ui container, aggregated multi-screen target - // if we have a valid pixel aspect, apply that and return - if (m_ui_target->pixel_aspect() != 0.0f) - return aspect / m_ui_target->pixel_aspect(); + orient = orientation_add(m_ui_target->orientation(), m_ui_container->orientation()); + // based on the orientation of the target, compute height/width or width/height + if (!(orient & ORIENTATION_SWAP_XY)) + aspect = (float)m_ui_target->height() / (float)m_ui_target->width(); + else + aspect = (float)m_ui_target->width() / (float)m_ui_target->height(); + + // if we have a valid pixel aspect, apply that and return + if (m_ui_target->pixel_aspect() != 0.0f) + return (aspect / m_ui_target->pixel_aspect()); + } else { + // single screen container + + orient = rc->orientation(); + // based on the orientation of the target, compute height/width or width/height + if (!(orient & ORIENTATION_SWAP_XY)) + aspect = (float)rc->screen()->visible_area().height() / (float)rc->screen()->visible_area().width(); + else + aspect = (float)rc->screen()->visible_area().width() / (float)rc->screen()->visible_area().height(); + } - // if not, clamp for extreme proportions + // clamp for extreme proportions if (aspect < 0.66f) aspect = 0.66f; if (aspect > 1.5f) aspect = 1.5f; + return aspect; } diff --git a/src/emu/render.h b/src/emu/render.h index 2ee8e108a09a5..bf0582585775f 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -744,7 +744,7 @@ class render_manager // UI targets render_target &ui_target() const { assert(m_ui_target != NULL); return *m_ui_target; } void set_ui_target(render_target &target) { m_ui_target = ⌖ } - float ui_aspect(); + float ui_aspect(render_container *rc = NULL); // UI containers render_container &ui_container() const { assert(m_ui_container != NULL); return *m_ui_container; } diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index 664775f2b1ba1..b968937cbea91 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -456,7 +456,7 @@ void ui_manager::update_and_render(render_container *container) { float mouse_y=-1,mouse_x=-1; if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) { - container->add_quad(mouse_x,mouse_y,mouse_x + 0.05*container->manager().ui_aspect(),mouse_y + 0.05,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_quad(mouse_x,mouse_y,mouse_x + 0.05*container->manager().ui_aspect(container),mouse_y + 0.05,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } } } @@ -600,7 +600,7 @@ void ui_manager::draw_text_full(render_container *container, const char *origs, const char *linestart; float cury = y; float maxwidth = 0; - float aspect = machine().render().ui_aspect(); + float aspect = machine().render().ui_aspect(container); // if we don't want wrapping, guarantee a huge wrapwidth if (wrap == WRAP_NEVER) From 05609ab9b1504a2ba62a6a23955590c82fd3865d Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 9 Mar 2015 08:43:17 +0100 Subject: [PATCH 02/41] luaengine: clip screen coordinates to screen size Several users reported that negative coordinates are wrongly handled. This happens because we assumed using unsigned values only, while unfortunately in many real cases negative values happen when tracking objects partly off-screen. This patch makes all screen drawing methods accept unsigned values, but crop them between 0 and screen size values. Signed-off-by: Luca Bruno --- src/emu/luaengine.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c index 59eae3870d5c3..f066bdeda6d6e 100644 --- a/src/emu/luaengine.c +++ b/src/emu/luaengine.c @@ -639,11 +639,13 @@ int lua_engine::lua_screen::l_draw_box(lua_State *L) luaL_argcheck(L, lua_isnumber(L, 7), 7, "outline color (integer) expected"); // retrieve all parameters + int sc_width = sc->visible_area().width(); + int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(lua_tounsigned(L, 2) / static_cast(sc->visible_area().width()) , 1.0f); - y1 = MIN(lua_tounsigned(L, 3) / static_cast(sc->visible_area().height()), 1.0f); - x2 = MIN(lua_tounsigned(L, 4) / static_cast(sc->visible_area().width()) , 1.0f); - y2 = MIN(lua_tounsigned(L, 5) / static_cast(sc->visible_area().height()), 1.0f); + x1 = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast(sc_width); + y1 = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast(sc_height); + x2 = MIN(MAX(0, lua_tointeger(L, 4)), sc_width-1) / static_cast(sc_width); + y2 = MIN(MAX(0, lua_tointeger(L, 5)), sc_height-1) / static_cast(sc_height); UINT32 bgcolor = lua_tounsigned(L, 6); UINT32 fgcolor = lua_tounsigned(L, 7); @@ -675,11 +677,13 @@ int lua_engine::lua_screen::l_draw_line(lua_State *L) luaL_argcheck(L, lua_isnumber(L, 6), 6, "color (integer) expected"); // retrieve all parameters + int sc_width = sc->visible_area().width(); + int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(lua_tounsigned(L, 2) / static_cast(sc->visible_area().width()) , 1.0f); - y1 = MIN(lua_tounsigned(L, 3) / static_cast(sc->visible_area().height()), 1.0f); - x2 = MIN(lua_tounsigned(L, 4) / static_cast(sc->visible_area().width()) , 1.0f); - y2 = MIN(lua_tounsigned(L, 5) / static_cast(sc->visible_area().height()), 1.0f); + x1 = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast(sc_width); + y1 = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast(sc_height); + x2 = MIN(MAX(0, lua_tointeger(L, 4)), sc_width-1) / static_cast(sc_width); + y2 = MIN(MAX(0, lua_tointeger(L, 5)), sc_height-1) / static_cast(sc_height); UINT32 color = lua_tounsigned(L, 6); // draw the line @@ -705,8 +709,10 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L) luaL_argcheck(L, lua_isstring(L, 4), 4, "message (string) expected"); // retrieve all parameters - float x = MIN(lua_tounsigned(L, 2) / static_cast(sc->visible_area().width()) , 1.0f); - float y = MIN(lua_tounsigned(L, 3) / static_cast(sc->visible_area().height()), 1.0f); + int sc_width = sc->visible_area().width(); + int sc_height = sc->visible_area().height(); + float x = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast(sc_width); + float y = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast(sc_height); const char *msg = luaL_checkstring(L,4); // TODO: add optional parameters (colors, etc.) From 1fa8b4ea4febee62516ea45a57568d0274cbd09a Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 16 Mar 2015 11:35:38 +0100 Subject: [PATCH 03/41] docs: add initial documentation for luaengine API This commits add some initial documentation for current API exposed via luaengine. This doc is meant to be a quick walkthrough for script writers coming from mame-rr. Full methods reference is not yet included, as the API is still rapidly changing. Signed-off-by: Luca Bruno --- docs/luaengine.md | 154 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 docs/luaengine.md diff --git a/docs/luaengine.md b/docs/luaengine.md new file mode 100644 index 0000000000000..c2f2b961492de --- /dev/null +++ b/docs/luaengine.md @@ -0,0 +1,154 @@ +# Scripting MAME via LUA + +## Introduction + +It is now possible to externally drive MAME via LUA scripts. +This feature initially appeared in version 0.148, when a minimal `luaengine` +was implemented. Nowadays, the LUA interface is rich enough +to let you inspect and manipulate devices state, access CPU +registers, read and write memory, and draw a custom HUD on screen. + +Internally, MAME makes extensive use of `luabridge` to implement +this feature: the idea is to transparently expose as many of +the useful internals as possible. + +Finally, a warning: LUA API is not yet declared stable and may +suddenly change without prior notice. +However, we expose methods to let you know at runtime which API +version you are running against, and you can introspect most of the +objects at runtime. + +## Features + +The API is not yet complete, but this is a partial list of capabilities +currently available to LUA scripts: + + * machine metadata (app version, current rom, rom details) + * machine control (starting, pausing, resetting, stopping) + * machine hooks (on frame painting and on user events) + * devices introspection (device tree listing, memory and register enumeration) + * screens introspection (screens listing, screen details, frames counting) + * screen HUD drawing (text, lines, boxes on multiple screens) + * memory read/write (8/16/32/64 bits, signed and unsigned) + * registers and states control (states enumeration, get and set) + +## Usage + +MAME supports external scripting via LUA (>= 5.3) scripts, either +written on the interactive console or loaded as a file. +To reach the console, just run MAME with `-console`; you will be +greeted by a naked `>` prompt where you can input your script. + +To load a whole script at once, store it in a plaintext file and +pass it via the `-autoboot_script`. Please note that script +loading may be delayed (few seconds by default), but you can +override the default with the `-autoboot_delay` argument. + +To control the execution of your code, you can use a loop-based or +an event-based approach. The former is not encouraged as it is +resource-intensive and makes control flow unnecessarily complex. +Instead, we suggest to register custom hooks to be invoked on specific +events (eg. at each frame rendering). + +## Walktrough + +Let's first run MAME in a terminal to reach the LUA console: +``` +$ mame -console YOUR_ROM +M.A.M.E. v0.158 (Feb 5 2015) - Multiple Arcade Machine Emulator +Copyright Nicola Salmoria and the MAME team +Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio + +> +``` + +At this point, your game is probably running in demo mode, let's pause it: +``` +> emu.pause() +> +``` +Even without textual feedback on the console, you'll notice the game is now paused. +In general, commands are quiet and only print back error messages. + +You can check at runtime which version of MAME you are running, with: +``` +> print(emu.app_name() .. " " .. emu.app_version()) +mame 0.158 +``` + +We now start exploring screen related methods. First, let's enumerate available screens: +``` +> for i,v in pairs(manager:machine().screens) do print(i) end +:screen +``` + +`manager:machine()` is the root object of your currently running machine: +we will be using this often. `screens` is a table with all available screens; +most machines only have one main screen. +In our case, the main and only screen is tagged as `:screen`, and we can further +inspect it: +``` +> -- let's define a shorthand for the main screen +> s = manager:machine().screens[":screen"] +> print(s:width() .. "x" .. s:height()) +320x224 +``` + +We have several methods to draw on the screen a HUD composed of lines, boxes and text: +``` +> -- we define a HUD-drawing function, and then call it +> function draw_hud() +>> s:draw_text(40, 40, "foo"); -- (x0, y0, msg) +>> s:draw_box(20, 20, 80, 80, 0, 0xff00ffff); -- (x0, y0, x1, y1, fill-color, line-color) +>> s:draw_line(20, 20, 80, 80, 0xff00ffff); -- (x0, y0, x1, y1, line-color) +>> end +> draw_hud(); +``` + +This will draw some useless art on the screen. However, when unpausing the game, your HUD +needs to be refreshed otherwise it will just disappear. In order to do this, you have to register +your hook to be called on every frame repaint: +``` +> emu.sethook(draw_hud, "frame") +``` + +Similarly to screens, you can inspect all the devices attached to a +machine: +``` +> for k,v in pairs(manager:machine().devices) do print(k) end +:audiocpu +:maincpu +:saveram +:screen +:palette +[...] +``` + +On some of them, you can also inspect and manipulate memory and state: +``` +> cpu = manager:machine().devices[":maincpu"] +> -- enumerate, read and write state registers +> for k,v in pairs(cpu.state) do print(k) end +D5 +SP +A4 +A3 +D0 +PC +[...] +> print(cpu.state["D0"].value) +303 +> cpu.state["D0"].value = 255 +> print(cpu.state["D0"].value) +255 +``` + +``` +> -- inspect memory +> for k,v in pairs(cpu.spaces) do print(k) end +program +> mem = cpu.spaces["program"] +> print(mem:read_i8(0xC000)) +41 +``` + From 2f5c5f8e2118c7eb5466fc4d25ef24027c08b267 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Mon, 23 Mar 2015 10:15:02 +0100 Subject: [PATCH 04/41] temp workaround for the MESS crash due to SNES trying to access a cart even if none is available (emulation should not crash even if carts are mandatory). nw. a better solution will be added in next dev cycle, by moving the memory handlers to the cart side as it is being done in most systems. --- src/mess/drivers/snes.c | 237 ++++++++++++++++++++-------------------- 1 file changed, 121 insertions(+), 116 deletions(-) diff --git a/src/mess/drivers/snes.c b/src/mess/drivers/snes.c index 8697bb35d8526..aff5e20e5f0d3 100644 --- a/src/mess/drivers/snes.c +++ b/src/mess/drivers/snes.c @@ -1005,9 +1005,9 @@ WRITE8_MEMBER( snes_console_state::pfest94_lo_w ) *************************************/ static ADDRESS_MAP_START( snes_map, AS_PROGRAM, 8, snes_console_state ) - AM_RANGE(0x000000, 0x7dffff) AM_READWRITE(snes20_lo_r, snes20_lo_w) +// AM_RANGE(0x000000, 0x7dffff) AM_READWRITE(snes20_lo_r, snes20_lo_w) AM_RANGE(0x7e0000, 0x7fffff) AM_RAM /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */ - AM_RANGE(0x800000, 0xffffff) AM_READWRITE(snes20_hi_r, snes20_hi_w) +// AM_RANGE(0x800000, 0xffffff) AM_READWRITE(snes20_hi_r, snes20_hi_w) ADDRESS_MAP_END static ADDRESS_MAP_START( spc_map, AS_PROGRAM, 8, snes_console_state ) @@ -1191,123 +1191,128 @@ void snes_console_state::machine_start() { snes_state::machine_start(); - m_type = m_cartslot->get_type(); - - switch (m_type) + if (m_cartslot && m_cartslot->exists()) { - // LoROM & LoROM + addons - case SNES_MODE20: - case SNES_BSXLO: - case SNES_SUFAMITURBO: - case SNES_CX4: // this still uses the old simulation instead of emulating the CPU - case SNES_ST010: // this requires two diff kinds of chip access, so we handle it in snes20_lo/hi_r/w - case SNES_ST011: // this requires two diff kinds of chip access, so we handle it in snes20_lo/hi_r/w - case SNES_ST018: // still unemulated - break; - case SNES_Z80GB: // skeleton support - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessgb_lo_r),this), write8_delegate(FUNC(snes_console_state::snessgb_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessgb_hi_r),this), write8_delegate(FUNC(snes_console_state::snessgb_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_SA1: // skeleton support - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessa1_lo_r),this), write8_delegate(FUNC(snes_console_state::snessa1_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessa1_hi_r),this), write8_delegate(FUNC(snes_console_state::snessa1_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_DSP: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_DSP_2MB: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_DSP4: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_OBC1: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_SFX: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessfx_lo_r),this), write8_delegate(FUNC(snes_console_state::snessfx_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessfx_hi_r),this), write8_delegate(FUNC(snes_console_state::snessfx_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_SDD1: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessdd1_lo_r),this), write8_delegate(FUNC(snes_console_state::snessdd1_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessdd1_hi_r),this), write8_delegate(FUNC(snes_console_state::snessdd1_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_BSX: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snesbsx_lo_r),this), write8_delegate(FUNC(snes_console_state::snesbsx_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snesbsx_hi_r),this), write8_delegate(FUNC(snes_console_state::snesbsx_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - // HiROM & HiROM + addons - case SNES_MODE21: - case SNES_BSXHI: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_DSP_MODE21: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->set_5a22_map(); - break; - case SNES_SRTC: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->set_5a22_map(); - break; - case SNES_SPC7110: - case SNES_SPC7110_RTC: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes7110_lo_r),this), write8_delegate(FUNC(snes_console_state::snes7110_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes7110_hi_r),this), write8_delegate(FUNC(snes_console_state::snes7110_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - case SNES_PFEST94: - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::pfest94_lo_r),this), write8_delegate(FUNC(snes_console_state::pfest94_lo_w),this)); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::pfest94_hi_r),this), write8_delegate(FUNC(snes_console_state::pfest94_hi_w),this)); - m_maincpu->set_5a22_map(); - break; - // pirate 'mappers' - case SNES_POKEMON: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_TEKKEN2: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_MCPIR1: - case SNES_MCPIR2: - m_maincpu->space(AS_PROGRAM).install_write_handler(0xffff00, 0xffffff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_20COL: - m_maincpu->space(AS_PROGRAM).install_write_handler(0x008000, 0x008fff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); - break; - case SNES_SOULBLAD: - // reads from xxx0-xxx3in range [80-bf] return a fixed sequence of 4bits; reads in range [c0-ff] return open bus - m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc00000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes_open_bus_r),this)); - break; - case SNES_BUGS: - case SNES_BANANA: -// m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); -// m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); -// m_maincpu->set_5a22_map(); - break; - } + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes20_lo_r),this), write8_delegate(FUNC(snes_console_state::snes20_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes20_hi_r),this), write8_delegate(FUNC(snes_console_state::snes20_hi_w),this)); + m_maincpu->set_5a22_map(); + + m_type = m_cartslot->get_type(); - if (m_cartslot) + switch (m_type) + { + // LoROM & LoROM + addons + case SNES_MODE20: + case SNES_BSXLO: + case SNES_SUFAMITURBO: + case SNES_CX4: // this still uses the old simulation instead of emulating the CPU + case SNES_ST010: // this requires two diff kinds of chip access, so we handle it in snes20_lo/hi_r/w + case SNES_ST011: // this requires two diff kinds of chip access, so we handle it in snes20_lo/hi_r/w + case SNES_ST018: // still unemulated + break; + case SNES_Z80GB: // skeleton support + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessgb_lo_r),this), write8_delegate(FUNC(snes_console_state::snessgb_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessgb_hi_r),this), write8_delegate(FUNC(snes_console_state::snessgb_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_SA1: // skeleton support + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessa1_lo_r),this), write8_delegate(FUNC(snes_console_state::snessa1_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessa1_hi_r),this), write8_delegate(FUNC(snes_console_state::snessa1_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_DSP: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x208000, 0x20ffff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x208000, 0x20ffff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_DSP_2MB: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x600000, 0x607fff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x600000, 0x607fff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_DSP4: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x308000, 0x30ffff, 0, 0x8f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x308000, 0x30ffff, 0, 0x8f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_OBC1: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_SFX: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessfx_lo_r),this), write8_delegate(FUNC(snes_console_state::snessfx_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessfx_hi_r),this), write8_delegate(FUNC(snes_console_state::snessfx_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_SDD1: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snessdd1_lo_r),this), write8_delegate(FUNC(snes_console_state::snessdd1_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snessdd1_hi_r),this), write8_delegate(FUNC(snes_console_state::snessdd1_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_BSX: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snesbsx_lo_r),this), write8_delegate(FUNC(snes_console_state::snesbsx_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snesbsx_hi_r),this), write8_delegate(FUNC(snes_console_state::snesbsx_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + // HiROM & HiROM + addons + case SNES_MODE21: + case SNES_BSXHI: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_DSP_MODE21: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x006000, 0x007fff, 0, 0x9f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x006000, 0x007fff, 0, 0x9f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->set_5a22_map(); + break; + case SNES_SRTC: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes21_lo_r),this), write8_delegate(FUNC(snes_console_state::snes21_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes21_hi_r),this), write8_delegate(FUNC(snes_console_state::snes21_hi_w),this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x002800, 0x002800, 0, 0xbf0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x002801, 0x002801, 0, 0xbf0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->set_5a22_map(); + break; + case SNES_SPC7110: + case SNES_SPC7110_RTC: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes7110_lo_r),this), write8_delegate(FUNC(snes_console_state::snes7110_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes7110_hi_r),this), write8_delegate(FUNC(snes_console_state::snes7110_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + case SNES_PFEST94: + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::pfest94_lo_r),this), write8_delegate(FUNC(snes_console_state::pfest94_lo_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::pfest94_hi_r),this), write8_delegate(FUNC(snes_console_state::pfest94_hi_w),this)); + m_maincpu->set_5a22_map(); + break; + // pirate 'mappers' + case SNES_POKEMON: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x800000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x800000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_TEKKEN2: + m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x8087ff, 0, 0x3f0000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x8087ff, 0, 0x3f0000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_MCPIR1: + case SNES_MCPIR2: + m_maincpu->space(AS_PROGRAM).install_write_handler(0xffff00, 0xffffff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_20COL: + m_maincpu->space(AS_PROGRAM).install_write_handler(0x008000, 0x008fff, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); + break; + case SNES_SOULBLAD: + // reads from xxx0-xxx3in range [80-bf] return a fixed sequence of 4bits; reads in range [c0-ff] return open bus + m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x808003, 0, 0x3f7ff0, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc00000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes_open_bus_r),this)); + break; + case SNES_BUGS: + case SNES_BANANA: +// m_maincpu->space(AS_PROGRAM).install_read_handler(0x808000, 0x80ffff, 0, 0x780000, read8_delegate(FUNC(base_sns_cart_slot_device::chip_read),(base_sns_cart_slot_device*)m_cartslot)); +// m_maincpu->space(AS_PROGRAM).install_write_handler(0x808000, 0x80ffff, 0, 0x780000, write8_delegate(FUNC(base_sns_cart_slot_device::chip_write),(base_sns_cart_slot_device*)m_cartslot)); +// m_maincpu->set_5a22_map(); + break; + } m_cartslot->save_ram(); + } } void snes_console_state::machine_reset() From efc7dedb573108f49876ee79459bce43d429f3c0 Mon Sep 17 00:00:00 2001 From: Cesare Falco Date: Mon, 23 Mar 2015 12:57:46 +0100 Subject: [PATCH 05/41] Updated *nix manpages to forthcoming 0.160 --- src/osd/sdl/man/castool.1 | 2 +- src/osd/sdl/man/chdman.1 | 2 +- src/osd/sdl/man/floptool.1 | 2 +- src/osd/sdl/man/imgtool.1 | 2 +- src/osd/sdl/man/jedutil.1 | 2 +- src/osd/sdl/man/ldresample.1 | 2 +- src/osd/sdl/man/ldverify.1 | 2 +- src/osd/sdl/man/mame.6 | 9 +++++---- src/osd/sdl/man/mess.6 | 10 +++++----- src/osd/sdl/man/romcmp.1 | 2 +- src/osd/sdl/man/testkeys.1 | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/osd/sdl/man/castool.1 b/src/osd/sdl/man/castool.1 index 09c56270c1b95..56ef844e08ff5 100644 --- a/src/osd/sdl/man/castool.1 +++ b/src/osd/sdl/man/castool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco , February 2011 .\" .\" -.TH CASTOOL 1 2015-01-18 0.158 "MESS Generic cassette manipulation tool" +.TH CASTOOL 1 2015-03-23 0.160 "MESS Generic cassette manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/chdman.1 b/src/osd/sdl/man/chdman.1 index d95e6e2ba2484..dfa9440428d55 100644 --- a/src/osd/sdl/man/chdman.1 +++ b/src/osd/sdl/man/chdman.1 @@ -6,7 +6,7 @@ .\" Ashley T. Howes , February 2005 .\" updated by Cesare Falco , February 2007 .\" -.TH CHDMAN 1 2015-01-18 0.158 "MAME Compressed Hunks of Data (CHD) manager" +.TH CHDMAN 1 2015-03-23 0.160 "MAME Compressed Hunks of Data (CHD) manager" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/floptool.1 b/src/osd/sdl/man/floptool.1 index c3cb1b0fbef45..338bf9b6b3b4f 100644 --- a/src/osd/sdl/man/floptool.1 +++ b/src/osd/sdl/man/floptool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco , April 2014 .\" .\" -.TH FLOPTOOL 1 2015-01-18 0.158 "MESS Generic floppy manipulation tool" +.TH FLOPTOOL 1 2015-03-23 0.160 "MESS Generic floppy manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/imgtool.1 b/src/osd/sdl/man/imgtool.1 index 03be2b8651515..392a767c1660b 100644 --- a/src/osd/sdl/man/imgtool.1 +++ b/src/osd/sdl/man/imgtool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco , February 2011 .\" .\" -.TH IMGTOOL 1 2015-01-18 0.158 "MESS media image manipulation tool" +.TH IMGTOOL 1 2015-03-23 0.160 "MESS media image manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/jedutil.1 b/src/osd/sdl/man/jedutil.1 index 84ec4fc2efb97..f85a5a3d6206b 100644 --- a/src/osd/sdl/man/jedutil.1 +++ b/src/osd/sdl/man/jedutil.1 @@ -8,7 +8,7 @@ .\" References .\" http://aarongiles.com/?p=159 .\" -.TH JEDUTIL 1 2015-01-18 0.158 "MAME JEDEC file utilities" +.TH JEDUTIL 1 2015-03-23 0.160 "MAME JEDEC file utilities" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/ldresample.1 b/src/osd/sdl/man/ldresample.1 index d84f8c1d5294a..cf719c41ac94c 100644 --- a/src/osd/sdl/man/ldresample.1 +++ b/src/osd/sdl/man/ldresample.1 @@ -3,7 +3,7 @@ .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .\" -.TH LDRESAMPLE 1 2015-01-18 0.158 "MAME laserdisc audio manipulation tool" +.TH LDRESAMPLE 1 2015-03-23 0.160 "MAME laserdisc audio manipulation tool" .\" .\" Please adjust this date whenever revising the manpage. .\" diff --git a/src/osd/sdl/man/ldverify.1 b/src/osd/sdl/man/ldverify.1 index 7dc1162d7ae15..83b43efe118e0 100644 --- a/src/osd/sdl/man/ldverify.1 +++ b/src/osd/sdl/man/ldverify.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information by .\" Cesare Falco , August 2008 .\" -.TH LDVERIFY 1 2015-01-18 0.158 "MAME laserdisc data checker" +.TH LDVERIFY 1 2015-03-23 0.160 "MAME laserdisc data checker" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/mame.6 b/src/osd/sdl/man/mame.6 index b378266a421ea..208629227924f 100644 --- a/src/osd/sdl/man/mame.6 +++ b/src/osd/sdl/man/mame.6 @@ -13,7 +13,7 @@ .\" and updated by Andrew Burton , July 2003 .\" .\" -.TH MAME 6 2015-01-18 0.158 "MAME \- The Multiple Arcade Machine Emulator" +.TH MAME 6 2015-03-23 0.160 "MAME \- The Multiple Arcade Machine Emulator" .\" .\" .\" NAME chapter @@ -448,6 +448,9 @@ The intention is that this PNG can be loaded via an artwork file with a low alpha (e.g, 0.1\-0.2 seems to work well) and blended over the entire screen. The PNG files are saved in the snap directory under the gamename\\burnin\-.png. The default is OFF (\-noburnin). +.TP +.B \-[no]dummywrite +Indicates whether a snapshot should be created with each frame. .\" .\" ******************************************************* .SS Performance options @@ -646,7 +649,7 @@ needs adjustment. This option requires a float argument in the range of .\" SDL specific .\" +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .TP -.B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fIopengl16\fR|\fInone\fR] +.B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fInone\fR] Specifies which video subsystem to use for drawing: .br \fBsoft\fR uses software rendering, which is slower but more compatible. @@ -654,8 +657,6 @@ Specifies which video subsystem to use for drawing: \fBopengl\fR uses OpenGL and your graphics accelerator to speed up many aspects of drawing MAME including compositing artwork, overlays, and bezels, as well as stretching the image to fit your screen. -.br -\fBopengl16\fR uses alternate OpenGL code, which should provide faster output on some cards. .br \fBnone\fR does no drawing and is intended for CPU benchmarking. diff --git a/src/osd/sdl/man/mess.6 b/src/osd/sdl/man/mess.6 index 999494192df4e..d3fb2875db447 100644 --- a/src/osd/sdl/man/mess.6 +++ b/src/osd/sdl/man/mess.6 @@ -16,7 +16,7 @@ .\" http://www.mess.org/ .\" .\" -.TH MESS 6 2015-01-18 0.158 "The Multiple Emulator Super System (MESS)" +.TH MESS 6 2015-03-23 0.160 "The Multiple Emulator Super System (MESS)" .\" .\" .\" NAME chapter @@ -463,6 +463,9 @@ The intention is that this PNG can be loaded via an artwork file with a low alpha (e.g, 0.1\-0.2 seems to work well) and blended over the entire screen. The PNG files are saved in the snap directory under the system/burnin\-.png. The default is OFF (\-noburnin). +.TP +.B \-[no]dummywrite +Indicates whether a snapshot should be created with each frame. .\" .\" ******************************************************* .SS Performance options @@ -661,7 +664,7 @@ needs adjustment. This option requires a float argument in the range of .\" SDL specific .\" +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .TP -.B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fIopengl16\fR|\fInone\fR] +.B \-video\fR [\fIsoft\fR|\fIopengl\fR|\fInone\fR] Specifies which video subsystem to use for drawing: .br \fBsoft\fR uses software rendering, which is slower but more compatible. @@ -670,9 +673,6 @@ Specifies which video subsystem to use for drawing: aspects of drawing MESS including compositing artwork, overlays, and bezels, as well as stretching the image to fit your screen. .br -\fBopengl16\fR uses alternate OpenGL code, which should provide faster -output on some cards. -.br \fBnone\fR does no drawing and is intended for CPU benchmarking. .br Default is SOFT. diff --git a/src/osd/sdl/man/romcmp.1 b/src/osd/sdl/man/romcmp.1 index 766dac20a41a0..a52c2a1b472e0 100644 --- a/src/osd/sdl/man/romcmp.1 +++ b/src/osd/sdl/man/romcmp.1 @@ -9,7 +9,7 @@ .\" References .\" http://www.mame.net/mamefaq.html .\" -.TH ROMCMP 1 2015-01-18 0.158 "MAME romset checking tool" +.TH ROMCMP 1 2015-03-23 0.160 "MAME romset checking tool" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/testkeys.1 b/src/osd/sdl/man/testkeys.1 index d253f3cbb2bbf..4ef207a35b661 100644 --- a/src/osd/sdl/man/testkeys.1 +++ b/src/osd/sdl/man/testkeys.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information .\" Cesare Falco , February 2007 .\" -.TH TESTKEYS 1 2015-01-18 0.158 "MAME SDL keycode scanner" +.TH TESTKEYS 1 2015-03-23 0.160 "MAME SDL keycode scanner" .\" .\" NAME chapter .SH NAME From d1e1dda76db02c8d70a885b0e1e95a1d0da50c36 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 23 Mar 2015 13:50:28 +0000 Subject: [PATCH 06/41] new clones Golden Axe II (Mega Play) (original rev) [Jets and Layer] This is the original release, the set we had was Rev B, so I've marked it as such. --- src/mame/drivers/megaplay.c | 18 ++++++++++++++++-- src/mame/mame.lst | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/megaplay.c b/src/mame/drivers/megaplay.c index 86dae7f694dd5..cd4b74fc98870 100644 --- a/src/mame/drivers/megaplay.c +++ b/src/mame/drivers/megaplay.c @@ -742,7 +742,7 @@ ROM_START( mp_col3 ) /* Columns 3 */ MEGAPLAY_BIOS ROM_END -ROM_START( mp_gaxe2 ) /* Golden Axe 2 */ +ROM_START( mp_gaxe2 ) /* Golden Axe 2, revision B */ ROM_REGION( 0x400000, "maincpu", 0 ) ROM_LOAD16_BYTE( "ep15179b.ic2", 0x000000, 0x040000, CRC(00d97b84) SHA1(914bbf566ddf940aab67b92af237d251650ddadf) ) ROM_LOAD16_BYTE( "ep15178b.ic1", 0x000001, 0x040000, CRC(2ea576db) SHA1(6d96b948243533de1f488b1f80e0d5431a4f1f53) ) @@ -755,6 +755,19 @@ ROM_START( mp_gaxe2 ) /* Golden Axe 2 */ MEGAPLAY_BIOS ROM_END +ROM_START( mp_gaxe2a ) /* Golden Axe 2 */ + ROM_REGION( 0x400000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "epr-15179.ic2", 0x000000, 0x040000, CRC(d35f1a35) SHA1(3105cd3b55f65337863703db04527fe298fc04e0) ) + ROM_LOAD16_BYTE( "epr-15178.ic1", 0x000001, 0x040000, CRC(2c6b6b76) SHA1(25577f49ecad451c217da9cacbd78ffca9dca24e) ) + /* Game Instruction rom copied to 0x300000 - 0x310000 (odd / even bytes equal) */ + + ROM_REGION( 0x8000, "user1", 0 ) /* Game Instructions */ + ROM_LOAD( "epr-15175-02.ic3", 0x000000, 0x08000, CRC(cfc87f91) SHA1(110609094aa6d848bec613faa0558db7ad272b77) ) + + ROM_REGION( 0x20000, "mtbios", 0 ) /* Bios */ + MEGAPLAY_BIOS +ROM_END + ROM_START( mp_gslam ) /* Grand Slam */ ROM_REGION( 0x400000, "maincpu", 0 ) ROM_LOAD16_BYTE( "epr-15181.ic2", 0x000000, 0x040000, CRC(642437c1) SHA1(cbf88e196c04b6d886bf9642b69bf165045510fe) ) @@ -928,7 +941,8 @@ didn't have original Sega part numbers it's probably a converted TWC cart /* -- */ GAME( 1993, megaplay, 0, megaplay, megaplay, mplay_state, megaplay, ROT0, "Sega", "Mega Play BIOS", GAME_IS_BIOS_ROOT ) /* 01 */ GAME( 1993, mp_sonic, megaplay, megaplay, mp_sonic, mplay_state, megaplay, ROT0, "Sega", "Sonic The Hedgehog (Mega Play)" , 0 ) -/* 02 */ GAME( 1993, mp_gaxe2, megaplay, megaplay, mp_gaxe2, mplay_state, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play)" , 0 ) +/* 02 */ GAME( 1993, mp_gaxe2, megaplay, megaplay, mp_gaxe2, mplay_state, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play) (Rev B)" , 0 ) +/* 02 */ GAME( 1993, mp_gaxe2a,mp_gaxe2, megaplay, mp_gaxe2, mplay_state, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play)" , 0 ) /* 03 */ GAME( 1993, mp_gslam, megaplay, megaplay, mp_gslam, mplay_state, megaplay, ROT0, "Sega", "Grand Slam (Mega Play)",0 ) /* 04 */ GAME( 1993, mp_twc, megaplay, megaplay, mp_twc, mplay_state, megaplay, ROT0, "Sega", "Tecmo World Cup (Mega Play)" , 0 ) /* 05 */ GAME( 1993, mp_sor2, megaplay, megaplay, mp_sor2, mplay_state, megaplay, ROT0, "Sega", "Streets of Rage II (Mega Play)" , 0 ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ffd1409ea4248..78fb22ae12214 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -5284,6 +5284,7 @@ mt_soni2 // 62 megaplay mp_sonic // 01 mp_gaxe2 // 02 +mp_gaxe2a // 02 mp_gslam // 03 mp_twc // 04 mp_sor2 // 05 From 1aca10780c7762e770100742ead61dda48b0a0d4 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 23 Mar 2015 14:11:24 +0000 Subject: [PATCH 07/41] works well enough to mark it as working (nw) --- src/mame/drivers/twins.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index b663bc6b7db70..6ee893004dc5f 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -39,17 +39,18 @@ video is not banked in this case instead palette data is sent to the ports strange palette format. todo: -hook up eeprom -takes a long time to boot (eeprom?) - +hook up eeprom (doesn't seem to work when hooked up??) +Twins set 1 takes a long time to boot (eeprom?) +Improve blitter / clear logic for Spider. Electronic Devices was printed on rom labels 1994 date string is in ROM -Spider seems to have some kind of sprites / blitter that works the same as as Table Tennis Champ (ttchamp.c) -Spider must also have some ROM banking, or the blitter must be able to access non-cpu visible space, the title logo is at 0x00000 in ROM +Spider PCB appears almost identical but uses additional 'blitter' features. +It is possible the Twins PCB has them too and doesn't use them. + -Twins (set 2) is significantly changed hardware. +Twins (set 2) is significantly changed hardware, uses a regular RAMDAC hookup for plaette etc. */ @@ -281,9 +282,19 @@ ADDRESS_MAP_END VIDEO_START_MEMBER(twins_state,twins) { save_item(NAME(m_paloff)); - m_paloff = 0; + + save_item(NAME(m_spritesinit)); + save_item(NAME(m_spriteswidth)); + save_item(NAME(m_spritesaddr)); + save_item(NAME(m_mainram)); + save_item(NAME(m_videoram)); + save_item(NAME(m_videoram2)); + save_item(NAME(m_videorambank)); } + + + UINT32 twins_state::screen_update_twins(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int y,x,count; @@ -401,6 +412,7 @@ VIDEO_START_MEMBER(twins_state,twinsa) } + static ADDRESS_MAP_START( twinsa_io, AS_IO, 16, twins_state ) AM_RANGE(0x0000, 0x0001) AM_DEVWRITE8("ramdac",ramdac_device,index_w,0x00ff) AM_RANGE(0x0002, 0x0003) AM_DEVWRITE8("ramdac",ramdac_device,mask_w,0x00ff) @@ -616,4 +628,4 @@ ROM_END GAME( 1994, twins, 0, twins, twins, driver_device, 0, ROT0, "Electronic Devices", "Twins (set 1)", GAME_SUPPORTS_SAVE ) GAME( 1994, twinsa, twins, twinsa, twins, driver_device, 0, ROT0, "Electronic Devices", "Twins (set 2)", GAME_SUPPORTS_SAVE ) -GAME( 1994, spider, 0, spider, twins, driver_device, 0, ROT0, "Buena Vision", "Spider", GAME_NOT_WORKING ) +GAME( 1994, spider, 0, spider, twins, driver_device, 0, ROT0, "Buena Vision", "Spider", GAME_IMPERFECT_GRAPHICS ) From 7ea90b986d7be32c897e7ec9074363fda8c653e5 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 24 Mar 2015 02:53:25 +1100 Subject: [PATCH 08/41] megasys1.c: fix status read for second OKI sound chip [Mamesick] --- src/mame/drivers/megasys1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c index 0da05bb5416a5..f31aad63bc7b9 100644 --- a/src/mame/drivers/megasys1.c +++ b/src/mame/drivers/megasys1.c @@ -398,7 +398,7 @@ READ8_MEMBER(megasys1_state::oki_status_2_r) if (m_ignore_oki_status == 1) return 0; else - return m_oki1->read_status(); + return m_oki2->read_status(); } /*************************************************************************** [ Sound CPU - System A ] From 277cb84661e0628121fff3ec0082cfddf5a4ca92 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 23 Mar 2015 16:05:27 +0000 Subject: [PATCH 09/41] use existing sprite device for 'thedeep' (thanks to Osso for pointing it out) --- src/mame/drivers/thedeep.c | 5 ++ src/mame/includes/thedeep.h | 9 +++- src/mame/video/decmxc06.c | 35 +++++++++----- src/mame/video/decmxc06.h | 10 ++++ src/mame/video/thedeep.c | 92 +------------------------------------ 5 files changed, 47 insertions(+), 104 deletions(-) diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index cc3db30a16d23..b28bb92237de7 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -436,6 +436,11 @@ static MACHINE_CONFIG_START( thedeep, thedeep_state ) MCFG_PALETTE_ADD("palette", 512) MCFG_PALETTE_INIT_OWNER(thedeep_state, thedeep) + MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0) + deco_mxc06_device::set_gfx_region(*device, 0); + MCFG_DECO_MXC06_GFXDECODE("gfxdecode") + MCFG_DECO_MXC06_PALETTE("palette") + MCFG_DECO_MXC06_RAMSIZE(0x400) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/includes/thedeep.h b/src/mame/includes/thedeep.h index 301bb0c8b0d22..948f278ac60e1 100644 --- a/src/mame/includes/thedeep.h +++ b/src/mame/includes/thedeep.h @@ -1,3 +1,6 @@ +#include "video/decmxc06.h" + + class thedeep_state : public driver_device { public: @@ -12,7 +15,9 @@ class thedeep_state : public driver_device m_vram_0(*this, "vram_0"), m_vram_1(*this, "vram_1"), m_scroll(*this, "scroll"), - m_scroll2(*this, "scroll2") { } + m_scroll2(*this, "scroll2"), + m_spritegen(*this, "spritegen") + { } required_device m_maincpu; required_device m_audiocpu; @@ -25,6 +30,7 @@ class thedeep_state : public driver_device required_shared_ptr m_vram_1; required_shared_ptr m_scroll; required_shared_ptr m_scroll2; + required_device m_spritegen; int m_nmi_enable; UINT8 m_protection_command; @@ -59,7 +65,6 @@ class thedeep_state : public driver_device DECLARE_PALETTE_INIT(thedeep); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(mcu_irq); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); diff --git a/src/mame/video/decmxc06.c b/src/mame/video/decmxc06.c index 3b908b6df80b0..61cc9d03d9316 100644 --- a/src/mame/video/decmxc06.c +++ b/src/mame/video/decmxc06.c @@ -51,6 +51,7 @@ deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char * : device_t(mconfig, DECO_MXC06, "DECO MXC06 Sprite", tag, owner, clock, "deco_mxc06", __FILE__), device_video_interface(mconfig, *this), m_gfxregion(0), + m_ramsize(0x800), m_gfxdecode(*this), m_palette(*this) { @@ -73,7 +74,7 @@ void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cli int offs; offs = 0; - while (offs < 0x800 / 2) + while (offs < m_ramsize / 2) { int sx, sy, code, color, w, h, flipx, flipy, incy, flash, mult, x, y; @@ -109,36 +110,44 @@ void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cli else mult = -16; + + // thedeep strongly suggests that this check goes here, otherwise the radar breaks + if (!(spriteram[offs] & 0x8000)) + { + offs += 4; + continue; + } + + for (x = 0; x < w; x++) { // maybe, birdie try appears to specify the base code for each part.. code = spriteram[offs + 1] & 0x1fff; - code &= ~(h-1); + code &= ~(h - 1); if (flipy) incy = -1; else { - code += h-1; + code += h - 1; incy = 1; } for (y = 0; y < h; y++) { - if (spriteram[offs] & 0x8000) { int draw = 0; if (!flash || (m_screen->frame_number() & 1)) { - if (m_priority_type==0) // most cases + if (m_priority_type == 0) // most cases { if ((color & pri_mask) == pri_val) { draw = 1; } } - else if (m_priority_type==1) // vaportra + else if (m_priority_type == 1) // vaportra { if (pri_mask && (color >= pri_val)) continue; @@ -152,18 +161,20 @@ void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cli if (draw) { - m_gfxdecode->gfx(m_gfxregion)->transpen(bitmap,cliprect, + m_gfxdecode->gfx(m_gfxregion)->transpen(bitmap, cliprect, code - y * incy, color & col_mask, - flipx,flipy, - sx + (mult * x),sy + (mult * y),0); + flipx, flipy, + sx + (mult * x), sy + (mult * y), 0); } } } offs += 4; - if (offs >= 0x800 / 2) - return; + if (offs >= m_ramsize / 2) + return; + + } } } @@ -175,7 +186,7 @@ void deco_mxc06_device::draw_sprites_bootleg( bitmap_ind16 &bitmap, const rectan int offs; offs = 0; - while (offs < 0x800 / 2) + while (offs < m_ramsize / 2) { int sx, sy, code, color, flipx, flipy; diff --git a/src/mame/video/decmxc06.h b/src/mame/video/decmxc06.h index e7d5013b03f9e..114ffd865d611 100644 --- a/src/mame/video/decmxc06.h +++ b/src/mame/video/decmxc06.h @@ -11,6 +11,12 @@ class deco_mxc06_device : public device_t, static void static_set_gfxdecode_tag(device_t &device, const char *tag); static void static_set_palette_tag(device_t &device, const char *tag); static void set_gfx_region(device_t &device, int region); + static void set_ram_size(device_t &device, int size) + { + deco_mxc06_device &dev = downcast(device); + dev.m_ramsize = size; + } + void set_gfxregion(int region) { m_gfxregion = region; }; void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram16, int pri_mask, int pri_val, int col_mask ); @@ -23,6 +29,7 @@ class deco_mxc06_device : public device_t, UINT8 m_gfxregion; int m_priority_type; // just so we can support the existing drivers without converting everything to pdrawgfx just yet + int m_ramsize; private: required_device m_gfxdecode; @@ -36,3 +43,6 @@ extern const device_type DECO_MXC06; #define MCFG_DECO_MXC06_PALETTE(_palette_tag) \ deco_mxc06_device::static_set_palette_tag(*device, "^" _palette_tag); + +#define MCFG_DECO_MXC06_RAMSIZE(_size) \ + deco_mxc06_device::set_ram_size(*device, _size); diff --git a/src/mame/video/thedeep.c b/src/mame/video/thedeep.c index f810cb7da58d1..2c081a9a05be4 100644 --- a/src/mame/video/thedeep.c +++ b/src/mame/video/thedeep.c @@ -107,95 +107,6 @@ void thedeep_state::video_start() m_tilemap_0->set_scroll_cols(0x20); // column scroll for the background } -/*************************************************************************** - - Sprites Drawing - -Offset: Bits: Value: - - 0 Y (low bits, 0 is bottom) - - 1 7------- Enable - -6------ Flip Y - --5----- Flip X ? (unused) - ---43--- Height: 1,2,4 or 8 tiles - -----21- Width: 1,2,4 or 8 tiles* - -------0 Y (High bit) - - 2 Code (low bits) - - 3 Code (high bits) - - 4 X (low bits, 0 is right) - - 5 7654---- Color - ----321- - -------0 X (High bit) - - 6 Unused - - 7 Unused - -* a sprite of width N uses N consecutive sprites. The first one specifies - all the data, the following ones only the tile code and color. - -***************************************************************************/ - -void thedeep_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - UINT8 *s = m_spriteram, *end = s + m_spriteram.bytes(); - - while (s < end) - { - int code,color,sx,sy,flipx,flipy,nx,ny,x,y,attr; - - attr = s[1]; - if (!(attr & 0x80)) { s+=8; continue; } - - sx = s[4]; - sy = s[0]; - - color = s[5]; - - flipx = attr & 0x00; // ? - flipy = attr & 0x40; - - nx = 1 << ((attr & 0x06) >> 1); - ny = 1 << ((attr & 0x18) >> 3); - - if (color & 1) sx -= 256; - if (attr & 1) sy -= 256; - - if (flip_screen()) - { - flipx = !flipx; - flipy = !flipy; - sy = sy - 8; - } - else - { - sx = 240 - sx; - sy = 240 - sy - ny * 16 + 16; - } - - for (x = 0; (x < nx) && (s < end); x++,s+=8) - { - code = s[2] + (s[3] << 8); - color = s[5] >> 4; - - for (y = 0; y < ny; y++) - { - m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, - code + (flipy ? (ny - y - 1) : y), - color, - flipx,flipy, - sx + x * (flipx ? 16 : -16), sy + y * 16,0 ); - } - } - } -} - - /*************************************************************************** Screen Drawing @@ -219,7 +130,8 @@ UINT32 thedeep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, bitmap.fill(m_palette->black_pen(), cliprect); m_tilemap_0->draw(screen, bitmap, cliprect, 0,0); - draw_sprites(bitmap,cliprect); + m_spritegen->draw_sprites(bitmap, cliprect, reinterpret_cast(m_spriteram.target()), 0x00, 0x00, 0x0f); m_tilemap_1->draw(screen, bitmap, cliprect, 0,0); return 0; } + From 8533f2617b4029663366ffe3fa0403e9c17a5db8 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 23 Mar 2015 19:16:12 +0100 Subject: [PATCH 10/41] tmp68301_device: initialized variables (nw) --- src/emu/machine/tmp68301.c | 7 +++++++ src/mame/includes/seta2.h | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c index d9793f0fefd70..9795e075b4a01 100644 --- a/src/emu/machine/tmp68301.c +++ b/src/emu/machine/tmp68301.c @@ -99,8 +99,15 @@ tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_memory_interface(mconfig, *this), m_in_parallel_cb(*this), m_out_parallel_cb(*this), + m_imr(0), + m_iisr(0), + m_scr(0), + m_pdir(0), m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, NULL, *ADDRESS_MAP_NAME(tmp68301_regs)) { + memset(m_regs, 0, sizeof(m_regs)); + memset(m_IE, 0, sizeof(m_IE)); + memset(m_irq_vector, 0, sizeof(m_irq_vector)); } diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index 5bfca4ffbadde..31c8663054876 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -10,7 +10,6 @@ class seta2_state : public driver_device : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), m_tmp68301(*this, "tmp68301"), - m_x1(*this, "x1snd"), m_oki(*this, "oki"), m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), @@ -24,7 +23,6 @@ class seta2_state : public driver_device required_device m_maincpu; optional_device m_tmp68301; - optional_device m_x1; optional_device m_oki; optional_device m_eeprom; required_device m_gfxdecode; From f517793c420ddc7ef6cad299546872e781d67ba3 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 23 Mar 2015 19:17:48 +0100 Subject: [PATCH 11/41] re900.c, ssrj.c, sstrangr.c: added save state support (nw) --- src/mame/drivers/re900.c | 40 +++++++++++++++++++++--------------- src/mame/drivers/ssrj.c | 25 +++++++++++++--------- src/mame/drivers/sstrangr.c | 22 ++++++++++++++------ src/mame/includes/ssrj.h | 41 ++++++++++++++++++++++--------------- src/mame/video/ssrj.c | 12 +++++------ 5 files changed, 85 insertions(+), 55 deletions(-) diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c index 748c27d9c6205..1c2cb63a56b30 100644 --- a/src/mame/drivers/re900.c +++ b/src/mame/drivers/re900.c @@ -87,26 +87,33 @@ class re900_state : public driver_device public: re900_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_rom(*this, "rom"), - m_maincpu(*this, "maincpu") { } + m_maincpu(*this, "maincpu"), + m_rom(*this, "rom") { } + + required_device m_maincpu; required_shared_ptr m_rom; + + // re900 specific UINT8 m_psg_pa; UINT8 m_psg_pb; UINT8 m_mux_data; UINT8 m_ledant; UINT8 m_player; UINT8 m_stat_a; + + // common DECLARE_READ8_MEMBER(rom_r); DECLARE_WRITE8_MEMBER(cpu_port_0_w); - DECLARE_WRITE8_MEMBER(re900_watchdog_reset_w); + DECLARE_WRITE8_MEMBER(watchdog_reset_w); + + // re900 specific DECLARE_READ8_MEMBER(re_psg_portA_r); DECLARE_READ8_MEMBER(re_psg_portB_r); DECLARE_WRITE8_MEMBER(re_mux_port_A_w); DECLARE_WRITE8_MEMBER(re_mux_port_B_w); - DECLARE_WRITE_LINE_MEMBER(vdp_interrupt); + DECLARE_DRIVER_INIT(re900); - required_device m_maincpu; }; @@ -219,7 +226,7 @@ WRITE8_MEMBER(re900_state::cpu_port_0_w) // output_set_lamp_value(8,1 ^ ( (data >> 5) & 1)); /* Cont. Ent */ } -WRITE8_MEMBER(re900_state::re900_watchdog_reset_w) +WRITE8_MEMBER(re900_state::watchdog_reset_w) { //watchdog_reset_w(space,0,0); /* To do! */ } @@ -240,19 +247,13 @@ static ADDRESS_MAP_START( mem_io, AS_IO, 8, re900_state ) AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("tms9128", tms9928a_device, register_write) AM_RANGE(0xe800, 0xe801) AM_DEVWRITE("ay_re900", ay8910_device, address_data_w) AM_RANGE(0xe802, 0xe802) AM_DEVREAD("ay_re900", ay8910_device, data_r) - AM_RANGE(0xe000, 0xefff) AM_WRITE(re900_watchdog_reset_w) + AM_RANGE(0xe000, 0xefff) AM_WRITE(watchdog_reset_w) AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P0) AM_WRITE(cpu_port_0_w) AM_RANGE(MCS51_PORT_P2, MCS51_PORT_P2) AM_NOP AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3) AM_NOP ADDRESS_MAP_END -WRITE_LINE_MEMBER(re900_state::vdp_interrupt) -{ - m_maincpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE ); -} - - /************************ * Input ports * ************************/ @@ -380,7 +381,7 @@ static MACHINE_CONFIG_START( re900, re900_state ) /* video hardware */ MCFG_DEVICE_ADD( "tms9128", TMS9128, XTAL_10_738635MHz / 2 ) /* TMS9128NL on the board */ MCFG_TMS9928A_VRAM_SIZE(0x4000) - MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(re900_state, vdp_interrupt)) + MCFG_TMS9928A_OUT_INT_LINE_CB(INPUTLINE("maincpu", INPUT_LINE_NMI)) MCFG_TMS9928A_SCREEN_ADD_NTSC( "screen" ) MCFG_SCREEN_UPDATE_DEVICE( "tms9128", tms9128_device, screen_update ) @@ -431,6 +432,13 @@ DRIVER_INIT_MEMBER(re900_state,re900) m_player = 1; m_stat_a = 1; m_psg_pa = m_psg_pb = m_mux_data = m_ledant = 0; + + save_item(NAME(m_psg_pa)); + save_item(NAME(m_psg_pb)); + save_item(NAME(m_mux_data)); + save_item(NAME(m_ledant)); + save_item(NAME(m_player)); + save_item(NAME(m_stat_a)); } @@ -439,5 +447,5 @@ DRIVER_INIT_MEMBER(re900_state,re900) *************************/ /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ -GAMEL( 1993, re900, 0, re900, re900, re900_state, re900, ROT90, "Entretenimientos GEMINIS", "Ruleta RE-900", 0, layout_re900) -GAME ( 1994, bs94 , 0, bs94, bs94 , re900_state, re900, ROT0, "Entretenimientos GEMINIS", "Buena Suerte '94", 0) +GAMEL( 1993, re900, 0, re900, re900, re900_state, re900, ROT90, "Entretenimientos GEMINIS", "Ruleta RE-900", GAME_SUPPORTS_SAVE, layout_re900) +GAME ( 1994, bs94 , 0, bs94, bs94 , driver_device, 0, ROT0, "Entretenimientos GEMINIS", "Buena Suerte '94", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ssrj.c b/src/mame/drivers/ssrj.c index 24c4a937063f3..b4282c1b9a2c3 100644 --- a/src/mame/drivers/ssrj.c +++ b/src/mame/drivers/ssrj.c @@ -21,8 +21,8 @@ HW info : f800 ?? Scroll RAM contains x and y offsets for each tileline, - as well as other data (priroities ? additional flags ?) - All moving obejcts (cars, etc) are displayed on tilemap 3. + as well as other data (priorities ? additional flags ?) + All moving objects (cars, etc) are displayed on tilemap 3. ------------------------------------ Cheat : $e210 - timer @@ -34,6 +34,11 @@ HW info : #include "sound/ay8910.h" #include "includes/ssrj.h" +void ssrj_state::machine_start() +{ + save_item(NAME(m_oldport)); +} + void ssrj_state::machine_reset() { UINT8 *rom = memregion("maincpu")->base(); @@ -42,7 +47,7 @@ void ssrj_state::machine_reset() m_oldport = 0x80; } -READ8_MEMBER(ssrj_state::ssrj_wheel_r) +READ8_MEMBER(ssrj_state::wheel_r) { int port = ioport("IN1")->read() - 0x80; int retval = port - m_oldport; @@ -53,14 +58,14 @@ READ8_MEMBER(ssrj_state::ssrj_wheel_r) static ADDRESS_MAP_START( ssrj_map, AS_PROGRAM, 8, ssrj_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xc000, 0xc7ff) AM_RAM_WRITE(ssrj_vram1_w) AM_SHARE("vram1") - AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(ssrj_vram2_w) AM_SHARE("vram2") + AM_RANGE(0xc000, 0xc7ff) AM_RAM_WRITE(vram1_w) AM_SHARE("vram1") + AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(vram2_w) AM_SHARE("vram2") AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_SHARE("vram3") - AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(ssrj_vram4_w) AM_SHARE("vram4") + AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(vram4_w) AM_SHARE("vram4") AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("scrollram") AM_RANGE(0xf000, 0xf000) AM_READ_PORT("IN0") - AM_RANGE(0xf001, 0xf001) AM_READ(ssrj_wheel_r) + AM_RANGE(0xf001, 0xf001) AM_READ(wheel_r) AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN2") AM_RANGE(0xf003, 0xf003) AM_WRITENOP /* unknown */ AM_RANGE(0xf401, 0xf401) AM_DEVREAD("aysnd", ay8910_device, data_r) @@ -141,8 +146,8 @@ static MACHINE_CONFIG_START( ssrj, ssrj_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 34*8-1, 1*8, 31*8-1) // unknown res - MCFG_SCREEN_UPDATE_DRIVER(ssrj_state, screen_update_ssrj) - MCFG_SCREEN_VBLANK_DRIVER(ssrj_state, screen_eof_ssrj) + MCFG_SCREEN_UPDATE_DRIVER(ssrj_state, screen_update) + MCFG_SCREEN_VBLANK_DRIVER(ssrj_state, screen_eof) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", ssrj) @@ -179,4 +184,4 @@ ROM_START( ssrj ) ROM_END -GAME( 1985, ssrj, 0, ssrj, ssrj, driver_device, 0, ROT90, "Taito Corporation", "Super Speed Race Junior (Japan)",GAME_WRONG_COLORS|GAME_IMPERFECT_GRAPHICS ) +GAME( 1985, ssrj, 0, ssrj, ssrj, driver_device, 0, ROT90, "Taito Corporation", "Super Speed Race Junior (Japan)", GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index bd2158535c07d..e30b534f7ad05 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -18,16 +18,21 @@ class sstrangr_state : public driver_device public: sstrangr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_ram(*this, "ram"), - m_maincpu(*this, "maincpu") { } + m_maincpu(*this, "maincpu"), + m_ram(*this, "ram") { } + + required_device m_maincpu; required_shared_ptr m_ram; + UINT8 m_flip_screen; - UINT8 *m_proms; + DECLARE_WRITE8_MEMBER(port_w); + + virtual void video_start(); + UINT32 screen_update_sstrangr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_sstrngr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - required_device m_maincpu; }; @@ -38,6 +43,11 @@ class sstrangr_state : public driver_device * *************************************/ +void sstrangr_state::video_start() +{ + save_item(NAME(m_flip_screen)); +} + UINT32 sstrangr_state::screen_update_sstrangr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { offs_t offs; @@ -296,5 +306,5 @@ ROM_START( sstrangr2 ) ROM_END -GAMEL( 1978, sstrangr, 0, sstrangr, sstrangr, driver_device, 0, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger", GAME_NO_SOUND, layout_sstrangr ) -GAME( 1979, sstrangr2,sstrangr, sstrngr2, sstrngr2, driver_device, 0, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger 2", GAME_NO_SOUND ) +GAMEL( 1978, sstrangr, 0, sstrangr, sstrangr, driver_device, 0, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger", GAME_NO_SOUND | GAME_SUPPORTS_SAVE, layout_sstrangr ) +GAME( 1979, sstrangr2,sstrangr, sstrngr2, sstrngr2, driver_device, 0, ROT270, "Yachiyo Electronics, Ltd.", "Space Stranger 2", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/ssrj.h b/src/mame/includes/ssrj.h index 724f580047798..b9175dcc17200 100644 --- a/src/mame/includes/ssrj.h +++ b/src/mame/includes/ssrj.h @@ -3,39 +3,46 @@ class ssrj_state : public driver_device public: ssrj_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_vram1(*this, "vram1"), m_vram2(*this, "vram2"), m_vram3(*this, "vram3"), m_vram4(*this, "vram4"), - m_scrollram(*this, "scrollram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_scrollram(*this, "scrollram") { } + + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_palette; - int m_oldport; - tilemap_t *m_tilemap1; - tilemap_t *m_tilemap2; - tilemap_t *m_tilemap4; required_shared_ptr m_vram1; required_shared_ptr m_vram2; required_shared_ptr m_vram3; required_shared_ptr m_vram4; required_shared_ptr m_scrollram; + + int m_oldport; + tilemap_t *m_tilemap1; + tilemap_t *m_tilemap2; + tilemap_t *m_tilemap4; UINT8 *m_buffer_spriteram; - DECLARE_READ8_MEMBER(ssrj_wheel_r); - DECLARE_WRITE8_MEMBER(ssrj_vram1_w); - DECLARE_WRITE8_MEMBER(ssrj_vram2_w); - DECLARE_WRITE8_MEMBER(ssrj_vram4_w); + + DECLARE_READ8_MEMBER(wheel_r); + DECLARE_WRITE8_MEMBER(vram1_w); + DECLARE_WRITE8_MEMBER(vram2_w); + DECLARE_WRITE8_MEMBER(vram4_w); + TILE_GET_INFO_MEMBER(get_tile_info1); TILE_GET_INFO_MEMBER(get_tile_info2); TILE_GET_INFO_MEMBER(get_tile_info4); + + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(ssrj); - UINT32 screen_update_ssrj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_ssrj(screen_device &screen, bool state); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void screen_eof(screen_device &screen, bool state); void draw_objects(bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_palette; }; diff --git a/src/mame/video/ssrj.c b/src/mame/video/ssrj.c index 91443bc80c219..0a227f6ecd50b 100644 --- a/src/mame/video/ssrj.c +++ b/src/mame/video/ssrj.c @@ -3,7 +3,7 @@ /* tilemap 1 */ -WRITE8_MEMBER(ssrj_state::ssrj_vram1_w) +WRITE8_MEMBER(ssrj_state::vram1_w) { m_vram1[offset] = data; m_tilemap1->mark_tile_dirty(offset>>1); @@ -21,7 +21,7 @@ TILE_GET_INFO_MEMBER(ssrj_state::get_tile_info1) /* tilemap 2 */ -WRITE8_MEMBER(ssrj_state::ssrj_vram2_w) +WRITE8_MEMBER(ssrj_state::vram2_w) { m_vram2[offset] = data; m_tilemap2->mark_tile_dirty(offset>>1); @@ -39,7 +39,7 @@ TILE_GET_INFO_MEMBER(ssrj_state::get_tile_info2) /* tilemap 4 */ -WRITE8_MEMBER(ssrj_state::ssrj_vram4_w) +WRITE8_MEMBER(ssrj_state::vram4_w) { m_vram4[offset] = data; m_tilemap4->mark_tile_dirty(offset>>1); @@ -60,7 +60,7 @@ TILE_GET_INFO_MEMBER(ssrj_state::get_tile_info4) TODO: This table is nowhere near as accurate. If you bother, here's how colors should be: -"START" sign is red with dark blue background. -Sidewalk is yellow-ish. --first opponents have swapped colors (blue/yellow ?nstead of yellow/blue) +-first opponents have swapped colors (blue/yellow instead of yellow/blue) -after the first stage, houses have red/white colors. */ @@ -270,7 +270,7 @@ PALETTE_INIT_MEMBER(ssrj_state, ssrj) palette.set_pen_color(i*8+j, fakecols[i][j][0], fakecols[i][j][1], fakecols[i][j][2]); } -UINT32 ssrj_state::screen_update_ssrj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 ssrj_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_tilemap1->set_scrollx(0, 0xff-m_scrollram[2] ); m_tilemap1->set_scrolly(0, m_scrollram[0] ); @@ -282,7 +282,7 @@ UINT32 ssrj_state::screen_update_ssrj(screen_device &screen, bitmap_ind16 &bitma return 0; } -void ssrj_state::screen_eof_ssrj(screen_device &screen, bool state) +void ssrj_state::screen_eof(screen_device &screen, bool state) { // rising edge if (state) From 38ddc8a6d7e412afc921d40e910f5e344341c713 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 23 Mar 2015 19:25:09 +0100 Subject: [PATCH 12/41] prepare for svg2lay --- src/mess/drivers/hh_hmcs40.c | 10 +++++++++- src/mess/drivers/hh_pic16.c | 10 +++++++++- src/mess/drivers/hh_tms1k.c | 10 +++++++++- src/mess/drivers/hh_ucom4.c | 10 +++++++++- src/mess/drivers/ticalc1x.c | 10 +++++++++- src/mess/drivers/tispeak.c | 10 +++++++++- 6 files changed, 54 insertions(+), 6 deletions(-) diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c index 4052f12875892..45bd3f76bc760 100644 --- a/src/mess/drivers/hh_hmcs40.c +++ b/src/mess/drivers/hh_hmcs40.c @@ -170,7 +170,15 @@ void hh_hmcs40_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); diff --git a/src/mess/drivers/hh_pic16.c b/src/mess/drivers/hh_pic16.c index 566c109ece2c5..b8281a737e029 100644 --- a/src/mess/drivers/hh_pic16.c +++ b/src/mess/drivers/hh_pic16.c @@ -137,7 +137,15 @@ void hh_pic16_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index 31f021c0dc803..c58cd7a1def86 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -168,7 +168,15 @@ void hh_tms1k_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); diff --git a/src/mess/drivers/hh_ucom4.c b/src/mess/drivers/hh_ucom4.c index d274457bed23e..b258c9429421e 100644 --- a/src/mess/drivers/hh_ucom4.c +++ b/src/mess/drivers/hh_ucom4.c @@ -182,7 +182,15 @@ void hh_ucom4_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index f5a948a58dbaf..679d62d550e22 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -169,7 +169,15 @@ void ticalc1x_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c index 4c941d6cc23a5..8e84bf335dcb3 100644 --- a/src/mess/drivers/tispeak.c +++ b/src/mess/drivers/tispeak.c @@ -433,7 +433,15 @@ void tispeak_state::display_update() const int mul = (m_display_maxx <= 10) ? 10 : 100; for (int x = 0; x < m_display_maxx; x++) - output_set_lamp_value(y * mul + x, active_state[y] >> x & 1); + { + int state = active_state[y] >> x & 1; + output_set_lamp_value(y * mul + x, state); + + // bit coords for svg2lay + char buf[10]; + sprintf(buf, "%d.%d", y, x); + output_set_value(buf, state); + } } memcpy(m_display_cache, active_state, sizeof(m_display_cache)); From 61038a7b889cf200d4bad99081937272cd809421 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Mon, 23 Mar 2015 19:52:09 +0100 Subject: [PATCH 13/41] realbrk: added save state support (nw) --- src/mame/drivers/realbrk.c | 30 +++++++++++----------- src/mame/includes/realbrk.h | 50 +++++++++++++++++++++++-------------- src/mame/video/realbrk.c | 24 +++++++++--------- 3 files changed, 58 insertions(+), 46 deletions(-) diff --git a/src/mame/drivers/realbrk.c b/src/mame/drivers/realbrk.c index 9c0ef1a393ef7..3b8a0eb77f095 100644 --- a/src/mame/drivers/realbrk.c +++ b/src/mame/drivers/realbrk.c @@ -36,7 +36,7 @@ To Do: - Priorities (e.g during the intro, there are two black bands in the backround that should obscure sprites). -- Sometimes sprites are shrinked to end up overlapping the background image +- Sometimes sprites are shrunk to end up overlapping the background image in the tilemaps, but they are a few pixels off ***************************************************************************/ @@ -155,10 +155,10 @@ static ADDRESS_MAP_START( base_mem, AS_PROGRAM, 16, realbrk_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM AM_RANGE(0x200000, 0x203fff) AM_RAM AM_SHARE("spriteram") // Sprites AM_RANGE(0x400000, 0x40ffff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") // Palette - AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(realbrk_vram_0_w) AM_SHARE("vram_0") // Background (0) - AM_RANGE(0x602000, 0x603fff) AM_RAM_WRITE(realbrk_vram_1_w) AM_SHARE("vram_1") // Background (1) - AM_RANGE(0x604000, 0x604fff) AM_RAM_WRITE(realbrk_vram_2_w) AM_SHARE("vram_2") // Text (2) - AM_RANGE(0x606000, 0x60600f) AM_RAM_WRITE(realbrk_vregs_w) AM_SHARE("vregs") // Scroll + Video Regs + AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(vram_0_w) AM_SHARE("vram_0") // Background (0) + AM_RANGE(0x602000, 0x603fff) AM_RAM_WRITE(vram_1_w) AM_SHARE("vram_1") // Background (1) + AM_RANGE(0x604000, 0x604fff) AM_RAM_WRITE(vram_2_w) AM_SHARE("vram_2") // Text (2) + AM_RANGE(0x606000, 0x60600f) AM_RAM_WRITE(vregs_w) AM_SHARE("vregs") // Scroll + Video Regs AM_RANGE(0x605000, 0x61ffff) AM_RAM // AM_RANGE(0x800000, 0x800003) AM_DEVREADWRITE8("ymz", ymz280b_device, read, write, 0xff00) // YMZ280 AM_RANGE(0xfe0000, 0xfeffff) AM_RAM // RAM @@ -744,7 +744,7 @@ GFXDECODE_END Billiard Academy Real Break ***************************************************************************/ -INTERRUPT_GEN_MEMBER(realbrk_state::realbrk_interrupt) +INTERRUPT_GEN_MEMBER(realbrk_state::interrupt) { /* VBlank is connected to INT1 (external interrupts pin 1) */ m_tmp68301->external_interrupt_1(); @@ -755,7 +755,7 @@ static MACHINE_CONFIG_START( realbrk, realbrk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",M68000, XTAL_32MHz / 2) /* !! TMP68301 !! */ MCFG_CPU_PROGRAM_MAP(realbrk_mem) - MCFG_CPU_VBLANK_INT_DRIVER("screen", realbrk_state, realbrk_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", realbrk_state, interrupt) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback) MCFG_DEVICE_ADD("tmp68301", TMP68301, 0) @@ -767,7 +767,7 @@ static MACHINE_CONFIG_START( realbrk, realbrk_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(0x140, 0xe0) MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xe0-1) - MCFG_SCREEN_UPDATE_DRIVER(realbrk_state, screen_update_realbrk) + MCFG_SCREEN_UPDATE_DRIVER(realbrk_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", realbrk) @@ -1273,13 +1273,13 @@ ROM_START( dai2kaku_alt_rom_size ) ROM_END #endif -GAME( 1998, pkgnsh, 0, pkgnsh, pkgnsh, driver_device, 0, ROT0, "Nakanihon / Dynax", "Pachinko Gindama Shoubu (Japan)", GAME_IMPERFECT_GRAPHICS ) +GAME( 1998, pkgnsh, 0, pkgnsh, pkgnsh, driver_device, 0, ROT0, "Nakanihon / Dynax", "Pachinko Gindama Shoubu (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) -GAME( 1998, pkgnshdx, 0, pkgnshdx, pkgnshdx, driver_device, 0, ROT0, "Nakanihon / Dynax", "Pachinko Gindama Shoubu DX (Japan)", GAME_IMPERFECT_GRAPHICS ) +GAME( 1998, pkgnshdx, 0, pkgnshdx, pkgnshdx, driver_device, 0, ROT0, "Nakanihon / Dynax", "Pachinko Gindama Shoubu DX (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) -GAME( 1998, realbrk, 0, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Europe)", GAME_IMPERFECT_GRAPHICS ) -GAME( 1998, realbrko, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Europe, older)", GAME_IMPERFECT_GRAPHICS ) -GAME( 1998, realbrkj, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Japan)", GAME_IMPERFECT_GRAPHICS ) -GAME( 1998, realbrkk, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Korea)", GAME_IMPERFECT_GRAPHICS ) +GAME( 1998, realbrk, 0, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Europe)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) +GAME( 1998, realbrko, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Europe, older)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) +GAME( 1998, realbrkj, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) +GAME( 1998, realbrkk, realbrk, realbrk, realbrk, driver_device, 0, ROT0, "Nakanihon", "Billiard Academy Real Break (Korea)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) -GAME( 2004, dai2kaku, 0, dai2kaku, dai2kaku, driver_device, 0, ROT0, "SystemBit", "Dai-Dai-Kakumei (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 2004, dai2kaku, 0, dai2kaku, dai2kaku, driver_device, 0, ROT0, "SystemBit", "Dai-Dai-Kakumei (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/includes/realbrk.h b/src/mame/includes/realbrk.h index 8b3ccec5cfd09..4adbdbfe9d041 100644 --- a/src/mame/includes/realbrk.h +++ b/src/mame/includes/realbrk.h @@ -5,6 +5,11 @@ class realbrk_state : public driver_device public: realbrk_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_tmp68301(*this, "tmp68301"), + m_gfxdecode(*this, "gfxdecode"), + m_screen(*this, "screen"), + m_palette(*this, "palette"), m_spriteram(*this, "spriteram"), m_vram_0(*this, "vram_0"), m_vram_1(*this, "vram_1"), @@ -13,12 +18,13 @@ class realbrk_state : public driver_device m_dsw_select(*this, "dsw_select"), m_backup_ram(*this, "backup_ram"), m_vram_0ras(*this, "vram_0ras"), - m_vram_1ras(*this, "vram_1ras"), - m_maincpu(*this, "maincpu"), - m_tmp68301(*this, "tmp68301"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_vram_1ras(*this, "vram_1ras") { } + + required_device m_maincpu; + required_device m_tmp68301; + required_device m_gfxdecode; + required_device m_screen; + required_device m_palette; required_shared_ptr m_spriteram; required_shared_ptr m_vram_0; @@ -29,36 +35,42 @@ class realbrk_state : public driver_device optional_shared_ptr m_backup_ram; optional_shared_ptr m_vram_0ras; optional_shared_ptr m_vram_1ras; + bitmap_ind16 *m_tmpbitmap0; bitmap_ind16 *m_tmpbitmap1; int m_disable_video; tilemap_t *m_tilemap_0; tilemap_t *m_tilemap_1; tilemap_t *m_tilemap_2; + + // common + DECLARE_WRITE16_MEMBER(vram_0_w); + DECLARE_WRITE16_MEMBER(vram_1_w); + DECLARE_WRITE16_MEMBER(vram_2_w); + DECLARE_WRITE16_MEMBER(vregs_w); + + // realbrk and/or dai2kaku DECLARE_READ16_MEMBER(realbrk_dsw_r); + DECLARE_WRITE16_MEMBER(realbrk_flipscreen_w); + DECLARE_WRITE16_MEMBER(dai2kaku_flipscreen_w); + + // pkgnsh and/or pkgnshdx DECLARE_READ16_MEMBER(pkgnsh_input_r); DECLARE_READ16_MEMBER(pkgnshdx_input_r); DECLARE_READ16_MEMBER(backup_ram_r); DECLARE_READ16_MEMBER(backup_ram_dx_r); DECLARE_WRITE16_MEMBER(backup_ram_w); - DECLARE_WRITE16_MEMBER(realbrk_flipscreen_w); - DECLARE_WRITE16_MEMBER(dai2kaku_flipscreen_w); - DECLARE_WRITE16_MEMBER(realbrk_vram_0_w); - DECLARE_WRITE16_MEMBER(realbrk_vram_1_w); - DECLARE_WRITE16_MEMBER(realbrk_vram_2_w); - DECLARE_WRITE16_MEMBER(realbrk_vregs_w); + TILE_GET_INFO_MEMBER(get_tile_info_0); TILE_GET_INFO_MEMBER(get_tile_info_1); TILE_GET_INFO_MEMBER(get_tile_info_2); + virtual void video_start(); - UINT32 screen_update_realbrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_dai2kaku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(realbrk_interrupt); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void dai2kaku_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect, int layer); - required_device m_maincpu; - required_device m_tmp68301; - required_device m_gfxdecode; - required_device m_screen; - required_device m_palette; + + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/video/realbrk.c b/src/mame/video/realbrk.c index 3c793ac1c6eef..0e17ba6576948 100644 --- a/src/mame/video/realbrk.c +++ b/src/mame/video/realbrk.c @@ -88,13 +88,13 @@ TILE_GET_INFO_MEMBER(realbrk_state::get_tile_info_1) TILE_FLIPYX( attr >> 14 )); } -WRITE16_MEMBER(realbrk_state::realbrk_vram_0_w) +WRITE16_MEMBER(realbrk_state::vram_0_w) { COMBINE_DATA(&m_vram_0[offset]); m_tilemap_0->mark_tile_dirty(offset/2); } -WRITE16_MEMBER(realbrk_state::realbrk_vram_1_w) +WRITE16_MEMBER(realbrk_state::vram_1_w) { COMBINE_DATA(&m_vram_1[offset]); m_tilemap_1->mark_tile_dirty(offset/2); @@ -123,7 +123,7 @@ TILE_GET_INFO_MEMBER(realbrk_state::get_tile_info_2) 0); } -WRITE16_MEMBER(realbrk_state::realbrk_vram_2_w) +WRITE16_MEMBER(realbrk_state::vram_2_w) { COMBINE_DATA(&m_vram_2[offset]); m_tilemap_2->mark_tile_dirty(offset); @@ -154,6 +154,8 @@ void realbrk_state::video_start() m_tmpbitmap0 = auto_bitmap_ind16_alloc(machine(),32,32); m_tmpbitmap1 = auto_bitmap_ind16_alloc(machine(),32,32); + + save_item(NAME(m_disable_video)); } /*************************************************************************** @@ -167,7 +169,7 @@ void realbrk_state::video_start() of a sprite to be drawn. 0x300 items of the list seem to be used. Each sprite is made of several 16x16 tiles (from 1 to 32x32) and - can be zoomed / shrinked in size. + can be zoomed / shrunk in size. There are two set of tiles: with 256 or 16 colors. @@ -203,7 +205,6 @@ void realbrk_state::video_start() void realbrk_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) { - UINT16 *spriteram16 = m_spriteram; int offs; int max_x = m_screen->width(); @@ -220,9 +221,9 @@ void realbrk_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) UINT16 *s; - if (spriteram16[offs] & 0x8000) continue; + if (m_spriteram[offs] & 0x8000) continue; - s = &spriteram16[(spriteram16[offs] & 0x3ff) * 16/2]; + s = &m_spriteram[(m_spriteram[offs] & 0x3ff) * 16/2]; sy = s[ 0 ]; sx = s[ 1 ]; @@ -365,7 +366,6 @@ void realbrk_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) /* layer : 0== bghighwidth(); @@ -380,9 +380,9 @@ void realbrk_state::dai2kaku_draw_sprites(bitmap_ind16 &bitmap,const rectangle & UINT16 *s; - if (spriteram16[offs] & 0x8000) continue; + if (m_spriteram[offs] & 0x8000) continue; - s = &spriteram16[(spriteram16[offs] & 0x3ff) * 16/2]; + s = &m_spriteram[(m_spriteram[offs] & 0x3ff) * 16/2]; sy = s[ 0 ]; sx = s[ 1 ]; @@ -467,7 +467,7 @@ void realbrk_state::dai2kaku_draw_sprites(bitmap_ind16 &bitmap,const rectangle & ***************************************************************************/ -WRITE16_MEMBER(realbrk_state::realbrk_vregs_w) +WRITE16_MEMBER(realbrk_state::vregs_w) { UINT16 old_data = m_vregs[offset]; UINT16 new_data = COMBINE_DATA(&m_vregs[offset]); @@ -478,7 +478,7 @@ WRITE16_MEMBER(realbrk_state::realbrk_vregs_w) } } -UINT32 realbrk_state::screen_update_realbrk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 realbrk_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int layers_ctrl = -1; From 7066eb4f9f59fdccc8bce31288b9085c1c3f9c45 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 23 Mar 2015 21:08:48 +0000 Subject: [PATCH 14/41] new clones Thunder Deity Biography (Chinese hack of Battle Garegga) [caius] (correct text gfx rom still needs dumping for this set) --- src/mame/drivers/toaplan2.c | 28 +++++++++++++++++++++++++++- src/mame/mame.lst | 1 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 67f321e038111..1bdc544e479cc 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -4876,7 +4876,32 @@ ROM_START( bgareggabl ) ROM_REGION( 0x010000, "text", 0 ) ROM_LOAD( "1#-256", 0x00000, 0x08000, CRC(760dcd14) SHA1(e151e5d7ca5557277f306b9484ec021f4edf1e07) ) - ROM_LOAD( "2#-256", 0x08000, 0x08000, CRC(456dd16e) SHA1(84779ee64d3ea33ba1ba4dee39b504a81c6811a1) ) + + ROM_REGION( 0x010000, "user1", 0 ) // not graphics + ROM_LOAD( "2#-256", 0x00000, 0x08000, CRC(456dd16e) SHA1(84779ee64d3ea33ba1ba4dee39b504a81c6811a1) ) + + ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM Samples */ + ROM_LOAD( "rom5.bin", 0x040000, 0x100000, CRC(f6d49863) SHA1(3a3c354852adad06e8a051511abfab7606bce382) ) +ROM_END + +ROM_START( bgareggabla ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* Main 68K code */ + ROM_LOAD16_WORD_SWAP( "27c8100.mon-sys", 0x000000, 0x100000, CRC(d334e5aa) SHA1(41607b5630d7b92a96607ea95c5b55ad43745857) ) + + ROM_REGION( 0x20000, "audiocpu", 0 ) /* Sound Z80 code + bank */ + ROM_LOAD( "snd.bin", 0x00000, 0x20000, CRC(68632952) SHA1(fb834db83157948e2b420b6051102a9c6ac3969b) ) + + ROM_REGION( 0x800000, "gp9001", 0 ) + ROM_LOAD( "rom4.bin", 0x000000, 0x200000, CRC(b333d81f) SHA1(5481465f1304334fd55798be2f44324c57c2dbcb) ) + ROM_LOAD( "rom3.bin", 0x200000, 0x200000, CRC(51b9ebfb) SHA1(30e0c326f5175aa436df8dba08f6f4e08130b92f) ) + ROM_LOAD( "rom2.bin", 0x400000, 0x200000, CRC(b330e5e2) SHA1(5d48e9d56f99d093b6390e0af1609fd796df2d35) ) + ROM_LOAD( "rom1.bin", 0x600000, 0x200000, CRC(7eafdd70) SHA1(7c8da8e86c3f9491719b1d7d5d285568d7614f38) ) + + ROM_REGION( 0x010000, "text", 0 ) + ROM_LOAD( "text.u81", 0x00000, 0x08000, BAD_DUMP CRC(e67fd534) SHA1(987d0edffc2c243a13d4567319ea3d185eaadbf8) ) // should contain different title logo for this game + + ROM_REGION( 0x010000, "user1", 0 ) // not graphics + ROM_LOAD( "2#-256", 0x00000, 0x08000, CRC(456dd16e) SHA1(84779ee64d3ea33ba1ba4dee39b504a81c6811a1) ) ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM Samples */ ROM_LOAD( "rom5.bin", 0x040000, 0x100000, CRC(f6d49863) SHA1(3a3c354852adad06e8a051511abfab7606bce382) ) @@ -5345,6 +5370,7 @@ GAME( 1996, bgaregganv, bgaregga, bgaregga, bgareggahk, toaplan2_state, bgaregga GAME( 1996, bgareggat2, bgaregga, bgaregga, bgaregga, toaplan2_state, bgaregga, ROT270, "Raizing / Eighting", "Battle Garegga - Type 2 (Europe / USA / Japan / Asia) (Sat Mar 2 1996)" , GAME_SUPPORTS_SAVE ) // displays Type 2 only when set to Europe GAME( 1996, bgareggacn, bgaregga, bgaregga, bgareggacn, toaplan2_state, bgaregga, ROT270, "Raizing / Eighting", "Battle Garegga - Type 2 (Denmark / China) (Tue Apr 2 1996)", GAME_SUPPORTS_SAVE ) // displays Type 2 only when set to Denmark GAME( 1996, bgareggabl, bgaregga, bgareggabl,bgareggacn, toaplan2_state,bgaregga, ROT270, "bootleg", "1945 Part-2 (Chinese hack of Battle Garegga)", GAME_SUPPORTS_SAVE ) +GAME( 1996, bgareggabla,bgaregga, bgareggabl,bgareggacn, toaplan2_state,bgaregga, ROT270, "bootleg", "Thunder Deity Biography (Chinese hack of Battle Garegga)", GAME_SUPPORTS_SAVE ) // these are all based on Version B, even if only the Japan version states 'version B' GAME( 1998, batrider, 0, batrider, batrider, toaplan2_state, batrider, ROT270, "Raizing / Eighting", "Armed Police Batrider (Europe) (Fri Feb 13 1998)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 78fb22ae12214..cc31e50579281 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -2757,6 +2757,7 @@ bgaregganv // (c) 1996 Raizing/8ing bgareggat2 // (c) 1996 Raizing/8ing bgareggacn // (c) 1996 Raizing/8ing bgareggabl // hack +bgareggabla // hack batrider // (c) 1998 Raizing/8ing batrideru // (c) 1998 Raizing/8ing batriderc // (c) 1998 Raizing/8ing From fb6880dcbc5068a5644eb78fa9d2ca85025ca492 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Mon, 23 Mar 2015 16:43:45 -0700 Subject: [PATCH 15/41] (MESS) pet_rom.xml: Added McTerm 0.95. [Mike Naberezny] --- hash/pet_rom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hash/pet_rom.xml b/hash/pet_rom.xml index 082bb6cb5c833..2f7cf099a1706 100644 --- a/hash/pet_rom.xml +++ b/hash/pet_rom.xml @@ -92,6 +92,18 @@ + + McTerm 0.95 + 1980 + Madison Computer + + + + + + + + McTerm 1.20 1981 From eb48fea5e220e70f63d03a1f905615b628bb4a10 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Tue, 24 Mar 2015 01:01:24 +0000 Subject: [PATCH 16/41] ttchamp PIC doesn't seem to be for sound either? (nw) --- src/mame/drivers/ttchamp.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 3ce64987e4ac8..b93e5c0b4f2bb 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -62,7 +62,7 @@ Dumped by tirino73 >isolani (at) interfree.it< #include "emu.h" #include "cpu/nec/nec.h" - +#include "sound/okim6295.h" class ttchamp_state : public driver_device { @@ -95,6 +95,7 @@ class ttchamp_state : public driver_device + UINT16 m_mainram[0x10000 / 2]; int m_spritesinit; @@ -193,7 +194,6 @@ WRITE16_MEMBER(ttchamp_state::paldat_w) } - READ16_MEMBER(ttchamp_state::ttchamp_mem_r) { // bits 0xf0 are used too, so this is likely wrong. @@ -338,6 +338,7 @@ static ADDRESS_MAP_START( ttchamp_io, AS_IO, 16, ttchamp_state ) AM_RANGE(0x0002, 0x0003) AM_READ_PORT("SYSTEM") AM_RANGE(0x0004, 0x0005) AM_READ_PORT("P1_P2") + AM_RANGE(0x0006, 0x0007) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) AM_RANGE(0x0018, 0x0019) AM_READ(ttchamp_blit_start_r) AM_RANGE(0x001e, 0x001f) AM_READNOP // read before each line is blit @@ -442,6 +443,11 @@ static MACHINE_CONFIG_START( ttchamp, ttchamp_state ) MCFG_PALETTE_ADD("palette", 0x8000) + MCFG_SPEAKER_STANDARD_MONO("mono") + + MCFG_OKIM6295_ADD("oki", 8000000/8, OKIM6295_PIN7_HIGH) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MACHINE_CONFIG_END ROM_START( ttchamp ) @@ -451,10 +457,10 @@ ROM_START( ttchamp ) ROM_LOAD16_BYTE( "4.bin", 0x100000, 0x080000, CRC(4388dead) SHA1(1965e4b84452b244e32c8d218aace8d287c67ec2) ) ROM_LOAD16_BYTE( "5.bin", 0x100001, 0x080000, CRC(fdbf9b28) SHA1(2d260555586097c8a396f65111f55ace801c7a5d) ) - ROM_REGION( 0x10000, "cpu1", 0 ) /* not verified if this is correct yet, seems very empty, maybe protected */ - ROM_LOAD( "pic16c84.rom", 0x000000, 0x4280, CRC(900f2ef8) SHA1(08f206fe52f413437436e4b0d2b4ec310767446c) ) + ROM_REGION( 0x10000, "cpu1", 0 ) // read protected, only half the data is valid + ROM_LOAD( "pic16c84.rom", 0x000000, 0x4280, BAD_DUMP CRC(900f2ef8) SHA1(08f206fe52f413437436e4b0d2b4ec310767446c) ) - ROM_REGION( 0x40000, "samples", 0 ) + ROM_REGION( 0x40000, "oki", 0 ) ROM_LOAD( "27c020.1", 0x000000, 0x040000, CRC(e2c4fe95) SHA1(da349035cc348db220a1e12b4c2a6021e2168425) ) ROM_END @@ -465,10 +471,10 @@ ROM_START( ttchampa ) ROM_LOAD16_BYTE( "4.bin", 0x100000, 0x080000, CRC(4388dead) SHA1(1965e4b84452b244e32c8d218aace8d287c67ec2) ) ROM_LOAD16_BYTE( "5.bin", 0x100001, 0x080000, CRC(fdbf9b28) SHA1(2d260555586097c8a396f65111f55ace801c7a5d) ) - ROM_REGION( 0x10000, "cpu1", 0 ) /* not verified if this is correct yet, seems very empty, maybe protected */ - ROM_LOAD( "pic16c84.rom", 0x000000, 0x4280, CRC(900f2ef8) SHA1(08f206fe52f413437436e4b0d2b4ec310767446c) ) + ROM_REGION( 0x10000, "cpu1", 0 ) // read protected, only half the data is valid + ROM_LOAD( "pic16c84.rom", 0x000000, 0x4280, BAD_DUMP CRC(900f2ef8) SHA1(08f206fe52f413437436e4b0d2b4ec310767446c) ) - ROM_REGION( 0x40000, "samples", 0 ) + ROM_REGION( 0x40000, "oki", 0 ) ROM_LOAD( "27c020.1", 0x000000, 0x040000, CRC(e2c4fe95) SHA1(da349035cc348db220a1e12b4c2a6021e2168425) ) ROM_END @@ -479,5 +485,5 @@ DRIVER_INIT_MEMBER(ttchamp_state,ttchamp) // membank("bank2")->set_base(&ROM1[0x180000]); } -GAME( 1995, ttchamp, 0, ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0, "Gamart", "Table Tennis Champions", GAME_NOT_WORKING|GAME_NO_SOUND ) // this has various advertising boards, including 'Electronic Devices' and 'Deniam' -GAME( 1995, ttchampa,ttchamp, ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0, "Gamart (Palencia Elektronik license)", "Table Tennis Champions (Palencia Elektronik license)", GAME_NOT_WORKING|GAME_NO_SOUND ) // this only has Palencia Elektronik advertising boards +GAME( 1995, ttchamp, 0, ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0, "Gamart", "Table Tennis Champions", GAME_NOT_WORKING ) // this has various advertising boards, including 'Electronic Devices' and 'Deniam' +GAME( 1995, ttchampa,ttchamp, ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0, "Gamart (Palencia Elektronik license)", "Table Tennis Champions (Palencia Elektronik license)", GAME_NOT_WORKING ) // this only has Palencia Elektronik advertising boards From d044c6b161757d93eb9575774bd131b5bb2a8214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 24 Mar 2015 09:13:30 +0100 Subject: [PATCH 17/41] removed assert for now fixed bug from src/mame/drivers/queen.c (nw) --- src/mame/drivers/queen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mame/drivers/queen.c b/src/mame/drivers/queen.c index 68d445f911acc..2c723affe8de7 100644 --- a/src/mame/drivers/queen.c +++ b/src/mame/drivers/queen.c @@ -158,7 +158,6 @@ static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, queen_state *state = busdevice->machine().driver_data(); // osd_printf_debug("PIIX4: read %d, %02X\n", function, reg); - assert(function >= 0 && function < ARRAY_LENGTH(state->m_piix4_config_reg)); return state->m_piix4_config_reg[function][reg]; } From 442aedc911ddf13c85e17ccb08387aa6204f8663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 24 Mar 2015 10:37:17 +0100 Subject: [PATCH 18/41] made -[no]dummywrite DEBUG only and removed it from the official documentation (nw) --- src/emu/emuopts.c | 4 +++- src/emu/emuopts.h | 4 ++++ src/emu/video.c | 2 ++ src/osd/sdl/man/mame.6 | 3 --- src/osd/sdl/man/mess.6 | 3 --- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 7c1bd9560cb5c..52ca361a7db49 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -61,6 +61,9 @@ const options_entry emu_options::s_option_entries[] = { OPTION_RECORD ";rec", NULL, OPTION_STRING, "record an input file" }, { OPTION_MNGWRITE, NULL, OPTION_STRING, "optional filename to write a MNG movie of the current session" }, { OPTION_AVIWRITE, NULL, OPTION_STRING, "optional filename to write an AVI movie of the current session" }, +#ifdef MAME_DEBUG + { OPTION_DUMMYWRITE, "0", OPTION_BOOLEAN, "indicates if a snapshot should be created if each frame" }, +#endif { OPTION_WAVWRITE, NULL, OPTION_STRING, "optional filename to write a WAV file of the current session" }, { OPTION_SNAPNAME, "%g/%i", OPTION_STRING, "override of the default snapshot/movie naming; %g == gamename, %i == index" }, { OPTION_SNAPSIZE, "auto", OPTION_STRING, "specify snapshot/movie resolution (x) or 'auto' to use minimal size " }, @@ -68,7 +71,6 @@ const options_entry emu_options::s_option_entries[] = { OPTION_SNAPBILINEAR, "1", OPTION_BOOLEAN, "specify if the snapshot/movie should have bilinear filtering applied" }, { OPTION_STATENAME, "%g", OPTION_STRING, "override of the default state subfolder naming; %g == gamename" }, { OPTION_BURNIN, "0", OPTION_BOOLEAN, "create burn-in snapshots for each screen" }, - { OPTION_DUMMYWRITE, "0", OPTION_BOOLEAN, "indicates if a snapshot should be created if each frame" }, // performance options { NULL, NULL, OPTION_HEADER, "CORE PERFORMANCE OPTIONS" }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index ece89e1d09fdb..aadb98a72c731 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -73,7 +73,9 @@ enum #define OPTION_RECORD "record" #define OPTION_MNGWRITE "mngwrite" #define OPTION_AVIWRITE "aviwrite" +#ifdef MAME_DEBUG #define OPTION_DUMMYWRITE "dummywrite" +#endif #define OPTION_WAVWRITE "wavwrite" #define OPTION_SNAPNAME "snapname" #define OPTION_SNAPSIZE "snapsize" @@ -242,7 +244,9 @@ class emu_options : public core_options const char *record() const { return value(OPTION_RECORD); } const char *mng_write() const { return value(OPTION_MNGWRITE); } const char *avi_write() const { return value(OPTION_AVIWRITE); } +#ifdef MAME_DEBUG bool dummy_write() const { return bool_value(OPTION_DUMMYWRITE); } +#endif const char *wav_write() const { return value(OPTION_WAVWRITE); } const char *snap_name() const { return value(OPTION_SNAPNAME); } const char *snap_size() const { return value(OPTION_SNAPSIZE); } diff --git a/src/emu/video.c b/src/emu/video.c index 7ec113b42d5d3..11dc45455404b 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -154,7 +154,9 @@ video_manager::video_manager(running_machine &machine) if (filename[0] != 0) begin_recording(filename, MF_AVI); +#ifdef MAME_DEBUG m_dummy_recording = machine.options().dummy_write(); +#endif // if no screens, create a periodic timer to drive updates if (machine.first_screen() == NULL) diff --git a/src/osd/sdl/man/mame.6 b/src/osd/sdl/man/mame.6 index 208629227924f..6d128814d66d4 100644 --- a/src/osd/sdl/man/mame.6 +++ b/src/osd/sdl/man/mame.6 @@ -448,9 +448,6 @@ The intention is that this PNG can be loaded via an artwork file with a low alpha (e.g, 0.1\-0.2 seems to work well) and blended over the entire screen. The PNG files are saved in the snap directory under the gamename\\burnin\-.png. The default is OFF (\-noburnin). -.TP -.B \-[no]dummywrite -Indicates whether a snapshot should be created with each frame. .\" .\" ******************************************************* .SS Performance options diff --git a/src/osd/sdl/man/mess.6 b/src/osd/sdl/man/mess.6 index d3fb2875db447..393943979e9d1 100644 --- a/src/osd/sdl/man/mess.6 +++ b/src/osd/sdl/man/mess.6 @@ -463,9 +463,6 @@ The intention is that this PNG can be loaded via an artwork file with a low alpha (e.g, 0.1\-0.2 seems to work well) and blended over the entire screen. The PNG files are saved in the snap directory under the system/burnin\-.png. The default is OFF (\-noburnin). -.TP -.B \-[no]dummywrite -Indicates whether a snapshot should be created with each frame. .\" .\" ******************************************************* .SS Performance options From adc1dcf6492872be304d6688b2a3871ea29a3023 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Tue, 24 Mar 2015 10:35:25 +0000 Subject: [PATCH 19/41] correct text rom (nw) --- src/mame/drivers/toaplan2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 1bdc544e479cc..5d7bf8b8c7484 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -4898,10 +4898,10 @@ ROM_START( bgareggabla ) ROM_LOAD( "rom1.bin", 0x600000, 0x200000, CRC(7eafdd70) SHA1(7c8da8e86c3f9491719b1d7d5d285568d7614f38) ) ROM_REGION( 0x010000, "text", 0 ) - ROM_LOAD( "text.u81", 0x00000, 0x08000, BAD_DUMP CRC(e67fd534) SHA1(987d0edffc2c243a13d4567319ea3d185eaadbf8) ) // should contain different title logo for this game + ROM_LOAD( "text.bin", 0x00000, 0x08000, CRC(00d100bd) SHA1(fb6028e3519d6588a966d1b16d47453db2e51fd7)) ROM_REGION( 0x010000, "user1", 0 ) // not graphics - ROM_LOAD( "2#-256", 0x00000, 0x08000, CRC(456dd16e) SHA1(84779ee64d3ea33ba1ba4dee39b504a81c6811a1) ) + ROM_LOAD( "base.bin", 0x00000, 0x08000, CRC(456dd16e) SHA1(84779ee64d3ea33ba1ba4dee39b504a81c6811a1) ) ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM Samples */ ROM_LOAD( "rom5.bin", 0x040000, 0x100000, CRC(f6d49863) SHA1(3a3c354852adad06e8a051511abfab7606bce382) ) From 02b72688b426cb8d2d6e4cfc1937eb5f10b6c668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 24 Mar 2015 15:31:35 +0100 Subject: [PATCH 20/41] reduced the image size of some chdman createhd tests (nw) --- .../chdman/input/createhd_4/in.params | 2 +- .../chdman/input/createhd_5/in.params | 2 +- src/regtests/chdman/output/createhd_4/out.chd | Bin 1048751 -> 10413 bytes src/regtests/chdman/output/createhd_5/out.chd | Bin 1048752 -> 10414 bytes 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/regtests/chdman/input/createhd_4/in.params b/src/regtests/chdman/input/createhd_4/in.params index 61dfdd4701b8e..51eee8734e105 100644 --- a/src/regtests/chdman/input/createhd_4/in.params +++ b/src/regtests/chdman/input/createhd_4/in.params @@ -1 +1 @@ --s 1073741824 \ No newline at end of file +-s 10485760 \ No newline at end of file diff --git a/src/regtests/chdman/input/createhd_5/in.params b/src/regtests/chdman/input/createhd_5/in.params index 614d2b263847d..27e6fe0e955b2 100644 --- a/src/regtests/chdman/input/createhd_5/in.params +++ b/src/regtests/chdman/input/createhd_5/in.params @@ -1 +1 @@ --s 1073741824 -ss 1024 \ No newline at end of file +-s 10485760 -ss 1024 \ No newline at end of file diff --git a/src/regtests/chdman/output/createhd_4/out.chd b/src/regtests/chdman/output/createhd_4/out.chd index 8e565b3799372e20d44f7fb3f87536ab297f5584..93d60a121b77ea3e6c984b0e4ceedbb801dc4e90 100644 GIT binary patch delta 89 zcmZ4A=&&|$f{HZ50tOhUfiN_Hv;dIFw9(O4!_eKu#f6c9K@q0NInpQC%GgN9!`0Cx Z*vimMC)m|F*viB}$0;D#%GA(^0RXQ}53~RP delta 495 zcmZ1*xW3V0f{L^Q102+VSpp0|S^&so+URJlu`xhr6c4H}xTI$6?&9LY$iScsi#g{= lpI|E!14}a<4_8N*U@Jp2onTkzU@K!I9jAa`D^o)w1^`CNmf8RS diff --git a/src/regtests/chdman/output/createhd_5/out.chd b/src/regtests/chdman/output/createhd_5/out.chd index 825a3493d0b72ebba311b07e332a944d711ca470..19f9033124068d3e1a1a7d1ddec98a1f5835b6e4 100644 GIT binary patch delta 90 zcmdnc=&&wuf{HZ50tOhUfiN_Hv;dIFveD62!^qvm#f6c9K?$bFInpQC%Fs;5!`0CR V%m{XM4z@Be&~XX?at(}37y!Wr59w*TBex0RZJWmkIy? From 892eb27dd583ba73790e65af4147f8f95177e0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 24 Mar 2015 15:32:17 +0100 Subject: [PATCH 21/41] chdtest.py: added some disabled debug code (nw) --- src/regtests/chdman/chdtest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/regtests/chdman/chdtest.py b/src/regtests/chdman/chdtest.py index 2f9e4b048111f..98f0a3886f925 100644 --- a/src/regtests/chdman/chdtest.py +++ b/src/regtests/chdman/chdtest.py @@ -5,12 +5,15 @@ import shutil def runProcess(cmd): + #print " ".join(cmd) process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdout, stderr) = process.communicate() if not isinstance(stdout, str): # python 3 stdout = stdout.decode('latin-1') if not isinstance(stderr, str): # python 3 stderr = stderr.decode('latin-1') + #if stderr: + # print stderr return process.returncode, stdout, stderr def compareInfo(info1, info2): From 3d2c821651816238f5a47afdf353cd6982d9795c Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Tue, 24 Mar 2015 16:04:15 +0100 Subject: [PATCH 22/41] one more dump, courtesy of Anna's reminder, and a small cmpro fix. nw. --- hash/gba.xml | 11 +++++++++++ hash/pc8801_flop.xml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hash/gba.xml b/hash/gba.xml index 4056ff8c2c4dc..2cc71b2965fdc 100644 --- a/hash/gba.xml +++ b/hash/gba.xml @@ -12294,6 +12294,17 @@ Note: In the AGB-E05-XX and AGB-E06-XX pcbs, the chip name is hidden under the b + + Frank Herbert's Dune - Ornithopter Assault (Prototype) + 200? + Cryo + + + + + + + Dungeons & Dragons - Eye of the Beholder (Euro) 2002 diff --git a/hash/pc8801_flop.xml b/hash/pc8801_flop.xml index d4ccb8a735426..cb6a34365c230 100644 --- a/hash/pc8801_flop.xml +++ b/hash/pc8801_flop.xml @@ -9666,7 +9666,7 @@ ExtractDisk [08]"下巻 ユーザー " -> "aaa_08.d88" - + From ddb6780c67a7c361ce0f11e9d33c3db1a253a315 Mon Sep 17 00:00:00 2001 From: fulivi Date: Tue, 24 Mar 2015 16:36:59 +0100 Subject: [PATCH 23/41] Added MESS driver for Intel MDS series-II --- src/emu/machine/i8257.c | 2 +- src/mess/drivers/imds2.c | 739 ++++++++++++++++++++++++++++++++++++++ src/mess/includes/imds2.h | 122 +++++++ 3 files changed, 862 insertions(+), 1 deletion(-) create mode 100644 src/mess/drivers/imds2.c create mode 100644 src/mess/includes/imds2.h diff --git a/src/emu/machine/i8257.c b/src/emu/machine/i8257.c index d46f9aa8ae76e..791a040295f54 100644 --- a/src/emu/machine/i8257.c +++ b/src/emu/machine/i8257.c @@ -79,7 +79,7 @@ inline void i8257_device::dma_request(int channel, int state) } else { - m_request &= ~1 << channel; + m_request &= ~(1 << channel); } trigger(1); } diff --git a/src/mess/drivers/imds2.c b/src/mess/drivers/imds2.c new file mode 100644 index 0000000000000..ad34b6f011449 --- /dev/null +++ b/src/mess/drivers/imds2.c @@ -0,0 +1,739 @@ +// license:MAME +// copyright-holders:fulivi +// +// *************************************** +// Driver for Intel Intellec MDS series-II +// *************************************** +// +// Documentation used for this driver: +// [1] Intel, manual 9800554-04 rev. D - Intellec series II MDS - Schematic drawings +// [2] Intel, manual 9800556-02 rev. B - Intellec series II MDS - Hardware reference manual +// [3] Intel, manual 9800555-02 rev. B - Intellec series II MDS - Hardware interface manual +// [4] Intel, manual 9800605-02 rev. B - Intellec series II MDS - Boot/monitor listing +// +// All these manuals are available on http://www.bitsavers.org +// +// An Intellec MDS series-II is composed of the following boards: +// +// ********** +// Integrated Processor Card (IPC) or Integrated Processor Board (IPB) +// +// This is the board where the OS (ISIS-II) and the application software run. +// This driver emulates an IPC. +// IPC is composed as follows: +// A83 8085A-2 CPU @ 4 MHz +// 64k of DRAM +// A82 2732 EPROM with monitor & boot firmware (assembly source of this ROM is in [4]) +// A66 8259A System PIC +// A89 8259A Local PIC +//*A86 8253 PIT +//*A91 8251A Serial channel #0 +//*A90 8251A Serial channel #1 +// +// ********** +// I/O Controller (IOC) +// +// This board acts as a controller for all I/O of the system. +// It is structured as if it were 2 boards in one: +// One part (around 8080) controls Keyboard, CRT & floppy, the other part (around PIO 8741) controls all parallel I/Os +// (Line printer, Paper tape puncher, Paper tape reader, I/O to PROM programmer). +// Both parts are interfaced to IPC through a bidirectional 8-bit bus. +// IOC is composed of these parts: +// A69 8080A-2 CPU @ 2.448 MHz +// 8k of DRAM +// A50 2716 +// A51 2716 +// A52 2716 +// A53 2716 EPROMs with IOC firmware +// A58 8257 DMA controller +// A35 8253 PIT +// A1 8271 Floppy controller +// A20 8275 CRT controller +// A19 2708 Character generator ROM +// LS1 3.3 kHz beeper +//*A72 8741-4 CPU @ 6 MHz (PIO: parallel I/O) +// +// ********** +// Keyboard controller +// +// Keyboard is controlled by a 8741 CPU that scans the key matrix and sends key codes to IOC through a 8-bit bus. +// +// A3 8741 CPU @ 3.58 MHz +// +// ICs that are not emulated yet are marked with "*" +// +// TODO: +// - Improve keyboard mapping +// - Emulate PIO. No known dumps of its ROM are available, though. +// - Emulate line printer output on PIO +// - Emulate serial channels on IPC +// - Emulate PIT on IPC +// - Adjust speed of processors. Wait states are not accounted for yet. +// +// Huge thanks to Dave Mabry for dumping IOC firmware, KB firmware and character generator. This driver would not +// exist without his dumps. +// (https://web.archive.org/web/20080509062332/http://www.s100-manuals.com/intel/IOC_iMDX_511_Upgrade.zip) + +#include "includes/imds2.h" + +// CPU oscillator of IPC board: 8 MHz +#define IPC_XTAL_Y2 XTAL_8MHz + +// Main oscillator of IOC board: 22.032 MHz +#define IOC_XTAL_Y2 22032000 + +// FDC oscillator of IOC board: 8 MHz +#define IOC_XTAL_Y1 XTAL_8MHz + +// Frequency of beeper +#define IOC_BEEP_FREQ 3300 + +static ADDRESS_MAP_START(ipc_mem_map , AS_PROGRAM , 8 , imds2_state) + AM_RANGE(0x0000 , 0xffff) AM_READWRITE(ipc_mem_read, ipc_mem_write) +ADDRESS_MAP_END + +static ADDRESS_MAP_START(ipc_io_map , AS_IO , 8 , imds2_state) + ADDRESS_MAP_UNMAP_LOW + AM_RANGE(0xc0 , 0xc0) AM_READWRITE(imds2_ipc_dbbout_r , imds2_ipc_dbbin_data_w) + AM_RANGE(0xc1 , 0xc1) AM_READWRITE(imds2_ipc_status_r , imds2_ipc_dbbin_cmd_w) + AM_RANGE(0xfa , 0xfb) AM_READWRITE(imds2_ipclocpic_r , imds2_ipclocpic_w) + AM_RANGE(0xfc , 0xfd) AM_READWRITE(imds2_ipcsyspic_r , imds2_ipcsyspic_w) + AM_RANGE(0xff , 0xff) AM_WRITE(imds2_ipc_control_w) +ADDRESS_MAP_END + + static ADDRESS_MAP_START(ioc_mem_map , AS_PROGRAM , 8 , imds2_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000 , 0x1fff) AM_ROM + AM_RANGE(0x4000 , 0x5fff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START(ioc_io_map , AS_IO , 8 , imds2_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x00 , 0x0f) AM_WRITE(imds2_ioc_dbbout_w) + AM_RANGE(0x20 , 0x2f) AM_WRITE(imds2_ioc_f0_w) + AM_RANGE(0x30 , 0x3f) AM_WRITE(imds2_ioc_set_f1_w) + AM_RANGE(0x40 , 0x4f) AM_WRITE(imds2_ioc_reset_f1_w) + AM_RANGE(0x50 , 0x5f) AM_WRITE(imds2_start_timer_w) + AM_RANGE(0x60 , 0x6f) AM_WRITE(imds2_miscout_w) + AM_RANGE(0x80 , 0x8f) AM_READ(imds2_miscin_r) + AM_RANGE(0x90 , 0x9f) AM_READ(imds2_kb_read) + AM_RANGE(0xa0 , 0xaf) AM_READ(imds2_ioc_status_r) + AM_RANGE(0xb0 , 0xbf) AM_READ(imds2_ioc_dbbin_r) + AM_RANGE(0xc0 , 0xcf) AM_DEVREADWRITE("iocfdc" , i8271_device , read , write) + AM_RANGE(0xd0 , 0xdf) AM_DEVREADWRITE("ioccrtc" , i8275_device , read , write) + AM_RANGE(0xe0 , 0xef) AM_DEVREADWRITE("ioctimer" , pit8253_device , read , write); +// DMA controller range doesn't extend to 0xff because register 0xfd needs to be read as 0xff +// This register is used by IOC firmware to detect DMA controller model (either 8237 or 8257) + AM_RANGE(0xf0 , 0xf8) AM_DEVREADWRITE("iocdma" , i8257_device , read , write) +ADDRESS_MAP_END + +static ADDRESS_MAP_START(kb_io_map , AS_IO , 8 , imds2_state) + AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_state::imds2_kb_port_p1_w) + AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_state::imds2_kb_port_p2_r) + AM_RANGE(MCS48_PORT_T0 , MCS48_PORT_T0) AM_READ(imds2_state::imds2_kb_port_t0_r) + AM_RANGE(MCS48_PORT_T1 , MCS48_PORT_T1) AM_READ(imds2_state::imds2_kb_port_t1_r) +ADDRESS_MAP_END + +imds2_state::imds2_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig , type , tag), + m_ipccpu(*this , "ipccpu"), + m_ipcsyspic(*this , "ipcsyspic"), + m_ipclocpic(*this , "ipclocpic"), + m_ioccpu(*this , "ioccpu"), + m_iocdma(*this , "iocdma"), + m_ioccrtc(*this , "ioccrtc"), + m_iocbeep(*this , "iocbeep"), + m_ioctimer(*this , "ioctimer"), + m_iocfdc(*this , "iocfdc"), + m_kbcpu(*this , "kbcpu"), + m_palette(*this , "palette"), + m_gfxdecode(*this, "gfxdecode"), + m_floppy0(*this , FLOPPY_0), + m_io_key0(*this , "KEY0"), + m_io_key1(*this , "KEY1"), + m_io_key2(*this , "KEY2"), + m_io_key3(*this , "KEY3"), + m_io_key4(*this , "KEY4"), + m_io_key5(*this , "KEY5"), + m_io_key6(*this , "KEY6"), + m_io_key7(*this , "KEY7"), + m_ioc_options(*this , "IOC_OPTS") +{ +} + +READ8_MEMBER(imds2_state::ipc_mem_read) +{ + if (imds2_in_ipc_rom(offset)) { + return m_ipc_rom[ (offset & 0x07ff) | ((offset & 0x1000) >> 1) ]; + } else { + return m_ipc_ram[ offset ]; + } +} + +WRITE8_MEMBER(imds2_state::ipc_mem_write) +{ + if (!imds2_in_ipc_rom(offset)) { + m_ipc_ram[ offset ] = data; + } +} + +WRITE8_MEMBER(imds2_state::imds2_ipc_control_w) +{ + // See A84, pg 28 of [1] + // b3 is ~(bit to be written) + // b2-b0 is ~(no. of bit to be written) + UINT8 mask = (1U << (~data & 0x07)); + + if (BIT(data , 3)) { + m_ipc_control &= ~mask; + } else { + m_ipc_control |= mask; + } +} + +WRITE_LINE_MEMBER(imds2_state::imds2_ipc_intr) +{ + m_ipccpu->set_input_line(I8085_INTR_LINE , (state != 0) && BIT(m_ipc_control , 2)); +} + +READ8_MEMBER(imds2_state::imds2_ipcsyspic_r) +{ + return m_ipcsyspic->read(space , offset == 0); +} + +READ8_MEMBER(imds2_state::imds2_ipclocpic_r) +{ + return m_ipclocpic->read(space , offset == 0); +} + +WRITE8_MEMBER(imds2_state::imds2_ipcsyspic_w) +{ + m_ipcsyspic->write(space , offset == 0 , data); +} + +WRITE8_MEMBER(imds2_state::imds2_ipclocpic_w) +{ + m_ipclocpic->write(space , offset == 0 , data); +} + +WRITE8_MEMBER(imds2_state::imds2_miscout_w) +{ + m_miscout = data; + imds2_update_beeper(); + // Send INTR to IPC + m_ipclocpic->ir6_w(BIT(m_miscout , 1)); +} + +READ8_MEMBER(imds2_state::imds2_miscin_r) +{ + UINT8 res = m_ioc_options->read(); + return res | ((m_beeper_timer == 0) << 2); +} + +WRITE_LINE_MEMBER(imds2_state::imds2_beep_timer_w) +{ + m_beeper_timer = state; + imds2_update_beeper(); +} + +WRITE8_MEMBER(imds2_state::imds2_start_timer_w) +{ + // Trigger timer 2 of ioctimer + m_ioctimer->write_gate2(0); + m_ioctimer->write_gate2(1); +} + +READ8_MEMBER(imds2_state::imds2_kb_read) +{ + return m_kbcpu->upi41_master_r(space , (offset & 2) >> 1); +} + +READ8_MEMBER(imds2_state::imds2_kb_port_p2_r) +{ + if ((m_kb_p1 & 3) == 0) { + // Row selected + // Row number is encoded on bits P15..P12, they are "backwards" (P15 is LSB) and keyboard rows are encoded starting with value 2 on these bits (see A4, pg 56 of [1]) + unsigned row = (m_kb_p1 >> 2) & 0x0f; + ioport_value data; + + switch (row) { + case 4: + // Row 0 + data = m_io_key0->read(); + break; + + case 12: + // Row 1 + data = m_io_key1->read(); + break; + + case 2: + // Row 2 + data = m_io_key2->read(); + break; + + case 10: + // Row 3 + data = m_io_key3->read(); + break; + + case 6: + // Row 4 + data = m_io_key4->read(); + break; + + case 14: + // Row 5 + data = m_io_key5->read(); + break; + + case 1: + // Row 6 + data = m_io_key6->read(); + break; + + case 9: + // Row 7 + data = m_io_key7->read(); + break; + + default: + data = 0xff; + break; + } + return data & 0xff; + } else { + // No row selected + return 0xff; + } +} + +WRITE8_MEMBER(imds2_state::imds2_kb_port_p1_w) +{ + m_kb_p1 = data; +} + +READ8_MEMBER(imds2_state::imds2_kb_port_t0_r) +{ + // T0 tied low + // It appears to be some kind of strapping option on kb hw + return 0; +} + +READ8_MEMBER(imds2_state::imds2_kb_port_t1_r) +{ + // T1 tied low + // It appears to be some kind of strapping option on kb hw + return 0; +} + +WRITE8_MEMBER(imds2_state::imds2_ioc_dbbout_w) +{ + m_ioc_obf = ~data; + // Set/reset OBF flag (b0) + m_ipc_ioc_status = ((offset & 1) == 0) | (m_ipc_ioc_status & ~0x01); +} + +WRITE8_MEMBER(imds2_state::imds2_ioc_f0_w) +{ + // Set/reset F0 flag (b2) + m_ipc_ioc_status = ((offset & 1) << 2) | (m_ipc_ioc_status & ~0x04); +} + +WRITE8_MEMBER(imds2_state::imds2_ioc_set_f1_w) +{ + // Set F1 flag (b3) + m_ipc_ioc_status |= 0x08; +} + +WRITE8_MEMBER(imds2_state::imds2_ioc_reset_f1_w) +{ + // Reset F1 flag (b3) + m_ipc_ioc_status &= ~0x08; +} + +READ8_MEMBER(imds2_state::imds2_ioc_status_r) +{ + return (~m_ipc_ioc_status & 0x0f) | 0xf0; +} + +READ8_MEMBER(imds2_state::imds2_ioc_dbbin_r) +{ + // Reset IBF flag (b1) + m_ipc_ioc_status &= ~0x02; + return ~m_ioc_ibf; +} + +READ8_MEMBER(imds2_state::imds2_ipc_dbbout_r) +{ + // Reset OBF flag (b0) + m_ipc_ioc_status &= ~0x01; + return m_ioc_obf; +} + +READ8_MEMBER(imds2_state::imds2_ipc_status_r) +{ + return m_ipc_ioc_status; +} + +WRITE8_MEMBER(imds2_state::imds2_ipc_dbbin_data_w) +{ + // Set IBF flag (b1) + m_ipc_ioc_status |= 0x02; + // Reset F1 flag (b3) + m_ipc_ioc_status &= ~0x08; + m_ioc_ibf = data; +} + +WRITE8_MEMBER(imds2_state::imds2_ipc_dbbin_cmd_w) +{ + // Set IBF flag (b1) + m_ipc_ioc_status |= 0x02; + // Set F1 flag (b3) + m_ipc_ioc_status |= 0x08; + m_ioc_ibf = data; +} + +WRITE_LINE_MEMBER(imds2_state::imds2_hrq_w) +{ + // Should be propagated to HOLD input of IOC CPU + m_iocdma->hlda_w(state); +} + +READ8_MEMBER(imds2_state::imds2_ioc_mem_r) +{ + address_space& prog_space = m_ioccpu->space(AS_PROGRAM); + return prog_space.read_byte(offset); +} + +WRITE8_MEMBER(imds2_state::imds2_ioc_mem_w) +{ + address_space& prog_space = m_ioccpu->space(AS_PROGRAM); + return prog_space.write_byte(offset , data); +} + +I8275_DRAW_CHARACTER_MEMBER(imds2_state::crtc_display_pixels) +{ + unsigned i; + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT8 chargen_byte = m_chargen[ (linecount & 7) | ((unsigned)charcode << 3) ]; + UINT16 pixels; + + if (lten) { + pixels = ~0; + } else if (vsp != 0 || (linecount & 8) != 0) { + pixels = 0; + } else { + // See [2], pg 58 for the very peculiar way of generating character images + // Here each half-pixel is translated into a full pixel + UINT16 exp_pix_l; + UINT16 exp_pix_r; + + exp_pix_l = (UINT16)chargen_byte; + exp_pix_l = ((exp_pix_l & 0x80) << 5) | + ((exp_pix_l & 0x40) << 4) | + ((exp_pix_l & 0x20) << 3) | + ((exp_pix_l & 0x10) << 2) | + ((exp_pix_l & 0x08) << 1) | + (exp_pix_l & 0x04); + exp_pix_l |= (exp_pix_l << 1); + exp_pix_r = exp_pix_l; + + // Layout of exp_pix_l/r: + // Bit # : F E D C B A 9 8 7 6 5 4 3 2 1 0 + // Bit of chargen_byte: 0 0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 0 0 + if ((chargen_byte & 2) == 0) { + exp_pix_l >>= 1; + } + exp_pix_l &= 0x3fc0; + + if ((chargen_byte & 1) == 0) { + exp_pix_r >>= 1; + } + exp_pix_r &= 0x003e; + + pixels = exp_pix_l | exp_pix_r; + } + + if (rvv) { + pixels = ~pixels; + } + + for (i = 0; i < 14; i++) { + bitmap.pix32(y, x + i) = palette[ (pixels & (1U << (13 - i))) != 0 ]; + } +} + +void imds2_state::driver_start() +{ + // Allocate 64k for IPC RAM + m_ipc_ram.resize(0x10000); + + memory_region *ipcrom = memregion("ipcrom"); + if (ipcrom == NULL) { + fatalerror("Unable to find IPC ROM region\n"); + } else { + m_ipc_rom = ipcrom->base(); + } +} + +void imds2_state::machine_start() +{ + m_floppy0->floppy_mon_w(0); + m_floppy0->floppy_drive_set_ready_state(1 , 0); +} + +void imds2_state::video_start() +{ + m_chargen = memregion("gfx1")->base(); +} + +void imds2_state::machine_reset() +{ + m_iocbeep->set_frequency(IOC_BEEP_FREQ); + m_ipc_control = 0x00; + m_ipc_ioc_status = 0x0f; +} + +bool imds2_state::imds2_in_ipc_rom(offs_t offset) const +{ + offs_t masked_offset = offset & 0xf800; + + // Region 0000-07ff is in ROM when START_UP/ == 0 && SEL_BOOT/ == 0 + if (masked_offset == 0x0000 && (m_ipc_control & 0x28) == 0) { + return true; + } + + // Region e800-efff is in ROM when SEL_BOOT/ == 0 + if (masked_offset == 0xe800 && (m_ipc_control & 0x08) == 0) { + return true; + } + + // Region f800-ffff is always in ROM + if (masked_offset == 0xf800) { + return true; + } + + return false; +} + +void imds2_state::imds2_update_beeper(void) +{ + m_iocbeep->set_state(m_beeper_timer == 0 && BIT(m_miscout , 0) == 0); +} + +static INPUT_PORTS_START(imds2) + // See [1], pg 56 for key matrix layout + // See [1], pg 57 for keyboard layout + PORT_START("KEY0") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') // ' + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // . + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("KEY1") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_UNUSED) + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') // OK + + PORT_START("KEY2") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + + PORT_START("KEY3") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') // OK + + PORT_START("KEY4") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') // OK + + PORT_START("KEY5") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // OK + + PORT_START("KEY6") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) // BS + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) // OK + + PORT_START("KEY7") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('_') PORT_CHAR('^') + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_UNUSED) + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_UNUSED) + + // Options on IOC: see [1], pg 40 + PORT_START("IOC_OPTS") + PORT_DIPNAME(0x80 , 0x80 , "Keyboard present") + PORT_DIPSETTING(0x80 , DEF_STR(Yes)) + PORT_DIPSETTING(0x00 , DEF_STR(No)) + PORT_DIPNAME(0x28 , 0x00 , "IOC mode") + PORT_DIPSETTING(0x00 , "On line") + PORT_DIPSETTING(0x08 , "Local") + PORT_DIPSETTING(0x20 , "Diagnostic") + PORT_DIPNAME(0x02 , 0x00 , "Floppy present") + PORT_DIPSETTING(0x02 , DEF_STR(Yes)) + PORT_DIPSETTING(0x00 , DEF_STR(No)) + PORT_DIPNAME(0x01 , 0x01 , "CRT frame frequency") + PORT_DIPSETTING(0x01 , "50 Hz") + PORT_DIPSETTING(0x00 , "60 Hz") +INPUT_PORTS_END + +static GFXLAYOUT_RAW(imds2_charlayout , 8 , 8 , 8 , 64) + +static GFXDECODE_START(imds2) + GFXDECODE_ENTRY("gfx1" , 0x0000 , imds2_charlayout , 0 , 1) +GFXDECODE_END + +static LEGACY_FLOPPY_OPTIONS_START(imds2) +LEGACY_FLOPPY_OPTIONS_END + +static const floppy_interface imds2_floppy_interface = +{ + FLOPPY_STANDARD_8_SSSD, + LEGACY_FLOPPY_OPTIONS_NAME(imds2), + "floppy_8" +}; + +static MACHINE_CONFIG_START(imds2 , imds2_state) + MCFG_CPU_ADD("ipccpu" , I8085A , IPC_XTAL_Y2 / 2) // 4 MHz + MCFG_CPU_PROGRAM_MAP(ipc_mem_map) + MCFG_CPU_IO_MAP(ipc_io_map) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("ipcsyspic" , pic8259_device , inta_cb) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) + + MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC , NULL) + MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC , NULL) + + MCFG_CPU_ADD("ioccpu" , I8080A , IOC_XTAL_Y2 / 9) // 2.448 MHz + MCFG_CPU_PROGRAM_MAP(ioc_mem_map) + MCFG_CPU_IO_MAP(ioc_io_map) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) + + // The IOC CRT hw is a bit complex, as the character clock (CCLK) to i8275 + // is varied according to the part of the video frame being scanned and according to + // the 50/60 Hz option jumper (W8). + // The basic clock (BCLK) runs at 22.032 MHz. + // CCLK = BCLK / 14 when in the active region of video + // CCLK = BCLK / 12 when in horizontal retrace (HRTC=1) + // CCLK = BCLK / 10 when in horizontal retrace of "short scan lines" (50 Hz only) + // + // ***** 50 Hz timings ***** + // 80 chars/row, 26 chars/h. retrace, 11 scan lines/row, 25 active rows, 3 vertical retrace rows + // Scan line: 80 chars * 14 BCLK + 26 chars * 12 BCLK = 1432 BCLK (64.996 usec) + // Scan row: 11 * scan lines = 15752 BCLK (714.960 usec) + // "Short" scan line: 80 chars * 14 BCLK + 26 chars * 10 BCLK = 1380 BCLK (62.636 usec) + // Frame: 28 scan rows (8 scan lines of 27th row are short): 27 * scan row + 3 * scan line + 8 * short scan line: 440640 BCLK (20 msec) + // + // ***** 60 Hz timings ***** + // 80 chars/row, 20 chars/h. retrace, 10 scan lines/row, 25 active rows, 2 vertical retrace rows + // Scan line: 80 chars * 14 BCLK + 20 chars * 12 BCLK = 1360 BCLK (61.728 usec) + // Scan row: 10 * scan lines = 13600 BCLK (617.284 usec) + // Frame: 27 scan rows : 367200 BCLK (16.667 msec) + // + // Clock here is semi-bogus: it gives the correct frame frequency at 50 Hz (with the incorrect + // assumption that CCLK is fixed at BCLK / 14) + MCFG_DEVICE_ADD("ioccrtc" , I8275 , 22853600 / 14) + MCFG_I8275_CHARACTER_WIDTH(14) + MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(imds2_state , crtc_display_pixels) + MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq2_w)) + MCFG_I8275_IRQ_CALLBACK(INPUTLINE("ioccpu" , I8085_INTR_LINE)) + + MCFG_SCREEN_ADD("screen" , RASTER) + MCFG_SCREEN_UPDATE_DEVICE("ioccrtc" , i8275_device , screen_update) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_GFXDECODE_ADD("gfxdecode" , "palette" , imds2) + MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("iocbeep" , BEEP , 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) + + MCFG_DEVICE_ADD("iocdma" , I8257 , IOC_XTAL_Y2 / 9) + MCFG_I8257_OUT_HRQ_CB(WRITELINE(imds2_state, imds2_hrq_w)) + MCFG_I8257_IN_MEMR_CB(READ8(imds2_state , imds2_ioc_mem_r)) + MCFG_I8257_OUT_MEMW_CB(WRITE8(imds2_state , imds2_ioc_mem_w)) + MCFG_I8257_IN_IOR_1_CB(DEVREAD8("iocfdc" , i8271_device , dack_r)) + MCFG_I8257_OUT_IOW_1_CB(DEVWRITE8("iocfdc" , i8271_device , dack_w)) + MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("ioccrtc" , i8275_device , dack_w)) + + MCFG_DEVICE_ADD("ioctimer" , PIT8253 , 0) + MCFG_PIT8253_CLK0(IOC_XTAL_Y1 / 4) + MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("ioctimer" , pit8253_device , write_clk2)); + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(imds2_state , imds2_beep_timer_w)); + + MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2) + MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w)) + MCFG_I8271_FLOPPIES(FLOPPY_0 , FLOPPY_1) + + MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, imds2_floppy_interface) + + MCFG_CPU_ADD("kbcpu", I8741, XTAL_3_579545MHz) /* 3.579545 MHz */ + MCFG_CPU_IO_MAP(kb_io_map) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) +MACHINE_CONFIG_END + +ROM_START(imds2) + // ROM definition of IPC cpu (8085A) + ROM_REGION(0x1000 , "ipcrom" , 0) + ROM_LOAD("ipc_a82.bin" , 0x0000 , 0x1000 , CRC(0889394f) SHA1(b7525baf1884a7d67402dea4b5566016a9861ef2)) + + // ROM definition of IOC cpu (8080A) + ROM_REGION(0x2000 , "ioccpu" , 0) + ROM_LOAD("ioc_a50.bin" , 0x0000 , 0x0800 , CRC(d9f926a1) SHA1(bd9d0f7458acc2806120a6dbaab9c48be315b060)) + ROM_LOAD("ioc_a51.bin" , 0x0800 , 0x0800 , CRC(6aa2f86c) SHA1(d3a5314d86e3366545b4c97b29e323dfab383d5f)) + ROM_LOAD("ioc_a52.bin" , 0x1000 , 0x0800 , CRC(b88a38d5) SHA1(934716a1daec852f4d1f846510f42408df0c9584)) + ROM_LOAD("ioc_a53.bin" , 0x1800 , 0x0800 , CRC(c8df4bb9) SHA1(2dfb921e94ae7033a7182457b2f00657674d1b77)) + // ROM definition of keyboard controller (8741) + ROM_REGION(0x400 , "kbcpu" , 0) + ROM_LOAD("kbd511.bin" , 0 , 0x400 , CRC(ba7c4303) SHA1(19899af732d0ae1247bfc79979b1ee5f339ee5cf)) + // ROM definition of character generator (2708, A19 on IOC) + ROM_REGION(0x400 , "gfx1" , 0) + ROM_LOAD ("ioc_a19.bin" , 0x0000 , 0x0400 , CRC(47487d0f) SHA1(0ed98f9f06622949ee3cc2ffc572fb9702db0f81)) +ROM_END + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ +COMP( 1979, imds2, 0, 0, imds2, imds2, driver_device, 0, "Intel", "Intellec MDS-II" , 0) diff --git a/src/mess/includes/imds2.h b/src/mess/includes/imds2.h new file mode 100644 index 0000000000000..62887b4b34e60 --- /dev/null +++ b/src/mess/includes/imds2.h @@ -0,0 +1,122 @@ +// license:MAME +// copyright-holders:fulivi +// Driver for Intel Intellec MDS series-II + +#ifndef _IMDS2_H_ +#define _IMDS2_H_ + +#include "emu.h" +#include "cpu/i8085/i8085.h" +#include "cpu/mcs48/mcs48.h" +#include "machine/i8257.h" +#include "video/i8275.h" +#include "sound/beep.h" +#include "machine/pit8253.h" +#include "machine/pic8259.h" +#include "machine/i8271.h" +#include "imagedev/flopdrv.h" + +class imds2_state : public driver_device +{ + public: + imds2_state(const machine_config &mconfig, device_type type, const char *tag); + + DECLARE_READ8_MEMBER(ipc_mem_read); + DECLARE_WRITE8_MEMBER(ipc_mem_write); + DECLARE_WRITE8_MEMBER(imds2_ipc_control_w); + DECLARE_WRITE_LINE_MEMBER(imds2_ipc_intr); + DECLARE_READ8_MEMBER(imds2_ipcsyspic_r); + DECLARE_READ8_MEMBER(imds2_ipclocpic_r); + DECLARE_WRITE8_MEMBER(imds2_ipcsyspic_w); + DECLARE_WRITE8_MEMBER(imds2_ipclocpic_w); + + DECLARE_WRITE8_MEMBER(imds2_miscout_w); + DECLARE_READ8_MEMBER(imds2_miscin_r); + DECLARE_WRITE_LINE_MEMBER(imds2_beep_timer_w); + DECLARE_WRITE8_MEMBER(imds2_start_timer_w); + DECLARE_READ8_MEMBER(imds2_kb_read); + DECLARE_READ8_MEMBER(imds2_kb_port_p2_r); + DECLARE_WRITE8_MEMBER(imds2_kb_port_p1_w); + DECLARE_READ8_MEMBER(imds2_kb_port_t0_r); + DECLARE_READ8_MEMBER(imds2_kb_port_t1_r); + DECLARE_WRITE8_MEMBER(imds2_ioc_dbbout_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_f0_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_set_f1_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_reset_f1_w); + DECLARE_READ8_MEMBER(imds2_ioc_status_r); + DECLARE_READ8_MEMBER(imds2_ioc_dbbin_r); + DECLARE_READ8_MEMBER(imds2_ipc_dbbout_r); + DECLARE_READ8_MEMBER(imds2_ipc_status_r); + DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_data_w); + DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_cmd_w); + DECLARE_WRITE_LINE_MEMBER(imds2_hrq_w); + + DECLARE_READ8_MEMBER(imds2_ioc_mem_r); + DECLARE_WRITE8_MEMBER(imds2_ioc_mem_w); + + I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels); + + virtual void driver_start(); + virtual void machine_start(); + virtual void video_start(); + virtual void machine_reset(); + + private: + required_device m_ipccpu; + required_device m_ipcsyspic; + required_device m_ipclocpic; + required_device m_ioccpu; + required_device m_iocdma; + required_device m_ioccrtc; + required_device m_iocbeep; + required_device m_ioctimer; + required_device m_iocfdc; + required_device m_kbcpu; + required_device m_palette; + required_device m_gfxdecode; + required_device m_floppy0; + required_ioport m_io_key0; + required_ioport m_io_key1; + required_ioport m_io_key2; + required_ioport m_io_key3; + required_ioport m_io_key4; + required_ioport m_io_key5; + required_ioport m_io_key6; + required_ioport m_io_key7; + required_ioport m_ioc_options; + + dynamic_array m_ipc_ram; + + bool imds2_in_ipc_rom(offs_t offset) const; + + void imds2_update_beeper(void); + + // IPC control port + UINT8 m_ipc_control; + + // IPC ROM content + const UINT8 *m_ipc_rom; + + // Character generator + const UINT8 *m_chargen; + + // MISCOUT state + UINT8 m_miscout; + + // Beeper timer line + int m_beeper_timer; + + // Keyboard state + UINT8 m_kb_p1; + + // IPC to IOC buffer + UINT8 m_ioc_ibf; + + // IOC to IPC buffer + UINT8 m_ioc_obf; + + // IPC/IOC status + UINT8 m_ipc_ioc_status; +}; + +#endif /* _IMDS2_H_ */ From 6dc4835957326e5c86c45908c53062b28c4e4d0c Mon Sep 17 00:00:00 2001 From: mamehaze Date: Tue, 24 Mar 2015 15:41:00 +0000 Subject: [PATCH 24/41] notes (nw) --- src/mame/drivers/ttchamp.c | 76 +++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 21 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index b93e5c0b4f2bb..7d9311e055697 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -1,4 +1,5 @@ -/* Table Tennis Champions ? +/* Table Tennis Champions + (c) 1995 Gamart ___________________________________________________ | __ _________ __________ __________ | @@ -45,7 +46,7 @@ ttennis1 adpcm data ttennis4/5 graphics *there is a pic16c84 that i cannot dump because my programmer doesn't support it. -Dumped by tirino73 >isolani (at) interfree.it< +Dumped by tirino73 @@ -54,7 +55,8 @@ Dumped by tirino73 >isolani (at) interfree.it< including the blitter (seems to be doubled up hardware tho, twice as many layers?) - need to work out how it selects between upper/lower program roms as blitter source -- PIC is probably for sound +- PIC is not for sound, what is is for? +- eeprom? (I don't see one, maybe PIC is used for settings?) - more than one layer - layer clearing @@ -80,6 +82,13 @@ class ttchamp_state : public driver_device DECLARE_WRITE16_MEMBER(paldat_w); DECLARE_WRITE16_MEMBER(port10_w); + + DECLARE_WRITE16_MEMBER(port20_w); + DECLARE_WRITE16_MEMBER(port62_w); + + DECLARE_READ16_MEMBER(port1e_r); + + UINT16 m_port10; DECLARE_DRIVER_INIT(ttchamp); @@ -190,7 +199,12 @@ WRITE16_MEMBER(ttchamp_state::paloff_w) WRITE16_MEMBER(ttchamp_state::paldat_w) { - m_palette->set_pen_color(m_paloff & 0x7fff,pal5bit(data>>0),pal5bit(data>>5),pal5bit(data>>10)); + // maybe 4 layers of 0x100 each? + // middle palettes seem to have special meaning tho, maybe blending? it's a darker copy ingame, and red/blue shades on char select + // based on screenshot references the highlighted player portraits should be appear in shades of red/blue + + // 0x8000 of offset is sometimes set + m_palette->set_pen_color(m_paloff & 0x3ff,pal5bit(data>>0),pal5bit(data>>5),pal5bit(data>>10)); } @@ -249,14 +263,14 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) if (m_spritesinit == 1) { - // printf("spider_blitter_w %08x %04x %04x (init?) (base?)\n", offset * 2, data, mem_mask); + // printf("%06x: spider_blitter_w %08x %04x %04x (init?) (base?)\n", space.device().safe_pc(), offset * 2, data, mem_mask); m_spritesinit = 2; m_spritesaddr = offset; } else if (m_spritesinit == 2) { - // printf("spider_blitter_w %08x %04x %04x (init2) (width?)\n", offset * 2, data, mem_mask); + // printf("%06x: spider_blitter_w %08x %04x %04x (init2) (width?)\n", space.device().safe_pc(), offset * 2, data, mem_mask); m_spriteswidth = offset & 0xff; if (m_spriteswidth == 0) m_spriteswidth = 80; @@ -274,9 +288,9 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) { COMBINE_DATA(&vram[offset&0x7fff]); } - else if (offset < 0x40000 / 2) + else if ((offset >= 0x30000 / 2) && (offset < 0x40000 / 2)) { - // 0x30000-0x3ffff and 0x40000-0x4ffff seem to be used here? + // 0x30000-0x3ffff used, on Spider it's 0x20000-0x2ffff offset &= 0x7fff; UINT8 *src = m_rom8; @@ -284,7 +298,7 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) if (m_port10 & 2) // NO, wrong for the portraits src += 0x100000; - // printf("spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr); + // printf("%06x: spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", space.device().safe_pc(), offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr); offset &= 0x7fff; for (int i = 0; i < m_spriteswidth; i++) @@ -311,46 +325,66 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) } else { - logerror("spider_blitter_w unhandled RAM access %08x %04x %04x\n", offset * 2, data, mem_mask); + // sometimes happens, why? special meanings? wrong interpretation of something else? + printf("%06x: spider_blitter_w unhandled RAM access %08x %04x %04x\n", space.device().safe_pc(), offset * 2, data, mem_mask); } } } + + +static ADDRESS_MAP_START( ttchamp_map, AS_PROGRAM, 16, ttchamp_state ) + AM_RANGE(0x00000, 0xfffff) AM_READWRITE(ttchamp_mem_r, ttchamp_mem_w) +ADDRESS_MAP_END + +READ16_MEMBER(ttchamp_state::port1e_r) +{ + return 0xff; +} + READ16_MEMBER(ttchamp_state::ttchamp_blit_start_r) { m_spritesinit = 1; return 0xff; } -static ADDRESS_MAP_START( ttchamp_map, AS_PROGRAM, 16, ttchamp_state ) - AM_RANGE(0x00000, 0xfffff) AM_READWRITE(ttchamp_mem_r, ttchamp_mem_w) -ADDRESS_MAP_END - WRITE16_MEMBER(ttchamp_state::port10_w) { COMBINE_DATA(&m_port10); } +WRITE16_MEMBER(ttchamp_state::port20_w) +{ + printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); +} + +WRITE16_MEMBER(ttchamp_state::port62_w) +{ + printf("%06x: port62_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); +} static ADDRESS_MAP_START( ttchamp_io, AS_IO, 16, ttchamp_state ) -// AM_RANGE(0x0000, 0x0001) AM_WRITENOP + AM_RANGE(0x0000, 0x0001) AM_WRITENOP // startup only AM_RANGE(0x0002, 0x0003) AM_READ_PORT("SYSTEM") AM_RANGE(0x0004, 0x0005) AM_READ_PORT("P1_P2") AM_RANGE(0x0006, 0x0007) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) - AM_RANGE(0x0018, 0x0019) AM_READ(ttchamp_blit_start_r) - AM_RANGE(0x001e, 0x001f) AM_READNOP // read before each line is blit + AM_RANGE(0x0018, 0x0019) AM_READ(ttchamp_blit_start_r) // read before using bus write offset as blit parameters + AM_RANGE(0x001e, 0x001f) AM_READ(port1e_r) // read before some blit operations (but not all) AM_RANGE(0x0008, 0x0009) AM_WRITE(paldat_w) - AM_RANGE(0x000a, 0x000b) AM_WRITE(paloff_w) + AM_RANGE(0x000a, 0x000b) AM_WRITE(paloff_w) // bit 0x8000 sometimes gets set, why? AM_RANGE(0x0010, 0x0011) AM_WRITE(port10_w) -// AM_RANGE(0x0020, 0x0021) AM_WRITENOP + AM_RANGE(0x0020, 0x0021) AM_WRITE(port20_w) + +// AM_RANGE(0x0034, 0x0035) AM_READ(peno_rand) AM_WRITENOP // eeprom (PIC?) / settings? + + AM_RANGE(0x0062, 0x0063) AM_WRITE(port62_w) -// AM_RANGE(0x0034, 0x0035) AM_READ(peno_rand) AM_WRITENOP ADDRESS_MAP_END @@ -441,7 +475,7 @@ static MACHINE_CONFIG_START( ttchamp, ttchamp_state ) MCFG_SCREEN_UPDATE_DRIVER(ttchamp_state, screen_update_ttchamp) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD("palette", 0x8000) + MCFG_PALETTE_ADD("palette", 0x400) MCFG_SPEAKER_STANDARD_MONO("mono") From c75c981c057d0b3577a25c7bafaa709f07d44d5f Mon Sep 17 00:00:00 2001 From: mamehaze Date: Tue, 24 Mar 2015 16:22:00 +0000 Subject: [PATCH 25/41] hmm pen based blending too.. ok ... (nw) --- src/mame/drivers/ttchamp.c | 101 +++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 31 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 7d9311e055697..9e97e878c6f02 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -99,7 +99,7 @@ class ttchamp_state : public driver_device DECLARE_WRITE16_MEMBER(ttchamp_mem_w); UINT16 m_videoram0[0x10000 / 2]; - UINT16 m_videoram1[0x10000 / 2]; +// UINT16 m_videoram1[0x10000 / 2]; UINT16 m_videoram2[0x10000 / 2]; @@ -141,18 +141,23 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 static const int xxx=320,yyy=204; bitmap.fill(m_palette->black_pen()); - + UINT8 *videoramfg; + UINT8* videorambg; + count=0; - UINT8 *videoram = (UINT8*)m_videoram0; + videorambg = (UINT8*)m_videoram0; + videoramfg = (UINT8*)m_videoram2; + for (y=0;yset_pen_color(m_paloff & 0x3ff,pal5bit(data>>0),pal5bit(data>>5),pal5bit(data>>10)); } @@ -216,7 +241,7 @@ READ16_MEMBER(ttchamp_state::ttchamp_mem_r) if ((m_port10&0xf) == 0x00) vram = m_videoram0; else if ((m_port10&0xf) == 0x01) - vram = m_videoram1; + vram = m_videoram2; else if ((m_port10&0xf) == 0x03) vram = m_videoram2; else @@ -251,7 +276,7 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) if ((m_port10&0xf) == 0x00) vram = m_videoram0; else if ((m_port10&0xf) == 0x01) - vram = m_videoram1; + vram = m_videoram2; else if ((m_port10&0xf) == 0x03) vram = m_videoram2; else @@ -272,8 +297,6 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) { // printf("%06x: spider_blitter_w %08x %04x %04x (init2) (width?)\n", space.device().safe_pc(), offset * 2, data, mem_mask); m_spriteswidth = offset & 0xff; - if (m_spriteswidth == 0) - m_spriteswidth = 80; m_spritesinit = 0; @@ -303,22 +326,30 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) for (int i = 0; i < m_spriteswidth; i++) { - UINT8 data; - - data = (src[(m_spritesaddr * 2) + 1]); - - if (data) - vram[offset] = (vram[offset] & 0x00ff) | data << 8; + if ((m_port10 & 0xf) == 0x01) // this is set when moving objects are cleared, although not screen clears? + { + vram[offset] = 0x0000; + offset++; + } + else + { + UINT8 data; + + data = (src[(m_spritesaddr * 2) + 1]); + + if (data) + vram[offset] = (vram[offset] & 0x00ff) | data << 8; - data = src[(m_spritesaddr*2)]; - - if (data) - vram[offset] = (vram[offset] & 0xff00) | data; + data = src[(m_spritesaddr * 2)]; + if (data) + vram[offset] = (vram[offset] & 0xff00) | data; - m_spritesaddr ++; - offset++; + + m_spritesaddr++; + offset++; + } offset &= 0x7fff; } @@ -356,6 +387,14 @@ WRITE16_MEMBER(ttchamp_state::port10_w) WRITE16_MEMBER(ttchamp_state::port20_w) { printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); + // seems to somehow be tied to layer clear + // might also depend on layer selected with 0x10 tho? written after it + for (int i = 0; i < 0x8000; i++) + { + // m_videoram0[i] = 0x0000; + m_videoram2[i] = 0x0000; + } + } WRITE16_MEMBER(ttchamp_state::port62_w) From 3a42abc7a78b68d3a978cb615b567f4289d985a8 Mon Sep 17 00:00:00 2001 From: fulivi Date: Tue, 24 Mar 2015 17:35:09 +0100 Subject: [PATCH 26/41] Added imds2 to list file & mess makefile --- src/mess/mess.lst | 2 ++ src/mess/mess.mak | 1 + 2 files changed, 3 insertions(+) diff --git a/src/mess/mess.lst b/src/mess/mess.lst index dde03cb744713..d27d039b024cb 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2103,6 +2103,8 @@ swtpc09i // S09, DC4 Floppy + PIA IDE SBUG rom - FLEX swtpc09u // S09, DMF2 Floppy UNIBUG rom - UniFLEX swtpc09d3 // S09, DMF3 Floppy UNIBUG U3 rom - UniFLEX U3 +// Intel +imds2 // Intellec MDS series-II //***************Games****************************************************** // Computer Electronic diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 1841a33be7572..ff2c0f07c84b0 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1334,6 +1334,7 @@ $(MESSOBJ)/intel.a: \ $(MESS_DRIVERS)/rex6000.o \ $(MESS_DRIVERS)/sdk85.o \ $(MESS_DRIVERS)/sdk86.o \ + $(MESS_DRIVERS)/imds2.o \ $(MESSOBJ)/ideal.a: \ $(MESS_DRIVERS)/elecdet.o \ From fa50b1e3b27b28f49cad8a57d7f4f185b44277a6 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 24 Mar 2015 19:44:12 +0100 Subject: [PATCH 27/41] i can probably finish dark tower, but ssimon can wait until post-release --- src/mess/mess.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mess/mess.lst b/src/mess/mess.lst index f056548879aaa..35b59572ef860 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -2205,7 +2205,7 @@ starwbc // Kenner starwbcp // Kenner (prototype) comp4 // Milton Bradley simon // Milton Bradley -ssimon // Milton Bradley +//ssimon // Milton Bradley cnsector // Parker Bros merlin // Parker Bros stopthie // Parker Bros From 7237f125a9fa86899d22067fae9e7f8b2ce95a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 24 Mar 2015 19:54:11 +0100 Subject: [PATCH 28/41] fixed Visual Studio compilation (nw) --- src/mess/drivers/imds2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mess/drivers/imds2.c b/src/mess/drivers/imds2.c index ad34b6f011449..cf192dd63e88a 100644 --- a/src/mess/drivers/imds2.c +++ b/src/mess/drivers/imds2.c @@ -128,10 +128,10 @@ static ADDRESS_MAP_START(ioc_io_map , AS_IO , 8 , imds2_state) ADDRESS_MAP_END static ADDRESS_MAP_START(kb_io_map , AS_IO , 8 , imds2_state) - AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_state::imds2_kb_port_p1_w) - AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_state::imds2_kb_port_p2_r) - AM_RANGE(MCS48_PORT_T0 , MCS48_PORT_T0) AM_READ(imds2_state::imds2_kb_port_t0_r) - AM_RANGE(MCS48_PORT_T1 , MCS48_PORT_T1) AM_READ(imds2_state::imds2_kb_port_t1_r) + AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_kb_port_p1_w) + AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_kb_port_p2_r) + AM_RANGE(MCS48_PORT_T0 , MCS48_PORT_T0) AM_READ(imds2_kb_port_t0_r) + AM_RANGE(MCS48_PORT_T1 , MCS48_PORT_T1) AM_READ(imds2_kb_port_t1_r) ADDRESS_MAP_END imds2_state::imds2_state(const machine_config &mconfig, device_type type, const char *tag) From a09a8fcbc8cc5500112521e5a569ce9f472a5d88 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 24 Mar 2015 20:17:31 +0100 Subject: [PATCH 29/41] darktower motor simulation --- src/mess/drivers/hh_tms1k.c | 11 ++-- src/mess/drivers/mbdtower.c | 124 +++++++++++++++++++++++++++++------ src/mess/layout/mbdtower.lay | 7 ++ 3 files changed, 117 insertions(+), 25 deletions(-) diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index c58cd7a1def86..83d83023ef09c 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -24,6 +24,7 @@ *MP2139 ? 1982, Gakken Galaxy Invader 1000 *MP2788 ? 1980, Bandai Flight Time @MP3226 TMS1000 1978, Milton Bradley Simon + *MP3301 TMS1000 1979, Milton Bradley Bigtrak *MP3320A TMS1000 1979, Coleco Head to Head Basketball MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.c @MP3404 TMS1100 1978, Parker Brothers Merlin @@ -730,7 +731,7 @@ void hh_tms1k_state::ebball_display() // R8 is a 7seg m_display_segmask[8] = 0x7f; - display_matrix(7, 9, m_o, m_r); + display_matrix(7, 9, ~m_o, m_r); } WRITE16_MEMBER(hh_tms1k_state::ebball_write_r) @@ -750,7 +751,7 @@ WRITE16_MEMBER(hh_tms1k_state::ebball_write_o) { // O0-O6: led row // O7: N/C - m_o = ~data; + m_o = data; ebball_display(); } @@ -848,7 +849,7 @@ void hh_tms1k_state::ebball2_display() for (int y = 0; y < 3; y++) m_display_segmask[y] = 0x7f; - display_matrix(8, 10, m_o, m_r); + display_matrix(8, 10, ~m_o, m_r ^ 0x7f); } WRITE16_MEMBER(hh_tms1k_state::ebball2_write_r) @@ -860,14 +861,14 @@ WRITE16_MEMBER(hh_tms1k_state::ebball2_write_r) m_speaker->level_w(data >> 10 & 1); // R0-R9: led columns - m_r = data ^ 0x7f; + m_r = data; ebball2_display(); } WRITE16_MEMBER(hh_tms1k_state::ebball2_write_o) { // O0-O7: led row/segment - m_o = ~data; + m_o = data; ebball2_display(); } diff --git a/src/mess/drivers/mbdtower.c b/src/mess/drivers/mbdtower.c index c7c35a4ab7554..b591dc81ec4b6 100644 --- a/src/mess/drivers/mbdtower.c +++ b/src/mess/drivers/mbdtower.c @@ -4,7 +4,9 @@ Milton Bradley Dark Tower * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332 + (assume same ROM contents between revisions) * SN75494N MOS-to-LED digit driver + * rotating reel + lightsensor x @@ -22,13 +24,20 @@ class mbdtower_state : public hh_tms1k_state { } void mbdtower_display(); + bool sensor_led_on() { return m_display_decay[0][0] != 0; } + + int m_motor_pos; + int m_motor_pos_prev; + int m_motor_decay; + bool m_motor_on; + bool m_sensor_blind; + + TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick); + DECLARE_WRITE16_MEMBER(write_r); DECLARE_WRITE16_MEMBER(write_o); DECLARE_READ8_MEMBER(read_k); - bool m_motor_on; - bool m_sensor; - protected: virtual void machine_start(); }; @@ -36,27 +45,104 @@ class mbdtower_state : public hh_tms1k_state /*************************************************************************** - I/O + Display, Motor ***************************************************************************/ void mbdtower_state::mbdtower_display() { + // declare display matrix size and the 2 7segs + m_display_maxx = 7; + m_display_maxy = 3; + m_display_segmask[1] = m_display_segmask[2] = 0x7f; + + // update current state + if (~m_r & 0x10) + { + UINT8 o = BITSWAP8(m_o,7,0,4,3,2,1,6,5) & 0x7f; + m_display_state[2] = (m_o & 0x80) ? o : 0; + m_display_state[1] = (m_o & 0x80) ? 0 : o; + m_display_state[0] = (m_r >> 8 & 1) | (m_r >> 4 & 0xe); + + display_update(); + } + else + { + // display items turned off + display_matrix(7, 3, 0, 0); + } +} + +TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) +{ + // it rotates counter-clockwise (when viewed from above) + if (m_motor_on) + { + m_motor_pos = (m_motor_pos - 1) & 0x7f; + + // give it some time to spin out when it's turned off + if (m_r & 0x200) + m_motor_decay += (m_motor_decay < 6); + else if (m_motor_decay > 0) + m_motor_decay--; + else + m_motor_on = false; + } + + // 8 evenly spaced holes in the rotation disc for the sensor to 'see' through. + // The first hole is much bigger, enabling the game to determine the position. + if ((m_motor_pos & 0xf) < 4 || m_motor_pos < 0xc) + m_sensor_blind = false; + else + m_sensor_blind = true; + + // on change, output info + if (m_motor_pos != m_motor_pos_prev) + output_set_value("motor_pos", 100 * (m_motor_pos / (float)0x80)); + + /* 3 display cards per hole, like this: + + (0) <---- display increments this way <---- (7) + + VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void) CURSED + WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void) LOST + BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void) PLAGUE + */ + int card_pos = m_motor_pos >> 4 & 7; + if (card_pos != (m_motor_pos_prev >> 4 & 7)) + output_set_value("card_pos", card_pos); + + m_motor_pos_prev = m_motor_pos; } + + +/*************************************************************************** + + I/O + +***************************************************************************/ + WRITE16_MEMBER(mbdtower_state::write_r) { // R0-R2: input mux m_inp_mux = data & 7; + // R9: motor on + if ((m_r ^ data) & 0x200) + output_set_value("motor_on", data >> 9 & 1); + if (data & 0x200) + m_motor_on = true; + // R3: N/C - // R4: 75494 enable (speaker, lamps, digit select go through that IC) + // R4: 75494 /EN (speaker, lamps, digit select go through that IC) // R5-R7: tower lamps // R8: rotation sensor led - // R9: motor on + m_r = data; + mbdtower_display(); // R10: speaker out - m_speaker->level_w(data >> 10 & 1); + m_speaker->level_w(~data >> 4 & data >> 10 & 1); } WRITE16_MEMBER(mbdtower_state::write_o) @@ -64,22 +150,16 @@ WRITE16_MEMBER(mbdtower_state::write_o) // O0-O6: led segments A-G // O7: digit select m_o = data; + mbdtower_display(); } - READ8_MEMBER(mbdtower_state::read_k) { // rotation sensor is on K8 - - return read_inputs(3); + return read_inputs(3) | ((!m_sensor_blind && sensor_led_on()) ? 8 : 0); } -/* tower motor simulation: - -*/ - - /*************************************************************************** @@ -138,15 +218,20 @@ void mbdtower_state::machine_start() hh_tms1k_state::machine_start(); // zerofill/register for savestates + m_motor_pos = 0; + m_motor_pos_prev = -1; + m_motor_decay = 0; m_motor_on = false; - m_sensor = false; + m_sensor_blind = false; + save_item(NAME(m_motor_pos)); + /* save_item(NAME(m_motor_pos_prev)); */ // don't save! + save_item(NAME(m_motor_decay)); save_item(NAME(m_motor_on)); - save_item(NAME(m_sensor)); + save_item(NAME(m_sensor_blind)); } - static MACHINE_CONFIG_START( mbdtower, mbdtower_state ) /* basic machine hardware */ @@ -155,6 +240,7 @@ static MACHINE_CONFIG_START( mbdtower, mbdtower_state ) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tower_motor", mbdtower_state, motor_sim_tick, attotime::from_msec(3500/0x80)) // ~3.5sec for a full rotation MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_mbdtower) @@ -168,7 +254,6 @@ MACHINE_CONFIG_END - /*************************************************************************** Game driver(s) @@ -187,4 +272,3 @@ ROM_END CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) - diff --git a/src/mess/layout/mbdtower.lay b/src/mess/layout/mbdtower.lay index 940ef1a955e1a..aff46ef4effdc 100644 --- a/src/mess/layout/mbdtower.lay +++ b/src/mess/layout/mbdtower.lay @@ -5,6 +5,10 @@ + + + + @@ -14,6 +18,9 @@ + + + From 971e1cdd86385b2030bf4b85068674e37398cf5f Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 24 Mar 2015 20:52:04 +0100 Subject: [PATCH 30/41] notes --- src/mess/drivers/elecbowl.c | 4 +++- src/mess/drivers/mbdtower.c | 16 +++++++++++++--- src/mess/drivers/tispeak.c | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/mess/drivers/elecbowl.c b/src/mess/drivers/elecbowl.c index c4be40e64e238..ae1e750924aee 100644 --- a/src/mess/drivers/elecbowl.c +++ b/src/mess/drivers/elecbowl.c @@ -2,6 +2,8 @@ // copyright-holders:hap, Kevin Horton /*************************************************************************** + ** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.c) ** + Marx Series 300 Electronic Bowling Game * TMS1100NLL MP3403 DBS 7836 SINGAPORE @@ -158,4 +160,4 @@ ROM_START( elecbowl ) ROM_END -CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) +CONS( 1978, elecbowl, 0, 0, elecbowl, elecbowl, driver_device, 0, "Marx", "Electronic Bowling (Marx)", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) diff --git a/src/mess/drivers/mbdtower.c b/src/mess/drivers/mbdtower.c index b591dc81ec4b6..802db8e59dd88 100644 --- a/src/mess/drivers/mbdtower.c +++ b/src/mess/drivers/mbdtower.c @@ -2,13 +2,22 @@ // copyright-holders:hap, Sean Riddle /*************************************************************************** + ** subclass of hh_tms1k_state (includes/hh_tms1k.h, drivers/hh_tms1k.c) ** + Milton Bradley Dark Tower * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332 (assume same ROM contents between revisions) * SN75494N MOS-to-LED digit driver * rotating reel + lightsensor - x + This is a board game, it obviously requires game pieces and the board. + The emulated part is the centerpiece, a black tower with a rotating card + panel and LED digits for displaying health, amount of gold, etc. As far + as MESS is concerned, the game works fine. + + To start up the game, first press [MOVE], the machine now does a self-test. + Then select level and number of players and the game will start. Read the + official manual on how to play the game. ***************************************************************************/ @@ -73,6 +82,7 @@ void mbdtower_state::mbdtower_display() } } + TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) { // it rotates counter-clockwise (when viewed from above) @@ -235,7 +245,7 @@ void mbdtower_state::machine_start() static MACHINE_CONFIG_START( mbdtower, mbdtower_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 400000) // approximation - RC osc. R=43K, C=56pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf, but unknown RC curve MCFG_TMS1XXX_READ_K_CB(READ8(mbdtower_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o)) @@ -271,4 +281,4 @@ ROM_START( mbdtower ) ROM_END -CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) +CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c index 8e84bf335dcb3..cc2b432106f8d 100644 --- a/src/mess/drivers/tispeak.c +++ b/src/mess/drivers/tispeak.c @@ -801,7 +801,7 @@ static MACHINE_CONFIG_START( snmath, tispeak_state ) MCFG_TMS5110_ADDR_CB(DEVWRITE8("tms6100", tms6100_device, tms6100_addr_w)) MCFG_TMS5110_DATA_CB(DEVREADLINE("tms6100", tms6100_device, tms6100_data_r)) MCFG_TMS5110_ROMCLK_CB(DEVWRITELINE("tms6100", tms6100_device, tms6100_romclock_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( snspell, snmath ) From a22a633e23de825b804d3782effe38ea037f566f Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Tue, 24 Mar 2015 23:57:37 +0100 Subject: [PATCH 31/41] Global layer clearance is at 0x10 bits 4-5 (nw) --- src/mame/drivers/ttchamp.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 9e97e878c6f02..1566f15d97b9f 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -205,7 +205,7 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 } } - +#if 0 for (int i = 0; i < 0x8000; i++) { // how are layers cleared? @@ -215,7 +215,8 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 // m_videoram1[i] = 0x0000; // m_videoram2[i] = 0x0000; } - +#endif + return 0; } @@ -381,7 +382,21 @@ READ16_MEMBER(ttchamp_state::ttchamp_blit_start_r) WRITE16_MEMBER(ttchamp_state::port10_w) { + UINT8 res; COMBINE_DATA(&m_port10); + + res = m_port10 & 0xf0; + /* Assume that both bits clears layers. */ + if(res == 0x30) + { + for (int i = 0; i < 0x8000; i++) + { + m_videoram0[i] = 0x0000; + m_videoram2[i] = 0x0000; + } + } + else if(res != 0) + printf("Check me, i/o 0x10 used with %02x\n",res); } WRITE16_MEMBER(ttchamp_state::port20_w) @@ -389,11 +404,11 @@ WRITE16_MEMBER(ttchamp_state::port20_w) printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); // seems to somehow be tied to layer clear // might also depend on layer selected with 0x10 tho? written after it - for (int i = 0; i < 0x8000; i++) + /*for (int i = 0; i < 0x8000; i++) { // m_videoram0[i] = 0x0000; m_videoram2[i] = 0x0000; - } + }*/ } From 159a234e0ec661f2c4859095e43c5fd6663b197d Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 25 Mar 2015 00:09:57 +0100 Subject: [PATCH 32/41] first rename lilprof to lilprof78 added Little Professor (1976 ver) --- src/mess/drivers/ticalc1x.c | 134 +++++++++++++++++++++++++++++------- src/mess/mess.lst | 1 + 2 files changed, 110 insertions(+), 25 deletions(-) diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index 679d62d550e22..37d9060016283 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -8,8 +8,8 @@ TODO: - - MCU clocks are unknown - - lilprof equals-sign is always on + - MCU clocks are unknown where noted + - lilprof78 equals-sign is always on ***************************************************************************/ @@ -70,7 +70,7 @@ class ticalc1x_state : public driver_device void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask); // calculator-specific handlers - void tisr16_display_update(); + void tisr16_display(); DECLARE_WRITE16_MEMBER(tisr16_write_o); DECLARE_WRITE16_MEMBER(tisr16_write_r); DECLARE_READ8_MEMBER(tisr16_read_k); @@ -84,9 +84,12 @@ class ticalc1x_state : public driver_device DECLARE_READ8_MEMBER(wizatron_read_k); DECLARE_WRITE16_MEMBER(lilprof_write_o); - DECLARE_WRITE16_MEMBER(lilprof_write_r); DECLARE_READ8_MEMBER(lilprof_read_k); + DECLARE_WRITE16_MEMBER(lilprof78_write_o); + DECLARE_WRITE16_MEMBER(lilprof78_write_r); + DECLARE_READ8_MEMBER(lilprof78_read_k); + DECLARE_WRITE16_MEMBER(ti30_write_o); DECLARE_WRITE16_MEMBER(ti30_write_r); DECLARE_READ8_MEMBER(ti30_read_k); @@ -256,7 +259,7 @@ INPUT_CHANGED_MEMBER(ticalc1x_state::power_button) ***************************************************************************/ -void ticalc1x_state::tisr16_display_update() +void ticalc1x_state::tisr16_display() { // update leds state for (int y = 0; y < 11; y++) @@ -275,14 +278,14 @@ WRITE16_MEMBER(ticalc1x_state::tisr16_write_r) // R0-R10: input mux // R0-R10: select digit (right-to-left) m_r = m_inp_mux = data; - tisr16_display_update(); + tisr16_display(); } WRITE16_MEMBER(ticalc1x_state::tisr16_write_o) { // O0-O7: digit segments m_o = data; - tisr16_display_update(); + tisr16_display(); } READ8_MEMBER(ticalc1x_state::tisr16_read_k) @@ -475,12 +478,17 @@ MACHINE_CONFIG_END WRITE16_MEMBER(ticalc1x_state::wizatron_write_r) { - // note: 6th digit is custom(not 7seg), for math symbols, and 3rd digit - // only has A and G for =, though some newer revisions use a custom digit too. + // 6th digit is custom(not 7seg), for math symbols, like this: + // \./ GAB + // --- F + // /.\ EDC + + // 3rd digit only has A and G for =, though some newer hardware revisions + // (goes for both wizatron and lilprof) use a custom equals-sign digit here m_display_segmask[3] = 0x41; // R0-R8: select digit (right-to-left) - display_matrix_seg(8, 9, m_o, data, 0x7f); + display_matrix_seg(7, 9, m_o, data, 0x7f); } WRITE16_MEMBER(ticalc1x_state::wizatron_write_o) @@ -500,7 +508,7 @@ READ8_MEMBER(ticalc1x_state::wizatron_read_k) static INPUT_PORTS_START( wizatron ) PORT_START("IN.0") // O1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("CLEAR") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") @@ -547,12 +555,72 @@ MACHINE_CONFIG_END /*************************************************************************** - TI Little Professor '78 + TI Little Professor (1976 version) + * TMS0970 MCU labeled TMS0975NL ZA0356, GP0975CS. die labeled 0970D-75C + + The hardware is nearly identical to Wiz-A-Tron (or vice versa, since this + one is older). + +***************************************************************************/ + +WRITE16_MEMBER(ticalc1x_state::lilprof_write_o) +{ + // O1-O4,O7: input mux + // O0-O6: digit segments A-G + m_inp_mux = (data >> 1 & 0xf) | (data >> 3 & 0x10); + m_o = data; +} + +READ8_MEMBER(ticalc1x_state::lilprof_read_k) +{ + return read_inputs(5); +} + + +static INPUT_PORTS_START( lilprof ) + PORT_INCLUDE( wizatron ) + + PORT_MODIFY("IN.0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_DEL) PORT_NAME("Set") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Go") + + PORT_START("IN.4") // O7 + PORT_CONFNAME( 0x0f, 0x01, "Level") + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + PORT_CONFSETTING( 0x04, "3" ) + PORT_CONFSETTING( 0x08, "4" ) +INPUT_PORTS_END + + +static MACHINE_CONFIG_START( lilprof, ticalc1x_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS0970, 250000) // guessed + MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, lilprof_read_k)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, lilprof_write_o)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, wizatron_write_r)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", ticalc1x_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_wizatron) + + /* no video! */ + + /* no sound! */ +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + TI Little Professor (1978 version, same as 1980 version) * TMS1990 MCU labeled TMC1993NL. die labeled 1990C-c3C ***************************************************************************/ -WRITE16_MEMBER(ticalc1x_state::lilprof_write_r) +WRITE16_MEMBER(ticalc1x_state::lilprof78_write_r) { // update leds state UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f; @@ -564,15 +632,15 @@ WRITE16_MEMBER(ticalc1x_state::lilprof_write_r) // 3rd digit A/G(equals sign) is from O7 m_display_state[3] = (m_o & 0x80) ? 0x41 : 0; - // 6th digit is a custom 7seg for math symbols + // 6th digit is a custom 7seg for math symbols (see wizatron_write_r) m_display_state[6] = BITSWAP8(m_display_state[6],7,6,1,4,2,3,5,0); - m_display_maxx = 8; + m_display_maxx = 7; m_display_maxy = 9; display_update(); } -WRITE16_MEMBER(ticalc1x_state::lilprof_write_o) +WRITE16_MEMBER(ticalc1x_state::lilprof78_write_o) { // O0-O3,O5: input mux // O0-O6: digit segments A-G @@ -581,13 +649,13 @@ WRITE16_MEMBER(ticalc1x_state::lilprof_write_o) m_o = data; } -READ8_MEMBER(ticalc1x_state::lilprof_read_k) +READ8_MEMBER(ticalc1x_state::lilprof78_read_k) { return read_inputs(5); } -static INPUT_PORTS_START( lilprof ) +static INPUT_PORTS_START( lilprof78 ) PORT_START("IN.0") // O0 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") @@ -621,13 +689,13 @@ static INPUT_PORTS_START( lilprof ) INPUT_PORTS_END -static MACHINE_CONFIG_START( lilprof, ticalc1x_state ) +static MACHINE_CONFIG_START( lilprof78, ticalc1x_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", TMS1990, 250000) // guessed - MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, lilprof_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, lilprof_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, lilprof_write_r)) + MCFG_TMS1XXX_READ_K_CB(READ8(ticalc1x_state, lilprof78_read_k)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ticalc1x_state, lilprof78_write_o)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ticalc1x_state, lilprof78_write_r)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", ticalc1x_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_wizatron) @@ -895,7 +963,7 @@ ROM_END ROM_START( ti1270 ) ROM_REGION( 0x0400, "maincpu", 0 ) - ROM_LOAD( "tms0974nl", 0x0000, 0x0400, CRC(48e09b4b) SHA1(17f27167164df223f9f06082ece4c3fc3900eda3) ) + ROM_LOAD( "za0355", 0x0000, 0x0400, CRC(48e09b4b) SHA1(17f27167164df223f9f06082ece4c3fc3900eda3) ) ROM_REGION( 782, "maincpu:ipla", 0 ) ROM_LOAD( "tms0970_ti1270_ipla.pla", 0, 782, CRC(05306ef8) SHA1(60a0a3c49ce330bce0c27f15f81d61461d0432ce) ) @@ -910,7 +978,7 @@ ROM_END ROM_START( wizatron ) ROM_REGION( 0x0400, "maincpu", 0 ) - ROM_LOAD( "dp0907bs", 0x0000, 0x0400, CRC(5a6af094) SHA1(b1f27e1f13f4db3b052dd50fb08dbf9c4d8db26e) ) + ROM_LOAD( "za0379", 0x0000, 0x0400, CRC(5a6af094) SHA1(b1f27e1f13f4db3b052dd50fb08dbf9c4d8db26e) ) ROM_REGION( 782, "maincpu:ipla", 0 ) ROM_LOAD( "tms0970_wizatron_ipla.pla", 0, 782, CRC(05306ef8) SHA1(60a0a3c49ce330bce0c27f15f81d61461d0432ce) ) @@ -924,6 +992,21 @@ ROM_END ROM_START( lilprof ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "za0356", 0x0000, 0x0400, CRC(fef9dd39) SHA1(5c9614c9c5092d55dabeee2d6e0387d50d6ad4d5) ) + + ROM_REGION( 782, "maincpu:ipla", 0 ) + ROM_LOAD( "tms0970_lilprof_ipla.pla", 0, 782, BAD_DUMP CRC(05306ef8) SHA1(60a0a3c49ce330bce0c27f15f81d61461d0432ce) ) // not verified + ROM_REGION( 860, "maincpu:mpla", 0 ) + ROM_LOAD( "tms0970_lilprof_mpla.pla", 0, 860, BAD_DUMP CRC(6ff5d51d) SHA1(59d3e5de290ba57694068ddba78d21a0c1edf427) ) // not verified + ROM_REGION( 352, "maincpu:opla", 0 ) + ROM_LOAD( "tms0970_lilprof_opla.pla", 0, 352, BAD_DUMP CRC(c74daf97) SHA1(c4948000196171b34d4fe9cdd2962a945da9883d) ) // not verified + ROM_REGION( 157, "maincpu:spla", 0 ) + ROM_LOAD( "tms0970_lilprof_spla.pla", 0, 157, CRC(56c37a4f) SHA1(18ecc20d2666e89673739056483aed5a261ae927) ) +ROM_END + + +ROM_START( lilprof78 ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "tmc1993nl", 0x0000, 0x0400, CRC(e941316b) SHA1(7e1542045d1e731cea81a639c9ac9e91bb233b15) ) @@ -989,7 +1072,8 @@ COMP( 1974, tisr16, 0, 0, tisr16, tisr16, driver_device, 0, "Tex COMP( 1976, ti1270, 0, 0, ti1270, ti1270, driver_device, 0, "Texas Instruments", "TI-1270", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) COMP( 1977, wizatron, 0, 0, wizatron, wizatron, driver_device, 0, "Texas Instruments", "Wiz-A-Tron", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1978, lilprof, 0, 0, lilprof, lilprof, driver_device, 0, "Texas Instruments", "Little Professor (1978 version)", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) // original is from 1976 +COMP( 1976, lilprof, 0, 0, lilprof, lilprof, driver_device, 0, "Texas Instruments", "Little Professor (1976 version)", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1978, lilprof78, lilprof, 0, lilprof78, lilprof78, driver_device, 0, "Texas Instruments", "Little Professor (1978 version)", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 35b59572ef860..643bd5452b8db 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -1086,6 +1086,7 @@ tiprog tibusan1 wizatron lilprof +lilprof78 ti73 // 1990 TI-73 ti74 // 1985 TI-74 ti95 // 1986 TI-95 From fdafc58deb926656c3fbf8311e3bcd9aee2ea4c1 Mon Sep 17 00:00:00 2001 From: briantro Date: Tue, 24 Mar 2015 19:39:52 -0500 Subject: [PATCH 33/41] peplus.c: Add in some rom dates & IGT game revision info - NW --- src/mame/drivers/peplus.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 0f2eb061219e4..41580b29f49c0 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -5930,7 +5930,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus) Programs Available: PP0055, X000055P, PP0723 */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xp000098.u67", 0x00000, 0x10000, CRC(12257ad8) SHA1(8f613377519850f8f711ccb827685dece018c735) ) + ROM_LOAD( "xp000098.u67", 0x00000, 0x10000, CRC(12257ad8) SHA1(8f613377519850f8f711ccb827685dece018c735) ) /* 01/29/98 @ IGT L98-0643 */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */ @@ -9075,7 +9075,7 @@ Double Bonus Poker P324A 100.20% Double Deuce Poker P236A 99.60% */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xmp00002.u67", 0x00000, 0x10000, CRC(d5624ac8) SHA1(6b778b0e7ddb81123c6038920b3447e05a0556b2) ) /* Linkable Progressive */ + ROM_LOAD( "xmp00002.u67", 0x00000, 0x10000, CRC(d5624ac8) SHA1(6b778b0e7ddb81123c6038920b3447e05a0556b2) ) /* 09/07/95 @ IGT L95-2183 - Linkable Progressive */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "xm00004p.u66", 0x00000, 0x10000, CRC(bafd160f) SHA1(7454fbf992d4d0668ef375b76ce2cae3324a5f75) ) @@ -9104,7 +9104,7 @@ Double Bonus Poker P434A 96.40% */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "xmp00004.u67", 0x00000, 0x10000, CRC(83184999) SHA1(b8483917b338be4fd3641b3990eea37072d36885) ) /* Linkable Progressive */ - /* Also known to be found with XMP00024 programs */ + /* Also known to be found with XMP00024 program */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "xm00005p.u66", 0x00000, 0x10000, CRC(c832eac7) SHA1(747d57de602b44ae1276fe1009db1b6de0d2c64c) ) @@ -9162,12 +9162,13 @@ Double Bonus Poker P325A 97.80% */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "xmp00006.u67", 0x00000, 0x10000, CRC(d61f1677) SHA1(2eca1315d6aa310a54de2dfa369e443a07495b76) ) /* 07/25/96 @ IGT L96-2041 - Linkable Progressive */ + /* Also known to be found with XMP00002 program */ ROM_REGION( 0x10000, "user1", 0 ) - ROM_LOAD( "xm00007p.u66", 0x00000, 0x10000, CRC(85a76416) SHA1(1bc3b9c2f687e68a085bfc5cf86d99fbd18cb9c7) ) + ROM_LOAD( "xm00007p.u66", 0x00000, 0x10000, CRC(85a76416) SHA1(1bc3b9c2f687e68a085bfc5cf86d99fbd18cb9c7) ) /* 03/09/96 @ IGT L96-0737 */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2233.u77", 0x00000, 0x8000, CRC(8758866a) SHA1(49146560a7e79593a2ac0378dc3b300b96ef1015) ) + ROM_LOAD( "mro-cg2233.u77", 0x00000, 0x8000, CRC(8758866a) SHA1(49146560a7e79593a2ac0378dc3b300b96ef1015) ) /* 03/07/96 @ IGT L96-0686 */ ROM_LOAD( "mgo-cg2233.u78", 0x08000, 0x8000, CRC(45ac6cfd) SHA1(25ff276320fe51c56aea0cff099be17e4ce8f404) ) ROM_LOAD( "mbo-cg2233.u79", 0x10000, 0x8000, CRC(9e9d702f) SHA1(75bb9adb49095b7cb87d2615bcf725e4a4774e25) ) ROM_LOAD( "mxo-cg2233.u80", 0x18000, 0x8000, CRC(2f05ebcb) SHA1(90d00ee4ce2dcbfbe33e221efe4db45a4e484baa) ) @@ -9221,7 +9222,7 @@ Jacks or Better BB 97.80% Double Aces & Faces ????? 99.30% */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xmp00002.u67", 0x00000, 0x10000, CRC(d5624ac8) SHA1(6b778b0e7ddb81123c6038920b3447e05a0556b2) ) /* Linkable Progressive */ + ROM_LOAD( "xmp00002.u67", 0x00000, 0x10000, CRC(d5624ac8) SHA1(6b778b0e7ddb81123c6038920b3447e05a0556b2) ) /* 09/07/95 @ IGT L95-2183 - Linkable Progressive */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "xm00009p.u66", 0x00000, 0x10000, CRC(e133d0bb) SHA1(7ed4fa335e230c28e6fc66f0c990bc7ead2b279d) ) @@ -9341,7 +9342,7 @@ The CG2298 graphics can support the following XnnnnnnP Data game types: */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) + ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) /* 09/17/97 @ IGT L97-2154 */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */ @@ -9375,7 +9376,7 @@ The CG2352 set supersedes CG2298. It's currently not known what has changed betw */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) + ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) /* 09/17/97 @ IGT L97-2154 */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "x000430p.u66", 0x00000, 0x10000, CRC(905571e3) SHA1(fd506516fed22842df8e9dbb3683dcb4c459719b) ) /* Dueces Joker Wild Poker */ @@ -9412,7 +9413,7 @@ The CG2426 set supersedes both CG2298 & CG2352 and adds graphics support for the */ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) + ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) /* 09/17/97 @ IGT L97-2154 */ ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "x002272p.u66", 0x00000, 0x10000, CRC(ee4f27b9) SHA1(1ee105430358ea27badd943bb6b18663e4029388) ) /* Black Jack Bonus Poker */ @@ -9430,7 +9431,7 @@ The CG2426 set supersedes both CG2298 & CG2352 and adds graphics support for the ROM_LOAD( "x002307p.u66", 0x00000, 0x10000, CRC(c6d5db70) SHA1(017e1e382fb789e4cd8b410362ad5e82b61f61db) ) /* Triple Double Bonus Poker */ ROM_REGION( 0x040000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2426.u77", 0x00000, 0x10000, CRC(e7622901) SHA1(f653aaf02de840aef56d3efd7680572356e94da7) ) + ROM_LOAD( "mro-cg2426.u77", 0x00000, 0x10000, CRC(e7622901) SHA1(f653aaf02de840aef56d3efd7680572356e94da7) ) /* 05/29/98 @ IGT L98-1765 */ ROM_LOAD( "mgo-cg2426.u78", 0x10000, 0x10000, CRC(5c8388a0) SHA1(c883bf7969850d07f37fa0fd58f82cda4cf15654) ) ROM_LOAD( "mbo-cg2426.u79", 0x20000, 0x10000, CRC(dc6e39aa) SHA1(7a7188757f5be25521a023d1315cfd7c395b6c25) ) ROM_LOAD( "mxo-cg2426.u80", 0x30000, 0x10000, CRC(a32f42a2) SHA1(87ddc4dda7c198ed62a2a065507efe4d3a016236) ) @@ -9488,7 +9489,7 @@ ROM_START( pexmp030 ) /* Superboard : 5-in-1 Wingboard (XMP00030) */ ROM_LOAD( "x002440p.u66", 0x00000, 0x10000, CRC(2ecb28cc) SHA1(a7b902bdfbf8f5ceedc778b8408c39ee279a1a1d) ) /* Deuces Wild Poker */ ROM_REGION( 0x040000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2426.u77", 0x00000, 0x10000, CRC(e7622901) SHA1(f653aaf02de840aef56d3efd7680572356e94da7) ) + ROM_LOAD( "mro-cg2426.u77", 0x00000, 0x10000, CRC(e7622901) SHA1(f653aaf02de840aef56d3efd7680572356e94da7) ) /* 05/29/98 @ IGT L98-1765 */ ROM_LOAD( "mgo-cg2426.u78", 0x10000, 0x10000, CRC(5c8388a0) SHA1(c883bf7969850d07f37fa0fd58f82cda4cf15654) ) ROM_LOAD( "mbo-cg2426.u79", 0x20000, 0x10000, CRC(dc6e39aa) SHA1(7a7188757f5be25521a023d1315cfd7c395b6c25) ) ROM_LOAD( "mxo-cg2426.u80", 0x30000, 0x10000, CRC(a32f42a2) SHA1(87ddc4dda7c198ed62a2a065507efe4d3a016236) ) From b248bf6cc98ad72ab8b2560745f08bbe71b180fb Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 25 Mar 2015 01:43:09 +0100 Subject: [PATCH 34/41] (MESS)New working game added ----------------- Milton Bradley Dark Tower [hap, Sean Riddle] --- src/mess/drivers/mbdtower.c | 12 ++--- src/mess/layout/mbdtower.lay | 97 ++++++++++++++++++++++++++++++++++-- 2 files changed, 99 insertions(+), 10 deletions(-) diff --git a/src/mess/drivers/mbdtower.c b/src/mess/drivers/mbdtower.c index 802db8e59dd88..412cbf3a6a7ad 100644 --- a/src/mess/drivers/mbdtower.c +++ b/src/mess/drivers/mbdtower.c @@ -92,7 +92,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) // give it some time to spin out when it's turned off if (m_r & 0x200) - m_motor_decay += (m_motor_decay < 6); + m_motor_decay += (m_motor_decay < 4); else if (m_motor_decay > 0) m_motor_decay--; else @@ -112,11 +112,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) /* 3 display cards per hole, like this: - (0) <---- display increments this way <---- (7) + (0) <---- display increments this way <---- (7) - VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void) CURSED - WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void) LOST - BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void) PLAGUE + CURSED VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void) + LOST WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void) + PLAGUE BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void) */ int card_pos = m_motor_pos >> 4 & 7; if (card_pos != (m_motor_pos_prev >> 4 & 7)) @@ -281,4 +281,4 @@ ROM_START( mbdtower ) ROM_END -CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", GAME_SUPPORTS_SAVE | GAME_MECHANICAL | GAME_NOT_WORKING ) +CONS( 1981, mbdtower, 0, 0, mbdtower, mbdtower, driver_device, 0, "Milton Bradley", "Dark Tower (Milton Bradley)", GAME_SUPPORTS_SAVE | GAME_MECHANICAL ) diff --git a/src/mess/layout/mbdtower.lay b/src/mess/layout/mbdtower.lay index aff46ef4effdc..98bbfc231a420 100644 --- a/src/mess/layout/mbdtower.lay +++ b/src/mess/layout/mbdtower.lay @@ -4,22 +4,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + From bbc7f700e2ed0b3ea3c5f43a71decf7ed1869236 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Wed, 25 Mar 2015 01:56:38 +0100 Subject: [PATCH 35/41] Fixed Gamart logo, bit 1 of port 0x10 enables transparent pen for the blitter. (nw) --- src/mame/drivers/ttchamp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 1566f15d97b9f..fe8ed6092d2fd 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -293,14 +293,14 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) m_spritesinit = 2; m_spritesaddr = offset; + } else if (m_spritesinit == 2) { // printf("%06x: spider_blitter_w %08x %04x %04x (init2) (width?)\n", space.device().safe_pc(), offset * 2, data, mem_mask); m_spriteswidth = offset & 0xff; - + m_spritesinit = 0; - } else { @@ -337,14 +337,16 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) UINT8 data; data = (src[(m_spritesaddr * 2) + 1]); - - if (data) + //data |= vram[offset] >> 8; + + /* bit 1 actually enables transparent pen */ + if (data || (m_port10 & 2) == 0) vram[offset] = (vram[offset] & 0x00ff) | data << 8; - data = src[(m_spritesaddr * 2)]; + //data |= vram[offset] & 0xff; - if (data) + if (data || (m_port10 & 2) == 0) vram[offset] = (vram[offset] & 0xff00) | data; From 5af0f58cd4de050e857aeed95f4c65c8d3210c0c Mon Sep 17 00:00:00 2001 From: arbee Date: Tue, 24 Mar 2015 21:45:11 -0400 Subject: [PATCH 36/41] Temporary Clang compile fix so the release can go on (nw) --- src/build/flags_clang.mak | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build/flags_clang.mak b/src/build/flags_clang.mak index bee1edebc1997..c92713b6a91e6 100644 --- a/src/build/flags_clang.mak +++ b/src/build/flags_clang.mak @@ -2,6 +2,9 @@ CCOMFLAGS += \ -Wno-cast-align \ -Wno-tautological-compare +# caused by dynamic_array being generally awful +CCOMFLAGS += -Wno-dynamic-class-memaccess + # caused by obj/sdl64d/emu/cpu/tms57002/tms57002.inc CCOMFLAGS += -Wno-self-assign-field From 4f599605f83e36582b8ac47d004430af01a1537f Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Wed, 25 Mar 2015 03:19:11 +0100 Subject: [PATCH 37/41] Fixed ROM bank for the blitter, one bug left (layer clearance on ranking screen, which I suspect is something to do with the blitter drawing itself) (nw) --- src/mame/drivers/ttchamp.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index fe8ed6092d2fd..62346ae130a26 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -90,6 +90,7 @@ class ttchamp_state : public driver_device UINT16 m_port10; + UINT8 m_rombank; DECLARE_DRIVER_INIT(ttchamp); @@ -104,7 +105,6 @@ class ttchamp_state : public driver_device - UINT16 m_mainram[0x10000 / 2]; int m_spritesinit; @@ -299,8 +299,9 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) { // printf("%06x: spider_blitter_w %08x %04x %04x (init2) (width?)\n", space.device().safe_pc(), offset * 2, data, mem_mask); m_spriteswidth = offset & 0xff; + //printf("%08x\n",(offset*2) & 0xfff00); - m_spritesinit = 0; + m_spritesinit = 3; } else { @@ -314,12 +315,20 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_mem_w) } else if ((offset >= 0x30000 / 2) && (offset < 0x40000 / 2)) { + if(m_spritesinit != 3) + { + printf("blitter bus write but blitter unselected? %08x %04x\n",offset*2,data); + return; + } + + m_spritesinit = 0; + // 0x30000-0x3ffff used, on Spider it's 0x20000-0x2ffff offset &= 0x7fff; UINT8 *src = m_rom8; - if (m_port10 & 2) // NO, wrong for the portraits + if (m_rombank) src += 0x100000; // printf("%06x: spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", space.device().safe_pc(), offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr); @@ -371,8 +380,10 @@ static ADDRESS_MAP_START( ttchamp_map, AS_PROGRAM, 16, ttchamp_state ) AM_RANGE(0x00000, 0xfffff) AM_READWRITE(ttchamp_mem_r, ttchamp_mem_w) ADDRESS_MAP_END +/* Re-use same parameters as before (one-shot) */ READ16_MEMBER(ttchamp_state::port1e_r) { + m_spritesinit = 3; return 0xff; } @@ -401,26 +412,22 @@ WRITE16_MEMBER(ttchamp_state::port10_w) printf("Check me, i/o 0x10 used with %02x\n",res); } +/* selects upper bank for the blitter */ WRITE16_MEMBER(ttchamp_state::port20_w) { printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); - // seems to somehow be tied to layer clear - // might also depend on layer selected with 0x10 tho? written after it - /*for (int i = 0; i < 0x8000; i++) - { - // m_videoram0[i] = 0x0000; - m_videoram2[i] = 0x0000; - }*/ - + m_rombank = 1; } +/* selects lower bank for the blitter */ WRITE16_MEMBER(ttchamp_state::port62_w) { printf("%06x: port62_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); + m_rombank = 0; } static ADDRESS_MAP_START( ttchamp_io, AS_IO, 16, ttchamp_state ) - AM_RANGE(0x0000, 0x0001) AM_WRITENOP // startup only + AM_RANGE(0x0000, 0x0001) AM_WRITENOP // startup only, nmi enable? AM_RANGE(0x0002, 0x0003) AM_READ_PORT("SYSTEM") AM_RANGE(0x0004, 0x0005) AM_READ_PORT("P1_P2") From ac58efacf7a9a6781c2bcd5448754da52df1b776 Mon Sep 17 00:00:00 2001 From: briantro Date: Tue, 24 Mar 2015 21:25:58 -0500 Subject: [PATCH 38/41] peplus.c: Found some documentation to correct the Hit Frequency for the Black Jack Bonus sets - NW --- src/mame/drivers/peplus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 41580b29f49c0..71a334615031c 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -8020,7 +8020,7 @@ Black Jack as in Jack of Spades/Clubs, not 21 With With PayTable Js+ 2PR STR FL FH 4K SF 4K 4K 4A 4K 4K 4A RF (Bonus) ----------------------------------------------------------------------------- P870BB 1 1 3 4 7 9 50 25 80 160 160 400 400 400 800 - % Range: 95.4-97.4% Optimum: 99.4% Hit Frequency: ???% + % Range: 95.4-97.4% Optimum: 99.4% Hit Frequency: 43.2% Programs Available: X002272P */ ROM_REGION( 0x10000, "maincpu", 0 ) @@ -8047,7 +8047,7 @@ Black Jack as in Jack of Spades/Clubs, not 21 With With PayTable Js+ 2PR STR FL FH 4K SF 4K 4K 4A 4K 4K 4A RF (Bonus) ----------------------------------------------------------------------------- P873BB 1 1 3 4 5 8 50 25 80 160 160 400 400 400 800 - % Range: 92.0-94.0% Optimum: 96.0% Hit Frequency: ???% + % Range: 92.0-94.0% Optimum: 96.0% Hit Frequency: 44.8% Programs Available: X002275P */ ROM_REGION( 0x10000, "maincpu", 0 ) @@ -8074,7 +8074,7 @@ Black Jack as in Jack of Spades/Clubs, not 21 With With PayTable Js+ 2PR STR FL FH 4K SF 4K 4K 4A 4K 4K 4A RF (Bonus) ----------------------------------------------------------------------------- P874BB 1 1 3 4 5 7 50 25 80 160 160 400 400 400 800 - % Range: 91.0-93.0% Optimum: 95.0% Hit Frequency: ???% + % Range: 91.0-93.0% Optimum: 95.0% Hit Frequency: 44.9% Programs Available: X002276P */ ROM_REGION( 0x10000, "maincpu", 0 ) From f539fa4aee152a04432355999a851e9ae65c7411 Mon Sep 17 00:00:00 2001 From: Justin Kerk Date: Wed, 25 Mar 2015 02:31:38 +0000 Subject: [PATCH 39/41] Copy-paste error (nw) --- src/emu/machine/machine.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/machine/machine.mak b/src/emu/machine/machine.mak index 85bfb92139d23..29992b87de58d 100644 --- a/src/emu/machine/machine.mak +++ b/src/emu/machine/machine.mak @@ -1369,7 +1369,7 @@ endif #------------------------------------------------- # -#@src/emu/machine/64h156.h,MACHINES += RP5C15 +#@src/emu/machine/64h156.h,MACHINES += R64H156 #------------------------------------------------- ifneq ($(filter R64H156,$(MACHINES)),) From fda60d87eb9228d923fd33130671b2c5de881683 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 25 Mar 2015 15:18:21 +1100 Subject: [PATCH 40/41] Add transliteration of Chinese title for bgareggabla --- src/mame/drivers/toaplan2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 5d7bf8b8c7484..e3cb8ce25cbb9 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -5370,7 +5370,7 @@ GAME( 1996, bgaregganv, bgaregga, bgaregga, bgareggahk, toaplan2_state, bgaregga GAME( 1996, bgareggat2, bgaregga, bgaregga, bgaregga, toaplan2_state, bgaregga, ROT270, "Raizing / Eighting", "Battle Garegga - Type 2 (Europe / USA / Japan / Asia) (Sat Mar 2 1996)" , GAME_SUPPORTS_SAVE ) // displays Type 2 only when set to Europe GAME( 1996, bgareggacn, bgaregga, bgaregga, bgareggacn, toaplan2_state, bgaregga, ROT270, "Raizing / Eighting", "Battle Garegga - Type 2 (Denmark / China) (Tue Apr 2 1996)", GAME_SUPPORTS_SAVE ) // displays Type 2 only when set to Denmark GAME( 1996, bgareggabl, bgaregga, bgareggabl,bgareggacn, toaplan2_state,bgaregga, ROT270, "bootleg", "1945 Part-2 (Chinese hack of Battle Garegga)", GAME_SUPPORTS_SAVE ) -GAME( 1996, bgareggabla,bgaregga, bgareggabl,bgareggacn, toaplan2_state,bgaregga, ROT270, "bootleg", "Thunder Deity Biography (Chinese hack of Battle Garegga)", GAME_SUPPORTS_SAVE ) +GAME( 1996, bgareggabla,bgaregga, bgareggabl,bgareggacn, toaplan2_state,bgaregga, ROT270, "bootleg", "Lei Shen Zhuan Thunder Deity Biography (Chinese hack of Battle Garegga)", GAME_SUPPORTS_SAVE ) // these are all based on Version B, even if only the Japan version states 'version B' GAME( 1998, batrider, 0, batrider, batrider, toaplan2_state, batrider, ROT270, "Raizing / Eighting", "Armed Police Batrider (Europe) (Fri Feb 13 1998)", GAME_SUPPORTS_SAVE ) From 0147bb4cc82e642cf75151f039f240eb20989fbc Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 25 Mar 2015 08:16:51 +0100 Subject: [PATCH 41/41] Cleanups and version bump --- hash/nes.xml | 4 +- hash/pasogo.xml | 2 +- src/emu/bus/a2bus/ezcgi.c | 5 +- src/emu/bus/scsi/omti5100.c | 4 +- src/emu/cpu/hmcs40/hmcs40.c | 72 +-- src/emu/cpu/hmcs40/hmcs40.h | 4 +- src/emu/cpu/hmcs40/hmcs40d.c | 90 +-- src/emu/cpu/hmcs40/hmcs40op.inc | 10 +- src/emu/cpu/i386/i386ops.h | 2 +- src/emu/cpu/i386/pentops.inc | 8 +- src/emu/cpu/nec/v53.c | 49 +- src/emu/cpu/nec/v53.h | 32 +- src/emu/cpu/pic16c5x/pic16c5x.c | 2 +- src/emu/cpu/pic16c5x/pic16c5x.h | 4 +- src/emu/cpu/z80/kl5c80a12.c | 12 +- src/emu/cpu/z80/kl5c80a12.h | 12 +- src/emu/machine/am9517a.c | 40 +- src/emu/machine/am9517a.h | 2 +- src/emu/machine/i8251.c | 132 ++-- src/emu/machine/i8257.c | 2 +- src/emu/machine/mcf5206e.c | 2 +- src/emu/machine/tmp68301.c | 2 +- src/emu/machine/upd71071.c | 10 +- src/emu/machine/vrc4373.c | 9 +- src/emu/machine/vrc4373.h | 16 +- src/emu/mame.c | 4 +- src/emu/render.c | 6 +- src/emu/sound/es1373.h | 40 +- src/emu/sound/flt_rc.c | 2 +- src/emu/sound/okim9810.c | 4 +- src/emu/sound/okim9810.h | 2 +- src/emu/video.c | 2 +- src/emu/video.h | 4 +- src/emu/video/tms34061.c | 4 +- src/emu/video/voodoo_pci.c | 2 +- src/lib/formats/d88_dsk.c | 4 +- src/lib/formats/flex_dsk.c | 2 +- src/lib/formats/fmtowns_dsk.c | 4 +- src/lib/formats/nfd_dsk.c | 4 +- src/mame/audio/hng64.c | 24 +- src/mame/drivers/argus.c | 6 +- src/mame/drivers/astrcorp.c | 160 ++--- src/mame/drivers/cabal.c | 2 +- src/mame/drivers/capbowl.c | 2 +- src/mame/drivers/cocoloco.c | 10 +- src/mame/drivers/dynax.c | 18 +- src/mame/drivers/fgoal.c | 2 +- src/mame/drivers/flyball.c | 14 +- src/mame/drivers/goldstar.c | 44 +- src/mame/drivers/hng64.c | 7 +- src/mame/drivers/hotblock.c | 8 +- src/mame/drivers/iteagle.c | 12 +- src/mame/drivers/jankenmn.c | 4 +- src/mame/drivers/jchan.c | 6 +- src/mame/drivers/junofrst.c | 4 +- src/mame/drivers/m72.c | 14 +- src/mame/drivers/madalien.c | 2 +- src/mame/drivers/mgolf.c | 12 +- src/mame/drivers/neogeo.c | 26 +- src/mame/drivers/neogeo_noslot.c | 28 +- src/mame/drivers/paradise.c | 2 +- src/mame/drivers/peplus.c | 2 +- src/mame/drivers/playmark.c | 6 +- src/mame/drivers/psychic5.c | 8 +- src/mame/drivers/pturn.c | 8 +- src/mame/drivers/re900.c | 8 +- src/mame/drivers/rltennis.c | 2 +- src/mame/drivers/sandscrp.c | 10 +- src/mame/drivers/scobra.c | 1 - src/mame/drivers/seta.c | 56 +- src/mame/drivers/seta2.c | 2 +- src/mame/drivers/shougi.c | 8 +- src/mame/drivers/sidearms.c | 8 +- src/mame/drivers/simple_st0016.c | 6 +- src/mame/drivers/sothello.c | 6 +- src/mame/drivers/speglsht.c | 6 +- src/mame/drivers/srmp2.c | 20 +- src/mame/drivers/srmp5.c | 6 +- src/mame/drivers/srmp6.c | 8 +- src/mame/drivers/srumbler.c | 14 +- src/mame/drivers/sstrangr.c | 8 +- src/mame/drivers/ssv.c | 2 +- src/mame/drivers/sub.c | 8 +- src/mame/drivers/suna16.c | 26 +- src/mame/drivers/suna8.c | 22 +- src/mame/drivers/supdrapo.c | 10 +- src/mame/drivers/supertnk.c | 8 +- src/mame/drivers/superwng.c | 6 +- src/mame/drivers/suprgolf.c | 30 +- src/mame/drivers/suprslam.c | 4 +- src/mame/drivers/tankbust.c | 8 +- src/mame/drivers/taotaido.c | 2 +- src/mame/drivers/tbowl.c | 2 +- src/mame/drivers/tgtpanic.c | 10 +- src/mame/drivers/thunderx.c | 2 +- src/mame/drivers/tryout.c | 4 +- src/mame/drivers/tsamurai.c | 6 +- src/mame/drivers/ttchamp.c | 57 +- src/mame/drivers/tugboat.c | 10 +- src/mame/drivers/twins.c | 34 +- src/mame/drivers/usgames.c | 4 +- src/mame/drivers/vamphalf.c | 6 +- src/mame/drivers/vigilant.c | 4 +- src/mame/drivers/wc90b.c | 2 +- src/mame/drivers/xain.c | 4 +- src/mame/drivers/xtheball.c | 12 +- src/mame/includes/argus.h | 26 +- src/mame/includes/bbusters.h | 8 +- src/mame/includes/cabal.h | 10 +- src/mame/includes/capbowl.h | 12 +- src/mame/includes/fgoal.h | 4 +- src/mame/includes/hng64.h | 5 +- src/mame/includes/ironhors.h | 8 +- src/mame/includes/mosaic.h | 10 +- src/mame/includes/paradise.h | 4 +- src/mame/includes/pooyan.h | 8 +- src/mame/includes/psychic5.h | 6 +- src/mame/includes/realbrk.h | 2 +- src/mame/includes/rltennis.h | 4 +- src/mame/includes/seta2.h | 4 +- src/mame/includes/shuuz.h | 10 +- src/mame/includes/sidearms.h | 6 +- src/mame/includes/simple_st0016.h | 4 +- src/mame/includes/speedbal.h | 2 +- src/mame/includes/srmp2.h | 4 +- src/mame/includes/srumbler.h | 8 +- src/mame/includes/ssozumo.h | 12 +- src/mame/includes/ssrj.h | 8 +- src/mame/includes/ssv.h | 10 +- src/mame/includes/subs.h | 10 +- src/mame/includes/suna16.h | 12 +- src/mame/includes/suprloco.h | 10 +- src/mame/includes/suprridr.h | 12 +- src/mame/includes/tankbatt.h | 14 +- src/mame/includes/tankbust.h | 14 +- src/mame/includes/taotaido.h | 10 +- src/mame/includes/tbowl.h | 8 +- src/mame/includes/thunderx.h | 2 +- src/mame/includes/timelimt.h | 8 +- src/mame/includes/tryout.h | 6 +- src/mame/includes/tsamurai.h | 24 +- src/mame/includes/usgames.h | 4 +- src/mame/includes/vigilant.h | 4 +- src/mame/includes/vulgus.h | 2 +- src/mame/includes/wc90b.h | 6 +- src/mame/machine/hng64_net.c | 2 +- src/mame/machine/iteagle_fpga.c | 24 +- src/mame/machine/iteagle_fpga.h | 2 +- src/mame/mame.lst | 12 +- src/mame/video/bbusters.c | 4 +- src/mame/video/deadang.c | 2 +- src/mame/video/decmxc06.c | 6 +- src/mame/video/dynax.c | 10 +- src/mame/video/hng64.c | 3 +- src/mame/video/hng64_3d.c | 10 +- src/mame/video/hng64_sprite.c | 1 - src/mame/video/jalblend.c | 2 +- src/mame/video/jalblend.h | 8 +- src/mame/video/pc080sn.c | 2 +- src/mame/video/psychic5.c | 12 +- src/mame/video/realbrk.c | 2 +- src/mame/video/rltennis.c | 2 +- src/mame/video/seta001.c | 2 +- src/mame/video/seta2.c | 4 +- src/mame/video/sidearms.c | 2 +- src/mame/video/srumbler.c | 2 +- src/mame/video/ssv.c | 4 +- src/mame/video/suna16.c | 2 +- src/mame/video/suprloco.c | 2 +- src/mame/video/suprridr.c | 2 +- src/mame/video/tankbust.c | 2 +- src/mame/video/tbowl.c | 2 +- src/mame/video/thedeep.c | 1 - src/mame/video/timelimt.c | 2 +- src/mame/video/tryout.c | 2 +- src/mame/video/tsamurai.c | 6 +- src/mame/video/vulgus.c | 2 +- src/mame/video/xain.c | 2 +- src/mess/audio/gamate.c | 6 +- src/mess/drivers/a7800.c | 10 +- src/mess/drivers/apple2.c | 6 +- src/mess/drivers/apple2e.c | 6 +- src/mess/drivers/gamate.c | 11 +- src/mess/drivers/hh_hmcs40.c | 50 +- src/mess/drivers/hh_pic16.c | 14 +- src/mess/drivers/hh_tms1k.c | 70 +-- src/mess/drivers/hh_ucom4.c | 48 +- src/mess/drivers/imds2.c | 910 ++++++++++++++-------------- src/mess/drivers/mbdtower.c | 32 +- src/mess/drivers/snes.c | 6 +- src/mess/drivers/ticalc1x.c | 20 +- src/mess/drivers/tispeak.c | 10 +- src/mess/includes/hh_tms1k.h | 6 +- src/mess/includes/imds2.h | 198 +++--- src/mess/layout/mbdtower.lay | 4 +- src/mess/mess.mak | 34 +- src/osd/modules/opengl/osd_opengl.h | 10 +- src/osd/modules/osdwindow.h | 6 +- src/osd/modules/render/draw13.c | 2 +- src/osd/modules/render/drawogl.c | 80 +-- src/osd/sdl/sdl.mak | 4 +- src/osd/sdl/video.h | 8 +- src/osd/sdl/window.c | 4 +- src/osd/windows/video.h | 8 +- src/osd/windows/windows.mak | 4 +- src/version.c | 2 +- 206 files changed, 1754 insertions(+), 1773 deletions(-) diff --git a/hash/nes.xml b/hash/nes.xml index cac46e99d0341..d007b53569bf4 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -57391,7 +57391,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx Union Bond - + @@ -75420,7 +75420,7 @@ be better to redump them properly. --> 19?? <unknown> - + diff --git a/hash/pasogo.xml b/hash/pasogo.xml index e1242fb909fd3..b254466995790 100644 --- a/hash/pasogo.xml +++ b/hash/pasogo.xml @@ -9,7 +9,7 @@ 歴代棋聖戦名曲集 (Rekidai Kisei Sen Meikyokushuu) 棋界覇王伝・古典編 (Kikai Haoh Den - Koten-hen) 棋界覇王伝・現代編 (Kikai Haoh Den - Gendai-hen) - + The undumped cart numbers are KS-1005, KS-1006, KS-1007 and KS-1008 For the remaining undumped games, the game to cart number match is unknown. --> diff --git a/src/emu/bus/a2bus/ezcgi.c b/src/emu/bus/a2bus/ezcgi.c index d7a9cf3d469c7..3c3a937b781e9 100644 --- a/src/emu/bus/a2bus/ezcgi.c +++ b/src/emu/bus/a2bus/ezcgi.c @@ -43,7 +43,7 @@ MACHINE_CONFIG_END #define MSX2_VISIBLE_YBORDER_PIXELS 14 * 2 MACHINE_CONFIG_FRAGMENT( ezcgi9938 ) - MCFG_V9938_ADD(TMS_TAG, SCREEN_TAG, 0x30000) // 192K of VRAM + MCFG_V9938_ADD(TMS_TAG, SCREEN_TAG, 0x30000) // 192K of VRAM MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(a2bus_ezcgi_9938_device, tms_irq_w)) MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) @@ -57,7 +57,7 @@ MACHINE_CONFIG_FRAGMENT( ezcgi9938 ) MACHINE_CONFIG_END MACHINE_CONFIG_FRAGMENT( ezcgi9958 ) - MCFG_V9958_ADD(TMS_TAG, SCREEN_TAG, 0x30000) // 192K of VRAM + MCFG_V9958_ADD(TMS_TAG, SCREEN_TAG, 0x30000) // 192K of VRAM MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(a2bus_ezcgi_9958_device, tms_irq_w)) MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) @@ -311,4 +311,3 @@ WRITE_LINE_MEMBER( a2bus_ezcgi_9958_device::tms_irq_w ) lower_slot_irq(); } } - diff --git a/src/emu/bus/scsi/omti5100.c b/src/emu/bus/scsi/omti5100.c index a3f00560f737e..0d7ed1567ab5f 100644 --- a/src/emu/bus/scsi/omti5100.c +++ b/src/emu/bus/scsi/omti5100.c @@ -20,8 +20,8 @@ const rom_entry *omti5100_device::device_rom_region() const omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : scsihd_device(mconfig, OMTI5100, "OMTI 5100", tag, owner, clock, "omti5100", __FILE__), - m_image0(*this, "image0"), - m_image1(*this, "image1") + m_image0(*this, "image0"), + m_image1(*this, "image1") { } diff --git a/src/emu/cpu/hmcs40/hmcs40.c b/src/emu/cpu/hmcs40/hmcs40.c index c279f07aec0ad..da87812906977 100644 --- a/src/emu/cpu/hmcs40/hmcs40.c +++ b/src/emu/cpu/hmcs40/hmcs40.c @@ -187,7 +187,7 @@ void hmcs40_cpu_device::device_start() m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hmcs40_cpu_device::simple_timer_cb), this)); reset_prescaler(); - + m_read_r0.resolve_safe(0); m_read_r1.resolve_safe(0); m_read_r2.resolve_safe(0); @@ -196,7 +196,7 @@ void hmcs40_cpu_device::device_start() m_read_r5.resolve_safe(0); m_read_r6.resolve_safe(0); m_read_r7.resolve_safe(0); - + m_write_r0.resolve_safe(); m_write_r1.resolve_safe(); m_write_r2.resolve_safe(); @@ -290,15 +290,15 @@ void hmcs40_cpu_device::device_reset() { m_pc = m_pcmask; m_prev_op = m_op = 0; - + // clear i/o m_d = m_polarity; for (int i = 0; i < 16; i++) hmcs40_cpu_device::write_d(i, 0); - + for (int i = 0; i < 8; i++) hmcs40_cpu_device::write_r(i, 0); - + // clear interrupts m_cf = 0; m_ie = 0; @@ -316,7 +316,7 @@ UINT8 hmcs40_cpu_device::read_r(int index) { index &= 7; UINT8 inp = 0; - + switch (index) { case 0: inp = m_read_r0(index, 0xff); break; @@ -328,7 +328,7 @@ UINT8 hmcs40_cpu_device::read_r(int index) case 6: inp = m_read_r6(index, 0xff); break; case 7: inp = m_read_r7(index, 0xff); break; } - + return ((inp ^ m_polarity) | m_r[index]) & 0xf; } @@ -337,7 +337,7 @@ void hmcs40_cpu_device::write_r(int index, UINT8 data) index &= 7; data = (data ^ m_polarity) & 0xf; m_r[index] = data; - + switch (index) { case 0: m_write_r0(index, data, 0xff); break; @@ -354,7 +354,7 @@ void hmcs40_cpu_device::write_r(int index, UINT8 data) int hmcs40_cpu_device::read_d(int index) { index &= 15; - + return ((m_read_d(index, 0xffff) ^ m_polarity) | m_d) >> index & 1; } @@ -362,7 +362,7 @@ void hmcs40_cpu_device::write_d(int index, int state) { index &= 15; state = (((state) ? 1 : 0) ^ m_polarity) & 1; - + m_d = (m_d & ~(1 << index)) | state << index; m_write_d(index, m_d, 0xffff); } @@ -374,7 +374,7 @@ void hmcs40_cpu_device::write_d(int index, int state) UINT8 hmcs43_cpu_device::read_r(int index) { index &= 7; - + if (index >= 2) logerror("%s read from %s port R%d at $%04X\n", tag(), (index >= 4) ? "unknown" : "output", index, m_prev_pc); @@ -394,7 +394,7 @@ void hmcs43_cpu_device::write_r(int index, UINT8 data) int hmcs43_cpu_device::read_d(int index) { index &= 15; - + if (index >= 4) logerror("%s read from output pin D%d at $%04X\n", tag(), index, m_prev_pc); @@ -408,10 +408,10 @@ int hmcs43_cpu_device::read_d(int index) UINT8 hmcs44_cpu_device::read_r(int index) { index &= 7; - + if (index >= 6) logerror("%s read from unknown port R%d at $%04X\n", tag(), index, m_prev_pc); - + return hmcs40_cpu_device::read_r(index); } @@ -432,10 +432,10 @@ void hmcs44_cpu_device::write_r(int index, UINT8 data) UINT8 hmcs45_cpu_device::read_r(int index) { index &= 7; - + if (index >= 6) logerror("%s read from %s port R%d at $%04X\n", tag(), (index == 7) ? "unknown" : "output", index, m_prev_pc); - + return hmcs40_cpu_device::read_r(index); } @@ -460,10 +460,10 @@ void hmcs40_cpu_device::do_interrupt() m_icount--; push_stack(); m_ie = 0; - + // line 0/1 for external interrupt, let's use 2 for t/c interrupt int line = (m_iri) ? m_eint_line : 2; - + // vector $3f, on page 0(timer/counter), or page 1(external) // external interrupt has priority over t/c interrupt m_pc = 0x3f | (m_iri ? 0x40 : 0); @@ -480,7 +480,7 @@ void hmcs40_cpu_device::execute_set_input(int line, int state) if (line != 0 && line != 1) return; state = (state) ? 1 : 0; - + // external interrupt request on rising edge if (state && !m_int[line]) { @@ -490,12 +490,12 @@ void hmcs40_cpu_device::execute_set_input(int line, int state) m_iri = 1; m_if[line] = 1; } - + // clock tc if it is in counter mode if (m_cf && line == 1) increment_tc(); } - + m_int[line] = state; } @@ -511,7 +511,7 @@ TIMER_CALLBACK_MEMBER( hmcs40_cpu_device::simple_timer_cb ) // timer prescaler overflow if (!m_cf) increment_tc(); - + reset_prescaler(); } @@ -519,7 +519,7 @@ void hmcs40_cpu_device::increment_tc() { // increment timer/counter m_tc = (m_tc + 1) & 0xf; - + // timer interrupt request on overflow if (m_tc == 0 && !m_tf) { @@ -554,7 +554,7 @@ void hmcs40_cpu_device::execute_run() while (m_icount > 0) { m_icount--; - + // LPU is handled 1 cycle later if ((m_prev_op & 0x3e0) == 0x340) { @@ -571,7 +571,7 @@ void hmcs40_cpu_device::execute_run() // remember previous state m_prev_op = m_op; m_prev_pc = m_pc; - + // fetch next opcode debugger_instruction_hook(this, m_pc); m_op = m_program->read_word(m_pc << 1) & 0x3ff; @@ -582,7 +582,7 @@ void hmcs40_cpu_device::execute_run() switch (m_op) { /* 0x000 */ - + case 0x000: case 0x001: case 0x002: case 0x003: op_xsp(); break; case 0x004: case 0x005: case 0x006: case 0x007: @@ -602,7 +602,7 @@ void hmcs40_cpu_device::execute_run() op_am(); break; case 0x03c: op_lta(); break; - + case 0x040: op_lxa(); break; case 0x045: @@ -626,7 +626,7 @@ void hmcs40_cpu_device::execute_run() case 0x070: case 0x071: case 0x072: case 0x073: case 0x074: case 0x075: case 0x076: case 0x077: case 0x078: case 0x079: case 0x07a: case 0x07b: case 0x07c: case 0x07d: case 0x07e: case 0x07f: op_lai(); break; - + case 0x080: case 0x081: case 0x082: case 0x083: case 0x084: case 0x085: case 0x086: case 0x087: case 0x088: case 0x089: case 0x08a: case 0x08b: case 0x08c: case 0x08d: case 0x08e: case 0x08f: op_ai(); break; @@ -655,10 +655,10 @@ void hmcs40_cpu_device::execute_run() case 0x0f0: case 0x0f1: case 0x0f2: case 0x0f3: case 0x0f4: case 0x0f5: case 0x0f6: case 0x0f7: case 0x0f8: case 0x0f9: case 0x0fa: case 0x0fb: case 0x0fc: case 0x0fd: case 0x0fe: case 0x0ff: op_xamr(); break; - - + + /* 0x100 */ - + case 0x110: case 0x111: op_lmaiy(); break; case 0x114: case 0x115: @@ -682,7 +682,7 @@ void hmcs40_cpu_device::execute_run() case 0x170: case 0x171: case 0x172: case 0x173: case 0x174: case 0x175: case 0x176: case 0x177: case 0x178: case 0x179: case 0x17a: case 0x17b: case 0x17c: case 0x17d: case 0x17e: case 0x17f: op_lti(); break; - + case 0x1a0: op_tif1(); break; case 0x1a1: @@ -706,7 +706,7 @@ void hmcs40_cpu_device::execute_run() /* 0x200 */ - + case 0x200: case 0x201: case 0x202: case 0x203: op_tm(); break; case 0x204: case 0x205: case 0x206: case 0x207: @@ -728,7 +728,7 @@ void hmcs40_cpu_device::execute_run() op_alem(); break; case 0x23c: op_lat(); break; - + case 0x240: op_laspx(); break; case 0x244: @@ -804,8 +804,8 @@ void hmcs40_cpu_device::execute_run() case 0x3f0: case 0x3f1: case 0x3f2: case 0x3f3: case 0x3f4: case 0x3f5: case 0x3f6: case 0x3f7: case 0x3f8: case 0x3f9: case 0x3fa: case 0x3fb: case 0x3fc: case 0x3fd: case 0x3fe: case 0x3ff: op_cal(); break; - - + + default: op_illegal(); break; } /* big switch */ diff --git a/src/emu/cpu/hmcs40/hmcs40.h b/src/emu/cpu/hmcs40/hmcs40.h index 6dd5166df878c..a7e3417330674 100644 --- a/src/emu/cpu/hmcs40/hmcs40.h +++ b/src/emu/cpu/hmcs40/hmcs40.h @@ -182,7 +182,7 @@ class hmcs40_cpu_device : public cpu_device int m_eint_line; // which input_line caused an interrupt emu_timer *m_timer; int m_icount; - + UINT16 m_pc; // Program Counter UINT16 m_prev_pc; UINT8 m_page; // LPU prepared page @@ -213,7 +213,7 @@ class hmcs40_cpu_device : public cpu_device // misc internal helpers void increment_pc(); - + UINT8 ram_r(); void ram_w(UINT8 data); void pop_stack(); diff --git a/src/emu/cpu/hmcs40/hmcs40d.c b/src/emu/cpu/hmcs40/hmcs40d.c index e16fa8ed61850..d01382e0b8d0b 100644 --- a/src/emu/cpu/hmcs40/hmcs40d.c +++ b/src/emu/cpu/hmcs40/hmcs40d.c @@ -3,7 +3,7 @@ /* Hitachi HMCS40 MCU family disassembler - + NOTE: start offset(basepc) is $3F, not 0 */ @@ -92,42 +92,42 @@ static const UINT8 hmcs40_mnemonic[0x400] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x000 */ - mNOP, mXSP, mXSP, mXSP, mSEM, mSEM, mSEM, mSEM, mLAM, mLAM, mLAM, mLAM, m, m, m, m, + mNOP, mXSP, mXSP, mXSP, mSEM, mSEM, mSEM, mSEM, mLAM, mLAM, mLAM, mLAM, m, m, m, m, mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY,mLMIIY, - mLBM, mLBM, mLBM, mLBM, mBLEM, m, m, m, m, m, m, m, m, m, m, m, - mAMC, m, m, m, mAM, m, m, m, m, m, m, m, mLTA, m, m, m, + mLBM, mLBM, mLBM, mLBM, mBLEM, m, m, m, m, m, m, m, m, m, m, m, + mAMC, m, m, m, mAM, m, m, m, m, m, m, m, mLTA, m, m, m, /* 0x040 */ mLXA, m, m, m, m, mDAS, mDAA, m, m, m, m, m, mREC, m, m, mSEC, - mLYA, m, m, m, mIY, m, m, m, mAYY, m, m, m, m, m, m, m, - mLBA, m, m, m, mIB, m, m, m, m, m, m, m, m, m, m, m, + mLYA, m, m, m, mIY, m, m, m, mAYY, m, m, m, m, m, m, m, + mLBA, m, m, m, mIB, m, m, m, m, m, m, m, m, m, m, m, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, mLAI, /* 0x080 */ mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, mAI, - mSED, m, m, m, mTD, m, m, m, m, m, m, m, m, m, m, m, - mSEIF1,mSECF, mSEIF0,m, mSEIE, mSETF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mSED, m, m, m, mTD, m, m, m, m, m, m, m, m, m, m, m, + mSEIF1,mSECF, mSEIF0,m, mSEIE, mSETF, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x0c0 */ - mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, m, m, m, m, m, m, m, m, + mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, mLAR, m, m, m, m, m, m, m, m, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, mSEDD, - mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, m, m, m, m, m, m, m, m, + mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, mLBR, m, m, m, m, m, m, m, m, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, mXAMR, /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x100 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mLMAIY,mLMAIY,m, m, mLMADY,mLMADY,m, m, mLAY, m, m, m, m, m, m, m, - mOR, m, m, m, mANEM, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mLMAIY,mLMAIY,m, m, mLMADY,mLMADY,m, m, mLAY, m, m, m, m, m, m, m, + mOR, m, m, m, mANEM, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x140 */ mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLXI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLYI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLBI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, mLTI, /* 0x180 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mTIF1, mTI1, mTIF0, mTI0, m, mTTF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mTIF1, mTI1, mTIF0, mTI0, m, mTTF, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x1c0 */ mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, mBR, @@ -136,42 +136,42 @@ static const UINT8 hmcs40_mnemonic[0x400] = /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x200 */ - mTM, mTM, mTM, mTM, mREM, mREM, mREM, mREM, mXMA, mXMA, mXMA, mXMA, m, m, m, m, + mTM, mTM, mTM, mTM, mREM, mREM, mREM, mREM, mXMA, mXMA, mXMA, mXMA, m, m, m, m, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, mMNEI, - mXMB, mXMB, mXMB, mXMB, mROTR, mROTL, m, m, m, m, m, m, m, m, m, m, - mSMC, m, m, m, mALEM, m, m, m, m, m, m, m, mLAT, m, m, m, + mXMB, mXMB, mXMB, mXMB, mROTR, mROTL, m, m, m, m, m, m, m, m, m, m, + mSMC, m, m, m, mALEM, m, m, m, m, m, m, m, mLAT, m, m, m, /* 0x240 */ mLASPX,m, m, m, mNEGA, m, m, m, m, m, m, m, m, m, m, mTC, - mLASPY,m, m, m, mDY, m, m, m, mSYY, m, m, m, m, m, m, m, - mLAB, m, m, m, m, m, m, mDB, m, m, m, m, m, m, m, m, + mLASPY,m, m, m, mDY, m, m, m, mSYY, m, m, m, m, m, m, m, + mLAB, m, m, m, m, m, m, mDB, m, m, m, m, m, m, m, m, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, mALEI, /* 0x280 */ mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, mYNEI, - mRED, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mREIF1,mRECF, mREIF0,m, mREIE, mRETF, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mRED, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mREIF1,mRECF, mREIF0,m, mREIE, mRETF, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x2c0 */ - mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, m, m, m, m, m, m, m, m, + mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, mLRA, m, m, m, m, m, m, m, m, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, mREDD, - mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, mLRB, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0x300 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - mCOMB, m, m, m, mBNEM, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + mCOMB, m, m, m, mBNEM, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x340 */ mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mLPU, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mTBR, mP, mP, mP, mP, mP, mP, mP, mP, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x380 */ - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, - m, m, m, m, mRTNI, m, m, mRTN, m, m, m, m, m, m, m, m, - m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, + m, m, m, m, mRTNI, m, m, mRTN, m, m, m, m, m, m, m, m, + m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, m, /* 0x3c0 */ mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, mCAL, @@ -188,7 +188,7 @@ CPU_DISASSEMBLE(hmcs40) char *dst = buffer; UINT8 instr = hmcs40_mnemonic[op]; INT8 bits = s_bits[instr]; - + // special case for (XY) opcode if (bits == 99) { @@ -202,12 +202,12 @@ CPU_DISASSEMBLE(hmcs40) else { dst += sprintf(dst, "%-6s ", s_mnemonics[instr]); - + // opcode parameter if (bits != 0) { UINT8 param = op; - + // reverse bits if (bits < 0) { @@ -215,16 +215,16 @@ CPU_DISASSEMBLE(hmcs40) param >>= (8 + bits); bits = -bits; } - + param &= ((1 << bits) - 1); - + if (bits > 5) dst += sprintf(dst, "$%02X", param); else dst += sprintf(dst, "%d", param); } } - + int pos = s_next_pc[pc & 0x3f] & DASMFLAG_LENGTHMASK; return pos | s_flags[instr] | DASMFLAG_SUPPORTED; } diff --git a/src/emu/cpu/hmcs40/hmcs40op.inc b/src/emu/cpu/hmcs40/hmcs40op.inc index 9732d86f53fdb..1887c3c0105bd 100644 --- a/src/emu/cpu/hmcs40/hmcs40op.inc +++ b/src/emu/cpu/hmcs40/hmcs40op.inc @@ -73,19 +73,19 @@ void hmcs40_cpu_device::op_laspy() void hmcs40_cpu_device::op_xamr() { // XAMR m: Exchange A and MR(m) - + // determine MR(Memory Register) location UINT8 address = m_op & 0xf; - + // HMCS42: MR0 on file 0, MR4-MR15 on file 4 (there is no file 1-3) // HMCS43: MR0-MR3 on file 0-3, MR4-MR15 on file 4 if (m_family == FAMILY_HMCS42 || m_family == FAMILY_HMCS43) address |= (address < 4) ? (address << 4) : 0x40; - + // HMCS44/45/46/47: all on last file else address |= 0xf0; - + address &= m_datamask; UINT8 old_a = m_a; m_a = m_data->read_byte(address) & 0xf; @@ -657,7 +657,7 @@ void hmcs40_cpu_device::op_p() m_icount--; UINT16 address = m_a | m_b << 4 | m_c << 8 | (m_op & 7) << 9 | (m_pc & ~0x3f); UINT16 o = m_program->read_word((address & m_prgmask) << 1); - + // destination is determined by the 2 highest bits if (o & 0x100) { diff --git a/src/emu/cpu/i386/i386ops.h b/src/emu/cpu/i386/i386ops.h index c540a7d3c1608..31f6b349721ed 100644 --- a/src/emu/cpu/i386/i386ops.h +++ b/src/emu/cpu/i386/i386ops.h @@ -333,7 +333,7 @@ const i386_device::X86_OPCODE i386_device::s_x86_opcode_table[] = { 0x3B, OP_2BYTE|OP_CYRIX, &i386_device::i386_cyrix_special, &i386_device::i386_cyrix_special, false}, { 0x3C, OP_2BYTE|OP_CYRIX, &i386_device::i386_cyrix_special, &i386_device::i386_cyrix_special, false}, { 0x3D, OP_2BYTE|OP_CYRIX, &i386_device::i386_cyrix_special, &i386_device::i386_cyrix_special, false}, - { 0x40, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovo_r16_rm16, &i386_device::pentium_cmovo_r32_rm32, false}, + { 0x40, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovo_r16_rm16, &i386_device::pentium_cmovo_r32_rm32, false}, { 0x41, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovno_r16_rm16, &i386_device::pentium_cmovno_r32_rm32, false}, { 0x42, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovb_r16_rm16, &i386_device::pentium_cmovb_r32_rm32, false}, { 0x43, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_cmovae_r16_rm16, &i386_device::pentium_cmovae_r32_rm32, false}, diff --git a/src/emu/cpu/i386/pentops.inc b/src/emu/cpu/i386/pentops.inc index c7a341d9ba749..f1b64aafb42eb 100644 --- a/src/emu/cpu/i386/pentops.inc +++ b/src/emu/cpu/i386/pentops.inc @@ -1065,10 +1065,10 @@ void i386_device::pentium_movnti_m32_r32() // Opcode 0f c3 void i386_device::i386_cyrix_special() // Opcode 0x0f 3a-3d { /* -0f 3a BB0_RESET (set BB0 pointer = base) -0f 3b BB1_RESET (set BB1 pointer = base) -0f 3c CPU_WRITE (write special CPU memory-mapped register, [ebx] = eax) -0f 3d CPU_READ (read special CPU memory-mapped register, eax, = [ebx]) +0f 3a BB0_RESET (set BB0 pointer = base) +0f 3b BB1_RESET (set BB1 pointer = base) +0f 3c CPU_WRITE (write special CPU memory-mapped register, [ebx] = eax) +0f 3d CPU_READ (read special CPU memory-mapped register, eax, = [ebx]) */ CYCLES(1); diff --git a/src/emu/cpu/nec/v53.c b/src/emu/cpu/nec/v53.c index 0019f5bd95921..a99d3bad960ca 100644 --- a/src/emu/cpu/nec/v53.c +++ b/src/emu/cpu/nec/v53.c @@ -237,9 +237,8 @@ void v53_base_device::install_peripheral_io() if (m_SCTL & 0x02) // uPD71037 mode { - if (IOAG) // 8-bit + if (IOAG) // 8-bit { - } else { @@ -256,9 +255,8 @@ void v53_base_device::install_peripheral_io() UINT16 base = (m_OPHA << 8) | m_IULA; base &= 0xfffe; - if (IOAG) // 8-bit + if (IOAG) // 8-bit { - } else { @@ -272,9 +270,8 @@ void v53_base_device::install_peripheral_io() //printf("installing TCU to %04x\n", base); base &= 0xfffe; - if (IOAG) // 8-bit + if (IOAG) // 8-bit { - } else { @@ -290,9 +287,8 @@ void v53_base_device::install_peripheral_io() UINT16 base = (m_OPHA << 8) | m_SULA; base &= 0xfffe; - if (IOAG) // 8-bit + if (IOAG) // 8-bit { - } else { @@ -333,9 +329,9 @@ WRITE8_MEMBER(v53_base_device::tmu_tct2_w) { m_v53tcu->write(space, 2, data); } WRITE8_MEMBER(v53_base_device::tmu_tmd_w) { m_v53tcu->write(space, 3, data); } -READ8_MEMBER(v53_base_device::tmu_tst0_r) { return m_v53tcu->read(space, 0); } -READ8_MEMBER(v53_base_device::tmu_tst1_r) { return m_v53tcu->read(space, 1); } -READ8_MEMBER(v53_base_device::tmu_tst2_r) { return m_v53tcu->read(space, 2); } +READ8_MEMBER(v53_base_device::tmu_tst0_r) { return m_v53tcu->read(space, 0); } +READ8_MEMBER(v53_base_device::tmu_tst1_r) { return m_v53tcu->read(space, 1); } +READ8_MEMBER(v53_base_device::tmu_tst2_r) { return m_v53tcu->read(space, 2); } @@ -343,7 +339,7 @@ READ8_MEMBER(v53_base_device::tmu_tst2_r) { return m_v53tcu->read(space, 2); } /*** DMA ***/ -// could be wrong / nonexistent +// could be wrong / nonexistent WRITE_LINE_MEMBER(v53_base_device::dreq0_w) { if (!(m_SCTL & 0x02)) @@ -409,20 +405,20 @@ WRITE_LINE_MEMBER(v53_base_device::hack_w) static ADDRESS_MAP_START( v53_internal_port_map, AS_IO, 16, v53_base_device ) AM_RANGE(0xffe0, 0xffe1) AM_WRITE8( BSEL_w, 0x00ff) // 0xffe0 // uPD71037 DMA mode bank selection register AM_RANGE(0xffe0, 0xffe1) AM_WRITE8( BADR_w, 0xff00) // 0xffe1 // uPD71037 DMA mode bank register peripheral mapping (also uses OPHA) -// AM_RANGE(0xffe2, 0xffe3) // (reserved , 0x00ff) // 0xffe2 -// AM_RANGE(0xffe2, 0xffe3) // (reserved , 0xff00) // 0xffe3 -// AM_RANGE(0xffe4, 0xffe5) // (reserved , 0x00ff) // 0xffe4 -// AM_RANGE(0xffe4, 0xffe5) // (reserved , 0xff00) // 0xffe5 -// AM_RANGE(0xffe6, 0xffe7) // (reserved , 0x00ff) // 0xffe6 -// AM_RANGE(0xffe6, 0xffe7) // (reserved , 0xff00) // 0xffe7 -// AM_RANGE(0xffe8, 0xffe9) // (reserved , 0x00ff) // 0xffe8 +// AM_RANGE(0xffe2, 0xffe3) // (reserved , 0x00ff) // 0xffe2 +// AM_RANGE(0xffe2, 0xffe3) // (reserved , 0xff00) // 0xffe3 +// AM_RANGE(0xffe4, 0xffe5) // (reserved , 0x00ff) // 0xffe4 +// AM_RANGE(0xffe4, 0xffe5) // (reserved , 0xff00) // 0xffe5 +// AM_RANGE(0xffe6, 0xffe7) // (reserved , 0x00ff) // 0xffe6 +// AM_RANGE(0xffe6, 0xffe7) // (reserved , 0xff00) // 0xffe7 +// AM_RANGE(0xffe8, 0xffe9) // (reserved , 0x00ff) // 0xffe8 AM_RANGE(0xffe8, 0xffe9) AM_WRITE8( BRC_w , 0xff00) // 0xffe9 // baud rate counter (used for serial peripheral) AM_RANGE(0xffea, 0xffeb) AM_WRITE8( WMB0_w, 0x00ff) // 0xffea // waitstate control AM_RANGE(0xffea, 0xffeb) AM_WRITE8( WCY1_w, 0xff00) // 0xffeb // waitstate control AM_RANGE(0xffec, 0xffed) AM_WRITE8( WCY0_w, 0x00ff) // 0xffec // waitstate control AM_RANGE(0xffec, 0xffed) AM_WRITE8( WAC_w, 0xff00) // 0xffed // waitstate control -// AM_RANGE(0xffee, 0xffef) // (reserved , 0x00ff) // 0xffee -// AM_RANGE(0xffee, 0xffef) // (reserved , 0xff00) // 0xffef +// AM_RANGE(0xffee, 0xffef) // (reserved , 0x00ff) // 0xffee +// AM_RANGE(0xffee, 0xffef) // (reserved , 0xff00) // 0xffef AM_RANGE(0xfff0, 0xfff1) AM_WRITE8( TCKS_w, 0x00ff) // 0xfff0 // timer clocks AM_RANGE(0xfff0, 0xfff1) AM_WRITE8( SBCR_w, 0xff00) // 0xfff1 // internal clock divider, halt behavior etc. AM_RANGE(0xfff2, 0xfff3) AM_WRITE8( REFC_w, 0x00ff) // 0xfff2 // ram refresh control @@ -430,7 +426,7 @@ static ADDRESS_MAP_START( v53_internal_port_map, AS_IO, 16, v53_base_device ) AM_RANGE(0xfff4, 0xfff5) AM_WRITE8( WCY2_w, 0x00ff) // 0xfff4 // waitstate control AM_RANGE(0xfff4, 0xfff5) AM_WRITE8( WCY3_w, 0xff00) // 0xfff5 // waitstate control AM_RANGE(0xfff6, 0xfff7) AM_WRITE8( WCY4_w, 0x00ff) // 0xfff6 // waitstate control -// AM_RANGE(0xfff6, 0xfff7) // (reserved , 0xff00) // 0xfff7 +// AM_RANGE(0xfff6, 0xfff7) // (reserved , 0xff00) // 0xfff7 AM_RANGE(0xfff8, 0xfff9) AM_WRITE8( SULA_w, 0x00ff) // 0xfff8 // peripheral mapping AM_RANGE(0xfff8, 0xfff9) AM_WRITE8( TULA_w, 0xff00) // 0xfff9 // peripheral mapping AM_RANGE(0xfffa, 0xfffb) AM_WRITE8( IULA_w, 0x00ff) // 0xfffa // peripheral mapping @@ -438,7 +434,7 @@ static ADDRESS_MAP_START( v53_internal_port_map, AS_IO, 16, v53_base_device ) AM_RANGE(0xfffc, 0xfffd) AM_WRITE8( OPHA_w, 0x00ff) // 0xfffc // peripheral mapping (upper bits, common) AM_RANGE(0xfffc, 0xfffd) AM_WRITE8( OPSEL_w, 0xff00) // 0xfffd // peripheral enabling AM_RANGE(0xfffe, 0xffff) AM_WRITE8( SCTL_w, 0x00ff) // 0xfffe // peripheral configuration (& byte / word mapping) -// AM_RANGE(0xfffe, 0xffff) // (reserved , 0xff00) // 0xffff +// AM_RANGE(0xfffe, 0xffff) // (reserved , 0xff00) // 0xffff ADDRESS_MAP_END @@ -486,7 +482,7 @@ static MACHINE_CONFIG_FRAGMENT( v53 ) MCFG_PIT8253_OUT0_HANDLER(WRITELINE( v53_base_device, tcu_out0_trampoline_cb )) MCFG_PIT8253_OUT1_HANDLER(WRITELINE( v53_base_device, tcu_out1_trampoline_cb )) MCFG_PIT8253_OUT2_HANDLER(WRITELINE( v53_base_device, tcu_out2_trampoline_cb )) - + MCFG_DEVICE_ADD("upd71071dma", V53_DMAU, 4000000) MCFG_AM9517A_OUT_HREQ_CB(WRITELINE(v53_base_device, hreq_trampoline_cb)) @@ -506,12 +502,12 @@ static MACHINE_CONFIG_FRAGMENT( v53 ) MCFG_AM9517A_OUT_DACK_2_CB(WRITELINE(v53_base_device, dma_dack2_trampoline_w)) MCFG_AM9517A_OUT_DACK_3_CB(WRITELINE(v53_base_device, dma_dack3_trampoline_w)) - + MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, internal_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) - MCFG_DEVICE_ADD("v53scu", V53_SCU, 0) + MCFG_DEVICE_ADD("v53scu", V53_SCU, 0) MCFG_I8251_TXD_HANDLER(WRITELINE(v53_base_device, scu_txd_trampoline_cb)) MCFG_I8251_DTR_HANDLER(WRITELINE(v53_base_device, scu_dtr_trampoline_cb)) MCFG_I8251_RTS_HANDLER(WRITELINE(v53_base_device, scu_rts_trampoline_cb)) @@ -578,4 +574,3 @@ v53a_device::v53a_device(const machine_config &mconfig, const char *tag, device_ : v53_base_device(mconfig, V53A, "V53A", tag, owner, clock, "v53a", BYTE_XOR_LE(0), 6, 1, V33_TYPE) { } - diff --git a/src/emu/cpu/nec/v53.h b/src/emu/cpu/nec/v53.h index dbaa7778773ca..05611e5503f35 100644 --- a/src/emu/cpu/nec/v53.h +++ b/src/emu/cpu/nec/v53.h @@ -131,7 +131,7 @@ class v53_base_device : public nec_common_device UINT8 m_SCTL; UINT8 m_OPSEL; - + UINT8 m_SULA; UINT8 m_TULA; UINT8 m_IULA; @@ -151,10 +151,10 @@ class v53_base_device : public nec_common_device template static devcb_base &set_syndet_handler(device_t &device, _Object object) { return downcast(device).m_syndet_handler.set_callback(object); } DECLARE_WRITE_LINE_MEMBER(scu_txd_trampoline_cb) { m_txd_handler(state); } DECLARE_WRITE_LINE_MEMBER(scu_dtr_trampoline_cb) { m_dtr_handler(state); } - DECLARE_WRITE_LINE_MEMBER(scu_rts_trampoline_cb) { m_rts_handler(state); } + DECLARE_WRITE_LINE_MEMBER(scu_rts_trampoline_cb) { m_rts_handler(state); } DECLARE_WRITE_LINE_MEMBER(scu_rxrdy_trampoline_cb) { m_rxrdy_handler(state); } /* should we mask this here based on m_simk? it can mask the interrupt */ DECLARE_WRITE_LINE_MEMBER(scu_txrdy_trampoline_cb) { m_txrdy_handler(state); } /* should we mask this here based on m_simk? it can mask the interrupt */ - DECLARE_WRITE_LINE_MEMBER(scu_txempty_trampoline_cb) { m_txempty_handler(state); } + DECLARE_WRITE_LINE_MEMBER(scu_txempty_trampoline_cb) { m_txempty_handler(state); } DECLARE_WRITE_LINE_MEMBER(scu_syndet_trampoline_cb) { m_syndet_handler(state); } // TCU @@ -165,9 +165,9 @@ class v53_base_device : public nec_common_device DECLARE_READ8_MEMBER(tmu_tst2_r); DECLARE_WRITE8_MEMBER(tmu_tct2_w); DECLARE_WRITE8_MEMBER(tmu_tmd_w); -// static void set_clk0(device_t &device, double clk0) { downcast(device).m_clk0 = clk0; } -// static void set_clk1(device_t &device, double clk1) { downcast(device).m_clk1 = clk1; } -// static void set_clk2(device_t &device, double clk2) { downcast(device).m_clk2 = clk2; } +// static void set_clk0(device_t &device, double clk0) { downcast(device).m_clk0 = clk0; } +// static void set_clk1(device_t &device, double clk1) { downcast(device).m_clk1 = clk1; } +// static void set_clk2(device_t &device, double clk2) { downcast(device).m_clk2 = clk2; } template static devcb_base &set_out0_handler(device_t &device, _Object object) { return downcast(device).m_out0_handler.set_callback(object); } template static devcb_base &set_out1_handler(device_t &device, _Object object) { return downcast(device).m_out1_handler.set_callback(object); } template static devcb_base &set_out2_handler(device_t &device, _Object object) { return downcast(device).m_out2_handler.set_callback(object); } @@ -195,7 +195,7 @@ class v53_base_device : public nec_common_device DECLARE_WRITE_LINE_MEMBER(hreq_trampoline_cb) { m_out_hreq_cb(state); } DECLARE_WRITE_LINE_MEMBER(eop_trampoline_cb) { m_out_eop_cb(state); } DECLARE_READ8_MEMBER(dma_memr_trampoline_r) { return m_in_memr_cb(space, offset); } - DECLARE_WRITE8_MEMBER(dma_memw_trampoline_w) { m_out_memw_cb(space, offset, data); } + DECLARE_WRITE8_MEMBER(dma_memw_trampoline_w) { m_out_memw_cb(space, offset, data); } DECLARE_READ8_MEMBER(dma_io_0_trampoline_r) { return m_in_ior_0_cb(space, offset); } DECLARE_READ8_MEMBER(dma_io_1_trampoline_r) { return m_in_ior_1_cb(space, offset); } DECLARE_READ8_MEMBER(dma_io_2_trampoline_r) { return m_in_ior_2_cb(space, offset); } @@ -204,10 +204,10 @@ class v53_base_device : public nec_common_device DECLARE_WRITE8_MEMBER(dma_io_1_trampoline_w) { m_out_iow_1_cb(space, offset, data); } DECLARE_WRITE8_MEMBER(dma_io_2_trampoline_w) { m_out_iow_2_cb(space, offset, data); } DECLARE_WRITE8_MEMBER(dma_io_3_trampoline_w) { m_out_iow_3_cb(space, offset, data); } - DECLARE_WRITE_LINE_MEMBER(dma_dack0_trampoline_w) { m_out_dack_0_cb(state); } - DECLARE_WRITE_LINE_MEMBER(dma_dack1_trampoline_w) { m_out_dack_1_cb(state); } - DECLARE_WRITE_LINE_MEMBER(dma_dack2_trampoline_w) { m_out_dack_2_cb(state); } - DECLARE_WRITE_LINE_MEMBER(dma_dack3_trampoline_w) { m_out_dack_3_cb(state); } + DECLARE_WRITE_LINE_MEMBER(dma_dack0_trampoline_w) { m_out_dack_0_cb(state); } + DECLARE_WRITE_LINE_MEMBER(dma_dack1_trampoline_w) { m_out_dack_1_cb(state); } + DECLARE_WRITE_LINE_MEMBER(dma_dack2_trampoline_w) { m_out_dack_2_cb(state); } + DECLARE_WRITE_LINE_MEMBER(dma_dack3_trampoline_w) { m_out_dack_3_cb(state); } DECLARE_WRITE_LINE_MEMBER(dreq0_w); @@ -221,7 +221,7 @@ class v53_base_device : public nec_common_device void install_peripheral_io(); const address_space_config m_io_space_config; - + const address_space_config *memory_space_config(address_spacenum spacenum) const { switch (spacenum) @@ -260,9 +260,9 @@ class v53_base_device : public nec_common_device devcb_write_line m_syndet_handler; // TCU -// double m_clk0; -// double m_clk1; -// double m_clk2; +// double m_clk0; +// double m_clk1; +// double m_clk2; devcb_write_line m_out0_handler; devcb_write_line m_out1_handler; devcb_write_line m_out2_handler; @@ -285,7 +285,7 @@ class v53_base_device : public nec_common_device devcb_write_line m_out_dack_1_cb; devcb_write_line m_out_dack_2_cb; devcb_write_line m_out_dack_3_cb; - + }; diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 6820bad7c74fd..c39324a0a69d7 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -799,7 +799,7 @@ void pic16c5x_device::device_start() m_program = &space(AS_PROGRAM); m_direct = &m_program->direct(); m_data = &space(AS_DATA); - + m_read_a.resolve_safe(0); m_read_b.resolve_safe(0); m_read_c.resolve_safe(0); diff --git a/src/emu/cpu/pic16c5x/pic16c5x.h b/src/emu/cpu/pic16c5x/pic16c5x.h index 92a62d3f20720..779d7a12a5d5b 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.h +++ b/src/emu/cpu/pic16c5x/pic16c5x.h @@ -81,7 +81,7 @@ class pic16c5x_device : public cpu_device * the value if known (available in HEX dumps of the ROM). */ void pic16c5x_set_config(UINT16 data); - + // or with a macro static void set_config_static(device_t &device, UINT16 data) { downcast(device).m_temp_config = data; } @@ -155,7 +155,7 @@ class pic16c5x_device : public cpu_device address_space *m_program; direct_read_data *m_direct; address_space *m_data; - + // i/o handlers devcb_read8 m_read_a; devcb_read8 m_read_b; diff --git a/src/emu/cpu/z80/kl5c80a12.c b/src/emu/cpu/z80/kl5c80a12.c index 4be701168f335..ddf40bd861255 100644 --- a/src/emu/cpu/z80/kl5c80a12.c +++ b/src/emu/cpu/z80/kl5c80a12.c @@ -1,13 +1,13 @@ /*************************************************************************** - Kawasaki LSI - KL5C80A12 CPU (KL5C80A12CFP on hng64.c) + Kawasaki LSI + KL5C80A12 CPU (KL5C80A12CFP on hng64.c) - Binary compatible with Z80, significantly faster opcode timings, operating at up to 10Mhz - Timers / Counters, Parrallel / Serial ports/ MMU, Interrupt Controller + Binary compatible with Z80, significantly faster opcode timings, operating at up to 10Mhz + Timers / Counters, Parrallel / Serial ports/ MMU, Interrupt Controller - (is this different enough to need it's own core?) - (todo: everything, some code currently lives in machine/hng64_net.c but not much) + (is this different enough to need it's own core?) + (todo: everything, some code currently lives in machine/hng64_net.c but not much) ***************************************************************************/ diff --git a/src/emu/cpu/z80/kl5c80a12.h b/src/emu/cpu/z80/kl5c80a12.h index 14fa9cc86dcb5..6f6683ecb5914 100644 --- a/src/emu/cpu/z80/kl5c80a12.h +++ b/src/emu/cpu/z80/kl5c80a12.h @@ -1,13 +1,13 @@ /*************************************************************************** - Kawasaki LSI - KL5C80A12 CPU (KL5C80A12CFP on hng64.c) + Kawasaki LSI + KL5C80A12 CPU (KL5C80A12CFP on hng64.c) - Binary compatible with Z80, significantly faster opcode timings, operating at up to 10Mhz - Timers / Counters, Parrallel / Serial ports/ MMU, Interrupt Controller + Binary compatible with Z80, significantly faster opcode timings, operating at up to 10Mhz + Timers / Counters, Parrallel / Serial ports/ MMU, Interrupt Controller - (is this different enough to need it's own core?) - (todo: everything, some code currently lives in machine/hng64_net.c but not much) + (is this different enough to need it's own core?) + (todo: everything, some code currently lives in machine/hng64_net.c but not much) ***************************************************************************/ diff --git a/src/emu/machine/am9517a.c b/src/emu/machine/am9517a.c index 0104ff077d6a9..15dafeb0362f9 100644 --- a/src/emu/machine/am9517a.c +++ b/src/emu/machine/am9517a.c @@ -3,15 +3,15 @@ /*************************************************************************** AMD AM9517A - Intel 8237A - NEC uPD71037 + Intel 8237A + NEC uPD71037 - NEC uPD71071 (extended version of above) + NEC uPD71071 (extended version of above) - a variant is used in the V53 CPU which offers subsets of both the - uPD71071 and uPD71037 functionality depending on a mode bit. - - Multimode DMA Controller emulation + a variant is used in the V53 CPU which offers subsets of both the + uPD71071 and uPD71037 functionality depending on a mode bit. + + Multimode DMA Controller emulation Copyright the MESS Team. Visit http://mamedev.org for licensing and usage restrictions. @@ -28,17 +28,17 @@ /* - When the V53 operates in uPD71071 compatible mode there are the following - differences from a real uPD71071 + When the V53 operates in uPD71071 compatible mode there are the following + differences from a real uPD71071 - V53 Real uPD71071 - Software Reqs No Yes - Memory-to-Memory DMA No Yes - DMARQ active level High programmable - DMAAK active level Low programmable - Bus Cycle 4 4 or 3 + V53 Real uPD71071 + Software Reqs No Yes + Memory-to-Memory DMA No Yes + DMARQ active level High programmable + DMAAK active level Low programmable + Bus Cycle 4 4 or 3 - we don't currently handle the differences + we don't currently handle the differences */ @@ -1158,7 +1158,7 @@ READ8_MEMBER(upd71071_v53_device::read) ret = m_command & 0xff; break; case 0x09: // Device control (high) // UPD71071 only? - ret = m_command_high & 0xff; + ret = m_command_high & 0xff; break; case 0x0b: // Status ret = m_status; @@ -1187,14 +1187,14 @@ READ8_MEMBER(upd71071_v53_device::read) WRITE8_MEMBER(upd71071_v53_device::write) { int channel = m_selected_channel; - + switch (offset) { case 0x00: // Initialise // TODO: reset (bit 0) //m_buswidth = data & 0x02; //if (data & 0x01) - // soft_reset(); + // soft_reset(); logerror("DMA: Initialise [%02x]\n", data); break; case 0x01: // Channel @@ -1279,4 +1279,4 @@ WRITE8_MEMBER(upd71071_v53_device::write) } trigger(1); -} \ No newline at end of file +} diff --git a/src/emu/machine/am9517a.h b/src/emu/machine/am9517a.h index 3a0eb2a64327e..3ba47c35f9660 100644 --- a/src/emu/machine/am9517a.h +++ b/src/emu/machine/am9517a.h @@ -172,7 +172,7 @@ class upd71071_v53_device : public am9517a_device virtual void device_start(); virtual void device_reset(); - int m_selected_channel; + int m_selected_channel; int m_base; UINT8 m_command_high; diff --git a/src/emu/machine/i8251.c b/src/emu/machine/i8251.c index 59da201a4d5ef..622605453cae7 100644 --- a/src/emu/machine/i8251.c +++ b/src/emu/machine/i8251.c @@ -3,10 +3,10 @@ i8251.c Intel 8251 Universal Synchronous/Asynchronous Receiver Transmitter code - NEC uPD71051 is a clone + NEC uPD71051 is a clone - The V53/V53A use a customized version with only the Asynchronous mode - and a split command / mode register + The V53/V53A use a customized version with only the Asynchronous mode + and a split command / mode register @@ -428,29 +428,29 @@ WRITE8_MEMBER(i8251_device::command_w) /* bit 7: - 0 = normal operation - 1 = hunt mode - bit 6: - 0 = normal operation - 1 = internal reset - bit 5: - 0 = /RTS set to 1 - 1 = /RTS set to 0 - bit 4: - 0 = normal operation - 1 = reset error flag - bit 3: - 0 = normal operation - 1 = send break character - bit 2: - 0 = receive disable - 1 = receive enable - bit 1: - 0 = /DTR set to 1 - 1 = /DTR set to 0 - bit 0: - 0 = transmit disable - 1 = transmit enable + 0 = normal operation + 1 = hunt mode + bit 6: + 0 = normal operation + 1 = internal reset + bit 5: + 0 = /RTS set to 1 + 1 = /RTS set to 0 + bit 4: + 0 = normal operation + 1 = reset error flag + bit 3: + 0 = normal operation + 1 = send break character + bit 2: + 0 = receive disable + 1 = receive enable + bit 1: + 0 = /DTR set to 1 + 1 = /DTR set to 0 + bit 0: + 0 = transmit disable + 1 = transmit enable */ m_rts_handler(!BIT(data, 5)); @@ -484,28 +484,28 @@ WRITE8_MEMBER(i8251_device::mode_w) { /* Asynchronous - bit 7,6: stop bit length - 0 = inhibit - 1 = 1 bit - 2 = 1.5 bits - 3 = 2 bits - bit 5: parity type - 0 = parity odd - 1 = parity even - bit 4: parity test enable - 0 = disable - 1 = enable - bit 3,2: character length - 0 = 5 bits - 1 = 6 bits - 2 = 7 bits - 3 = 8 bits - bit 1,0: baud rate factor - 0 = defines command byte for synchronous or asynchronous - 1 = x1 - 2 = x16 - 3 = x64 - */ + bit 7,6: stop bit length + 0 = inhibit + 1 = 1 bit + 2 = 1.5 bits + 3 = 2 bits + bit 5: parity type + 0 = parity odd + 1 = parity even + bit 4: parity test enable + 0 = disable + 1 = enable + bit 3,2: character length + 0 = 5 bits + 1 = 6 bits + 2 = 7 bits + 3 = 8 bits + bit 1,0: baud rate factor + 0 = defines command byte for synchronous or asynchronous + 1 = x1 + 2 = x16 + 3 = x64 + */ LOG(("I8251: Asynchronous operation\n")); @@ -597,24 +597,24 @@ WRITE8_MEMBER(i8251_device::mode_w) else { /* bit 7: Number of sync characters - 0 = 1 character - 1 = 2 character - bit 6: Synchronous mode - 0 = Internal synchronisation - 1 = External synchronisation - bit 5: parity type - 0 = parity odd - 1 = parity even - bit 4: parity test enable - 0 = disable - 1 = enable - bit 3,2: character length - 0 = 5 bits - 1 = 6 bits - 2 = 7 bits - 3 = 8 bits - bit 1,0 = 0 - */ + 0 = 1 character + 1 = 2 character + bit 6: Synchronous mode + 0 = Internal synchronisation + 1 = External synchronisation + bit 5: parity type + 0 = parity odd + 1 = parity even + bit 4: parity test enable + 0 = disable + 1 = enable + bit 3,2: character length + 0 = 5 bits + 1 = 6 bits + 2 = 7 bits + 3 = 8 bits + bit 1,0 = 0 + */ LOG(("I8251: Synchronous operation\n")); /* setup for sync byte(s) */ diff --git a/src/emu/machine/i8257.c b/src/emu/machine/i8257.c index 791a040295f54..404e3066b15b6 100644 --- a/src/emu/machine/i8257.c +++ b/src/emu/machine/i8257.c @@ -79,7 +79,7 @@ inline void i8257_device::dma_request(int channel, int state) } else { - m_request &= ~(1 << channel); + m_request &= ~(1 << channel); } trigger(1); } diff --git a/src/emu/machine/mcf5206e.c b/src/emu/machine/mcf5206e.c index d7b99c4248304..f19684f71a084 100644 --- a/src/emu/machine/mcf5206e.c +++ b/src/emu/machine/mcf5206e.c @@ -860,7 +860,7 @@ void mcf5206e_peripheral_device::device_start() init_regs(true); m_timer1 = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( mcf5206e_peripheral_device::timer1_callback ), this) ); - + save_item(NAME(m_ICR)); save_item(NAME(m_CSAR)); save_item(NAME(m_CSMR)); diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c index 9795e075b4a01..4594ea0397f67 100644 --- a/src/emu/machine/tmp68301.c +++ b/src/emu/machine/tmp68301.c @@ -123,7 +123,7 @@ void tmp68301_device::device_start() m_in_parallel_cb.resolve_safe(0); m_out_parallel_cb.resolve_safe(); - + save_item(NAME(m_regs)); save_item(NAME(m_IE)); save_item(NAME(m_irq_vector)); diff --git a/src/emu/machine/upd71071.c b/src/emu/machine/upd71071.c index 62214ef9e9124..0a4484b607fee 100644 --- a/src/emu/machine/upd71071.c +++ b/src/emu/machine/upd71071.c @@ -1,7 +1,7 @@ /* - am9517a.c is a more complete implementation of this, the uPD71071 appears to be a clone of it + am9517a.c is a more complete implementation of this, the uPD71071 appears to be a clone of it NEC uPD71071 DMA Controller Used on the Fujitsu FM-Towns @@ -31,8 +31,8 @@ Self-explanatory, I hope. :) NOTE: Datasheet clearly shows this as 24-bit, with register 7 unused. But the FM-Towns definitely uses reg 7 as bits 24-31. - The documentation on the V53A manual doesn't show these bits either, maybe it's - an external connection on the FMT? might be worth checking overflow behavior etc. + The documentation on the V53A manual doesn't show these bits either, maybe it's + an external connection on the FMT? might be worth checking overflow behavior etc. 0x08: 0x09: Device Control register (16-bit) @@ -77,8 +77,8 @@ 0x0f: Mask register bit 0-3: DMARQ mask bits 1 and 0 only in MTM transfers - - Note, the uPD71071 compatible mode of the V53 CPU differs from a real uPD71071 in the following ways + + Note, the uPD71071 compatible mode of the V53 CPU differs from a real uPD71071 in the following ways diff --git a/src/emu/machine/vrc4373.c b/src/emu/machine/vrc4373.c index b1e5c6e89284c..e91c2f2a8c481 100644 --- a/src/emu/machine/vrc4373.c +++ b/src/emu/machine/vrc4373.c @@ -111,7 +111,7 @@ void vrc4373_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ if (LOG_NILE) logerror("%s: map_extra Master Window 2 start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_pci2_laddr); } - // PCI IO Window + // PCI IO Window if (m_cpu_regs[NREG_PCIMIOW]&0x1000) { winStart = m_cpu_regs[NREG_PCIMIOW]&0xff000000; winEnd = winStart | (~(0x80000000 | (((m_cpu_regs[NREG_PCIMIOW]>>13)&0x7f)<<24))); @@ -122,7 +122,7 @@ void vrc4373_device::map_extra(UINT64 memory_window_start, UINT64 memory_window_ logerror("%s: map_extra IO Window start=%08X end=%08X size=%08X laddr=%08X\n", tag(), winStart, winEnd, winSize, m_pci_io_laddr); } // PCI Target Window 1 - if (m_cpu_regs[NREG_PCITW1]&0x1000) { + if (m_cpu_regs[NREG_PCITW1]&0x1000) { winStart = m_cpu_regs[NREG_PCITW1]&0xffe00000; winEnd = winStart | (~(0xf0000000 | (((m_cpu_regs[NREG_PCITW1]>>13)&0x7f)<<21))); winSize = winEnd - winStart + 1; @@ -242,7 +242,7 @@ WRITE32_MEMBER (vrc4373_device::target2_w) logerror("%06X:nile target2 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask); } -// CPU I/F +// CPU I/F READ32_MEMBER (vrc4373_device::cpu_if_r) { UINT32 result = m_cpu_regs[offset]; @@ -290,7 +290,7 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w) case NREG_PCICAR: // Bits in reserved area are used for device selection of type 0 config transactions // Assuming 23:11 get mapped into device number for configuration - if ((data&0x3) == 0x0) { + if ((data&0x3) == 0x0) { // Type 0 transaction modData = 0; // Select the device based on one hot bit @@ -341,4 +341,3 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w) } } - diff --git a/src/emu/machine/vrc4373.h b/src/emu/machine/vrc4373.h index 17fa5de7e9c86..998bea718324d 100644 --- a/src/emu/machine/vrc4373.h +++ b/src/emu/machine/vrc4373.h @@ -10,13 +10,13 @@ downcast(device)->set_cpu_tag(_cpu_tag); #define VRC4373_PAGESHIFT 12 - + /* NILE 3 registers 0x000-0x0ff */ -#define NREG_BMCR (0x000/4) -#define NREG_SIMM1 (0x004/4) -#define NREG_SIMM2 (0x008/4) -#define NREG_SIMM3 (0x00C/4) -#define NREG_SIMM4 (0x010/4) +#define NREG_BMCR (0x000/4) +#define NREG_SIMM1 (0x004/4) +#define NREG_SIMM2 (0x008/4) +#define NREG_SIMM3 (0x00C/4) +#define NREG_SIMM4 (0x010/4) #define NREG_PCIMW1 (0x014/4) #define NREG_PCIMW2 (0x018/4) #define NREG_PCITW1 (0x01C/4) @@ -57,7 +57,7 @@ class vrc4373_device : public pci_host_device { void set_cpu_tag(const char *tag); virtual DECLARE_ADDRESS_MAP(config_map, 32); - + DECLARE_READ32_MEMBER( pcictrl_r); DECLARE_WRITE32_MEMBER( pcictrl_w); //cpu bus registers @@ -76,7 +76,7 @@ class vrc4373_device : public pci_host_device { virtual DECLARE_ADDRESS_MAP(target1_map, 32); DECLARE_READ32_MEMBER (target1_r); DECLARE_WRITE32_MEMBER(target1_w); - + virtual DECLARE_ADDRESS_MAP(target2_map, 32); DECLARE_READ32_MEMBER (target2_r); DECLARE_WRITE32_MEMBER(target2_w); diff --git a/src/emu/mame.c b/src/emu/mame.c index 3d8380d86663d..b2df26d661bc7 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -286,11 +286,11 @@ void CLIB_DECL popmessage(const char *format, ...) // pop it in the UI machine_manager::instance()->machine()->ui().popup_time(temp.len() / 40 + 2, "%s", temp.cstr()); - + /* // also write to error.log logerror("popmessage: %s\n", temp.cstr()); - + #ifdef MAME_DEBUG // and to command-line in a DEBUG build osd_printf_info("popmessage: %s\n", temp.cstr()); diff --git a/src/emu/render.c b/src/emu/render.c index 46ae77e890966..af95b896cf558 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -2494,13 +2494,13 @@ float render_manager::ui_aspect(render_container *rc) orient = orientation_add(m_ui_target->orientation(), m_ui_container->orientation()); // based on the orientation of the target, compute height/width or width/height if (!(orient & ORIENTATION_SWAP_XY)) - aspect = (float)m_ui_target->height() / (float)m_ui_target->width(); + aspect = (float)m_ui_target->height() / (float)m_ui_target->width(); else - aspect = (float)m_ui_target->width() / (float)m_ui_target->height(); + aspect = (float)m_ui_target->width() / (float)m_ui_target->height(); // if we have a valid pixel aspect, apply that and return if (m_ui_target->pixel_aspect() != 0.0f) - return (aspect / m_ui_target->pixel_aspect()); + return (aspect / m_ui_target->pixel_aspect()); } else { // single screen container diff --git a/src/emu/sound/es1373.h b/src/emu/sound/es1373.h index b2ee13f1feb50..46a2e4180d303 100644 --- a/src/emu/sound/es1373.h +++ b/src/emu/sound/es1373.h @@ -9,26 +9,26 @@ MCFG_PCI_DEVICE_ADD(_tag, ES1373, 0x12741371, 0x04, 0x040100, 0x12741371) /* Ensonic ES1373 registers 0x00-0x3f */ -#define ES_INT_CS_CTRL (0x00/4) -#define ES_INT_CS_STATUS (0x04/4) -#define ES_UART_DATA (0x08/4) -#define ES_UART_STATUS (0x09/4) -#define ES_UART_CTRL (0x09/4) -#define ES_UART_RSVD (0x0A/4) -#define ES_MEM_PAGE (0x0C/4) -#define ES_SRC_IF (0x10/4) -#define ES_CODEC (0x14/4) -#define ES_LEGACY (0x18/4) -#define ES_CHAN_CTRL (0x1C/4) -#define ES_SERIAL_CTRL (0x20/4) -#define ES_DAC1_CNT (0x24/4) -#define ES_DAC2_CNT (0x28/4) -#define ES_ADC_CNT (0x2C/4) -#define ES_ADC_CNT (0x2C/4) -#define ES_HOST_IF0 (0x30/4) -#define ES_HOST_IF1 (0x34/4) -#define ES_HOST_IF2 (0x38/4) -#define ES_HOST_IF3 (0x3C/4) +#define ES_INT_CS_CTRL (0x00/4) +#define ES_INT_CS_STATUS (0x04/4) +#define ES_UART_DATA (0x08/4) +#define ES_UART_STATUS (0x09/4) +#define ES_UART_CTRL (0x09/4) +#define ES_UART_RSVD (0x0A/4) +#define ES_MEM_PAGE (0x0C/4) +#define ES_SRC_IF (0x10/4) +#define ES_CODEC (0x14/4) +#define ES_LEGACY (0x18/4) +#define ES_CHAN_CTRL (0x1C/4) +#define ES_SERIAL_CTRL (0x20/4) +#define ES_DAC1_CNT (0x24/4) +#define ES_DAC2_CNT (0x28/4) +#define ES_ADC_CNT (0x2C/4) +#define ES_ADC_CNT (0x2C/4) +#define ES_HOST_IF0 (0x30/4) +#define ES_HOST_IF1 (0x34/4) +#define ES_HOST_IF2 (0x38/4) +#define ES_HOST_IF3 (0x3C/4) struct frame_reg { UINT32 pci_addr; diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c index 806792ccc179c..cec4ebd6bc43b 100644 --- a/src/emu/sound/flt_rc.c +++ b/src/emu/sound/flt_rc.c @@ -37,7 +37,7 @@ void filter_rc_device::device_start() { m_stream = stream_alloc(1, 1, machine().sample_rate()); recalc(); - + save_item(NAME(m_k)); save_item(NAME(m_memory)); save_item(NAME(m_type)); diff --git a/src/emu/sound/okim9810.c b/src/emu/sound/okim9810.c index 3370ee460e807..b18894e71a3ae 100644 --- a/src/emu/sound/okim9810.c +++ b/src/emu/sound/okim9810.c @@ -115,11 +115,11 @@ void okim9810_device::device_start() save_item(NAME(m_global_volume)); save_item(NAME(m_filter_type)); save_item(NAME(m_output_level)); - + for (int i = 0; i < OKIM9810_VOICES; i++) { okim_voice *voice = get_voice(i); - + save_item(NAME(voice->m_adpcm.m_signal), i); save_item(NAME(voice->m_adpcm.m_step), i); save_item(NAME(voice->m_adpcm2.m_signal), i); diff --git a/src/emu/sound/okim9810.h b/src/emu/sound/okim9810.h index 823a8e25f595d..4d1f3da7b7130 100644 --- a/src/emu/sound/okim9810.h +++ b/src/emu/sound/okim9810.h @@ -135,7 +135,7 @@ class okim9810_device : public device_t, }; okim_voice *get_voice(int which); - + // internal state const address_space_config m_space_config; diff --git a/src/emu/video.c b/src/emu/video.c index 11dc45455404b..f332e75eac7bf 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -153,7 +153,7 @@ video_manager::video_manager(running_machine &machine) filename = machine.options().avi_write(); if (filename[0] != 0) begin_recording(filename, MF_AVI); - + #ifdef MAME_DEBUG m_dummy_recording = machine.options().dummy_write(); #endif diff --git a/src/emu/video.h b/src/emu/video.h index c5ca9c9e27bfc..31e115870efa5 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -176,9 +176,9 @@ class video_manager attotime m_avi_frame_period; // period of a single movie frame attotime m_avi_next_frame_time; // time of next frame UINT32 m_avi_frame; // current movie frame number - + // movie recording - dummy - bool m_dummy_recording; // indicates if snapshot should be created of every frame + bool m_dummy_recording; // indicates if snapshot should be created of every frame static const UINT8 s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS]; diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c index ffcb01d99ad40..2e1667d991fe1 100644 --- a/src/emu/video/tms34061.c +++ b/src/emu/video/tms34061.c @@ -60,7 +60,7 @@ void tms34061_device::device_start() /* allocate memory for VRAM */ m_vram = auto_alloc_array_clear(machine(), UINT8, m_vramsize + 256 * 2); - + /* allocate memory for latch RAM */ m_latchram = auto_alloc_array_clear(machine(), UINT8, m_vramsize + 256 * 2); @@ -93,7 +93,7 @@ void tms34061_device::device_start() /* start vertical interrupt timer */ m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tms34061_device::interrupt), this)); - + save_item(NAME(m_regs)); save_item(NAME(m_xmask)); save_item(NAME(m_yshift)); diff --git a/src/emu/video/voodoo_pci.c b/src/emu/video/voodoo_pci.c index 2b7a6f074333c..e1e02e2260e30 100644 --- a/src/emu/video/voodoo_pci.c +++ b/src/emu/video/voodoo_pci.c @@ -56,7 +56,7 @@ void voodoo_pci_device::map_extra(UINT64 memory_window_start, UINT64 memory_wind return; if(UINT32(bi.adr) == UINT32(~(bi.size - 1))) return; - + UINT64 start; address_space *space; if(bi.flags & M_IO) { diff --git a/src/lib/formats/d88_dsk.c b/src/lib/formats/d88_dsk.c index abb2eac307958..23363acdcc1ce 100644 --- a/src/lib/formats/d88_dsk.c +++ b/src/lib/formats/d88_dsk.c @@ -27,8 +27,8 @@ * */ - #include - + #include + #include "flopimg.h" #include "imageutl.h" diff --git a/src/lib/formats/flex_dsk.c b/src/lib/formats/flex_dsk.c index 34aa965643d81..f4934d8e436c7 100644 --- a/src/lib/formats/flex_dsk.c +++ b/src/lib/formats/flex_dsk.c @@ -4,7 +4,7 @@ * Created on: 24/06/2014 */ - #include "emu.h" // logerror + #include "emu.h" // logerror #include "flex_dsk.h" flex_format::flex_format() diff --git a/src/lib/formats/fmtowns_dsk.c b/src/lib/formats/fmtowns_dsk.c index 83bfd2fbd5180..6baede6fb0717 100644 --- a/src/lib/formats/fmtowns_dsk.c +++ b/src/lib/formats/fmtowns_dsk.c @@ -6,8 +6,8 @@ * Created on: 23/03/2014 */ - #include - + #include + #include "formats/fmtowns_dsk.h" fmtowns_format::fmtowns_format() : wd177x_format(formats) diff --git a/src/lib/formats/nfd_dsk.c b/src/lib/formats/nfd_dsk.c index 083d59417b2e6..7702d3814a504 100644 --- a/src/lib/formats/nfd_dsk.c +++ b/src/lib/formats/nfd_dsk.c @@ -77,8 +77,8 @@ *********************************************************************/ - #include - + #include + #include "nfd_dsk.h" nfd_format::nfd_format() diff --git a/src/mame/audio/hng64.c b/src/mame/audio/hng64.c index 2cc54a21ed290..ed44a57893e86 100644 --- a/src/mame/audio/hng64.c +++ b/src/mame/audio/hng64.c @@ -191,12 +191,12 @@ ADDRESS_MAP_END WRITE16_MEMBER(hng64_state::hng64_sound_port_0008_w) { -// logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask); +// logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask); // seems to one or more of the DMARQ on the V53, writes here when it expects DMA channel 3 to transfer ~0x20 bytes just after startup m_audiocpu->dreq3_w(data&1); -// m_audiocpu->hack_w(1); +// m_audiocpu->hack_w(1); } @@ -262,23 +262,23 @@ WRITE16_MEMBER(hng64_state::hng64_sound_data_02_w) { m_audiodat[m_audiochannel].dat[2] = data; -// if ((m_audiochannel & 0xff00) == 0x0a00) -// printf("write port 0x0002 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); +// if ((m_audiochannel & 0xff00) == 0x0a00) +// printf("write port 0x0002 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); } WRITE16_MEMBER(hng64_state::hng64_sound_data_04_w) { m_audiodat[m_audiochannel].dat[1] = data; -// if ((m_audiochannel & 0xff00) == 0x0a00) -// printf("write port 0x0004 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); +// if ((m_audiochannel & 0xff00) == 0x0a00) +// printf("write port 0x0004 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); } WRITE16_MEMBER(hng64_state::hng64_sound_data_06_w) { m_audiodat[m_audiochannel].dat[0] = data; -// if ((m_audiochannel & 0xff00) == 0x0a00) -// printf("write port 0x0006 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); +// if ((m_audiochannel & 0xff00) == 0x0a00) +// printf("write port 0x0006 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]); } // but why not just use the V33/V53 XA mode?? @@ -414,18 +414,18 @@ WRITE_LINE_MEMBER(hng64_state::tcu_tm0_cb) WRITE_LINE_MEMBER(hng64_state::tcu_tm1_cb) { // these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1 -// logerror("tcu_tm1_cb %02x\n", state); +// logerror("tcu_tm1_cb %02x\n", state); m_audiocpu->set_input_line(5, state? ASSERT_LINE:CLEAR_LINE); // not accurate, just so we have a trigger } WRITE_LINE_MEMBER(hng64_state::tcu_tm2_cb) { // these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1 -// logerror("tcu_tm2_cb %02x\n", state); +// logerror("tcu_tm2_cb %02x\n", state); // NOT ACCURATE, just so that all the interrupts get triggered for now. static int i = 0; - m_audiocpu->set_input_line(i, state? ASSERT_LINE:CLEAR_LINE); + m_audiocpu->set_input_line(i, state? ASSERT_LINE:CLEAR_LINE); i++; if (i == 3) i = 0; } @@ -445,5 +445,3 @@ MACHINE_CONFIG_FRAGMENT( hng64_audio ) MCFG_V53_TCU_OUT2_HANDLER(WRITELINE(hng64_state, tcu_tm2_cb)) MACHINE_CONFIG_END - - diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c index 4704d27ce10fc..295b924d51d22 100644 --- a/src/mame/drivers/argus.c +++ b/src/mame/drivers/argus.c @@ -548,7 +548,7 @@ static MACHINE_CONFIG_START( argus, argus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", argus) MCFG_PALETTE_ADD("palette", 896) - + MCFG_DEVICE_ADD("blend", JALECO_BLEND, 0) MCFG_VIDEO_START_OVERRIDE(argus_state,argus) @@ -594,7 +594,7 @@ static MACHINE_CONFIG_START( valtric, argus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", valtric) MCFG_PALETTE_ADD("palette", 768) - + MCFG_DEVICE_ADD("blend", JALECO_BLEND, 0) MCFG_VIDEO_START_OVERRIDE(argus_state,valtric) @@ -640,7 +640,7 @@ static MACHINE_CONFIG_START( butasan, argus_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", butasan) MCFG_PALETTE_ADD("palette", 768) - + MCFG_DEVICE_ADD("blend", JALECO_BLEND, 0) MCFG_VIDEO_START_OVERRIDE(argus_state,butasan) diff --git a/src/mame/drivers/astrcorp.c b/src/mame/drivers/astrcorp.c index 8ee006d0f17e6..3c02d436ebd6e 100644 --- a/src/mame/drivers/astrcorp.c +++ b/src/mame/drivers/astrcorp.c @@ -1159,130 +1159,130 @@ DRIVER_INIT_MEMBER(astrocorp_state,astoneag) for (i = 0x25100/2; i < 0x25200/2; i++) { x = 0x0000; - if ( (i & 0x0001) ) x |= 0x0200; - if ( (i & 0x0004) && !(i & 0x0001) ) x |= 0x0080; - if ( (i & 0x0040) || (i & 0x0001) ) x |= 0x0040; - if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0020; - if ( !(i & 0x0020) || (i & 0x0001) ) x |= 0x0010; - if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0008; - if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0004; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0002; - if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0001; + if ( (i & 0x0001) ) x |= 0x0200; + if ( (i & 0x0004) && !(i & 0x0001) ) x |= 0x0080; + if ( (i & 0x0040) || (i & 0x0001) ) x |= 0x0040; + if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0020; + if ( !(i & 0x0020) || (i & 0x0001) ) x |= 0x0010; + if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0008; + if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0004; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0002; + if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0001; rom[i] ^= x; } /* - for (i = 0x25300/2; i < 0x25400/2; i++) - { - x = 0x1300; - rom[i] ^= x; - } + for (i = 0x25300/2; i < 0x25400/2; i++) + { + x = 0x1300; + rom[i] ^= x; + } */ for (i = 0x25400/2; i < 0x25500/2; i++) { x = 0x4200; - if ( (i & 0x0001) ) x |= 0x0400; - if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0080; - if ( !(i & 0x0010) || (i & 0x0001) ) x |= 0x0040; - if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0020; - if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0004; - if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; - if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0001; + if ( (i & 0x0001) ) x |= 0x0400; + if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0080; + if ( !(i & 0x0010) || (i & 0x0001) ) x |= 0x0040; + if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0020; + if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0004; + if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; + if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0001; rom[i] ^= x; } for (i = 0x25500/2; i < 0x25600/2; i++) { x = 0x4200; - if ( (i & 0x0001) ) x |= 0x0400; - if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0080; - if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0040; - if ( !(i & 0x0002) && !(i & 0x0001) ) x |= 0x0020; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0010; - if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0008; - if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0004; - if ( (i & 0x0004) && !(i & 0x0001) ) x |= 0x0002; - if ( (i & 0x0001) ) x |= 0x0001; + if ( (i & 0x0001) ) x |= 0x0400; + if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0080; + if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0040; + if ( !(i & 0x0002) && !(i & 0x0001) ) x |= 0x0020; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0010; + if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0008; + if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0004; + if ( (i & 0x0004) && !(i & 0x0001) ) x |= 0x0002; + if ( (i & 0x0001) ) x |= 0x0001; rom[i] ^= x; } /* - for (i = 0x25700/2; i < 0x25800/2; i++) - { - x = 0x6800; - if ( !(i & 0x0001) ) x |= 0x8000; + for (i = 0x25700/2; i < 0x25800/2; i++) + { + x = 0x6800; + if ( !(i & 0x0001) ) x |= 0x8000; - if ( !(i & 0x0040) || ((i & 0x0001) || !(i & 0x0001)) ) x |= 0x0100; + if ( !(i & 0x0040) || ((i & 0x0001) || !(i & 0x0001)) ) x |= 0x0100; - rom[i] ^= x; - } + rom[i] ^= x; + } */ for (i = 0x25800/2; i < 0x25900/2; i++) { x = 0x8300; - if ( (i & 0x0040) || (i & 0x0001) ) x |= 0x2000; - if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0080; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0040; - if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0020; - if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0008; - if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0004; - if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0001; + if ( (i & 0x0040) || (i & 0x0001) ) x |= 0x2000; + if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0080; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0040; + if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0020; + if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0008; + if ( (i & 0x0010) && !(i & 0x0001) ) x |= 0x0004; + if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0001; rom[i] ^= x; } -// for (i = 0x25900/2; i < 0x25a00/2; i++) +// for (i = 0x25900/2; i < 0x25a00/2; i++) for (i = 0x25c00/2; i < 0x25d00/2; i++) { // changed from 25400 -// x = 0x4200; +// x = 0x4200; x = 0x4000; -// if ( (i & 0x0001) ) x |= 0x0400; - if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0080; - if ( !(i & 0x0010) || (i & 0x0001) ) x |= 0x0040; - if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0020; - if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0004; - if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; - if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0001; +// if ( (i & 0x0001) ) x |= 0x0400; + if ( (i & 0x0020) && !(i & 0x0001) ) x |= 0x0080; + if ( !(i & 0x0010) || (i & 0x0001) ) x |= 0x0040; + if ( (i & 0x0040) && !(i & 0x0001) ) x |= 0x0020; + if ( !(i & 0x0004) || (i & 0x0001) ) x |= 0x0010; + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0004; + if ( (i & 0x0008) && !(i & 0x0001) ) x |= 0x0002; + if ( (i & 0x0002) || (i & 0x0001) ) x |= 0x0001; rom[i] ^= x; } /* - for (i = 0x25d00/2; i < 0x25e00/2; i++) - { - x = 0x4000; - if ( !(i & 0x0040) ) x |= 0x0800; - - if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0100; // almost!! - - if ( ((i & 0x0040)&&((i & 0x0020)||(i & 0x0010))) || !(i & 0x0001) ) x |= 0x0200; // almost!! - if ( (!(i & 0x0040) || !(i & 0x0008)) && !(i & 0x0001) ) x |= 0x0008; - if ( (i & 0x0040) || !(i & 0x0020) || (i & 0x0001) ) x |= 0x0001; // almost!! - rom[i] ^= x; - } + for (i = 0x25d00/2; i < 0x25e00/2; i++) + { + x = 0x4000; + if ( !(i & 0x0040) ) x |= 0x0800; + + if ( !(i & 0x0040) && !(i & 0x0001) ) x |= 0x0100; // almost!! + + if ( ((i & 0x0040)&&((i & 0x0020)||(i & 0x0010))) || !(i & 0x0001) ) x |= 0x0200; // almost!! + if ( (!(i & 0x0040) || !(i & 0x0008)) && !(i & 0x0001) ) x |= 0x0008; + if ( (i & 0x0040) || !(i & 0x0020) || (i & 0x0001) ) x |= 0x0001; // almost!! + rom[i] ^= x; + } */ /* - for (i = 0x25e00/2; i < 0x25f00/2; i++) - { - x = 0xa600; + for (i = 0x25e00/2; i < 0x25f00/2; i++) + { + x = 0xa600; - if ( (i & 0x0040) && (i & 0x0001) ) x |= 0x4000; - if ( (i & 0x0040) && (i & 0x0001) ) x |= 0x0800; - if ( !(i & 0x0001) ) x |= 0x0100; + if ( (i & 0x0040) && (i & 0x0001) ) x |= 0x4000; + if ( (i & 0x0040) && (i & 0x0001) ) x |= 0x0800; + if ( !(i & 0x0001) ) x |= 0x0100; - if ( ( (i & 0x0040) && (i & 0x0008) && !(i & 0x0001)) || - ( !(i & 0x0040) && ((i & 0x0004) ^ (i & 0x0002)) && !(i & 0x0001) ) ) x |= 0x0002; // almost!! + if ( ( (i & 0x0040) && (i & 0x0008) && !(i & 0x0001)) || + ( !(i & 0x0040) && ((i & 0x0004) ^ (i & 0x0002)) && !(i & 0x0001) ) ) x |= 0x0002; // almost!! - if ( !(i & 0x0040) || !(i & 0x0002) || (i & 0x0001) ) x |= 0x0001; - rom[i] ^= x; - } + if ( !(i & 0x0040) || !(i & 0x0002) || (i & 0x0001) ) x |= 0x0001; + rom[i] ^= x; + } */ for (i = 0x26f00/2; i < 0x27000/2; i++) diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index 1ac68036d7805..bc8b2ce317cb9 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -475,7 +475,7 @@ static MACHINE_CONFIG_START( cabal, cabal_state ) MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(sound_map) - + MCFG_MACHINE_START_OVERRIDE(cabal_state,cabal) /* video hardware */ diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index 2e23106f9aeee..196e48cb9a140 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -293,7 +293,7 @@ INPUT_PORTS_END void capbowl_state::machine_start() { m_update_timer = timer_alloc(TIMER_UPDATE); - + save_item(NAME(m_blitter_addr)); save_item(NAME(m_last_trackball_val)); } diff --git a/src/mame/drivers/cocoloco.c b/src/mame/drivers/cocoloco.c index 8932025cc9bde..e50969abada56 100644 --- a/src/mame/drivers/cocoloco.c +++ b/src/mame/drivers/cocoloco.c @@ -192,21 +192,21 @@ class cocoloco_state : public driver_device required_device m_maincpu; required_device m_palette; - + UINT8 *m_videoram; UINT8 m_videobank; - + DECLARE_READ8_MEMBER(vram_r); DECLARE_WRITE8_MEMBER(vram_w); DECLARE_WRITE8_MEMBER(vbank_w); DECLARE_WRITE8_MEMBER(vram_clear_w); DECLARE_WRITE8_MEMBER(coincounter_w); - + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - + virtual void video_start(); DECLARE_PALETTE_INIT(cocoloco); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c index 7570f3ea05272..a565d8b502cba 100644 --- a/src/mame/drivers/dynax.c +++ b/src/mame/drivers/dynax.c @@ -1564,14 +1564,14 @@ static ADDRESS_MAP_START( cdracula_io_map, AS_IO, 8, dynax_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE( 0x01, 0x07 ) AM_WRITE(cdracula_blitter_rev2_w) // Blitter + Destination Layers AM_RANGE( 0x10, 0x10 ) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE( 0x11, 0x11 ) AM_NOP // unpopulated oki + AM_RANGE( 0x11, 0x11 ) AM_NOP // unpopulated oki // AM_RANGE( 0x12, 0x12 ) AM_WRITENOP // CRT Controller // AM_RANGE( 0x13, 0x13 ) AM_WRITENOP // CRT Controller AM_RANGE( 0x20, 0x20 ) AM_READ_PORT("P1") // P1 AM_RANGE( 0x21, 0x21 ) AM_READ_PORT("P2") // P2 AM_RANGE( 0x22, 0x22 ) AM_READ_PORT("COINS") // Coins AM_RANGE( 0x30, 0x30 ) AM_WRITE(dynax_layer_enable_w) // Layers Enable -// AM_RANGE( 0x31, 0x31 ) AM_WRITE(dynax_rombank_w) // BANK ROM Select +// AM_RANGE( 0x31, 0x31 ) AM_WRITE(dynax_rombank_w) // BANK ROM Select AM_RANGE( 0x32, 0x32 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen AM_RANGE( 0x33, 0x33 ) AM_WRITE(dynax_blit_flags_w) // Flags + Do Blit AM_RANGE( 0x34, 0x34 ) AM_WRITE(dynax_blit_palette01_w) // Layers Palettes (Low Bits) @@ -2042,7 +2042,7 @@ static INPUT_PORTS_START( cdracula ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW1") // port $61 -> c217 + PORT_START("DSW1") // port $61 -> c217 PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "SW1:1,2" ) PORT_DIPSETTING( 0x03, DEF_STR( Easy ) ) // 44 PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) // 47 @@ -2062,9 +2062,9 @@ static INPUT_PORTS_START( cdracula ) PORT_DIPNAME( 0x40, 0x40, "Unknown 1-7" ) PORT_DIPLOCATION( "SW1:7" ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION( "SW1:8" ) + PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION( "SW1:8" ) - PORT_START("DSW2") // port $60 -> c216 + PORT_START("DSW2") // port $60 -> c216 PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW2:1,2" ) PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) @@ -3190,7 +3190,7 @@ static INPUT_PORTS_START( jantouki ) PORT_DIPSETTING( 0x00, "12:00" ) PORT_DIPNAME( 0x08, 0x00, "Nudity" ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPSETTING( 0x08, DEF_STR( No ) ) // Moles On Gal's Face + PORT_DIPSETTING( 0x08, DEF_STR( No ) ) // Moles On Gal's Face PORT_DIPNAME( 0x10, 0x10, "Buy Screen Bonus Points" ) /* Sets your points to 100 every time you arrive at the screen for buying special items. */ PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3363,7 +3363,7 @@ static INPUT_PORTS_START( mjembase ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, "Nudity" ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face + PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face PORT_START("FAKE") /* IN10 - Fake DSW */ PORT_DIPNAME( 0xff, 0xff, "Allow Bets" ) @@ -3500,7 +3500,7 @@ static INPUT_PORTS_START( mjelct3 ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x80, 0x00, "Nudity" ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face + PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face PORT_START("FAKE") /* IN10 - Fake DSW */ PORT_DIPNAME( 0xff, 0xff, "Allow Bets" ) @@ -4354,7 +4354,7 @@ static MACHINE_CONFIG_START( cdracula, dynax_state ) MCFG_MACHINE_START_OVERRIDE(dynax_state,dynax) MCFG_MACHINE_RESET_OVERRIDE(dynax_state,dynax) -// MCFG_NVRAM_ADD_0FILL("nvram") // no battery +// MCFG_NVRAM_ADD_0FILL("nvram") // no battery /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c index f1856cdb40ada..804a3228031df 100644 --- a/src/mame/drivers/fgoal.c +++ b/src/mame/drivers/fgoal.c @@ -339,7 +339,7 @@ GFXDECODE_END void fgoal_state::machine_start() { m_interrupt_timer = timer_alloc(TIMER_INTERRUPT); - + save_item(NAME(m_xpos)); save_item(NAME(m_ypos)); save_item(NAME(m_current_color)); diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index bd64e087f4a07..4d06d03db9f3b 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -61,10 +61,10 @@ class flyball_state : public driver_device /* misc */ UINT8 m_potmask; UINT8 m_potsense; - + emu_timer *m_pot_clear_timer; emu_timer *m_quarter_timer; - + DECLARE_READ8_MEMBER(input_r); DECLARE_READ8_MEMBER(scanline_r); DECLARE_READ8_MEMBER(potsense_r); @@ -75,17 +75,17 @@ class flyball_state : public driver_device DECLARE_WRITE8_MEMBER(pitcher_vert_w); DECLARE_WRITE8_MEMBER(pitcher_horz_w); DECLARE_WRITE8_MEMBER(misc_w); - + TILEMAP_MAPPER_MEMBER(get_memory_offset); TILE_GET_INFO_MEMBER(get_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(flyball); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_CALLBACK_MEMBER(joystick_callback); TIMER_CALLBACK_MEMBER(quarter_callback); @@ -428,7 +428,7 @@ void flyball_state::machine_start() for (int i = 0; i < len; i++) buf[i ^ 0x1ff] = ROM[i]; memcpy(ROM, buf, len); - + m_pot_clear_timer = timer_alloc(TIMER_POT_CLEAR); m_quarter_timer = timer_alloc(TIMER_QUARTER); diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c index f1868c108a51c..7daa0f8d6260a 100644 --- a/src/mame/drivers/goldstar.c +++ b/src/mame/drivers/goldstar.c @@ -2993,8 +2993,8 @@ static INPUT_PORTS_START( ns8linew ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) // manual says 1c/8c - PORT_DIPSETTING( 0x28, "1 Coin/10 Credits" ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) // manual says 1c/8c + PORT_DIPSETTING( 0x28, "1 Coin/10 Credits" ) PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:7") /* not checked */ PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3375,12 +3375,12 @@ static INPUT_PORTS_START( bingowng ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) -/* On a W-4 PCB these are used as: "Special Odds-Prohibition Of Winning...(Odds B)" - see DSW2-7 - PORT_DIPNAME( 0x80, 0x00, "Special Odds" ) PORT_DIPLOCATION("DSW1:7,8") - PORT_DIPSETTING( 0x00, "None" ) - PORT_DIPSETTING( 0x40, "x300 (x1000)" ) - PORT_DIPSETTING( 0x80, "x500 (x5000" ) - PORT_DIPSETTING( 0xc0, "x1000 (x10000) +/* On a W-4 PCB these are used as: "Special Odds-Prohibition Of Winning...(Odds B)" - see DSW2-7 + PORT_DIPNAME( 0x80, 0x00, "Special Odds" ) PORT_DIPLOCATION("DSW1:7,8") + PORT_DIPSETTING( 0x00, "None" ) + PORT_DIPSETTING( 0x40, "x300 (x1000)" ) + PORT_DIPSETTING( 0x80, "x500 (x5000" ) + PORT_DIPSETTING( 0xc0, "x1000 (x10000) */ PORT_START("DSW2") @@ -3406,13 +3406,13 @@ static INPUT_PORTS_START( bingowng ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) -/* On a W-4 PCB these are used as: - PORT_DIPNAME( 0x40, 0x40, "Odds" ) PORT_DIPLOCATION("DSW2:7") - PORT_DIPSETTING( 0x40, "Type A" ) - PORT_DIPSETTING( 0x00, "Type B" ) - PORT_DIPNAME( 0x80, 0x80, "Type Of W-Up Game" ) PORT_DIPLOCATION("DSW2:8") - PORT_DIPSETTING( 0x80, "Slots" ) - PORT_DIPSETTING( 0x00, "Big/Small Card" ) +/* On a W-4 PCB these are used as: + PORT_DIPNAME( 0x40, 0x40, "Odds" ) PORT_DIPLOCATION("DSW2:7") + PORT_DIPSETTING( 0x40, "Type A" ) + PORT_DIPSETTING( 0x00, "Type B" ) + PORT_DIPNAME( 0x80, 0x80, "Type Of W-Up Game" ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x80, "Slots" ) + PORT_DIPSETTING( 0x00, "Big/Small Card" ) */ /* On a W-4 PCB DSW3 & DSW4 are reversed and all dips on DSW4 are set to off! */ @@ -3672,7 +3672,7 @@ static INPUT_PORTS_START( schery97 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Key Out / Attendant") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Settings") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // doesn't work in v352c4 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Stats") // doesn't work in v352c4 PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x03, "Game Level (Difficulty)" ) PORT_DIPLOCATION("DSW1:1,2,3") /* OK */ @@ -4335,14 +4335,14 @@ static INPUT_PORTS_START( roypok96a ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x00, "Unused - leave off" ) PORT_DIPLOCATION("DSW5:6") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x00, "Reset Remaining Score To Zero" ) PORT_DIPLOCATION("DSW5:7") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) PORT_DIPNAME( 0x80, 0x00, "Count Game To Issue Ticket" ) PORT_DIPLOCATION("DSW5:8") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) INPUT_PORTS_END @@ -4472,7 +4472,7 @@ static INPUT_PORTS_START( pokonl97 ) PORT_DIPNAME( 0x10, 0x10, "Auto Ticket Dispense" ) PORT_DIPLOCATION("DSW4:5") /* not checked */ PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0xe0, 0xe0, "Ticket Dispense Mode" ) PORT_DIPLOCATION("DSW4:6,7,8") + PORT_DIPNAME( 0xe0, 0xe0, "Ticket Dispense Mode" ) PORT_DIPLOCATION("DSW4:6,7,8") PORT_DIPSETTING( 0xe0, "Continuous" ) PORT_DIPSETTING( 0xc0, "Max 1 Ticket Per Game" ) PORT_DIPSETTING( 0xa0, "Max 2 Ticket Per Game" ) diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c index 7749e0aa4eba1..0b01b59c82338 100644 --- a/src/mame/drivers/hng64.c +++ b/src/mame/drivers/hng64.c @@ -918,7 +918,7 @@ WRITE32_MEMBER(hng64_state::hng64_sprite_clear_odd_w) WRITE32_MEMBER(hng64_state::hng64_vregs_w) { -// printf("hng64_vregs_w %02x, %08x %08x\n", offset * 4, data, mem_mask); +// printf("hng64_vregs_w %02x, %08x %08x\n", offset * 4, data, mem_mask); COMBINE_DATA(&m_videoregs[offset]); } @@ -1503,7 +1503,7 @@ void hng64_state::machine_start() { m_videoregs[i] = 0xdeadbeef; } - + } @@ -1569,8 +1569,7 @@ MACHINE_CONFIG_END ROM_REGION( 0x0100000, "user2", 0 ) /* KL5C80 BIOS */ \ ROM_LOAD ( "from1.bin", 0x000000, 0x080000, CRC(6b933005) SHA1(e992747f46c48b66e5509fe0adf19c91250b00c7) ) \ ROM_REGION( 0x0100000, "fpga", 0 ) /* FPGA data */ \ - ROM_LOAD ( "rom1.bin", 0x000000, 0x01ff32, CRC(4a6832dc) SHA1(ae504f7733c2f40450157cd1d3b85bc83fac8569) ) \ - + ROM_LOAD ( "rom1.bin", 0x000000, 0x01ff32, CRC(4a6832dc) SHA1(ae504f7733c2f40450157cd1d3b85bc83fac8569) ) ROM_START( hng64 ) /* BIOS */ diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index bd6725d711a92..9759df963e213 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -57,7 +57,7 @@ class hotblock_state : public driver_device /* devices */ required_device m_maincpu; required_device m_palette; - + /* memory pointers */ required_shared_ptr m_vram; @@ -67,15 +67,15 @@ class hotblock_state : public driver_device /* memory */ UINT8 m_pal[0x10000]; - + DECLARE_READ8_MEMBER(video_read); DECLARE_READ8_MEMBER(port4_r); DECLARE_WRITE8_MEMBER(port4_w); DECLARE_WRITE8_MEMBER(port0_w); DECLARE_WRITE8_MEMBER(video_write); - + virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/iteagle.c b/src/mame/drivers/iteagle.c index dfcf369441ece..9d54105484380 100644 --- a/src/mame/drivers/iteagle.c +++ b/src/mame/drivers/iteagle.c @@ -105,9 +105,9 @@ class iteagle_state : public driver_device public: iteagle_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + m_maincpu(*this, "maincpu") {} - + required_device m_maincpu; virtual void machine_start(); @@ -129,7 +129,7 @@ static MACHINE_CONFIG_START( gtfore, iteagle_state ) MCFG_CPU_ADD("maincpu", VR4310LE, 166666666) MCFG_MIPS3_ICACHE_SIZE(16384) MCFG_MIPS3_DCACHE_SIZE(16384) - + MCFG_PCI_ROOT_ADD( ":pci") MCFG_VRC4373_ADD( ":pci:00.0", ":maincpu") MCFG_ITEAGLE_FPGA_ADD( ":pci:06.0") @@ -144,7 +144,7 @@ static MACHINE_CONFIG_START( gtfore, iteagle_state ) MCFG_SCREEN_SIZE(640, 350) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 349) MCFG_SCREEN_UPDATE_DEVICE(":pci:09.0", voodoo_pci_device, screen_update) - + MACHINE_CONFIG_END @@ -167,7 +167,7 @@ static INPUT_PORTS_START( iteagle ) PORT_DIPNAME( 0x0F00, 0x0000, "GAME" ) PORT_DIPNAME( 0x00F0, 0x0000, "MAJOR" ) PORT_DIPNAME( 0x000F, 0x0000, "MINOR" ) - + INPUT_PORTS_END static INPUT_PORTS_START( gtfore05 ) @@ -263,7 +263,7 @@ ROM_START( gtfore02 ) DISK_REGION( ":pci:06.1:ide:0:hdd:image" ) DISK_IMAGE( "golf_fore_2002_v2.01.04_umv", 0, SHA1(e902b91bd739daee0b95b10e5cf33700dd63a76b) ) /* Labeled Golf Fore! V2.01.04 UMV */ //DISK_REGION( "ide:1:cdrom" ) // program CD-ROM - + ROM_END ROM_START( gtfore02o ) diff --git a/src/mame/drivers/jankenmn.c b/src/mame/drivers/jankenmn.c index c28b74a276c76..fe874996a7917 100644 --- a/src/mame/drivers/jankenmn.c +++ b/src/mame/drivers/jankenmn.c @@ -153,11 +153,11 @@ class jankenmn_state : public driver_device m_maincpu(*this, "maincpu") { } required_device m_maincpu; - + DECLARE_WRITE8_MEMBER(lamps1_w); DECLARE_WRITE8_MEMBER(lamps2_w); DECLARE_WRITE8_MEMBER(lamps3_w); - + DECLARE_CUSTOM_INPUT_MEMBER(hopper_status_r); }; diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c index 5a32033f88c5f..14be78b6dbb50 100644 --- a/src/mame/drivers/jchan.c +++ b/src/mame/drivers/jchan.c @@ -228,9 +228,9 @@ class jchan_state : public driver_device DECLARE_DRIVER_INIT(jchan); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(vblank); }; @@ -290,7 +290,7 @@ void jchan_state::video_start() m_spritegen1->skns_sprite_kludge(0,0); m_spritegen2->skns_sprite_kludge(0,0); - + save_item(NAME(m_irq_sub_enable)); save_pointer(NAME(m_sprite_ram32_1), 0x4000/4); save_pointer(NAME(m_sprite_ram32_2), 0x4000/4); diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index 538671d705d55..36f18235a0b9d 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -105,11 +105,11 @@ class junofrst_state : public tutankhm_state required_device m_filter_0_0; required_device m_filter_0_1; required_device m_filter_0_2; - + UINT8 m_blitterdata[4]; int m_i8039_status; int m_last_irq; - + DECLARE_WRITE8_MEMBER(blitter_w); DECLARE_WRITE8_MEMBER(bankselect_w); DECLARE_WRITE8_MEMBER(sh_irqtrigger_w); diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index e26226b702eb1..8fa6c0cb04ce7 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -1785,7 +1785,7 @@ static MACHINE_CONFIG_START( m72_base, m72_state ) MCFG_CPU_ADD("soundcpu",Z80, SOUND_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_ram_map) MCFG_CPU_IO_MAP(sound_portmap) - + /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", m72) @@ -1834,7 +1834,7 @@ static MACHINE_CONFIG_DERIVED( xmultiplm72, m72_8751 ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) MACHINE_CONFIG_END @@ -1852,7 +1852,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( dkgenm72, m72 ) // dervices from 'm72' because we use 'fake nmi' on the soundcpu - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) MACHINE_CONFIG_END @@ -1871,7 +1871,7 @@ static MACHINE_CONFIG_DERIVED( xmultipl, m72 ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) @@ -1948,7 +1948,7 @@ static MACHINE_CONFIG_START( dbreed, m72_state ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) /* video hardware */ @@ -1979,7 +1979,7 @@ static MACHINE_CONFIG_START( hharry, m72_state ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) /* video hardware */ @@ -2011,7 +2011,7 @@ static MACHINE_CONFIG_START( hharryu, m72_state ) MCFG_CPU_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - + MCFG_MACHINE_RESET_OVERRIDE(m72_state,xmultipl) /* video hardware */ diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c index d58ca5a221301..27134b2843bf1 100644 --- a/src/mame/drivers/madalien.c +++ b/src/mame/drivers/madalien.c @@ -437,7 +437,7 @@ ROM_START( madalienb ) ROM_LOAD( "mc-1.3k", 0x0000, 0x0400, BAD_DUMP CRC(2710c47e) SHA1(337e4f160c7db143ec3bfae3e08e8789b9e41cc5) ) // taken from chwy, see below, tile 2 is mismatched with the 2 roms from the actual PCB. ROM_LOAD( "me-1.3l", 0x0400, 0x0400, CRC(7328a425) SHA1(327adc8b0e25d93f1ae98a44c26d0aaaac1b1a9c) ) ROM_LOAD( "md-1.3m", 0x0800, 0x0400, CRC(b5329929) SHA1(86890e1b7cc8cb31fc0dcbc2d3cff02e4cf95619) ) - + /* for reference, this is the data used by Highway Chase on the cassette system when extracted ROM_REGION( 0x0400, "user1", 0 ) // background tile map ROM_LOAD( "rom1", 0x0000, 0x0400, CRC(9b04c446) SHA1(918013f3c0244ab6a670b9d1b6b642298e2c5ab8) ) diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index 5baa1d7c4d073..b8e72700fd282 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -47,18 +47,18 @@ class mgolf_state : public driver_device DECLARE_READ8_MEMBER(dial_r); DECLARE_READ8_MEMBER(misc_r); DECLARE_WRITE8_MEMBER(wram_w); - + TILE_GET_INFO_MEMBER(get_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(mgolf); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_CALLBACK_MEMBER(interrupt_callback); - + void update_plunger( ); double calc_plunger_pos(); @@ -343,7 +343,7 @@ GFXDECODE_END void mgolf_state::machine_start() { m_interrupt_timer = timer_alloc(TIMER_INTERRUPT); - + save_item(NAME(m_prev)); save_item(NAME(m_mask)); save_item(NAME(m_time_pushed)); diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index 52918dd89b1af..9357761b511e7 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -238,9 +238,9 @@ . NEO-AEG CHA42G-3 . NEO-AEG CHA42G-4 . NEO-AEG CHA256 - . NEO-AEG CHA256 B + . NEO-AEG CHA256 B . NEO-AEG CHA256[B] - . NEO-AEG CHA256BY + . NEO-AEG CHA256BY . NEO-AEG CHA256RY . NEO-AEG CHA512Y . NEO-AEG CHAFIO (1999.8.10) - used with NEO-CMC 90G06C7042 or NEO-CMC 90G06C7050 @@ -263,7 +263,7 @@ . NEO-AEG PROG4096 B . NEO-AEG PROGGS . NEO-AEG PROGTOP2 - . NEO-AEG PROGTOP2Y + . NEO-AEG PROGTOP2Y . NEO-AEG PROGEOP (1999.4.2) . NEO-AEG PROGLBA (1999.7.6) . NEO-AEG PROGRK @@ -310,16 +310,16 @@ GIGA PROG Board 1.0 GIGA PROG Board 1.5 - - Unofficial pcb's from NEOBITZ: - - MVS CHA: - CHARBITZ1 2013.12.01 - - MVS PROG: - PROGBITZ1 2013.12.01 - - + + Unofficial pcb's from NEOBITZ: + + MVS CHA: + CHARBITZ1 2013.12.01 + + MVS PROG: + PROGBITZ1 2013.12.01 + + Neo-Geo game PCB infos by Johnboy diff --git a/src/mame/drivers/neogeo_noslot.c b/src/mame/drivers/neogeo_noslot.c index dea6d0087287b..9c839f06fd8cc 100644 --- a/src/mame/drivers/neogeo_noslot.c +++ b/src/mame/drivers/neogeo_noslot.c @@ -1237,7 +1237,7 @@ ROM_END ID-0023 . NGM-023 NEO-MVS PROG42G / NEO-MVS CHA42G - NEO-MVS PROGTOP / NEO-MVS CHA-256 + NEO-MVS PROGTOP / NEO-MVS CHA-256 Boards used for the Korean release . NGH-023 NEO-AEG PROG42G-1 / NEO-AEG CHA42G-1 @@ -1915,7 +1915,7 @@ ROM_START( aof ) /* MVS AND AES VERSION */ ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "044-p1.p1", 0x000000, 0x080000, CRC(ca9f7a6d) SHA1(4d28ef86696f7e832510a66d3e8eb6c93b5b91a1) ) /* TC534200 */ /* also found sets with ep1 or p1 on eprom. */ - + NEO_SFIX_128K( "044-s1.s1", CRC(89903f39) SHA1(a04a0c244a5d5c7a595fcf649107969635a6a8b6) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "044-m1.m1", CRC(0987e4bb) SHA1(8fae4b7fac09d46d4727928e609ed9d3711dbded) ) /* TC531001 */ @@ -1950,7 +1950,7 @@ ROM_START( samsho ) /* MVS VERSION */ ROM_LOAD16_WORD_SWAP( "045-p1.p1", 0x000000, 0x100000, CRC(dfe51bf0) SHA1(2243af3770a516ae698b69bcd9daf53632d9128d) ) /* TC538200 */ ROM_LOAD16_WORD_SWAP( "045-pg2.sp2", 0x100000, 0x100000, CRC(46745b94) SHA1(d9e959fd1f88c9402915c1d0dcdb4a9e3d49cdcb) ) /* TC538200 */ /* also found set with ep1 / ep2 on eprom and sp2 on maskrom; same rom data as samshoh is used. */ - + NEO_SFIX_128K( "045-s1.s1", CRC(9142a4d3) SHA1(54088e99fcfd75fd0f94852890a56350066a05a3) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "045-m1.m1", CRC(95170640) SHA1(125c502db0693e8d11cef619b090081c14a9a300) ) /* TC531001 */ @@ -2271,7 +2271,7 @@ ROM_START( wh1h ) /* AES VERSION */ ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "053-p1.p1", 0x000000, 0x080000, CRC(95b574cb) SHA1(b7b7af6a04c3d902e7f8852897741ecaf0b1062c) ) /* TC534200 */ ROM_LOAD16_WORD_SWAP( "053-p2.p2", 0x080000, 0x080000, CRC(f198ed45) SHA1(24ccc091e97f63796562bb5b30df51f39bd504ef) ) /* TC534200 */ - + NEO_SFIX_128K( "053-s1.s1", CRC(8c2c2d6b) SHA1(87fa79611c6f8886dcc8766814829c669c65b40f) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "053-m1.m1", CRC(1bd9d04b) SHA1(65cd7b002123ed1a3111e3d942608d0082799ff3) ) /* TC531001 */ @@ -2615,7 +2615,7 @@ ROM_START( ssideki2 ) /* MVS AND AES VERSION */ ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "061-p1.p1", 0x000000, 0x100000, CRC(5969e0dc) SHA1(78abea880c125ec5a85bef6404478512a34b5513) ) /* mask rom TC538200 */ /* also found MVS sets with ep1 / ep2 on eprom; correct chip label unknown. */ - + NEO_SFIX_128K( "061-s1.s1", CRC(226d1b68) SHA1(de010f6fda3ddadb181fe37daa6105f22e78b970) ) /* mask rom TC531000 */ NEO_BIOS_AUDIO_128K( "061-m1.m1", CRC(156f6951) SHA1(49686f615f109a02b4f23931f1c84fee13872ffd) ) /* mask rom TC531001 */ @@ -2679,7 +2679,7 @@ ROM_START( samsho2 ) /* MVS AND AES VERSION */ ROM_LOAD16_WORD_SWAP( "063-p1.p1", 0x100000, 0x100000, CRC(22368892) SHA1(0997f8284aa0f57a333be8a0fdea777d0d01afd6) ) /* TC5316200 */ ROM_CONTINUE( 0x000000, 0x100000 ) /* also found MVS sets with ep1 / ep2 on eprom and p1 / sp2 on maskrom; correct chip label unknown */ - + NEO_SFIX_128K( "063-s1.s1", CRC(64a5cd66) SHA1(12cdfb27bf9ccd5a8df6ddd4628ef7cf2c6d4964) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "063-m1.m1", CRC(56675098) SHA1(90429fc40d056d480d0e2bbefbc691d9fa260fc4) ) /* TC531001 */ @@ -2965,7 +2965,7 @@ ROM_END BANK 3 NOT USED ****************************************/ - ROM_START( b2b ) + ROM_START( b2b ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "071.p1", 0x000000, 0x080000, CRC(7687197d) SHA1(4bb9cb7819807f7a7e1f85f1c4faac4a2f8761e8) ) @@ -4252,7 +4252,7 @@ ROM_START( kof96 ) /* MVS VERSION */ ROM_LOAD16_WORD_SWAP( "214-p1.p1", 0x000000, 0x100000, CRC(52755d74) SHA1(4232d627f1d2e6ea9fc8cf01571d77d4d5b8a1bb) ) /* TC538200 */ ROM_LOAD16_WORD_SWAP( "214-p2.sp2", 0x100000, 0x200000, CRC(002ccb73) SHA1(3ae8df682c75027ca82db25491021eeba00a267e) ) /* TC5316200 */ /* also found sets with ep1 / ep2 / ep3 / ep4 on eprom and 214-P5 on TC5316200; correct chip labels for eproms is unknown */ - + NEO_SFIX_128K( "214-s1.s1", CRC(1254cbdb) SHA1(fce5cf42588298711a3633e9c9c1d4dcb723ac76) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "214-m1.m1", CRC(dabc427c) SHA1(b76722ed142ee7addceb4757424870dbd003e8b3) ) /* TC531001 */ @@ -5013,9 +5013,9 @@ ROM_START( lastblad ) /* MVS VERSION */ ROM_REGION( 0x500000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "234-p1.p1", 0x000000, 0x100000, CRC(e123a5a3) SHA1(a3ddabc00feeb54272b145246612ad4632b0e413) ) /* TC538200 */ ROM_LOAD16_WORD_SWAP( "234-p2.sp2", 0x100000, 0x400000, CRC(0fdc289e) SHA1(1ff31c0b0f4f9ddbedaf4bcf927faaae81892ec7) ) /* TC5332205 */ - /* also found sets with p1 / sp2 / ep1 / ep2 / m1 on eprom with sticker */ + /* also found sets with p1 / sp2 / ep1 / ep2 / m1 on eprom with sticker */ /* chip label is 0234-P1, 0234-SP2, 0234-EP1, 0234-EP2 and 0234-M1 */ - + NEO_SFIX_128K( "234-s1.s1", CRC(95561412) SHA1(995de272f572fd08d909d3d0af4251b9957b3640) ) /* TC531000 */ NEO_BIOS_AUDIO_128K( "234-m1.m1", CRC(087628ea) SHA1(48dcf739bb16699af4ab8ed632b7dcb25e470e06) ) /* TC531001 */ @@ -6193,7 +6193,7 @@ ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */ /* revision 20 /* The SMA for this release has a green colour marking; the older revision has a white colour marking */ ROM_LOAD16_WORD_SWAP( "256-pg1.p1", 0x100000, 0x400000, CRC(b07edfd5) SHA1(dcbd9e500bfae98d754e55cdbbbbf9401013f8ee) ) /* TC5332202 */ ROM_LOAD16_WORD_SWAP( "256-pg2.p2", 0x500000, 0x400000, CRC(6097c26b) SHA1(248ec29d21216f29dc6f5f3f0e1ad1601b3501b6) ) /* TC5332202 */ - + ROM_Y_ZOOM /* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */ @@ -6230,7 +6230,7 @@ ROM_START( mslug3h ) /* Original Version - Encrypted GFX */ /* revision 2000.3.1 ROM_LOAD16_WORD_SWAP( "256-ph2.sp2", 0x100000, 0x400000, CRC(1f3d8ce8) SHA1(08b05a8abfb86ec09a5e758d6273acf1489961f9) ) /* also found AES set with p1 / p2 on maskrom on NEO-AEG PROGLBA (NEO-SMA); chip labels is 256-PG1 and 256-PG2 */ /* The SMA for this release has a pink color marking */ - + ROM_Y_ZOOM /* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */ @@ -6748,7 +6748,7 @@ ROM_START( pnyaa ) /* Encrypted Set */ /* MVS ONLY RELEASE */ ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_WORD_SWAP( "267-p1.p1", 0x000000, 0x100000, CRC(112fe2c0) SHA1(01420e051f0bdbd4f68ce306a3738161b96f8ba8) ) /* mask rom TC538200 */ /* also found set with p1 and m1 on eprom with sticker; chip labels is PN 2.02 and M1 */ - + ROM_Y_ZOOM /* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */ @@ -6820,7 +6820,7 @@ ROM_START( mslug5h ) /* Encrypted Set */ /* AES release of the game but is also ROM_LOAD32_WORD_SWAP( "268-p1c.p1", 0x000000, 0x400000, CRC(3636690a) SHA1(e0da714b4bdc6efffe1250ded02ebddb3ab6d7b3) ) ROM_LOAD32_WORD_SWAP( "268-p2c.p2", 0x000002, 0x400000, CRC(8dfc47a2) SHA1(27d618cfbd0107a4d2a836797e967b39d2eb4851) ) /* also found AES set with p1 / p2 on maskrom; chip labels is 268-P1CR2 and 268-P2CR2 */ - + ROM_Y_ZOOM /* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */ diff --git a/src/mame/drivers/paradise.c b/src/mame/drivers/paradise.c index a08aa36bb8c6d..bdb91cb46a041 100644 --- a/src/mame/drivers/paradise.c +++ b/src/mame/drivers/paradise.c @@ -660,7 +660,7 @@ GFXDECODE_END void paradise_state::machine_start() { int bank_n = memregion("maincpu")->bytes() / 0x4000; - + membank("prgbank")->configure_entries(0, bank_n, memregion("maincpu")->base(), 0x4000); save_item(NAME(m_palbank)); diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 71a334615031c..6cf5fd7c676b9 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -9256,7 +9256,7 @@ Joker Poker P17A 95.50% ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "xmp00025.u67", 0x00000, 0x10000, CRC(5d39ff71) SHA1(0a5f67e61ae0e8a08cc551ab4271ffc97c343ae3) ) /* International multi currency version - Auto Hold always on */ /* Also compatible with XMP00002, XMP00003, XMP00004, XMP00006 and XMP00024 programs */ - + ROM_REGION( 0x10000, "user1", 0 ) ROM_LOAD( "xm00013p.u66", 0x00000, 0x10000, CRC(4fde73f9) SHA1(f8eb6fb0585e8df9a7eb2ddc65bb20b120753d7a) ) diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index ac791c1b52f33..7467d262c9195 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -1375,7 +1375,7 @@ static MACHINE_CONFIG_START( hrdtimes, playmark_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* verified on pcb */ -// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead +// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead MCFG_PIC16C5x_READ_B_CB(READ8(playmark_state, playmark_snd_command_r)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(playmark_state, playmark_oki_w)) MCFG_PIC16C5x_READ_C_CB(READ8(playmark_state, playmark_snd_flag_r)) @@ -1416,7 +1416,7 @@ static MACHINE_CONFIG_START( hotmind, playmark_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq6_line_hold) // irq 2 and 6 point to the same location on hotmind MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* verified on pcb */ -// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead +// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead MCFG_PIC16C5x_READ_B_CB(READ8(playmark_state, playmark_snd_command_r)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(playmark_state, playmark_oki_w)) MCFG_PIC16C5x_READ_C_CB(READ8(playmark_state, playmark_snd_flag_r)) @@ -1462,7 +1462,7 @@ static MACHINE_CONFIG_START( luckboomh, playmark_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq6_line_hold) MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* verified on pcb */ -// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead +// MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // Banking data output but not wired. Port C is wired to the OKI banking instead MCFG_PIC16C5x_READ_B_CB(READ8(playmark_state, playmark_snd_command_r)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(playmark_state, playmark_oki_w)) MCFG_PIC16C5x_READ_C_CB(READ8(playmark_state, playmark_snd_flag_r)) diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c index 5998e87ba8526..b7da83ebe5cce 100644 --- a/src/mame/drivers/psychic5.c +++ b/src/mame/drivers/psychic5.c @@ -318,14 +318,14 @@ The first sprite data is located at f20b,then f21b and so on. MACHINE_START_MEMBER(psychic5_state, psychic5) { membank("mainbank")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000); - + save_item(NAME(m_bank_latch)); } MACHINE_START_MEMBER(psychic5_state, bombsa) { membank("mainbank")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); - + save_item(NAME(m_bank_latch)); } @@ -707,7 +707,7 @@ static MACHINE_CONFIG_START( psychic5, psychic5_state ) MCFG_CPU_IO_MAP(psychic5_soundport_map) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* Allow time for 2nd cpu to interleave */ - + MCFG_MACHINE_START_OVERRIDE(psychic5_state,psychic5) /* video hardware */ @@ -763,7 +763,7 @@ static MACHINE_CONFIG_START( bombsa, psychic5_state ) MCFG_CPU_IO_MAP(bombsa_soundport_map) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - + MCFG_MACHINE_START_OVERRIDE(psychic5_state,bombsa) /* video hardware */ diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index aeddf8a66a359..894102ea23cbc 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -123,14 +123,14 @@ class pturn_state : public driver_device TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); - + DECLARE_DRIVER_INIT(pturn); virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(sub_intgen); INTERRUPT_GEN_MEMBER(main_intgen); }; @@ -174,7 +174,7 @@ void pturn_state::video_start() m_fgmap->set_transparent_pen(0); m_bgmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pturn_state::get_bg_tile_info),this),TILEMAP_SCAN_ROWS,8, 8,32,32*8); m_bgmap->set_transparent_pen(0); - + save_item(NAME(m_bgbank)); save_item(NAME(m_fgbank)); save_item(NAME(m_bgpalette)); diff --git a/src/mame/drivers/re900.c b/src/mame/drivers/re900.c index 1c2cb63a56b30..7d335f9c0fb6e 100644 --- a/src/mame/drivers/re900.c +++ b/src/mame/drivers/re900.c @@ -101,18 +101,18 @@ class re900_state : public driver_device UINT8 m_ledant; UINT8 m_player; UINT8 m_stat_a; - + // common DECLARE_READ8_MEMBER(rom_r); DECLARE_WRITE8_MEMBER(cpu_port_0_w); DECLARE_WRITE8_MEMBER(watchdog_reset_w); - + // re900 specific DECLARE_READ8_MEMBER(re_psg_portA_r); DECLARE_READ8_MEMBER(re_psg_portB_r); DECLARE_WRITE8_MEMBER(re_mux_port_A_w); DECLARE_WRITE8_MEMBER(re_mux_port_B_w); - + DECLARE_DRIVER_INIT(re900); }; @@ -432,7 +432,7 @@ DRIVER_INIT_MEMBER(re900_state,re900) m_player = 1; m_stat_a = 1; m_psg_pa = m_psg_pb = m_mux_data = m_ledant = 0; - + save_item(NAME(m_psg_pa)); save_item(NAME(m_psg_pb)); save_item(NAME(m_mux_data)); diff --git a/src/mame/drivers/rltennis.c b/src/mame/drivers/rltennis.c index 40f3558cddcb6..4523bd4c6dca3 100644 --- a/src/mame/drivers/rltennis.c +++ b/src/mame/drivers/rltennis.c @@ -157,7 +157,7 @@ void rltennis_state::machine_start() m_samples_2 = memregion("samples2")->base(); m_gfx = memregion("gfx1")->base(); m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(rltennis_state::sample_player),this)); - + save_item(NAME(m_data760000)); save_item(NAME(m_data740000)); save_item(NAME(m_dac_counter)); diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c index 153ddbd73b684..baf5c66adbfc7 100644 --- a/src/mame/drivers/sandscrp.c +++ b/src/mame/drivers/sandscrp.c @@ -102,7 +102,7 @@ class sandscrp_state : public driver_device UINT8 m_vblank_irq; UINT8 m_latch1_full; UINT8 m_latch2_full; - + DECLARE_READ16_MEMBER(irq_cause_r); DECLARE_WRITE16_MEMBER(irq_cause_w); DECLARE_WRITE16_MEMBER(coincounter_w); @@ -114,12 +114,12 @@ class sandscrp_state : public driver_device DECLARE_READ8_MEMBER(latchstatus_r); DECLARE_READ8_MEMBER(soundlatch_r); DECLARE_WRITE8_MEMBER(soundlatch_w); - + virtual void machine_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof(screen_device &screen, bool state); - + INTERRUPT_GEN_MEMBER(interrupt); void update_irq_state(); }; @@ -150,7 +150,7 @@ UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap void sandscrp_state::machine_start() { membank("bank1")->configure_entries(0, 8, memregion("audiocpu")->base(), 0x4000); - + save_item(NAME(m_sprite_irq)); save_item(NAME(m_unknown_irq)); save_item(NAME(m_vblank_irq)); diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c index aea64789de422..ead37d0d5f137 100644 --- a/src/mame/drivers/scobra.c +++ b/src/mame/drivers/scobra.c @@ -1253,4 +1253,3 @@ GAME( 1981, hustlerb4, hustler, hustlerb4, hustler, driver_device, 0, GAME( 1982, mimonkey, 0, mimonkey, mimonkey, scramble_state, mimonkey, ROT90, "Universal Video Games", "Mighty Monkey", GAME_SUPPORTS_SAVE ) GAME( 1982, mimonsco, mimonkey, mimonkey, mimonsco, scramble_state, mimonsco, ROT90, "bootleg", "Mighty Monkey (bootleg on Super Cobra hardware)", GAME_SUPPORTS_SAVE ) - diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 3b2ba24c92dbb..c41cbf515c0e0 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -7796,7 +7796,7 @@ static MACHINE_CONFIG_START( downtown, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(57.42) /* verified on pcb */ @@ -7857,7 +7857,7 @@ static MACHINE_CONFIG_START( usclssic, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -7912,7 +7912,7 @@ static MACHINE_CONFIG_START( calibr50, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(57.42) /* verified on pcb */ @@ -7956,7 +7956,7 @@ static MACHINE_CONFIG_START( metafox, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8040,7 +8040,7 @@ static MACHINE_CONFIG_START( blandia, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8078,7 +8078,7 @@ static MACHINE_CONFIG_START( blandiap, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8196,7 +8196,7 @@ static MACHINE_CONFIG_START( daioh, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(57.42) /* verified on PCB */ @@ -8235,7 +8235,7 @@ static MACHINE_CONFIG_START( daiohp, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(57.42) /* verified on PCB */ @@ -8279,7 +8279,7 @@ static MACHINE_CONFIG_START( drgnunit, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8317,7 +8317,7 @@ static MACHINE_CONFIG_START( qzkklgy2, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8368,7 +8368,7 @@ static MACHINE_CONFIG_START( setaroul, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + MCFG_NVRAM_ADD_RANDOM_FILL("nvram") /* video hardware */ @@ -8412,7 +8412,7 @@ static MACHINE_CONFIG_START( eightfrc, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8456,7 +8456,7 @@ static MACHINE_CONFIG_START( extdwnhl, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8522,7 +8522,7 @@ static MACHINE_CONFIG_START( gundhara, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8568,7 +8568,7 @@ static MACHINE_CONFIG_START( jjsquawk, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8605,7 +8605,7 @@ static MACHINE_CONFIG_START( jjsquawb, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8651,7 +8651,7 @@ static MACHINE_CONFIG_START( kamenrid, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8820,7 +8820,7 @@ static MACHINE_CONFIG_START( madshark, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8866,7 +8866,7 @@ static MACHINE_CONFIG_START( magspeed, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8915,7 +8915,7 @@ static MACHINE_CONFIG_START( msgundam, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(56.66) /* between 56 and 57 to match a real PCB's game speed */ @@ -8956,7 +8956,7 @@ static MACHINE_CONFIG_START( oisipuzl, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -8996,7 +8996,7 @@ static MACHINE_CONFIG_START( triplfun, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9077,7 +9077,7 @@ static MACHINE_CONFIG_START( rezon, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9313,7 +9313,7 @@ static MACHINE_CONFIG_START( utoukond, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9365,7 +9365,7 @@ static MACHINE_CONFIG_START( wrofaero, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9411,7 +9411,7 @@ static MACHINE_CONFIG_START( zingzip, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9519,7 +9519,7 @@ static MACHINE_CONFIG_START( crazyfgt, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -9585,7 +9585,7 @@ static MACHINE_CONFIG_START( inttoote, seta_state ) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_PALETTE("palette") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - + /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c index 93d469a6e2a1e..9341a7c939251 100644 --- a/src/mame/drivers/seta2.c +++ b/src/mame/drivers/seta2.c @@ -585,7 +585,7 @@ void funcube_touchscreen_device::device_start() emu_timer *tm = timer_alloc(0); tm->adjust(attotime::from_ticks(1, clock()), 0, attotime::from_ticks(1, clock())); m_tx_cb.resolve_safe(); - + save_item(NAME(m_button_state)); save_item(NAME(m_serial_pos)); save_item(NAME(m_serial)); diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index e48adda2f6c10..f438caacd988b 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -107,7 +107,7 @@ class shougi_state : public driver_device int m_r; //UINT8 *m_cpu_sharedram; //UINT8 m_cpu_sharedram_control_val; - + DECLARE_WRITE8_MEMBER(cpu_sharedram_sub_w); DECLARE_WRITE8_MEMBER(cpu_sharedram_main_w); DECLARE_READ8_MEMBER(cpu_sharedram_r); @@ -118,12 +118,12 @@ class shougi_state : public driver_device DECLARE_WRITE8_MEMBER(nmi_disable_and_clear_line_w); DECLARE_WRITE8_MEMBER(nmi_enable_w); DECLARE_READ8_MEMBER(dummy_r); - + DECLARE_PALETTE_INIT(shougi); virtual void machine_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(vblank_nmi); }; diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index ef18f2bd45f87..9b80a8d4d143a 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -43,12 +43,12 @@ FEB-2003 AAT void sidearms_state::machine_start() { - membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x8000, 0x4000); + membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x8000, 0x4000); } WRITE8_MEMBER(sidearms_state::bankswitch_w) { - membank("bank1")->set_entry(data & 0x07); + membank("bank1")->set_entry(data & 0x07); } @@ -119,7 +119,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(sidearms_state::whizz_bankswitch_w) { - int bank = 0; + int bank = 0; switch (data & 0xC0) { case 0x00 : bank = 0; break; @@ -127,7 +127,7 @@ WRITE8_MEMBER(sidearms_state::whizz_bankswitch_w) case 0x80 : bank = 1; break; case 0xC0 : bank = 3; break; } - membank("bank1")->set_entry(bank); + membank("bank1")->set_entry(bank); } static ADDRESS_MAP_START( whizz_map, AS_PROGRAM, 8, sidearms_state ) diff --git a/src/mame/drivers/simple_st0016.c b/src/mame/drivers/simple_st0016.c index c6268e13c2751..ebf65b0b8ab73 100644 --- a/src/mame/drivers/simple_st0016.c +++ b/src/mame/drivers/simple_st0016.c @@ -33,7 +33,7 @@ Dips verified for Neratte Chu (nratechu) from manual void st0016_state::machine_start() { - membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); + membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); } static ADDRESS_MAP_START( st0016_mem, AS_PROGRAM, 8, st0016_state ) @@ -81,8 +81,8 @@ WRITE8_MEMBER(st0016_state::mux_select_w) WRITE8_MEMBER(st0016_state::st0016_rom_bank_w) { - membank("bank1")->set_entry(data); - // st0016_rom_bank = data; + membank("bank1")->set_entry(data); + // st0016_rom_bank = data; } static ADDRESS_MAP_START( st0016_io, AS_IO, 8, st0016_state ) diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c index 0b48fd943cd89..f8b3b8a4d705d 100644 --- a/src/mame/drivers/sothello.c +++ b/src/mame/drivers/sothello.c @@ -72,7 +72,7 @@ class sothello_state : public driver_device DECLARE_READ8_MEMBER(subcpu_status_r); DECLARE_WRITE8_MEMBER(msm_cfg_w); - virtual void machine_start(); + virtual void machine_start(); virtual void machine_reset(); TIMER_CALLBACK_MEMBER(subcpu_suspend); TIMER_CALLBACK_MEMBER(subcpu_resume); @@ -101,7 +101,7 @@ class sothello_state : public driver_device void sothello_state::machine_start() { - membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000); + membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000); } WRITE8_MEMBER(sothello_state::bank_w) @@ -114,7 +114,7 @@ WRITE8_MEMBER(sothello_state::bank_w) case 4: bank=2; break; case 8: bank=3; break; } - membank("bank1")->set_entry(bank); + membank("bank1")->set_entry(bank); } TIMER_CALLBACK_MEMBER(sothello_state::subcpu_suspend) diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c index 56197f2f321dc..4c8a7dd0cf8cb 100644 --- a/src/mame/drivers/speglsht.c +++ b/src/mame/drivers/speglsht.c @@ -134,7 +134,7 @@ class speglsht_state : public driver_device DECLARE_READ32_MEMBER(irq_ack_clear); DECLARE_DRIVER_INIT(speglsht); DECLARE_MACHINE_RESET(speglsht); - virtual void machine_start(); + virtual void machine_start(); DECLARE_VIDEO_START(speglsht); UINT32 screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); required_device m_palette; @@ -160,13 +160,13 @@ ADDRESS_MAP_END void speglsht_state::machine_start() { - membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); + membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); } // common rombank? should go in machine/st0016 with larger address space exposed? WRITE8_MEMBER(speglsht_state::st0016_rom_bank_w) { - membank("bank1")->set_entry(data); + membank("bank1")->set_entry(data); } diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c index 85b7be4405924..c0903ff5d4c0a 100644 --- a/src/mame/drivers/srmp2.c +++ b/src/mame/drivers/srmp2.c @@ -83,7 +83,7 @@ void srmp2_state::machine_start() MACHINE_START_MEMBER(srmp2_state,srmp2) { machine_start(); - + m_iox.reset = 0x1f; m_iox.ff_event = -1; m_iox.ff_1 = 0x00; @@ -92,14 +92,14 @@ MACHINE_START_MEMBER(srmp2_state,srmp2) m_iox.protcheck[1] = -1; m_iox.protlatch[1] = -1; m_iox.protcheck[2] = -1; m_iox.protlatch[2] = -1; m_iox.protcheck[3] = -1; m_iox.protlatch[3] = -1; - + save_item(NAME(m_color_bank)); } MACHINE_START_MEMBER(srmp2_state,srmp3) { machine_start(); - + m_iox.reset = 0xc8; m_iox.ff_event = 0xef; m_iox.ff_1 = -1; @@ -107,16 +107,16 @@ MACHINE_START_MEMBER(srmp2_state,srmp3) m_iox.protcheck[1] = 0x4c; m_iox.protlatch[1] = 0x00; m_iox.protcheck[2] = 0x1c; m_iox.protlatch[2] = 0x04; m_iox.protcheck[3] = 0x45; m_iox.protlatch[3] = 0x00; - - membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base(), 0x2000); - + + membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base(), 0x2000); + save_item(NAME(m_gfx_bank)); } MACHINE_START_MEMBER(srmp2_state,rmgoldyh) { machine_start(); - + m_iox.reset = 0xc8; m_iox.ff_event = 0xff; m_iox.ff_1 = -1; @@ -125,15 +125,15 @@ MACHINE_START_MEMBER(srmp2_state,rmgoldyh) m_iox.protcheck[2] = -1; m_iox.protlatch[2] = -1; m_iox.protcheck[3] = -1; m_iox.protlatch[3] = -1; - membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base(), 0x2000); - + membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base(), 0x2000); + save_item(NAME(m_gfx_bank)); } MACHINE_START_MEMBER(srmp2_state,mjyuugi) { machine_start(); - + m_iox.reset = 0x1f; m_iox.ff_event = -1; m_iox.ff_1 = 0x00; diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c index ab4bf6885dcae..04a278cf138e5 100644 --- a/src/mame/drivers/srmp5.c +++ b/src/mame/drivers/srmp5.c @@ -114,7 +114,7 @@ class srmp5_state : public driver_device DECLARE_READ8_MEMBER(cmd1_r); DECLARE_READ8_MEMBER(cmd2_r); DECLARE_READ8_MEMBER(cmd_stat8_r); - virtual void machine_start(); + virtual void machine_start(); DECLARE_DRIVER_INIT(srmp5); UINT32 screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -240,7 +240,7 @@ UINT32 srmp5_state::screen_update_srmp5(screen_device &screen, bitmap_rgb32 &bit void srmp5_state::machine_start() { - membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); + membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000); } WRITE32_MEMBER(srmp5_state::bank_w) @@ -400,7 +400,7 @@ READ8_MEMBER(srmp5_state::cmd_stat8_r) // common rombank? should go in machine/st0016 with larger address space exposed? WRITE8_MEMBER(srmp5_state::st0016_rom_bank_w) { - membank("bank1")->set_entry(data); + membank("bank1")->set_entry(data); } diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index e3c5c3860f5e0..ac2d05af38664 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -107,7 +107,7 @@ class srmp6_state : public driver_device DECLARE_WRITE16_MEMBER(paletteram_w); DECLARE_READ16_MEMBER(srmp6_irq_ack_r); DECLARE_DRIVER_INIT(INIT); - virtual void machine_start(); + virtual void machine_start(); virtual void video_start(); UINT32 screen_update_srmp6(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void update_palette(); @@ -309,7 +309,7 @@ UINT32 srmp6_state::screen_update_srmp6(screen_device &screen, bitmap_rgb32 &bit void srmp6_state::machine_start() { - membank("bank1")->configure_entries(0, 16, memregion("nile")->base(), 0x200000); + membank("bank1")->configure_entries(0, 16, memregion("nile")->base(), 0x200000); } WRITE16_MEMBER(srmp6_state::srmp6_input_select_w) @@ -340,8 +340,8 @@ WRITE16_MEMBER(srmp6_state::video_regs_w) { case 0x5e/2: // bank switch, used by ROM check { - LOG(("%x\n",data)); - membank("bank1")->set_entry(data & 0x0f); + LOG(("%x\n",data)); + membank("bank1")->set_entry(data & 0x0f); break; } diff --git a/src/mame/drivers/srumbler.c b/src/mame/drivers/srumbler.c index be87dc9acf9ac..21c252d60e2ea 100644 --- a/src/mame/drivers/srumbler.c +++ b/src/mame/drivers/srumbler.c @@ -32,25 +32,25 @@ WRITE8_MEMBER(srumbler_state::bankswitch_w) for (int i = 0x05;i < 0x10;i++) { - /* bit 2 of prom1 selects ROM or RAM - not supported */ + /* bit 2 of prom1 selects ROM or RAM - not supported */ int bank = ((prom1[i] & 0x03) << 4) | (prom2[i] & 0x0f); - char bankname[10]; + char bankname[10]; sprintf(bankname, "%04x", i*0x1000); - membank(bankname)->set_entry(bank); + membank(bankname)->set_entry(bank); } } void srumbler_state::machine_start() { - for (int i = 0x05; i < 0x10; i++) + for (int i = 0x05; i < 0x10; i++) { - char bankname[10]; + char bankname[10]; sprintf(bankname, "%04x", i*0x1000); - membank(bankname)->configure_entries(0, 64, memregion("user1")->base(), 0x1000); + membank(bankname)->configure_entries(0, 64, memregion("user1")->base(), 0x1000); } - /* initialize banked ROM pointers */ + /* initialize banked ROM pointers */ bankswitch_w(m_maincpu->space(AS_PROGRAM), 0, 0); } diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index e30b534f7ad05..35e002d6aa9b1 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -24,13 +24,13 @@ class sstrangr_state : public driver_device required_device m_maincpu; required_shared_ptr m_ram; - + UINT8 m_flip_screen; - + DECLARE_WRITE8_MEMBER(port_w); - + virtual void video_start(); - + UINT32 screen_update_sstrangr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_sstrngr2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c index 70895a60be905..8ebeae48d5a77 100644 --- a/src/mame/drivers/ssv.c +++ b/src/mame/drivers/ssv.c @@ -2491,7 +2491,7 @@ void ssv_state::init(int interrupt_ultrax) ( (i & 1) ? (8 << 16) : 0 ) ; enable_video(1); m_interrupt_ultrax = interrupt_ultrax; - + save_item(NAME(m_requested_int)); save_item(NAME(m_irq_enable)); } diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c index 11a3100c31388..6927e1c1c5503 100644 --- a/src/mame/drivers/sub.c +++ b/src/mame/drivers/sub.c @@ -139,15 +139,15 @@ class sub_state : public driver_device required_shared_ptr m_spriteram; required_shared_ptr m_spriteram2; required_shared_ptr m_scrolly; - + UINT8 m_nmi_en; - + DECLARE_WRITE8_MEMBER(to_sound_w); DECLARE_WRITE8_MEMBER(nmi_mask_w); - + virtual void machine_start(); DECLARE_PALETTE_INIT(sub); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(sound_irq); }; diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index 2677c793f41d6..ae94711dba275 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -215,7 +215,7 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(suna16_state,bestbest) { - save_item(NAME(m_prot)); + save_item(NAME(m_prot)); } @@ -294,8 +294,8 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(suna16_state, bssoccer) { - membank("bank1")->configure_entries(0, 8, memregion("pcm1")->base() + 0x1000, 0x10000); - membank("bank2")->configure_entries(0, 8, memregion("pcm2")->base() + 0x1000, 0x10000); + membank("bank1")->configure_entries(0, 8, memregion("pcm1")->base() + 0x1000, 0x10000); + membank("bank2")->configure_entries(0, 8, memregion("pcm2")->base() + 0x1000, 0x10000); } /* Bank Switching */ @@ -304,16 +304,16 @@ WRITE8_MEMBER(suna16_state::bssoccer_pcm_1_bankswitch_w) { const int bank = data & 7; if (bank & ~7) logerror("CPU#2 PC %06X - ROM bank unknown bits: %02X\n", space.device().safe_pc(), data); - printf("%d %d\n", 1, bank); - membank("bank1")->set_entry(bank); + printf("%d %d\n", 1, bank); + membank("bank1")->set_entry(bank); } WRITE8_MEMBER(suna16_state::bssoccer_pcm_2_bankswitch_w) { const int bank = data & 7; if (bank & ~7) logerror("CPU#3 PC %06X - ROM bank unknown bits: %02X\n", space.device().safe_pc(), data); - printf("%d %d\n", 2, bank); - membank("bank2")->set_entry(bank); + printf("%d %d\n", 2, bank); + membank("bank2")->set_entry(bank); } @@ -378,7 +378,7 @@ WRITE8_MEMBER(suna16_state::uballoon_pcm_1_bankswitch_w) { const int bank = data & 1; if (bank & ~1) logerror("CPU#2 PC %06X - ROM bank unknown bits: %02X\n", space.device().safe_pc(), data); - membank("bank1")->set_entry(bank); + membank("bank1")->set_entry(bank); } /* Memory maps: Yes, *no* RAM */ @@ -398,8 +398,8 @@ ADDRESS_MAP_END MACHINE_START_MEMBER(suna16_state,uballoon) { - membank("bank1")->configure_entries(0, 2, memregion("pcm1")->base() + 0x400, 0x10000); - + membank("bank1")->configure_entries(0, 2, memregion("pcm1")->base() + 0x400, 0x10000); + save_item(NAME(m_prot)); } @@ -828,7 +828,7 @@ static MACHINE_CONFIG_START( bssoccer, suna16_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_MACHINE_START_OVERRIDE(suna16_state,bssoccer) + MCFG_MACHINE_START_OVERRIDE(suna16_state,bssoccer) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -887,7 +887,7 @@ static MACHINE_CONFIG_START( uballoon, suna16_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_MACHINE_START_OVERRIDE(suna16_state,uballoon) + MCFG_MACHINE_START_OVERRIDE(suna16_state,uballoon) MCFG_MACHINE_RESET_OVERRIDE(suna16_state,uballoon) /* video hardware */ @@ -992,7 +992,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state ) /* 2nd PCM Z80 missing */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - + MCFG_MACHINE_START_OVERRIDE(suna16_state, bestbest) /* video hardware */ diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index b6d128d8dea4b..a2d9412c31c98 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -735,7 +735,7 @@ static ADDRESS_MAP_START( brickzn11_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc060, 0xc060) AM_WRITE(brickzn_rombank_w ) // ROM Bank AM_RANGE(0xc080, 0xc080) AM_WRITE(brickzn_leds_w ) // Leds AM_RANGE(0xc0a0, 0xc0a0) AM_WRITE(brickzn_palbank_w ) // Palette RAM Bank -// AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(brickzn_prot2_w ) // Protection 2 +// AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(brickzn_prot2_w ) // Protection 2 AM_RANGE(0xc100, 0xc100) AM_READ_PORT("P1") // P1 (Buttons) AM_RANGE(0xc101, 0xc101) AM_READ_PORT("P2") // P2 (Buttons) @@ -771,13 +771,13 @@ WRITE8_MEMBER(suna8_state::brickzn_multi_w) else if (protselect == 0x90) { /* - 0d brick hit NO! 25? - 2c side wall hit OK - 3b paddle hit OK - 44 death OK? - 53 death OK? - 56 coin in OK? - 70 monster hit NO? 58? + 0d brick hit NO! 25? + 2c side wall hit OK + 3b paddle hit OK + 44 death OK? + 53 death OK? + 56 coin in OK? + 70 monster hit NO? 58? */ UINT8 remap = (m_remap_sound ? BITSWAP8(data, 7,6,3,4,5,2,1,0) : data); @@ -1975,7 +1975,7 @@ MACHINE_CONFIG_END MACHINE_RESET_MEMBER(suna8_state,brickzn) { m_protection_val = m_prot2 = m_prot2_prev = 0xff; - m_paletteram_enab = 1; // for brickzn11 + m_paletteram_enab = 1; // for brickzn11 m_remap_sound = 0; membank("bank1")->set_entry(0); } @@ -2015,12 +2015,12 @@ static MACHINE_CONFIG_START( brickzn11, suna8_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") - MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8) // 3MHz (measured) + MCFG_SOUND_ADD("ymsnd", YM3812, SUNA8_MASTER_CLOCK / 8) // 3MHz (measured) MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) - MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16) // 1.5MHz (measured) + MCFG_SOUND_ADD("aysnd", AY8910, SUNA8_MASTER_CLOCK / 16) // 1.5MHz (measured) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33) diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index 84c58873ec16d..2507d625d675c 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -82,13 +82,13 @@ class supdrapo_state : public driver_device required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - + required_shared_ptr m_col_line; required_shared_ptr m_videoram; required_shared_ptr m_char_bank; - + UINT8 m_wdog; - + DECLARE_READ8_MEMBER(rng_r); DECLARE_WRITE8_MEMBER(wdog8000_w); DECLARE_WRITE8_MEMBER(debug8004_w); @@ -97,12 +97,12 @@ class supdrapo_state : public driver_device DECLARE_WRITE8_MEMBER(payout_w); DECLARE_WRITE8_MEMBER(ay8910_outputa_w); DECLARE_WRITE8_MEMBER(ay8910_outputb_w); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(supdrapo); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index 6e865850a85f9..38d3876e052b3 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -124,7 +124,7 @@ class supertnk_state : public driver_device DECLARE_WRITE8_MEMBER(supertnk_bitplane_select_0_w); DECLARE_WRITE8_MEMBER(supertnk_bitplane_select_1_w); DECLARE_DRIVER_INIT(supertnk); - virtual void machine_start(); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); UINT32 screen_update_supertnk(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -135,7 +135,7 @@ class supertnk_state : public driver_device void supertnk_state::machine_start() { - membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x1000); + membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x1000); } @@ -148,14 +148,14 @@ void supertnk_state::machine_start() WRITE8_MEMBER(supertnk_state::supertnk_bankswitch_0_w) { m_rom_bank = (m_rom_bank & 0x02) | ((data << 0) & 0x01); - membank("bank1")->set_entry(m_rom_bank); + membank("bank1")->set_entry(m_rom_bank); } WRITE8_MEMBER(supertnk_state::supertnk_bankswitch_1_w) { m_rom_bank = (m_rom_bank & 0x01) | ((data << 1) & 0x02); - membank("bank1")->set_entry(m_rom_bank); + membank("bank1")->set_entry(m_rom_bank); } diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c index 3b5c5f541de8e..364abd14ece5d 100644 --- a/src/mame/drivers/superwng.c +++ b/src/mame/drivers/superwng.c @@ -10,7 +10,7 @@ Hardware a bit (interrupts, sound) similar to mouser as well TODO: - unused rom 6.8s (located on the pcb near the gfx rom 7.8p, but contains data (similar to the one in roms 4.5p and 5.5r) - + The game currently crashes after the bonus round rather than moving on to the next level, it writes 01 to 0xa187 which is probably ROM bank, however banking the ROM in there results in the game crashing anyway, and looking @@ -101,7 +101,7 @@ WRITE8_MEMBER(superwng_state::superwng_unk_a187_w) WRITE8_MEMBER(superwng_state::superwng_unk_a185_w) { -// printf("superwng_unk_a185_w %02x\n", data); +// printf("superwng_unk_a185_w %02x\n", data); } TILE_GET_INFO_MEMBER(superwng_state::get_bg_tile_info) @@ -456,7 +456,7 @@ void superwng_state::machine_start() save_item(NAME(m_tile_bank)); save_item(NAME(m_sound_byte)); save_item(NAME(m_nmi_enable)); - membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base()+0x4000, 0x4000); + membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base()+0x4000, 0x4000); } void superwng_state::machine_reset() diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 368fe3ded9119..21faaaadf9c8d 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -60,7 +60,7 @@ class suprgolf_state : public driver_device UINT8 m_palette_switch; UINT8 m_bg_vreg_test; UINT8 m_toggle; - + DECLARE_READ8_MEMBER(videoram_r); DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_READ8_MEMBER(bg_vram_r); @@ -78,14 +78,14 @@ class suprgolf_state : public driver_device DECLARE_WRITE8_MEMBER(writeA); DECLARE_WRITE8_MEMBER(writeB); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - + TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_DRIVER_INIT(suprgolf); - virtual void machine_start(); + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -109,7 +109,7 @@ void suprgolf_state::video_start() m_fg_fb = auto_alloc_array(machine(), UINT16, 0x2000*0x20); m_tilemap->set_transparent_pen(15); - + save_item(NAME(m_bg_bank)); save_item(NAME(m_vreg_bank)); save_item(NAME(m_vreg_pen)); @@ -267,9 +267,9 @@ WRITE8_MEMBER(suprgolf_state::bg_vram_w) void suprgolf_state::machine_start() { - membank("bank1")->configure_entries(0, 16, memregion("user2")->base(), 0x4000); - membank("bank2")->configure_entries(0, 64, memregion("user1")->base(), 0x4000); - + membank("bank1")->configure_entries(0, 16, memregion("user2")->base(), 0x4000); + membank("bank2")->configure_entries(0, 64, memregion("user1")->base(), 0x4000); + save_item(NAME(m_rom_bank)); save_item(NAME(m_msm5205next)); save_item(NAME(m_msm_nmi_mask)); @@ -293,11 +293,11 @@ READ8_MEMBER(suprgolf_state::rom_bank_select_r) WRITE8_MEMBER(suprgolf_state::rom_bank_select_w) { - m_rom_bank = data; + m_rom_bank = data; - //popmessage("%08x %02x",((data & 0x3f) * 0x4000),data); - //osd_printf_debug("ROM_BANK 0x8000 - %X @%X\n",data,space.device().safe_pcbase()); - membank("bank2")->set_entry(data & 0x3f); + //popmessage("%08x %02x",((data & 0x3f) * 0x4000),data); + //osd_printf_debug("ROM_BANK 0x8000 - %X @%X\n",data,space.device().safe_pcbase()); + membank("bank2")->set_entry(data & 0x3f); m_msm_nmi_mask = data & 0x40; flip_screen_set(data & 0x80); @@ -305,9 +305,9 @@ WRITE8_MEMBER(suprgolf_state::rom_bank_select_w) WRITE8_MEMBER(suprgolf_state::rom2_bank_select_w) { - //osd_printf_debug("ROM_BANK 0x4000 - %X @%X\n",data,space.device().safe_pcbase()); - membank("bank1")->set_entry(data & 0x0f); - + //osd_printf_debug("ROM_BANK 0x4000 - %X @%X\n",data,space.device().safe_pcbase()); + membank("bank1")->set_entry(data & 0x0f); + if(data & 0xf0) printf("Rom bank select 2 with data %02x activated\n",data); } diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index 05a7a9f67dac8..3b7ef9207709e 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -115,7 +115,7 @@ WRITE8_MEMBER(suprslam_state::pending_command_clear_w) WRITE8_MEMBER(suprslam_state::suprslam_sh_bankswitch_w) { - membank("bank1")->set_entry(data & 0x03); + membank("bank1")->set_entry(data & 0x03); } /*** MEMORY MAPS *************************************************************/ @@ -285,7 +285,7 @@ void suprslam_state::machine_start() save_item(NAME(m_bg_bank)); save_item(NAME(m_pending_command)); - membank("bank1")->configure_entries(0, 4, memregion("audiocpu")->base() + 0x10000, 0x8000); + membank("bank1")->configure_entries(0, 4, memregion("audiocpu")->base() + 0x10000, 0x8000); } void suprslam_state::machine_reset() diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c index d0f4766475e1a..4f46ce7bf3c93 100644 --- a/src/mame/drivers/tankbust.c +++ b/src/mame/drivers/tankbust.c @@ -24,9 +24,9 @@ To do: void tankbust_state::machine_start() { - membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000); - membank("bank2")->configure_entries(0, 2, memregion("maincpu")->base() + 0x18000, 0x2000); - + membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000); + membank("bank2")->configure_entries(0, 2, memregion("maincpu")->base() + 0x18000, 0x2000); + save_item(NAME(m_latch)); save_item(NAME(m_timer1)); save_item(NAME(m_e0xx_data)); @@ -107,7 +107,7 @@ WRITE8_MEMBER(tankbust_state::e0xx_w) case 7: /* 0xe007 bankswitch */ /* bank 1 at 0x6000-9fff = from 0x10000 when bit0=0 else from 0x14000 */ - membank("bank1")->set_entry(data & 1); + membank("bank1")->set_entry(data & 1); /* bank 2 at 0xa000-bfff = from 0x18000 when bit0=0 else from 0x1a000 */ membank("bank2")->set_entry(data & 1); /* verified (the game will reset after the "game over" otherwise) */ diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index b011913e1cebf..242f16cf8fa59 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -76,7 +76,7 @@ zooming might be wrong void taotaido_state::machine_start() { membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000); - + save_item(NAME(m_pending_command)); } diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index 6f642fdd28ab0..1a6aefe439d89 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -418,7 +418,7 @@ void tbowl_state::machine_start() { membank("mainbank")->configure_entries(0, 32, memregion("maincpu")->base() + 0x10000, 0x800); membank("subbank")->configure_entries(0, 32, memregion("sub")->base() + 0x10000, 0x800); - + save_item(NAME(m_adpcm_pos)); save_item(NAME(m_adpcm_end)); save_item(NAME(m_adpcm_data)); diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c index 73d58364756fc..b53dbf6d4d819 100644 --- a/src/mame/drivers/tgtpanic.c +++ b/src/mame/drivers/tgtpanic.c @@ -24,15 +24,15 @@ class tgtpanic_state : public driver_device required_device m_maincpu; required_device m_screen; - + required_shared_ptr m_ram; - + UINT8 m_color; - + DECLARE_WRITE8_MEMBER(color_w); - + virtual void machine_start(); - + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index 77a82af1ec247..db00ce1cb0d8f 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -317,7 +317,7 @@ WRITE8_MEMBER(thunderx_state::thunderx_1f98_w) WRITE8_MEMBER(thunderx_state::scontra_bankswitch_w) { // bits 0-3 select ROM bank at 6000-7fff - m_rombank->set_entry(data & 0x0f); + m_rombank->set_entry(data & 0x0f); // bit 4 selects work RAM or palette RAM at 5800-5fff m_bank5800->set_bank((data & 0x10) >> 4); diff --git a/src/mame/drivers/tryout.c b/src/mame/drivers/tryout.c index 2b6db01e5f9ac..8b2259c7b4377 100644 --- a/src/mame/drivers/tryout.c +++ b/src/mame/drivers/tryout.c @@ -45,12 +45,12 @@ WRITE8_MEMBER(tryout_state::sound_irq_ack_w) void tryout_state::machine_start() { - membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x2000); + membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x2000); } WRITE8_MEMBER(tryout_state::bankswitch_w) { - membank("bank1")->set_entry(data & 0x01); + membank("bank1")->set_entry(data & 0x01); } static ADDRESS_MAP_START( main_cpu, AS_PROGRAM, 8, tryout_state ) diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index 3020a719c31dc..9cda0ce3a861e 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -711,7 +711,7 @@ static MACHINE_CONFIG_START( tsamurai, tsamurai_state ) MCFG_CPU_ADD("audio2", Z80, XTAL_24MHz/8) MCFG_CPU_PROGRAM_MAP(sound2_map) - + MCFG_MACHINE_START_OVERRIDE(tsamurai_state,tsamurai) /* video hardware */ @@ -752,7 +752,7 @@ static MACHINE_CONFIG_START( vsgongf, tsamurai_state ) MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map) MCFG_CPU_IO_MAP(vsgongf_audio_io_map) MCFG_CPU_PERIODIC_INT_DRIVER(tsamurai_state, vsgongf_sound_interrupt, 3*60) - + MCFG_MACHINE_START_OVERRIDE(tsamurai_state,vsgongf) /* video hardware */ @@ -797,7 +797,7 @@ static MACHINE_CONFIG_START( m660, tsamurai_state ) MCFG_CPU_PROGRAM_MAP(sound3_m660_map) MCFG_CPU_IO_MAP(sound3_m660_io_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, nmi_line_pulse) - + MCFG_MACHINE_START_OVERRIDE(tsamurai_state,m660) /* video hardware */ diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 62346ae130a26..c65d751fc98a6 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -51,7 +51,7 @@ Dumped by tirino73 -- works in a very similar way to 'Spider' (twins.c) +- works in a very similar way to 'Spider' (twins.c) including the blitter (seems to be doubled up hardware tho, twice as many layers?) - need to work out how it selects between upper/lower program roms as blitter source @@ -85,7 +85,7 @@ class ttchamp_state : public driver_device DECLARE_WRITE16_MEMBER(port20_w); DECLARE_WRITE16_MEMBER(port62_w); - + DECLARE_READ16_MEMBER(port1e_r); @@ -100,7 +100,7 @@ class ttchamp_state : public driver_device DECLARE_WRITE16_MEMBER(ttchamp_mem_w); UINT16 m_videoram0[0x10000 / 2]; -// UINT16 m_videoram1[0x10000 / 2]; +// UINT16 m_videoram1[0x10000 / 2]; UINT16 m_videoram2[0x10000 / 2]; @@ -130,7 +130,6 @@ void ttchamp_state::machine_start() void ttchamp_state::video_start() { - } UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -143,7 +142,7 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 bitmap.fill(m_palette->black_pen()); UINT8 *videoramfg; UINT8* videorambg; - + count=0; videorambg = (UINT8*)m_videoram0; videoramfg = (UINT8*)m_videoram2; @@ -156,21 +155,21 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 count++; } } - + /* count=0; videoram = (UINT8*)m_videoram1; for (y=0;y> 8; - + /* bit 1 actually enables transparent pen */ if (data || (m_port10 & 2) == 0) vram[offset] = (vram[offset] & 0x00ff) | data << 8; @@ -397,7 +396,7 @@ WRITE16_MEMBER(ttchamp_state::port10_w) { UINT8 res; COMBINE_DATA(&m_port10); - + res = m_port10 & 0xf0; /* Assume that both bits clears layers. */ if(res == 0x30) @@ -444,7 +443,7 @@ static ADDRESS_MAP_START( ttchamp_io, AS_IO, 16, ttchamp_state ) AM_RANGE(0x0020, 0x0021) AM_WRITE(port20_w) -// AM_RANGE(0x0034, 0x0035) AM_READ(peno_rand) AM_WRITENOP // eeprom (PIC?) / settings? +// AM_RANGE(0x0034, 0x0035) AM_READ(peno_rand) AM_WRITENOP // eeprom (PIC?) / settings? AM_RANGE(0x0062, 0x0063) AM_WRITE(port62_w) @@ -577,9 +576,9 @@ ROM_END DRIVER_INIT_MEMBER(ttchamp_state,ttchamp) { -// UINT8 *ROM1 = memregion("user1")->base(); -// membank("bank1")->set_base(&ROM1[0x100000]); -// membank("bank2")->set_base(&ROM1[0x180000]); +// UINT8 *ROM1 = memregion("user1")->base(); +// membank("bank1")->set_base(&ROM1[0x100000]); +// membank("bank2")->set_base(&ROM1[0x180000]); } GAME( 1995, ttchamp, 0, ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0, "Gamart", "Table Tennis Champions", GAME_NOT_WORKING ) // this has various advertising boards, including 'Electronic Devices' and 'Deniam' diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c index 50c9690c31cfb..9c4d965ac3d27 100644 --- a/src/mame/drivers/tugboat.c +++ b/src/mame/drivers/tugboat.c @@ -49,7 +49,7 @@ class tugboat_state : public driver_device required_device m_gfxdecode; required_device m_screen; required_device m_palette; - + required_shared_ptr m_ram; UINT8 m_hd46505_0_reg[18]; @@ -58,18 +58,18 @@ class tugboat_state : public driver_device int m_reg1; int m_ctrl; emu_timer *m_interrupt_timer; - + DECLARE_WRITE8_MEMBER(hd46505_0_w); DECLARE_WRITE8_MEMBER(hd46505_1_w); DECLARE_WRITE8_MEMBER(score_w); DECLARE_READ8_MEMBER(input_r); DECLARE_WRITE8_MEMBER(ctrl_w); - + virtual void machine_start(); virtual void video_start(); virtual void machine_reset(); DECLARE_PALETTE_INIT(tugboat); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_tilemap(bitmap_ind16 &bitmap,const rectangle &cliprect, int addr,int gfx0,int gfx1,int transparency); @@ -82,7 +82,7 @@ class tugboat_state : public driver_device void tugboat_state::machine_start() { m_interrupt_timer = timer_alloc(TIMER_INTERRUPT); - + save_item(NAME(m_hd46505_0_reg)); save_item(NAME(m_hd46505_1_reg)); save_item(NAME(m_reg0)); diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index 6ee893004dc5f..2aba06aa99936 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -123,15 +123,15 @@ void twins_state::machine_start() READ16_MEMBER(twins_state::twins_port4_r) { // doesn't work?? -// printf("%08x: twins_port4_r %04x\n", space.device().safe_pc(), mem_mask); -// return m_i2cmem->read_sda();// | 0xfffe; +// printf("%08x: twins_port4_r %04x\n", space.device().safe_pc(), mem_mask); +// return m_i2cmem->read_sda();// | 0xfffe; return 0x0001; } WRITE16_MEMBER(twins_state::twins_port4_w) { -// printf("%08x: twins_port4_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); +// printf("%08x: twins_port4_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); int i2c_clk = BIT(data, 1); int i2c_mem = BIT(data, 0); m_i2cmem->write_scl(i2c_clk); @@ -165,7 +165,7 @@ WRITE16_MEMBER(twins_state::twins_pal_w) /* ??? weird ..*/ WRITE16_MEMBER(twins_state::porte_paloff0_w) { -// printf("porte_paloff0_w %04x\n", data); +// printf("porte_paloff0_w %04x\n", data); m_paloff = 0; } @@ -205,14 +205,14 @@ WRITE16_MEMBER(twins_state::spider_blitter_w) if (m_spritesinit == 1) { - // printf("spider_blitter_w %08x %04x %04x (init?) (base?)\n", offset * 2, data, mem_mask); + // printf("spider_blitter_w %08x %04x %04x (init?) (base?)\n", offset * 2, data, mem_mask); m_spritesinit = 2; m_spritesaddr = offset; } else if (m_spritesinit == 2) { - // printf("spider_blitter_w %08x %04x %04x (init2) (width?)\n", offset * 2, data, mem_mask); + // printf("spider_blitter_w %08x %04x %04x (init2) (width?)\n", offset * 2, data, mem_mask); m_spriteswidth = offset & 0xff; if (m_spriteswidth == 0) m_spriteswidth = 80; @@ -234,26 +234,26 @@ WRITE16_MEMBER(twins_state::spider_blitter_w) { UINT8 *src = m_rom8; - // printf("spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr); + // printf("spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr); offset &= 0x7fff; for (int i = 0; i < m_spriteswidth; i++) { UINT8 data; - + data = (src[(m_spritesaddr * 2) + 1]); - + if (data) vram[offset] = (vram[offset] & 0x00ff) | data << 8; data = src[(m_spritesaddr*2)]; - + if (data) vram[offset] = (vram[offset] & 0xff00) | data; - m_spritesaddr ++; + m_spritesaddr ++; offset++; offset &= 0x7fff; @@ -386,7 +386,7 @@ static MACHINE_CONFIG_START( twins, twins_state ) MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 200-1) MCFG_SCREEN_UPDATE_DRIVER(twins_state, screen_update_twins) MCFG_SCREEN_PALETTE("palette") - + MCFG_24C02_ADD("i2cmem") MCFG_PALETTE_ADD("palette", 0x100) @@ -447,7 +447,7 @@ static MACHINE_CONFIG_START( twinsa, twins_state ) MCFG_PALETTE_ADD("palette", 256) MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette") MCFG_RAMDAC_SPLIT_READ(0) - + MCFG_24C02_ADD("i2cmem") MCFG_VIDEO_START_OVERRIDE(twins_state,twinsa) @@ -477,9 +477,9 @@ WRITE16_MEMBER(twins_state::spider_pal_w) } else { - // printf("first palette write %04x\n", data); + // printf("first palette write %04x\n", data); } - + m_paloff++; if (m_paloff == 0x101) @@ -503,7 +503,7 @@ WRITE16_MEMBER(twins_state::spider_port_1c_w) { // done before the 'sprite' read / writes // might clear a buffer? - + // game is only animating sprites at 30fps, maybe there's some double buffering too? UINT16* vram; @@ -575,7 +575,7 @@ static MACHINE_CONFIG_START( spider, twins_state ) MCFG_PALETTE_ADD("palette", 0x100) MCFG_VIDEO_START_OVERRIDE(twins_state,twins) - + MCFG_24C02_ADD("i2cmem") /* sound hardware */ diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c index e918370cb6626..7110df01a462c 100644 --- a/src/mame/drivers/usgames.c +++ b/src/mame/drivers/usgames.c @@ -32,12 +32,12 @@ Sound: AY-3-8912 void usgames_state::machine_start() { - membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000); + membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000); } WRITE8_MEMBER(usgames_state::usgames_rombank_w) { - membank("bank1")->set_entry(data); + membank("bank1")->set_entry(data); } WRITE8_MEMBER(usgames_state::lamps1_w) diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index b4195254753c9..41476df94f6b2 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -2754,10 +2754,10 @@ DRIVER_INIT_MEMBER(vamphalf_state,yorijori) m_semicom_prot_data[0] = 2; m_semicom_prot_data[1] = 1; -// UINT8 *romx = (UINT8 *)memregion("user1")->base(); +// UINT8 *romx = (UINT8 *)memregion("user1")->base(); // prevent code dying after a trap 33 by patching it out, why? -// romx[BYTE4_XOR_BE(0x8ff0)] = 3; -// romx[BYTE4_XOR_BE(0x8ff1)] = 0; +// romx[BYTE4_XOR_BE(0x8ff0)] = 3; +// romx[BYTE4_XOR_BE(0x8ff1)] = 0; // Configure the QS1000 ROM banking. Care must be taken not to overlap the 256b internal RAM machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "data"); diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c index 242d6a2b36265..62ea412c42662 100644 --- a/src/mame/drivers/vigilant.c +++ b/src/mame/drivers/vigilant.c @@ -24,12 +24,12 @@ Buccaneers has a 5.6888 Mhz and a 18.432 Mhz OSC void vigilant_state::machine_start() { - membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); + membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); } WRITE8_MEMBER(vigilant_state::vigilant_bank_select_w) { - membank("bank1")->set_entry(data & 0x07); + membank("bank1")->set_entry(data & 0x07); } /*************************************************************************** diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c index ddac4ad9c7f01..e7d9f51ebcd45 100644 --- a/src/mame/drivers/wc90b.c +++ b/src/mame/drivers/wc90b.c @@ -325,7 +325,7 @@ void wc90b_state::machine_start() membank("mainbank")->configure_entries(0, 32, memregion("maincpu")->base() + 0x10000, 0x800); membank("subbank")->configure_entries(0, 32, memregion("sub")->base() + 0x10000, 0x800); membank("audiobank")->configure_entries(0, 2, memregion("audiocpu")->base() + 0x8000, 0x4000); - + save_item(NAME(m_msm5205next)); save_item(NAME(m_toggle)); } diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c index dbb3a9fb604b5..b13d6d334f0cd 100644 --- a/src/mame/drivers/xain.c +++ b/src/mame/drivers/xain.c @@ -555,9 +555,9 @@ void xain_state::machine_start() membank("bank2")->configure_entries(0, 2, memregion("sub")->base() + 0x4000, 0xc000); membank("bank1")->set_entry(0); membank("bank2")->set_entry(0); - + save_item(NAME(m_vblank)); - + if (m_mcu) { save_item(NAME(m_from_main)); diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c index 51f93712eca16..6d67b7afa6590 100644 --- a/src/mame/drivers/xtheball.c +++ b/src/mame/drivers/xtheball.c @@ -30,21 +30,21 @@ class xtheball_state : public driver_device required_device m_maincpu; required_device m_tlc34076; - + required_shared_ptr m_vram_bg; required_shared_ptr m_vram_fg; - + required_ioport m_analog_x; required_ioport m_analog_y; - + UINT8 m_bitvals[32]; - + DECLARE_WRITE16_MEMBER(bit_controls_w); DECLARE_READ16_MEMBER(analogx_r); DECLARE_READ16_MEMBER(analogy_watchdog_r); - + virtual void machine_start(); - + TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update); diff --git a/src/mame/includes/argus.h b/src/mame/includes/argus.h index 35710c2655f25..6cf9cf2fd607c 100644 --- a/src/mame/includes/argus.h +++ b/src/mame/includes/argus.h @@ -42,12 +42,12 @@ class argus_state : public driver_device UINT8 m_bg_status; UINT8 m_flipscreen; UINT16 m_palette_intensity; - + // argus specific UINT8 *m_dummy_bg0ram; int m_lowbitscroll; int m_prvscrollx; - + // butasan specific UINT8 *m_butasan_txram; UINT8 *m_butasan_bg0ram; @@ -57,17 +57,17 @@ class argus_state : public driver_device UINT8 m_butasan_page_latch; UINT8 m_butasan_bg1_status; UINT8 m_butasan_unknown; - + // valtric specific UINT8 m_valtric_mosaic; bitmap_rgb32 m_mosaicbitmap; UINT8 m_valtric_unknown; int m_mosaic; - + tilemap_t *m_tx_tilemap; tilemap_t *m_bg0_tilemap; tilemap_t *m_bg1_tilemap; - + // common DECLARE_WRITE8_MEMBER(bankselect_w); DECLARE_WRITE8_MEMBER(valtric_mosaic_w); @@ -94,7 +94,7 @@ class argus_state : public driver_device DECLARE_WRITE8_MEMBER(valtric_bg_status_w); DECLARE_WRITE8_MEMBER(valtric_paletteram_w); DECLARE_WRITE8_MEMBER(valtric_unknown_w); - + TILE_GET_INFO_MEMBER(argus_get_tx_tile_info); TILE_GET_INFO_MEMBER(argus_get_bg0_tile_info); TILE_GET_INFO_MEMBER(argus_get_bg1_tile_info); @@ -103,7 +103,7 @@ class argus_state : public driver_device TILE_GET_INFO_MEMBER(butasan_get_tx_tile_info); TILE_GET_INFO_MEMBER(butasan_get_bg0_tile_info); TILE_GET_INFO_MEMBER(butasan_get_bg1_tile_info); - + virtual void machine_start(); DECLARE_VIDEO_START(argus); DECLARE_VIDEO_RESET(argus); @@ -111,28 +111,28 @@ class argus_state : public driver_device DECLARE_VIDEO_RESET(valtric); DECLARE_VIDEO_START(butasan); DECLARE_VIDEO_RESET(butasan); - + UINT32 screen_update_argus(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_valtric(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_butasan(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(scanline); TIMER_DEVICE_CALLBACK_MEMBER(butasan_scanline); - + void reset_common(); void change_palette(int color, int lo_offs, int hi_offs); void change_bg_palette(int color, int lo_offs, int hi_offs); void bg_setting(); - + // argus specific void argus_bg0_scroll_handle(); void argus_write_dummy_rams(int dramoffs, int vromoffs); void argus_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority); - + // butasan specific void butasan_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); void butasan_log_vram(); - + // valtric specific void valtric_draw_mosaic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void valtric_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/bbusters.h b/src/mame/includes/bbusters.h index 9e7dd060368a9..abcb8c1c8b8a3 100644 --- a/src/mame/includes/bbusters.h +++ b/src/mame/includes/bbusters.h @@ -23,7 +23,7 @@ class bbusters_state : public driver_device required_device m_gfxdecode; required_device m_spriteram; optional_device m_spriteram2; - + optional_shared_ptr m_eprom_data; required_shared_ptr m_ram; required_shared_ptr m_videoram; @@ -53,15 +53,15 @@ class bbusters_state : public driver_device DECLARE_WRITE16_MEMBER(video_w); DECLARE_WRITE16_MEMBER(pf1_w); DECLARE_WRITE16_MEMBER(pf2_w); - + TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_pf1_tile_info); TILE_GET_INFO_MEMBER(get_pf2_tile_info); - + virtual void machine_start(); DECLARE_VIDEO_START(bbuster); DECLARE_VIDEO_START(mechatt); - + UINT32 screen_update_bbuster(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_mechatt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_bbuster(screen_device &screen, bool state); diff --git a/src/mame/includes/cabal.h b/src/mame/includes/cabal.h index 6bd2ff2ebcd6b..244e294f30d6f 100644 --- a/src/mame/includes/cabal.h +++ b/src/mame/includes/cabal.h @@ -38,7 +38,7 @@ class cabal_state : public driver_device int m_sound_command1; int m_sound_command2; int m_last[4]; - + // common DECLARE_WRITE16_MEMBER(flipscreen_w); DECLARE_WRITE16_MEMBER(background_videoram_w); @@ -57,19 +57,19 @@ class cabal_state : public driver_device DECLARE_WRITE8_MEMBER(cabalbl_coin_w); DECLARE_WRITE8_MEMBER(cabalbl_1_adpcm_w); DECLARE_WRITE8_MEMBER(cabalbl_2_adpcm_w); - + DECLARE_DRIVER_INIT(cabal); DECLARE_DRIVER_INIT(cabalbl2); DECLARE_MACHINE_START(cabal); DECLARE_MACHINE_START(cabalbl); DECLARE_MACHINE_RESET(cabalbl); virtual void video_start(); - + TILE_GET_INFO_MEMBER(get_back_tile_info); TILE_GET_INFO_MEMBER(get_text_tile_info); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - + void seibu_sound_bootleg(const char *cpu,int length); }; diff --git a/src/mame/includes/capbowl.h b/src/mame/includes/capbowl.h index 99ff693862ac2..25c51ee4acda0 100644 --- a/src/mame/includes/capbowl.h +++ b/src/mame/includes/capbowl.h @@ -37,7 +37,7 @@ class capbowl_state : public driver_device /* input-related */ UINT8 m_last_trackball_val[2]; - + emu_timer *m_update_timer; // common @@ -47,21 +47,21 @@ class capbowl_state : public driver_device DECLARE_WRITE8_MEMBER(sndcmd_w); DECLARE_WRITE8_MEMBER(tms34061_w); DECLARE_READ8_MEMBER(tms34061_r); - + // capbowl specific DECLARE_WRITE8_MEMBER(capbowl_rom_select_w); - + // bowlrama specific DECLARE_WRITE8_MEMBER(bowlrama_blitter_w); DECLARE_READ8_MEMBER(bowlrama_blitter_r); - + DECLARE_DRIVER_INIT(capbowl); virtual void machine_start(); virtual void machine_reset(); - + INTERRUPT_GEN_MEMBER(interrupt); TIMER_CALLBACK_MEMBER(update); - + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); inline rgb_t pen_for_pixel( UINT8 *src, UINT8 pix ); diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h index b6257ba61536b..c5076c1755842 100644 --- a/src/mame/includes/fgoal.h +++ b/src/mame/includes/fgoal.h @@ -15,7 +15,7 @@ class fgoal_state : public driver_device m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_video_ram(*this, "video_ram") { } + m_video_ram(*this, "video_ram") { } /* devices */ required_device m_maincpu; @@ -58,7 +58,7 @@ class fgoal_state : public driver_device DECLARE_WRITE8_MEMBER(xpos_w); DECLARE_CUSTOM_INPUT_MEMBER(_80_r); - + TIMER_CALLBACK_MEMBER(interrupt_callback); virtual void machine_start(); diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index c8c43c858c9f2..b2e03d86cb952 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -125,7 +125,7 @@ class hng64_state : public driver_device m_generic_paletteram_32(*this, "paletteram") { } - + required_device m_maincpu; required_device m_audiocpu; required_device m_comm; @@ -363,7 +363,7 @@ class hng64_state : public driver_device DECLARE_WRITE_LINE_MEMBER(tcu_tm2_cb); UINT16 m_audiochannel; - + struct hng64_48bit_data { UINT16 dat[3]; }; @@ -395,4 +395,3 @@ class hng64_state : public driver_device DECLARE_WRITE16_MEMBER(hng64_sound_bank_w); }; - diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index 0218f440fc2b2..5df3f1f5e66e8 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -48,21 +48,21 @@ class ironhors_state : public driver_device DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(filter_w); DECLARE_READ8_MEMBER(farwest_soundlatch_r); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(farwest_get_bg_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(ironhors); DECLARE_VIDEO_START(farwest); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_farwest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void farwest_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - + TIMER_DEVICE_CALLBACK_MEMBER(irq); TIMER_DEVICE_CALLBACK_MEMBER(farwest_irq); }; diff --git a/src/mame/includes/mosaic.h b/src/mame/includes/mosaic.h index 75c90a19f0b50..c28bda1a7ca7a 100644 --- a/src/mame/includes/mosaic.h +++ b/src/mame/includes/mosaic.h @@ -17,7 +17,7 @@ class mosaic_state : public driver_device /* devices */ required_device m_maincpu; required_device m_gfxdecode; - + /* memory pointers */ required_shared_ptr m_fgvideoram; required_shared_ptr m_bgvideoram; @@ -28,20 +28,20 @@ class mosaic_state : public driver_device /* misc */ int m_prot_val; - + DECLARE_WRITE8_MEMBER(protection_w); DECLARE_READ8_MEMBER(protection_r); DECLARE_WRITE8_MEMBER(gfire2_protection_w); DECLARE_READ8_MEMBER(gfire2_protection_r); DECLARE_WRITE8_MEMBER(fgvideoram_w); DECLARE_WRITE8_MEMBER(bgvideoram_w); - + TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/paradise.h b/src/mame/includes/paradise.h index a9e572def9f65..af4dbc285dfb0 100644 --- a/src/mame/includes/paradise.h +++ b/src/mame/includes/paradise.h @@ -54,10 +54,10 @@ class paradise_state : public driver_device DECLARE_WRITE8_MEMBER(vram_2_w); DECLARE_WRITE8_MEMBER(pixmap_w); DECLARE_WRITE8_MEMBER(priority_w); - + // paradise specific DECLARE_WRITE8_MEMBER(paradise_okibank_w); - + // torus specific DECLARE_WRITE8_MEMBER(torus_coin_counter_w); diff --git a/src/mame/includes/pooyan.h b/src/mame/includes/pooyan.h index cbf490442a632..08ed9f48d3e54 100644 --- a/src/mame/includes/pooyan.h +++ b/src/mame/includes/pooyan.h @@ -32,16 +32,16 @@ class pooyan_state : public driver_device DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(colorram_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(pooyan); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/includes/psychic5.h b/src/mame/includes/psychic5.h index b422db2496265..d3d8e9dc32007 100644 --- a/src/mame/includes/psychic5.h +++ b/src/mame/includes/psychic5.h @@ -21,14 +21,14 @@ class psychic5_state : public driver_device m_ps5_palette_ram_tx(*this, "palette_ram_tx") { } - + required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; required_device m_palette; optional_device m_vrambank; optional_device m_blend; - + required_shared_ptr m_spriteram; required_shared_ptr m_fg_videoram; required_shared_ptr m_bg_videoram; @@ -78,7 +78,7 @@ class psychic5_state : public driver_device DECLARE_VIDEO_START(psychic5); DECLARE_VIDEO_START(bombsa); DECLARE_VIDEO_RESET(psychic5); - + TIMER_DEVICE_CALLBACK_MEMBER(scanline); UINT32 screen_update_psychic5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/realbrk.h b/src/mame/includes/realbrk.h index 4adbdbfe9d041..dca2c50ba7e17 100644 --- a/src/mame/includes/realbrk.h +++ b/src/mame/includes/realbrk.h @@ -71,6 +71,6 @@ class realbrk_state : public driver_device UINT32 screen_update_dai2kaku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void dai2kaku_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect, int layer); - + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/includes/rltennis.h b/src/mame/includes/rltennis.h index fb02b1a41b522..fa8fa4c117db4 100644 --- a/src/mame/includes/rltennis.h +++ b/src/mame/includes/rltennis.h @@ -18,7 +18,7 @@ class rltennis_state : public driver_device required_device m_maincpu; required_device m_dac_1; required_device m_dac_2; - + UINT16 m_blitter[RLT_NUM_BLITTER_REGS]; INT32 m_data760000; INT32 m_data740000; @@ -41,7 +41,7 @@ class rltennis_state : public driver_device virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(interrupt); diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index 31c8663054876..383f9c1b3d8c7 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -28,7 +28,7 @@ class seta2_state : public driver_device required_device m_gfxdecode; required_device m_screen; required_device m_palette; - + optional_shared_ptr m_nvram; optional_shared_ptr m_spriteram; optional_shared_ptr m_vregs; @@ -39,7 +39,7 @@ class seta2_state : public driver_device int m_yoffset; int m_keyboard_row; UINT16 *m_buffered_spriteram; - + UINT64 m_funcube_coin_start_cycles; UINT8 m_funcube_hopper_motor; diff --git a/src/mame/includes/shuuz.h b/src/mame/includes/shuuz.h index 715bf59a6ef46..45828b0f9e5f6 100644 --- a/src/mame/includes/shuuz.h +++ b/src/mame/includes/shuuz.h @@ -19,17 +19,17 @@ class shuuz_state : public atarigen_state required_device m_vad; int m_cur[2]; - + virtual void update_interrupts(); - + DECLARE_WRITE16_MEMBER(latch_w); DECLARE_READ16_MEMBER(leta_r); DECLARE_READ16_MEMBER(special_port0_r); - + virtual void machine_start(); - + TILE_GET_INFO_MEMBER(get_playfield_tile_info); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); static const atari_motion_objects_config s_mob_config; diff --git a/src/mame/includes/sidearms.h b/src/mame/includes/sidearms.h index a46d6259c4e19..fc42ebaef5d46 100644 --- a/src/mame/includes/sidearms.h +++ b/src/mame/includes/sidearms.h @@ -54,9 +54,9 @@ class sidearms_state : public driver_device DECLARE_WRITE8_MEMBER(gfxctrl_w); DECLARE_WRITE8_MEMBER(star_scrollx_w); DECLARE_WRITE8_MEMBER(star_scrolly_w); - + DECLARE_READ8_MEMBER(turtship_ports_r); - + DECLARE_WRITE8_MEMBER(whizz_bankswitch_w); DECLARE_DRIVER_INIT(dyger); @@ -64,7 +64,7 @@ class sidearms_state : public driver_device DECLARE_DRIVER_INIT(whizz); DECLARE_DRIVER_INIT(turtship); virtual void machine_start(); - virtual void video_start(); + virtual void video_start(); TILE_GET_INFO_MEMBER(get_sidearms_bg_tile_info); TILE_GET_INFO_MEMBER(get_philko_bg_tile_info); diff --git a/src/mame/includes/simple_st0016.h b/src/mame/includes/simple_st0016.h index b78fdbb0fa814..9be3716815402 100644 --- a/src/mame/includes/simple_st0016.h +++ b/src/mame/includes/simple_st0016.h @@ -12,7 +12,7 @@ class st0016_state : public driver_device { } int mux_port; - // UINT32 m_st0016_rom_bank; + // UINT32 m_st0016_rom_bank; optional_device m_maincpu; DECLARE_READ8_MEMBER(mux_r); @@ -27,7 +27,7 @@ class st0016_state : public driver_device DECLARE_DRIVER_INIT(mayjinsn); DECLARE_DRIVER_INIT(mayjisn2); DECLARE_DRIVER_INIT(renju); - virtual void machine_start(); + virtual void machine_start(); DECLARE_VIDEO_START(st0016); void st0016_draw_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/speedbal.h b/src/mame/includes/speedbal.h index 040335c94bec4..a6b2f397e66b0 100644 --- a/src/mame/includes/speedbal.h +++ b/src/mame/includes/speedbal.h @@ -39,7 +39,7 @@ class speedbal_state : public driver_device TILE_GET_INFO_MEMBER(get_tile_info_bg); TILE_GET_INFO_MEMBER(get_tile_info_fg); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/srmp2.h b/src/mame/includes/srmp2.h index 3c440148725cc..107b5344e5960 100644 --- a/src/mame/includes/srmp2.h +++ b/src/mame/includes/srmp2.h @@ -21,7 +21,7 @@ class srmp2_state : public driver_device required_device m_maincpu; required_device m_seta001; required_device m_msm; - + int m_color_bank; int m_gfx_bank; int m_adpcm_bank; @@ -43,7 +43,7 @@ class srmp2_state : public driver_device DECLARE_WRITE16_MEMBER(mjyuugi_adpcm_bank_w); DECLARE_READ8_MEMBER(mjyuugi_irq2_ack_r); DECLARE_READ8_MEMBER(mjyuugi_irq4_ack_r); - + // rmgoldyh DECLARE_WRITE8_MEMBER(rmgoldyh_rombank_w); diff --git a/src/mame/includes/srumbler.h b/src/mame/includes/srumbler.h index 06dab337b2a22..3d85800db5e13 100644 --- a/src/mame/includes/srumbler.h +++ b/src/mame/includes/srumbler.h @@ -29,15 +29,15 @@ class srumbler_state : public driver_device DECLARE_WRITE8_MEMBER(background_w); DECLARE_WRITE8_MEMBER(_4009_w); DECLARE_WRITE8_MEMBER(scroll_w); - + TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); - + virtual void machine_start(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(interrupt); }; diff --git a/src/mame/includes/ssozumo.h b/src/mame/includes/ssozumo.h index 42771f95f7aa3..f8c30eb5534f8 100644 --- a/src/mame/includes/ssozumo.h +++ b/src/mame/includes/ssozumo.h @@ -29,7 +29,7 @@ class ssozumo_state : public driver_device tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; UINT8 m_sound_nmi_mask; - + DECLARE_WRITE8_MEMBER(sh_command_w); DECLARE_WRITE8_MEMBER(sound_nmi_mask_w); DECLARE_WRITE8_MEMBER(videoram_w); @@ -39,18 +39,18 @@ class ssozumo_state : public driver_device DECLARE_WRITE8_MEMBER(paletteram_w); DECLARE_WRITE8_MEMBER(scroll_w); DECLARE_WRITE8_MEMBER(flipscreen_w); - + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - + INTERRUPT_GEN_MEMBER(sound_timer_irq); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(ssozumo); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/ssrj.h b/src/mame/includes/ssrj.h index b9175dcc17200..d8c61ffed71c6 100644 --- a/src/mame/includes/ssrj.h +++ b/src/mame/includes/ssrj.h @@ -27,21 +27,21 @@ class ssrj_state : public driver_device tilemap_t *m_tilemap2; tilemap_t *m_tilemap4; UINT8 *m_buffer_spriteram; - + DECLARE_READ8_MEMBER(wheel_r); DECLARE_WRITE8_MEMBER(vram1_w); DECLARE_WRITE8_MEMBER(vram2_w); DECLARE_WRITE8_MEMBER(vram4_w); - + TILE_GET_INFO_MEMBER(get_tile_info1); TILE_GET_INFO_MEMBER(get_tile_info2); TILE_GET_INFO_MEMBER(get_tile_info4); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(ssrj); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof(screen_device &screen, bool state); void draw_objects(bitmap_ind16 &bitmap, const rectangle &cliprect ); diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index 2d5ac2fa60d90..0627c79a39d8d 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -106,9 +106,9 @@ class ssv_state : public driver_device DECLARE_WRITE16_MEMBER(scroll_w); DECLARE_READ16_MEMBER(gdfs_eeprom_r); DECLARE_WRITE16_MEMBER(gdfs_eeprom_w); - + TILE_GET_INFO_MEMBER(get_tile_info_0); - + DECLARE_DRIVER_INIT(gdfs); DECLARE_DRIVER_INIT(sxyreac2); DECLARE_DRIVER_INIT(hypreac2); @@ -135,16 +135,16 @@ class ssv_state : public driver_device virtual void video_start(); DECLARE_VIDEO_START(gdfs); DECLARE_VIDEO_START(eaglshot); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_gdfs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_eaglshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(interrupt); TIMER_DEVICE_CALLBACK_MEMBER(gdfs_interrupt); void update_irq_state(); IRQ_CALLBACK_MEMBER(irq_callback); - + void drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx,UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0,int shadow); void draw_row(bitmap_ind16 &bitmap, const rectangle &cliprect, int sx, int sy, int scroll); void draw_layer(bitmap_ind16 &bitmap, const rectangle &cliprect, int nr); diff --git a/src/mame/includes/subs.h b/src/mame/includes/subs.h index 1b9629a7b29be..523512951f28d 100644 --- a/src/mame/includes/subs.h +++ b/src/mame/includes/subs.h @@ -42,7 +42,7 @@ class subs_state : public driver_device int m_steering_val2; int m_last_val_1; int m_last_val_2; - + DECLARE_WRITE8_MEMBER(steer_reset_w); DECLARE_READ8_MEMBER(control_r); DECLARE_READ8_MEMBER(coin_r); @@ -56,16 +56,16 @@ class subs_state : public driver_device DECLARE_WRITE8_MEMBER(crash_w); DECLARE_WRITE8_MEMBER(explode_w); DECLARE_WRITE8_MEMBER(noise_reset_w); - + virtual void machine_start(); virtual void machine_reset(); DECLARE_PALETTE_INIT(subs); - + UINT32 screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(interrupt); - + int steering_1(); int steering_2(); }; diff --git a/src/mame/includes/suna16.h b/src/mame/includes/suna16.h index 6ccfc4f40457d..7f641552bfee4 100644 --- a/src/mame/includes/suna16.h +++ b/src/mame/includes/suna16.h @@ -40,7 +40,7 @@ class suna16_state : public driver_device DECLARE_WRITE16_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(DAC1_w); DECLARE_WRITE8_MEMBER(DAC2_w); - + // bestbest specific DECLARE_WRITE16_MEMBER(bestbest_flipscreen_w); DECLARE_WRITE16_MEMBER(bestbest_coin_w); @@ -54,22 +54,22 @@ class suna16_state : public driver_device DECLARE_WRITE8_MEMBER(bssoccer_pcm_2_bankswitch_w); DECLARE_WRITE8_MEMBER(bssoccer_DAC3_w); DECLARE_WRITE8_MEMBER(bssoccer_DAC4_w); - + // uballoon specific DECLARE_WRITE16_MEMBER(uballoon_leds_w); DECLARE_WRITE8_MEMBER(uballoon_pcm_1_bankswitch_w); DECLARE_READ8_MEMBER(uballoon_prot_r); DECLARE_WRITE8_MEMBER(uballoon_prot_w); - + TIMER_DEVICE_CALLBACK_MEMBER(bssoccer_interrupt); - + DECLARE_DRIVER_INIT(uballoon); virtual void video_start(); DECLARE_MACHINE_START(bestbest); DECLARE_MACHINE_START(bssoccer); - DECLARE_MACHINE_START(uballoon); + DECLARE_MACHINE_START(uballoon); DECLARE_MACHINE_RESET(uballoon); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_bestbest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 *sprites, int gfx); diff --git a/src/mame/includes/suprloco.h b/src/mame/includes/suprloco.h index a04d8166faa22..13b534f793df6 100644 --- a/src/mame/includes/suprloco.h +++ b/src/mame/includes/suprloco.h @@ -9,7 +9,7 @@ class suprloco_state : public driver_device m_spriteram(*this, "spriteram"), m_videoram(*this, "videoram"), m_scrollram(*this, "scrollram") { } - + required_device m_maincpu; required_device m_audiocpu; required_device m_gfxdecode; @@ -17,7 +17,7 @@ class suprloco_state : public driver_device required_shared_ptr m_spriteram; required_shared_ptr m_videoram; required_shared_ptr m_scrollram; - + tilemap_t *m_bg_tilemap; int m_control; @@ -26,13 +26,13 @@ class suprloco_state : public driver_device DECLARE_WRITE8_MEMBER(scrollram_w); DECLARE_WRITE8_MEMBER(control_w); DECLARE_READ8_MEMBER(control_r); - + TILE_GET_INFO_MEMBER(get_tile_info); - + virtual void video_start(); DECLARE_PALETTE_INIT(suprloco); DECLARE_DRIVER_INIT(suprloco); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); inline void draw_pixel(bitmap_ind16 &bitmap,const rectangle &cliprect,int x,int y,int color,int flip); void draw_sprite(bitmap_ind16 &bitmap,const rectangle &cliprect,int spr_number); diff --git a/src/mame/includes/suprridr.h b/src/mame/includes/suprridr.h index fe39170bee429..29c34423e4b86 100644 --- a/src/mame/includes/suprridr.h +++ b/src/mame/includes/suprridr.h @@ -35,7 +35,7 @@ class suprridr_state : public driver_device tilemap_t *m_bg_tilemap_noscroll; UINT8 m_flipx; UINT8 m_flipy; - + DECLARE_WRITE8_MEMBER(nmi_enable_w); DECLARE_WRITE8_MEMBER(sound_data_w); DECLARE_WRITE8_MEMBER(sound_irq_ack_w); @@ -48,19 +48,19 @@ class suprridr_state : public driver_device DECLARE_WRITE8_MEMBER(bgram_w); DECLARE_WRITE8_MEMBER(fgram_w); DECLARE_READ8_MEMBER(sound_data_r); - + DECLARE_CUSTOM_INPUT_MEMBER(control_r); - + TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(get_tile_info2); - + INTERRUPT_GEN_MEMBER(main_nmi_gen); TIMER_CALLBACK_MEMBER(delayed_sound_w); - + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(suprridr); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int is_screen_flipped(); }; diff --git a/src/mame/includes/tankbatt.h b/src/mame/includes/tankbatt.h index c7c9c39646afd..d89621127f221 100644 --- a/src/mame/includes/tankbatt.h +++ b/src/mame/includes/tankbatt.h @@ -18,11 +18,11 @@ class tankbatt_state : public driver_device required_shared_ptr m_bulletsram; required_shared_ptr m_videoram; - + int m_nmi_enable; int m_sound_enable; tilemap_t *m_bg_tilemap; - + DECLARE_WRITE8_MEMBER(led_w); DECLARE_READ8_MEMBER(in0_r); DECLARE_READ8_MEMBER(in1_r); @@ -36,17 +36,17 @@ class tankbatt_state : public driver_device DECLARE_WRITE8_MEMBER(coincounter_w); DECLARE_WRITE8_MEMBER(coinlockout_w); DECLARE_WRITE8_MEMBER(videoram_w); - - + + INTERRUPT_GEN_MEMBER(interrupt); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); - + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(tankbatt); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/tankbust.h b/src/mame/includes/tankbust.h index 2bf3f8bcc213e..37e88e410de8d 100644 --- a/src/mame/includes/tankbust.h +++ b/src/mame/includes/tankbust.h @@ -31,7 +31,7 @@ class tankbust_state : public driver_device UINT8 m_xscroll[2]; UINT8 m_yscroll[2]; UINT8 m_irq_mask; - + DECLARE_WRITE8_MEMBER(soundlatch_w); DECLARE_WRITE8_MEMBER(e0xx_w); DECLARE_READ8_MEMBER(debug_output_area_r); @@ -44,18 +44,18 @@ class tankbust_state : public driver_device DECLARE_WRITE8_MEMBER(yscroll_w); DECLARE_READ8_MEMBER(soundlatch_r); DECLARE_READ8_MEMBER(soundtimer_r); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_txt_tile_info); - - virtual void machine_start(); - virtual void machine_reset(); + + virtual void machine_start(); + virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(tankbust); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(soundlatch_callback); TIMER_CALLBACK_MEMBER(soundirqline_callback); diff --git a/src/mame/includes/taotaido.h b/src/mame/includes/taotaido.h index 56c75aa93a96b..f4012287c169b 100644 --- a/src/mame/includes/taotaido.h +++ b/src/mame/includes/taotaido.h @@ -21,7 +21,7 @@ class taotaido_state : public driver_device required_shared_ptr m_spriteram2; required_shared_ptr m_scrollram; required_shared_ptr m_bgram; - + int m_pending_command; UINT16 m_sprite_character_bank_select[8]; UINT16 m_video_bank_select[8]; @@ -30,7 +30,7 @@ class taotaido_state : public driver_device UINT16 *m_spriteram_older; UINT16 *m_spriteram2_old; UINT16 *m_spriteram2_older; - + DECLARE_READ16_MEMBER(pending_command_r); DECLARE_WRITE16_MEMBER(sound_command_w); DECLARE_WRITE8_MEMBER(pending_command_clear_w); @@ -38,13 +38,13 @@ class taotaido_state : public driver_device DECLARE_WRITE16_MEMBER(sprite_character_bank_select_w); DECLARE_WRITE16_MEMBER(tileregs_w); DECLARE_WRITE16_MEMBER(bgvideoram_w); - + TILE_GET_INFO_MEMBER(bg_tile_info); TILEMAP_MAPPER_MEMBER(tilemap_scan_rows); - + virtual void machine_start(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof(screen_device &screen, bool state); UINT32 tile_callback( UINT32 code ); diff --git a/src/mame/includes/tbowl.h b/src/mame/includes/tbowl.h index c6fbb1e042157..778e273c526e1 100644 --- a/src/mame/includes/tbowl.h +++ b/src/mame/includes/tbowl.h @@ -62,18 +62,18 @@ class tbowl_state : public driver_device DECLARE_WRITE8_MEMBER(bg2xscroll_hi); DECLARE_WRITE8_MEMBER(bg2yscroll_lo); DECLARE_WRITE8_MEMBER(bg2yscroll_hi); - + TILE_GET_INFO_MEMBER(get_tx_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_bg2_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + void adpcm_int(msm5205_device *device, int chip); DECLARE_WRITE_LINE_MEMBER(adpcm_int_1); DECLARE_WRITE_LINE_MEMBER(adpcm_int_2); diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 8e42281322abc..41d552015600a 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -62,7 +62,7 @@ class thunderx_state : public driver_device virtual void machine_start(); virtual void machine_reset(); - virtual void video_start(); + virtual void video_start(); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(vblank_interrupt); diff --git a/src/mame/includes/timelimt.h b/src/mame/includes/timelimt.h index b1390b0fd46a1..91a2894e0a99f 100644 --- a/src/mame/includes/timelimt.h +++ b/src/mame/includes/timelimt.h @@ -33,17 +33,17 @@ class timelimt_state : public driver_device DECLARE_WRITE8_MEMBER(scroll_x_lsb_w); DECLARE_WRITE8_MEMBER(scroll_x_msb_w); DECLARE_WRITE8_MEMBER(scroll_y_w); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); DECLARE_PALETTE_INIT(timelimt); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(irq); }; diff --git a/src/mame/includes/tryout.h b/src/mame/includes/tryout.h index 9d06817ef3053..d8e63eade36c3 100644 --- a/src/mame/includes/tryout.h +++ b/src/mame/includes/tryout.h @@ -27,7 +27,7 @@ class tryout_state : public driver_device UINT8 m_vram_bank; UINT8 *m_vram; UINT8 *m_vram_gfx; - + DECLARE_WRITE8_MEMBER(nmi_ack_w); DECLARE_WRITE8_MEMBER(sound_w); DECLARE_WRITE8_MEMBER(sound_irq_ack_w); @@ -45,8 +45,8 @@ class tryout_state : public driver_device TILEMAP_MAPPER_MEMBER(get_fg_memory_offset); TILEMAP_MAPPER_MEMBER(get_bg_memory_offset); - virtual void machine_start(); - virtual void video_start(); + virtual void machine_start(); + virtual void video_start(); DECLARE_PALETTE_INIT(tryout); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/tsamurai.h b/src/mame/includes/tsamurai.h index 1a43871fea006..62983b0fb4dbd 100644 --- a/src/mame/includes/tsamurai.h +++ b/src/mame/includes/tsamurai.h @@ -28,26 +28,26 @@ class tsamurai_state : public driver_device tilemap_t *m_background; tilemap_t *m_foreground; - + //common int m_flicker; int m_textbank1; int m_nmi_enabled; - + // tsamurai and m660 specific int m_bgcolor; int m_sound_command1; int m_sound_command2; - + //m660 specific int m_textbank2; int m_sound_command3; - + //vsgongf specific int m_vsgongf_sound_nmi_enabled; int m_vsgongf_color; int m_key_count; //debug only - + // common DECLARE_WRITE8_MEMBER(nmi_enable_w); DECLARE_WRITE8_MEMBER(coincounter_w); @@ -68,27 +68,27 @@ class tsamurai_state : public driver_device DECLARE_WRITE8_MEMBER(sound_command2_w); DECLARE_READ8_MEMBER(sound_command1_r); DECLARE_READ8_MEMBER(sound_command2_r); - + // tsamurai specific DECLARE_READ8_MEMBER(tsamurai_unknown_d803_r); - + // m660 specific DECLARE_WRITE8_MEMBER(m660_textbank2_w); DECLARE_READ8_MEMBER(m660_unknown_d803_r); DECLARE_WRITE8_MEMBER(m660_sound_command3_w); DECLARE_READ8_MEMBER(m660_sound_command3_r); - + // vsgongf specific DECLARE_WRITE8_MEMBER(vsgongf_color_w); DECLARE_WRITE8_MEMBER(vsgongf_sound_nmi_enable_w); DECLARE_READ8_MEMBER(vsgongf_a006_r); DECLARE_READ8_MEMBER(vsgongf_a100_r); DECLARE_WRITE8_MEMBER(vsgongf_sound_command_w); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_vsgongf_tile_info); - + virtual void machine_start(); DECLARE_MACHINE_START(m660); DECLARE_MACHINE_START(tsamurai); @@ -97,11 +97,11 @@ class tsamurai_state : public driver_device DECLARE_VIDEO_START(m660); DECLARE_VIDEO_START(tsamurai); DECLARE_VIDEO_START(vsgongf); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); - + INTERRUPT_GEN_MEMBER(interrupt); INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); }; diff --git a/src/mame/includes/usgames.h b/src/mame/includes/usgames.h index f8f4e5bb83a03..51316a7a16531 100644 --- a/src/mame/includes/usgames.h +++ b/src/mame/includes/usgames.h @@ -17,8 +17,8 @@ class usgames_state : public driver_device DECLARE_WRITE8_MEMBER(usgames_videoram_w); DECLARE_WRITE8_MEMBER(usgames_charram_w); TILE_GET_INFO_MEMBER(get_usgames_tile_info); - virtual void machine_start(); - virtual void video_start(); + virtual void machine_start(); + virtual void video_start(); DECLARE_PALETTE_INIT(usgames); UINT32 screen_update_usgames(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device m_maincpu; diff --git a/src/mame/includes/vigilant.h b/src/mame/includes/vigilant.h index 52b88897e7e98..e1797090313e0 100644 --- a/src/mame/includes/vigilant.h +++ b/src/mame/includes/vigilant.h @@ -38,8 +38,8 @@ class vigilant_state : public driver_device DECLARE_WRITE8_MEMBER(vigilant_horiz_scroll_w); DECLARE_WRITE8_MEMBER(vigilant_rear_horiz_scroll_w); DECLARE_WRITE8_MEMBER(vigilant_rear_color_w); - virtual void machine_start(); - virtual void video_start(); + virtual void machine_start(); + virtual void video_start(); virtual void video_reset(); UINT32 screen_update_vigilant(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kikcubic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/vulgus.h b/src/mame/includes/vulgus.h index 2c4294cc75f29..19383814077d8 100644 --- a/src/mame/includes/vulgus.h +++ b/src/mame/includes/vulgus.h @@ -48,6 +48,6 @@ class vulgus_state : public driver_device UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/wc90b.h b/src/mame/includes/wc90b.h index b81bc70feb58e..b5d513d69dc20 100644 --- a/src/mame/includes/wc90b.h +++ b/src/mame/includes/wc90b.h @@ -51,14 +51,14 @@ class wc90b_state : public driver_device DECLARE_WRITE8_MEMBER(txvideoram_w); DECLARE_WRITE8_MEMBER(adpcm_control_w); DECLARE_WRITE_LINE_MEMBER(adpcm_int); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); - + virtual void machine_start(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority ); }; diff --git a/src/mame/machine/hng64_net.c b/src/mame/machine/hng64_net.c index 8fedeccf250a8..190d992a9b222 100644 --- a/src/mame/machine/hng64_net.c +++ b/src/mame/machine/hng64_net.c @@ -141,4 +141,4 @@ MACHINE_CONFIG_FRAGMENT( hng64_network ) MCFG_CPU_ADD("network", KL5C80A12, HNG64_MASTER_CLOCK / 4) /* KL5C80A12CFP - binary compatible with Z80. */ MCFG_CPU_PROGRAM_MAP(hng_comm_map) MCFG_CPU_IO_MAP(hng_comm_io_map) -MACHINE_CONFIG_END \ No newline at end of file +MACHINE_CONFIG_END diff --git a/src/mame/machine/iteagle_fpga.c b/src/mame/machine/iteagle_fpga.c index 22f907ddcdd69..f72e62a4f26e6 100644 --- a/src/mame/machine/iteagle_fpga.c +++ b/src/mame/machine/iteagle_fpga.c @@ -35,15 +35,15 @@ void iteagle_fpga_device::device_start() add_map(sizeof(m_ctrl_regs), M_IO, FUNC(iteagle_fpga_device::ctrl_map)); // ctrl defaults to base address 0x00000000 - bank_infos[0].adr = 0x00000000 & (~(bank_infos[0].size - 1)); + bank_infos[0].adr = 0x00000000 & (~(bank_infos[0].size - 1)); add_map(sizeof(m_fpga_regs), M_IO, FUNC(iteagle_fpga_device::fpga_map)); // fpga defaults to base address 0x00000300 - bank_infos[1].adr = 0x00000300 & (~(bank_infos[1].size - 1)); + bank_infos[1].adr = 0x00000300 & (~(bank_infos[1].size - 1)); add_map(sizeof(m_rtc_regs), M_MEM, FUNC(iteagle_fpga_device::rtc_map)); // RTC defaults to base address 0x000c0000 - bank_infos[2].adr = 0x000c0000 & (~(bank_infos[2].size - 1)); + bank_infos[2].adr = 0x000c0000 & (~(bank_infos[2].size - 1)); } void iteagle_fpga_device::device_reset() @@ -106,7 +106,7 @@ READ32_MEMBER( iteagle_fpga_device::fpga_r ) if (LOG_FPGA && (m_prev_reg != offset && m_prev_reg != (0x08/4))) logerror("%s:fpga read from offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; - case 0x04/4: + case 0x04/4: result = (result & 0xFF0FFFFF) | (machine().root_device().ioport("SW5")->read()<<20); // Resolution if (LOG_FPGA) logerror("%s:fpga read from offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); @@ -183,7 +183,7 @@ WRITE32_MEMBER( iteagle_fpga_device::rtc_w ) COMBINE_DATA(&m_rtc_regs[offset]); switch (offset) { - case 0x7F8/4: // M48T02 time + case 0x7F8/4: // M48T02 time if (data & mem_mask & 0x40) { // get the current date/time from the core machine().current_datetime(systime); @@ -191,7 +191,7 @@ WRITE32_MEMBER( iteagle_fpga_device::rtc_w ) raw[1] = dec_2_bcd(systime.local_time.second); raw[2] = dec_2_bcd(systime.local_time.minute); raw[3] = dec_2_bcd(systime.local_time.hour); - + raw[4] = dec_2_bcd((systime.local_time.weekday != 0) ? systime.local_time.weekday : 7); raw[5] = dec_2_bcd(systime.local_time.mday); raw[6] = dec_2_bcd(systime.local_time.month + 1); @@ -199,10 +199,10 @@ WRITE32_MEMBER( iteagle_fpga_device::rtc_w ) m_rtc_regs[0x7F8/4] = (raw[3]<<24) | (raw[2]<<16) | (raw[1]<<8) | (raw[0] <<0); //m_rtc_regs[0x7FC/4] = (raw[7]<<24) | (raw[6]<<16) | (raw[5]<<8) | (raw[4] <<0); m_rtc_regs[0x7FC/4] = (0x95<<24) | (raw[6]<<16) | (raw[5]<<8) | (raw[4] <<0); - } + } if (LOG_RTC) logerror("%s:RTC write to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); - + break; default: if (LOG_RTC) @@ -249,7 +249,7 @@ void iteagle_eeprom_device::device_reset() pci_device::device_reset(); } -READ32_MEMBER( iteagle_eeprom_device::eeprom_r ) +READ32_MEMBER( iteagle_eeprom_device::eeprom_r ) { UINT32 result = 0; @@ -257,7 +257,7 @@ READ32_MEMBER( iteagle_eeprom_device::eeprom_r ) case 0xC/4: // I2C Handler if (ACCESSING_BITS_16_23) { result = m_eeprom->do_read()<<(16+3); - } else { + } else { if (LOG_EEPROM) logerror("%s:eeprom read from offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); } @@ -270,7 +270,7 @@ READ32_MEMBER( iteagle_eeprom_device::eeprom_r ) return result; } -WRITE32_MEMBER( iteagle_eeprom_device::eeprom_w ) +WRITE32_MEMBER( iteagle_eeprom_device::eeprom_w ) { switch (offset) { case 0xC/4: // I2C Handler @@ -278,7 +278,7 @@ WRITE32_MEMBER( iteagle_eeprom_device::eeprom_w ) m_eeprom->di_write((data & 0x040000) >> (16+2)); m_eeprom->cs_write((data & 0x020000) ? ASSERT_LINE : CLEAR_LINE); m_eeprom->clk_write((data & 0x010000) ? ASSERT_LINE : CLEAR_LINE); - } else { + } else { if (LOG_EEPROM) logerror("%s:eeprom write to offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h index acc4bd85b0036..356c65176199f 100644 --- a/src/mame/machine/iteagle_fpga.h +++ b/src/mame/machine/iteagle_fpga.h @@ -31,7 +31,7 @@ class iteagle_fpga_device : public pci_device { UINT32 m_fpga_regs[0x20]; UINT32 m_rtc_regs[0x800]; UINT32 m_prev_reg; - + DECLARE_ADDRESS_MAP(rtc_map, 32); DECLARE_ADDRESS_MAP(fpga_map, 32); DECLARE_ADDRESS_MAP(ctrl_map, 32); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index cc31e50579281..b6e570a8fe057 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -336,7 +336,7 @@ froggers // bootleg frogf // bootleg quaak // bootleg froggeram // bootleg -froggerv // bootleg +froggerv // bootleg amidars // GX337 (c) 1982 Konami triplep // (c) 1982 KKI / made by Sanritsu? triplepa // (c) 1982 KKI / made by Sanritsu? @@ -6350,7 +6350,7 @@ combatsc // GX611 (c) 1988 combatsct // GX611 (c) 1987 combatscj // GX611 (c) 1987 (Japan) bootcamp // GX611 (c) 1987 -bootcampa // GX611 (c) 1987 +bootcampa // GX611 (c) 1987 combatscb // bootleg rockrage // GX620 (c) 1986 (World?) rockragea // GX620 (c) 1986 (Prototype?) @@ -7713,7 +7713,7 @@ kof2000 // 0257 (c) 2000 SNK kof2000n // 0257 (c) 2000 SNK // 0258 SNK vs. Capcom? bangbead // 0259 (c) 2000 Visco -b2b // 0071 (c) 2000 Visco (released by NCI in 2010) +b2b // 0071 (c) 2000 Visco (released by NCI in 2010) nitd // 0260 (c) 2000 Eleven / Gavaking nitdbl // bootleg sengoku3 // 0261 (c) 2001 Noise Factory / SNK @@ -7910,7 +7910,7 @@ tstrike // East Coast Coin Company (Melbourne) tstrikea // Game Room ctribe // TA-0028 (c) 1990 (US) ctribe1 // TA-0028 (c) 1990 (US) -ctribeo // TA-0028 (c) 1990 (US) +ctribeo // TA-0028 (c) 1990 (US) ctribej // TA-0028 (c) 1990 (Japan) ctribeb // bootleg ctribeb2 // bootleg @@ -8453,7 +8453,7 @@ raiden2ea // (c) 1993 Seibu Kaihatsu raiden2eu // (c) 1993 Seibu Kaihatsu + Fabtek license raiden2eua // (c) 1993 Seibu Kaihatsu + Fabtek license raiden2nl // (c) 1993 Seibu Kaihatsu -raiden2f // (c) 1993 Seibu Kaihatsu +raiden2f // (c) 1993 Seibu Kaihatsu raiden2g // (c) 1993 Seibu Kaihatsu + Tuning license raiden2dx // (c) 1993 Seibu Kaihatsu @@ -8777,7 +8777,7 @@ gunbird // (c) 1994 gunbirdk // (c) 1994 gunbirdj // (c) 1994 btlkroad // (c) 1994 -btlkroadk // (c) 1994 +btlkroadk // (c) 1994 s1945 // (c) 1995 s1945a // (c) 1995 s1945j // (c) 1995 diff --git a/src/mame/video/bbusters.c b/src/mame/video/bbusters.c index 77c90356759fd..dcc064e803761 100644 --- a/src/mame/video/bbusters.c +++ b/src/mame/video/bbusters.c @@ -76,7 +76,7 @@ VIDEO_START_MEMBER(bbusters_state,bbuster) m_pf1_tilemap->set_transparent_pen(15); m_fix_tilemap->set_transparent_pen(15); - + save_item(NAME(m_scale_line_count)); } @@ -88,7 +88,7 @@ VIDEO_START_MEMBER(bbusters_state,mechatt) m_pf1_tilemap->set_transparent_pen(15); m_fix_tilemap->set_transparent_pen(15); - + save_item(NAME(m_scale_line_count)); } diff --git a/src/mame/video/deadang.c b/src/mame/video/deadang.c index 606a7f08e8bf0..f1f9360798d37 100644 --- a/src/mame/video/deadang.c +++ b/src/mame/video/deadang.c @@ -77,7 +77,7 @@ void deadang_state::video_start() m_pf2_layer->set_transparent_pen(15); m_pf1_layer->set_transparent_pen(15); m_text_layer->set_transparent_pen(15); - + save_item(NAME(m_tilebank)); save_item(NAME(m_oldtilebank)); } diff --git a/src/mame/video/decmxc06.c b/src/mame/video/decmxc06.c index 61cc9d03d9316..e8c7a5972a836 100644 --- a/src/mame/video/decmxc06.c +++ b/src/mame/video/decmxc06.c @@ -110,14 +110,14 @@ void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cli else mult = -16; - + // thedeep strongly suggests that this check goes here, otherwise the radar breaks if (!(spriteram[offs] & 0x8000)) { offs += 4; continue; } - + for (x = 0; x < w; x++) { @@ -173,7 +173,7 @@ void deco_mxc06_device::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cli offs += 4; if (offs >= m_ramsize / 2) return; - + } } diff --git a/src/mame/video/dynax.c b/src/mame/video/dynax.c index 86994063971b3..f588a436d2c91 100644 --- a/src/mame/video/dynax.c +++ b/src/mame/video/dynax.c @@ -122,8 +122,8 @@ WRITE8_MEMBER(dynax_state::tenkai_blit_dest_w) } /* -mjelctrn: 7 d e -> 1 - 4 8 -mjembase: b d e -> - 2 4 8 +mjelctrn: 7 d e -> 1 - 4 8 +mjembase: b d e -> - 2 4 8 */ WRITE8_MEMBER(dynax_state::mjembase_blit_dest_w) { @@ -381,7 +381,7 @@ void dynax_state::blitter_plot_pixel( int layer, int mask, int x, int y, int pen } /* - Flags: + Flags: 7654 ---- - ---- 3--- Rotation = SWAPXY + FLIPY @@ -1223,9 +1223,9 @@ WRITE8_MEMBER(dynax_state::tenkai_priority_w) } /* -mjembase: priority: 00 08 10 18 20 28; enable: 1,2,4 +mjembase: priority: 00 08 10 18 20 28; enable: 1,2,4 Convert to: -mjelctrn: priority: 00 20 10 40 30 50; enable: 1,2,8 +mjelctrn: priority: 00 20 10 40 30 50; enable: 1,2,8 */ WRITE8_MEMBER(dynax_state::mjembase_priority_w) { diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index 7456486068914..2446eb2636593 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -660,7 +660,7 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, // xrally's pink tilemaps make me think this is a tilemap enable bit. // fatfurwa makes me think otherwise. -// if (!(tileregs & 0x0040)) return; +// if (!(tileregs & 0x0040)) return; // set the transmask so our manual copy is correct if (tileregs & 0x0400) @@ -1251,4 +1251,3 @@ void hng64_state::video_start() m_vertsrom = (UINT16*)memregion("verts")->base(); m_vertsrom_size = memregion("verts")->bytes(); } - diff --git a/src/mame/video/hng64_3d.c b/src/mame/video/hng64_3d.c index 0dbca3d24f70e..3945a70dd4fa5 100644 --- a/src/mame/video/hng64_3d.c +++ b/src/mame/video/hng64_3d.c @@ -68,7 +68,7 @@ TIMER_CALLBACK_MEMBER(hng64_state::hng64_3dfifo_processed ) /* Note: Samurai Shodown games never calls bit 1, so it can't be framebuffer clear. It also calls bit 3 at start-up, meaning unknown */ WRITE32_MEMBER(hng64_state::dl_control_w) // This handles framebuffers { -// printf("dl_control_w %08x %08x\n", data, mem_mask); +// printf("dl_control_w %08x %08x\n", data, mem_mask); //if(data & 2) // swap buffers //{ @@ -540,7 +540,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, struct polygon* poly #if 0 if (((chunkOffset[2] & 0xc000) == 0x4000) && (m_screen->frame_number() & 1)) { - // if (chunkOffset[2] == 0xd870) + // if (chunkOffset[2] == 0xd870) { polys[*numPolys].debugColor = 0xffff0000; printf("%d (%08x) : %04x %04x %04x\n", k, address[k] * 3 * 2, chunkOffset[0], chunkOffset[1], chunkOffset[2]); @@ -863,13 +863,12 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, struct polygon* poly void hng64_state::hng64_command3d(const UINT16* packet) { - /* A temporary place to put some polygons. This will optimize away if the compiler's any good. */ int numPolys = 0; dynamic_array polys(1024*5); //printf("packet type : %04x %04x|%04x %04x|%04x %04x|%04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x\n", packet[0],packet[1],packet[2],packet[3],packet[4],packet[5],packet[6],packet[7], packet[8], packet[9], packet[10], packet[11], packet[12], packet[13], packet[14], packet[15]); - + switch (packet[0]) { case 0x0000: // Appears to be a NOP. @@ -1239,7 +1238,7 @@ inline void hng64_state::FillSmoothTexPCHorizontalLine( UINT8 paletteEntry = 0; float t_coord, s_coord; - const UINT8 *gfx = m_texturerom; + const UINT8 *gfx = m_texturerom; const UINT8 *textureOffset = &gfx[prOptions.texIndex * 1024 * 1024]; for (; x_start <= x_end; x_start++) @@ -1702,4 +1701,3 @@ void hng64_state::drawShaded( struct polygon *p) prOptions); } } - diff --git a/src/mame/video/hng64_sprite.c b/src/mame/video/hng64_sprite.c index 0c6f6e37fc31a..39827c4c79ec3 100644 --- a/src/mame/video/hng64_sprite.c +++ b/src/mame/video/hng64_sprite.c @@ -222,4 +222,3 @@ void hng64_state::draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, cons if (!chaini) source +=8; } } - diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c index 6b6e6f8917a8e..1d96bc6dbbedd 100644 --- a/src/mame/video/jalblend.c +++ b/src/mame/video/jalblend.c @@ -35,7 +35,7 @@ jaleco_blend_device::jaleco_blend_device(const machine_config &mconfig, const ch void jaleco_blend_device::device_start() { m_table = auto_alloc_array_clear(machine(), UINT8, 0xc00); - + save_pointer(NAME(m_table), 0xc00); } diff --git a/src/mame/video/jalblend.h b/src/mame/video/jalblend.h index 2fb6a20b32eb9..f382d63ac9c11 100644 --- a/src/mame/video/jalblend.h +++ b/src/mame/video/jalblend.h @@ -3,7 +3,7 @@ class jaleco_blend_device : public device_t public: jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~jaleco_blend_device() {} - + void set(int color, UINT8 val); rgb_t func(rgb_t dest, rgb_t addMe, UINT8 alpha); void drawgfx(palette_device &palette,bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx, @@ -18,14 +18,14 @@ class jaleco_blend_device : public device_t virtual void device_start(); virtual void device_reset(); -private: +private: /* each palette entry contains a fourth 'alpha' value */ UINT8 *m_table; - + template void drawgfx_common(palette_device &palette,_BitmapClass &dest_bmp,const rectangle &clip,gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy, int transparent_color); }; -extern const device_type JALECO_BLEND; \ No newline at end of file +extern const device_type JALECO_BLEND; diff --git a/src/mame/video/pc080sn.c b/src/mame/video/pc080sn.c index d0d3cbb556092..61e8ff45fbeff 100644 --- a/src/mame/video/pc080sn.c +++ b/src/mame/video/pc080sn.c @@ -62,7 +62,7 @@ pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, d { for (int i = 0; i < 8; i++) m_ctrl[i] = 0; - + for (int i = 0; i < 2; i++) { m_bg_ram[i] = NULL; diff --git a/src/mame/video/psychic5.c b/src/mame/video/psychic5.c index 6a0b56d39314d..40403564aacaa 100644 --- a/src/mame/video/psychic5.c +++ b/src/mame/video/psychic5.c @@ -24,10 +24,10 @@ void psychic5_state::change_palette(int offset, UINT8* palram, int palbase) UINT8 hi = palram[(offset) | 1]; int color = offset >> 1; - + if (m_blend) m_blend->set(palbase + color, hi & 0x0f); - + m_palette->set_pen_color(palbase + color, pal4bit(lo >> 4), pal4bit(lo), pal4bit(hi >> 4)); } @@ -188,11 +188,11 @@ void psychic5_state::video_start() VIDEO_START_MEMBER(psychic5_state,psychic5) { video_start(); - + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(psychic5_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 64, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(psychic5_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 32, 32); m_fg_tilemap->set_transparent_pen(15); - + save_item(NAME(m_title_screen)); } @@ -200,11 +200,11 @@ VIDEO_START_MEMBER(psychic5_state,psychic5) VIDEO_START_MEMBER(psychic5_state,bombsa) { video_start(); - + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(psychic5_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 32); m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(psychic5_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 32, 32); m_fg_tilemap->set_transparent_pen(15); - + save_item(NAME(m_bombsa_unknown)); } diff --git a/src/mame/video/realbrk.c b/src/mame/video/realbrk.c index 0e17ba6576948..683c38bc173c4 100644 --- a/src/mame/video/realbrk.c +++ b/src/mame/video/realbrk.c @@ -154,7 +154,7 @@ void realbrk_state::video_start() m_tmpbitmap0 = auto_bitmap_ind16_alloc(machine(),32,32); m_tmpbitmap1 = auto_bitmap_ind16_alloc(machine(),32,32); - + save_item(NAME(m_disable_video)); } diff --git a/src/mame/video/rltennis.c b/src/mame/video/rltennis.c index 993e719d08a0c..e736e90a58d74 100644 --- a/src/mame/video/rltennis.c +++ b/src/mame/video/rltennis.c @@ -224,7 +224,7 @@ void rltennis_state::video_start() m_tmp_bitmap[BITMAP_FG_1] = auto_bitmap_ind16_alloc(machine(), 512, 256); m_tmp_bitmap[BITMAP_FG_2] = auto_bitmap_ind16_alloc(machine(), 512, 256); m_tmp_bitmap[BITMAP_FG_DISPLAY] = auto_bitmap_ind16_alloc(machine(), 512, 256); - + save_item(NAME(m_blitter)); } diff --git a/src/mame/video/seta001.c b/src/mame/video/seta001.c index 796efafbd4a30..9a5468e385799 100644 --- a/src/mame/video/seta001.c +++ b/src/mame/video/seta001.c @@ -84,7 +84,7 @@ void seta001_device::device_start() m_spritelimit = 0x1ff; m_bgflag = 0x00; - + m_gfxbank_cb.bind_relative_to(*owner()); save_item(NAME(m_bgflag)); diff --git a/src/mame/video/seta2.c b/src/mame/video/seta2.c index 333bf9daa0ddd..32a4e5055d12f 100644 --- a/src/mame/video/seta2.c +++ b/src/mame/video/seta2.c @@ -457,14 +457,14 @@ void seta2_state::video_start() VIDEO_START_MEMBER(seta2_state,xoffset) { video_start(); - + m_xoffset = 0x200; } VIDEO_START_MEMBER(seta2_state,yoffset) { video_start(); - + m_yoffset = 0x10; } diff --git a/src/mame/video/sidearms.c b/src/mame/video/sidearms.c index 65daee439a936..5dbbc87cc74fa 100644 --- a/src/mame/video/sidearms.c +++ b/src/mame/video/sidearms.c @@ -159,7 +159,7 @@ void sidearms_state::video_start() m_latch_374 = m_vcount_191 = m_hcount_191 = 0; m_flipon = m_charon = m_staron = m_objon = m_bgon = 0; - + save_item(NAME(m_bgon)); save_item(NAME(m_objon)); save_item(NAME(m_staron)); diff --git a/src/mame/video/srumbler.c b/src/mame/video/srumbler.c index 61fa910b92cc7..4c3d722bc6854 100644 --- a/src/mame/video/srumbler.c +++ b/src/mame/video/srumbler.c @@ -52,7 +52,7 @@ void srumbler_state::video_start() m_bg_tilemap->set_transmask(0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ m_bg_tilemap->set_transmask(1,0x07ff,0xf800); /* split type 1 has pens 0-10 transparent in front half */ - + save_item(NAME(m_scroll)); } diff --git a/src/mame/video/ssv.c b/src/mame/video/ssv.c index ab7b33888d9dc..6b48449c7af41 100644 --- a/src/mame/video/ssv.c +++ b/src/mame/video/ssv.c @@ -194,7 +194,7 @@ void ssv_state::drawgfx(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_ele void ssv_state::video_start() { m_gfxdecode->gfx(0)->set_granularity(64); /* 256 colour sprites with palette selectable on 64 colour boundaries */ - + save_item(NAME(m_enable_video)); save_item(NAME(m_shadow_pen_mask)); save_item(NAME(m_shadow_pen_shift)); @@ -208,7 +208,7 @@ VIDEO_START_MEMBER(ssv_state,eaglshot) m_gfxdecode->gfx(0)->set_source((UINT8 *)m_eaglshot_gfxram); m_gfxdecode->gfx(1)->set_source((UINT8 *)m_eaglshot_gfxram); - + save_pointer(NAME(m_eaglshot_gfxram), 16 * 0x40000 / 2); } diff --git a/src/mame/video/suna16.c b/src/mame/video/suna16.c index e58ce30410370..777cfff419c4f 100644 --- a/src/mame/video/suna16.c +++ b/src/mame/video/suna16.c @@ -92,7 +92,7 @@ WRITE16_MEMBER(suna16_state::bestbest_flipscreen_w) void suna16_state::video_start() { m_paletteram = auto_alloc_array(machine(), UINT16, m_palette->entries()); - + save_item(NAME(m_color_bank)); } diff --git a/src/mame/video/suprloco.c b/src/mame/video/suprloco.c index 6021a01a2bc2b..1c60380f5c90a 100644 --- a/src/mame/video/suprloco.c +++ b/src/mame/video/suprloco.c @@ -98,7 +98,7 @@ void suprloco_state::video_start() m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(suprloco_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); m_bg_tilemap->set_scroll_rows(32); - + save_item(NAME(m_control)); } diff --git a/src/mame/video/suprridr.c b/src/mame/video/suprridr.c index adaa1f4673f48..de72518a1ce31 100644 --- a/src/mame/video/suprridr.c +++ b/src/mame/video/suprridr.c @@ -44,7 +44,7 @@ void suprridr_state::video_start() m_bg_tilemap_noscroll = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(suprridr_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8,8, 32,32); m_fg_tilemap->set_transparent_pen(0); - + save_item(NAME(m_flipx)); save_item(NAME(m_flipy)); } diff --git a/src/mame/video/tankbust.c b/src/mame/video/tankbust.c index f2b747881d0da..e26cf97887fe3 100644 --- a/src/mame/video/tankbust.c +++ b/src/mame/video/tankbust.c @@ -83,7 +83,7 @@ void tankbust_state::video_start() m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(tankbust_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_txt_tilemap->set_transparent_pen(0); - + save_item(NAME(m_xscroll)); save_item(NAME(m_yscroll)); } diff --git a/src/mame/video/tbowl.c b/src/mame/video/tbowl.c index 293f562f876c6..8d5b1a0c796ab 100644 --- a/src/mame/video/tbowl.c +++ b/src/mame/video/tbowl.c @@ -116,7 +116,7 @@ void tbowl_state::video_start() m_tx_tilemap->set_transparent_pen(0); m_bg_tilemap->set_transparent_pen(0); m_bg2_tilemap->set_transparent_pen(0); - + save_item(NAME(m_xscroll)); save_item(NAME(m_yscroll)); save_item(NAME(m_bg2xscroll)); diff --git a/src/mame/video/thedeep.c b/src/mame/video/thedeep.c index 2c081a9a05be4..9397957fe3cbe 100644 --- a/src/mame/video/thedeep.c +++ b/src/mame/video/thedeep.c @@ -134,4 +134,3 @@ UINT32 thedeep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, m_tilemap_1->draw(screen, bitmap, cliprect, 0,0); return 0; } - diff --git a/src/mame/video/timelimt.c b/src/mame/video/timelimt.c index 31412c8000e50..282c85155b33c 100644 --- a/src/mame/video/timelimt.c +++ b/src/mame/video/timelimt.c @@ -73,7 +73,7 @@ void timelimt_state::video_start() 8, 8, 32, 32); m_fg_tilemap->set_transparent_pen(0); - + save_item(NAME(m_scrollx)); save_item(NAME(m_scrolly)); } diff --git a/src/mame/video/tryout.c b/src/mame/video/tryout.c index 1b7f1fb841eee..f7f284adc10d3 100644 --- a/src/mame/video/tryout.c +++ b/src/mame/video/tryout.c @@ -12,7 +12,7 @@ PALETTE_INIT_MEMBER(tryout_state, tryout) { const UINT8 *color_prom = memregion("proms")->base(); - + for (int i = 0;i < palette.entries();i++) { int bit0,bit1,bit2,r,g,b; diff --git a/src/mame/video/tsamurai.c b/src/mame/video/tsamurai.c index 1fb47e835b218..eede6d28503e0 100644 --- a/src/mame/video/tsamurai.c +++ b/src/mame/video/tsamurai.c @@ -55,7 +55,7 @@ VIDEO_START_MEMBER(tsamurai_state, tsamurai) m_background->set_transparent_pen(0); m_foreground->set_transparent_pen(0); - + save_item(NAME(m_bgcolor)); video_start(); } @@ -63,7 +63,7 @@ VIDEO_START_MEMBER(tsamurai_state, tsamurai) VIDEO_START_MEMBER(tsamurai_state, m660) { VIDEO_START_CALL_MEMBER(tsamurai); - + save_item(NAME(m_textbank2)); } @@ -256,7 +256,7 @@ TILE_GET_INFO_MEMBER(tsamurai_state::get_vsgongf_tile_info) VIDEO_START_MEMBER(tsamurai_state,vsgongf) { m_foreground = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(tsamurai_state::get_vsgongf_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32); - + save_item(NAME(m_vsgongf_color)); video_start(); } diff --git a/src/mame/video/vulgus.c b/src/mame/video/vulgus.c index 1c99617e85b5e..4cd5bdbe10002 100644 --- a/src/mame/video/vulgus.c +++ b/src/mame/video/vulgus.c @@ -113,7 +113,7 @@ void vulgus_state::video_start() m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(vulgus_state::get_bg_tile_info),this),TILEMAP_SCAN_COLS,16,16,32,32); m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 47); - + save_item(NAME(m_palette_bank)); } diff --git a/src/mame/video/xain.c b/src/mame/video/xain.c index fdd210c06405f..810923e96f431 100644 --- a/src/mame/video/xain.c +++ b/src/mame/video/xain.c @@ -89,7 +89,7 @@ void xain_state::video_start() m_bgram0_tilemap->set_transparent_pen(0); m_bgram1_tilemap->set_transparent_pen(0); m_char_tilemap->set_transparent_pen(0); - + save_item(NAME(m_pri)); save_item(NAME(m_scrollxP0)); save_item(NAME(m_scrollyP0)); diff --git a/src/mess/audio/gamate.c b/src/mess/audio/gamate.c index c49aeb7268075..7e6a03c7be881 100644 --- a/src/mess/audio/gamate.c +++ b/src/mess/audio/gamate.c @@ -38,7 +38,7 @@ gamate_sound_device::gamate_sound_device(const machine_config &mconfig, const ch void gamate_sound_device::device_start() { // bind callbacks -// m_irq_cb.bind_relative_to(*owner()); +// m_irq_cb.bind_relative_to(*owner()); memset(m_channels, 0, sizeof(m_channels)); memset(reg, 0, sizeof(reg)); @@ -56,7 +56,7 @@ void gamate_sound_device::sound_stream_update(sound_stream &stream, stream_sampl stream_sample_t *left=outputs[0], *right=outputs[1]; int i, j; Tone *channel; - + for (i = 0; i < samples; i++, left++, right++) { noise.pos += noise.step; @@ -77,7 +77,7 @@ void gamate_sound_device::sound_stream_update(sound_stream &stream, stream_sampl { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: - case 8: case 9: case 0xb: + case 8: case 9: case 0xb: case 0xd: case 0xf: if (envelope.index>=ARRAY_LENGTH(EnvelopeVolumes)/2) { diff --git a/src/mess/drivers/a7800.c b/src/mess/drivers/a7800.c index cffcd9c747be3..4602c3ce941f1 100644 --- a/src/mess/drivers/a7800.c +++ b/src/mess/drivers/a7800.c @@ -286,11 +286,11 @@ static ADDRESS_MAP_START( a7800_mem, AS_PROGRAM, 8, a7800_state ) AM_RANGE(0x0480, 0x04ff) AM_RAM AM_SHARE("riot_ram") AM_MIRROR(0x100) AM_RANGE(0x1800, 0x1fff) AM_RAM AM_SHARE("6116_1") AM_RANGE(0x2000, 0x27ff) AM_RAM AM_SHARE("6116_2") AM_MIRROR(0x0800) - // According to the official Software Guide, the RAM at 0x2000 is - // repeatedly mirrored up to 0x3fff, but this is evidently incorrect - // because the High Score Cartridge maps ROM at 0x3000-0x3fff - // Hardware tests show that only the mirror at 0x2800-0x2fff actually - // exists, and only on some hardware (MARIA? motherboard?) revisions + // According to the official Software Guide, the RAM at 0x2000 is + // repeatedly mirrored up to 0x3fff, but this is evidently incorrect + // because the High Score Cartridge maps ROM at 0x3000-0x3fff + // Hardware tests show that only the mirror at 0x2800-0x2fff actually + // exists, and only on some hardware (MARIA? motherboard?) revisions AM_RANGE(0x4000, 0xffff) AM_DEVWRITE("cartslot", a78_cart_slot_device, write_40xx) AM_RANGE(0x4000, 0xbfff) AM_DEVREAD("cartslot", a78_cart_slot_device, read_40xx) AM_RANGE(0xc000, 0xffff) AM_READ(bios_or_cart_r) // here also the BIOS can be accessed diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index 15bbbc0655925..4c06eac3b7b54 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -1229,9 +1229,9 @@ static SLOT_INTERFACE_START(apple2_cards) SLOT_INTERFACE("dx1", A2BUS_DX1) /* Decillonix DX-1 sampler card */ SLOT_INTERFACE("tm2ho", A2BUS_TIMEMASTERHO) /* Applied Engineering TimeMaster II H.O. */ SLOT_INTERFACE("mouse", A2BUS_MOUSE) /* Apple II Mouse Card */ - SLOT_INTERFACE("ezcgi", A2BUS_EZCGI) /* E-Z Color Graphics Interface */ - SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */ - SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */ + SLOT_INTERFACE("ezcgi", A2BUS_EZCGI) /* E-Z Color Graphics Interface */ + SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */ + SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */ // SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */ SLOT_INTERFACE_END diff --git a/src/mess/drivers/apple2e.c b/src/mess/drivers/apple2e.c index 84b41de961ae2..e270fa4d6fa69 100644 --- a/src/mess/drivers/apple2e.c +++ b/src/mess/drivers/apple2e.c @@ -3036,9 +3036,9 @@ static SLOT_INTERFACE_START(apple2_cards) SLOT_INTERFACE("dx1", A2BUS_DX1) /* Decillonix DX-1 sampler card */ SLOT_INTERFACE("tm2ho", A2BUS_TIMEMASTERHO) /* Applied Engineering TimeMaster II H.O. */ SLOT_INTERFACE("mouse", A2BUS_MOUSE) /* Apple II Mouse Card */ - SLOT_INTERFACE("ezcgi", A2BUS_EZCGI) /* E-Z Color Graphics Interface */ - SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */ - SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */ + SLOT_INTERFACE("ezcgi", A2BUS_EZCGI) /* E-Z Color Graphics Interface */ + SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */ + SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */ // SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */ SLOT_INTERFACE_END diff --git a/src/mess/drivers/gamate.c b/src/mess/drivers/gamate.c index 3953bc5b060a5..67cf8c29d91ef 100644 --- a/src/mess/drivers/gamate.c +++ b/src/mess/drivers/gamate.c @@ -4,7 +4,7 @@ Morten Shearman Kirkegaard morten+gamate@afdelingp.dk Juan F??lix Mateos vectrex@hackermesh.org - nmi unknown + nmi unknown bomb blast top status line missing ******************************************************************************/ @@ -84,7 +84,7 @@ class gamate_state : public driver_device WRITE8_MEMBER( gamate_state::gamate_cart_protection_w ) { logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter); - + switch (offset) { case 0: @@ -118,7 +118,7 @@ READ8_MEMBER( gamate_state::gamate_cart_protection_r ) ret=(card_protection.cartridge_byte&0x80) ? 2 : 0; if (card_protection.bit_shifter==7 && !card_protection.failed) { // now protection chip on cartridge activates cartridge chip select on cpu accesses -// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working +// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working } card_protection.cartridge_byte<<=1; } @@ -318,12 +318,12 @@ void gamate_state::machine_start() m_cart_ptr = memregion("maincpu")->base() + 0x6000; if (m_cart->exists()) { -// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); +// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); m_cart_ptr = m_cart->get_rom_base(); membank("bankmulti")->set_base(m_cart->get_rom_base()+1); membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset } -// m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback +// m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback card_protection.set=false; bank_multi=0; card_protection.unprotected=false; @@ -400,4 +400,3 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", 0) - diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c index 45bd3f76bc760..048ab43dede12 100644 --- a/src/mess/drivers/hh_hmcs40.c +++ b/src/mess/drivers/hh_hmcs40.c @@ -66,7 +66,7 @@ class hh_hmcs40_state : public driver_device required_device m_maincpu; optional_ioport_array<7> m_inp_matrix; // max 7 optional_device m_speaker; - + // misc common UINT16 m_inp_mux; // multiplexed inputs mask @@ -78,11 +78,11 @@ class hh_hmcs40_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - + UINT32 m_grid; // VFD current row data UINT64 m_plate; // VFD current column data - - UINT64 m_display_state[0x20]; // display matrix rows data + + UINT64 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT64 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x40]; // (internal use) @@ -95,7 +95,7 @@ class hh_hmcs40_state : public driver_device DECLARE_WRITE8_MEMBER(alnattck_plate_w); DECLARE_WRITE16_MEMBER(alnattck_d_w); DECLARE_READ16_MEMBER(alnattck_d_r); - + void egalaxn2_display(); DECLARE_WRITE8_MEMBER(egalaxn2_plate_w); DECLARE_WRITE16_MEMBER(egalaxn2_grid_w); @@ -110,7 +110,7 @@ void hh_hmcs40_state::machine_start() memset(m_display_cache, ~0, sizeof(m_display_cache)); memset(m_display_decay, 0, sizeof(m_display_decay)); memset(m_display_segmask, 0, sizeof(m_display_segmask)); - + m_inp_mux = 0; m_grid = 0; m_plate = 0; @@ -191,7 +191,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hh_hmcs40_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -204,7 +204,7 @@ void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 set UINT64 mask = (1 << maxx) - 1; for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? (setx & mask) : 0; - + display_update(); } @@ -249,7 +249,7 @@ static MACHINE_CONFIG_START( bambball, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -284,7 +284,7 @@ static MACHINE_CONFIG_START( packmon, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -318,7 +318,7 @@ static MACHINE_CONFIG_START( zackman, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -351,7 +351,7 @@ WRITE8_MEMBER(hh_hmcs40_state::alnattck_plate_w) // update display UINT32 plate = BITSWAP16(m_plate,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15) | (m_plate & 0xf0000); - + display_matrix(20, 10, plate, m_grid); } @@ -359,13 +359,13 @@ WRITE16_MEMBER(hh_hmcs40_state::alnattck_d_w) { // D4: speaker out m_speaker->level_w(data >> 4 & 1); - + // D7-D13: input mux m_inp_mux = data >> 7 & 0x7f; // D6-D15: vfd matrix grid m_grid = data >> 6 & 0x3ff; - + // D0-D3: plate 16-19 (update display there) alnattck_plate_w(space, 4, data & 0xf); } @@ -449,7 +449,7 @@ static MACHINE_CONFIG_START( cdkong, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -484,7 +484,7 @@ static MACHINE_CONFIG_START( cgalaxn, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -519,7 +519,7 @@ static MACHINE_CONFIG_START( cpacman, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -554,7 +554,7 @@ static MACHINE_CONFIG_START( cmspacmn, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -583,7 +583,7 @@ void hh_hmcs40_state::egalaxn2_display() { UINT32 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); UINT32 plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8); - + display_matrix(24, 15, plate, grid); } @@ -591,10 +591,10 @@ WRITE16_MEMBER(hh_hmcs40_state::egalaxn2_grid_w) { // D0: speaker out m_speaker->level_w(data & 1); - + // D1-D4: input mux m_inp_mux = data >> 1 & 0xf; - + // D1-D15: vfd matrix grid m_grid = data >> 1; egalaxn2_display(); @@ -766,7 +766,7 @@ static MACHINE_CONFIG_START( pbqbert, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -787,7 +787,7 @@ MACHINE_CONFIG_END * boards are labeled THF-01II 2E138E01/2E128E02 * Hitachi HD38800B23 MCU * cyan/red/blue VFD display Futaba DM-65ZK 3A - + NOTE!: MESS external artwork is recommended ***************************************************************************/ @@ -801,7 +801,7 @@ static MACHINE_CONFIG_START( kingman, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ @@ -836,7 +836,7 @@ static MACHINE_CONFIG_START( tmtron, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) +// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) /* no video! */ diff --git a/src/mess/drivers/hh_pic16.c b/src/mess/drivers/hh_pic16.c index b8281a737e029..4ee9bf2938568 100644 --- a/src/mess/drivers/hh_pic16.c +++ b/src/mess/drivers/hh_pic16.c @@ -57,8 +57,8 @@ class hh_pic16_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - - UINT32 m_display_state[0x20]; // display matrix rows data + + UINT32 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT32 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x20]; // (internal use) @@ -79,7 +79,7 @@ void hh_pic16_state::machine_start() memset(m_display_cache, ~0, sizeof(m_display_cache)); memset(m_display_decay, 0, sizeof(m_display_decay)); memset(m_display_segmask, 0, sizeof(m_display_segmask)); - + m_b = 0; m_c = 0; @@ -158,7 +158,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hh_pic16_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -171,7 +171,7 @@ void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety UINT32 mask = (1 << maxx) - 1; for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? (setx & mask) : 0; - + display_update(); } @@ -199,14 +199,14 @@ WRITE8_MEMBER(hh_pic16_state::maniac_output_w) m_c = data; else m_b = data; - + // d7: speaker out m_speaker->level_w((m_b >> 7 & 1) | (m_c >> 6 & 2)); // d0-d6: 7seg m_display_maxx = 7; m_display_maxy = 2; - + m_display_segmask[offset] = 0x7f; m_display_state[offset] = ~data & 0x7f; display_update(); diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index 83d83023ef09c..5d78b892de5b7 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -5,7 +5,7 @@ This driver is a collection of simple dedicated handheld and tabletop toys based around the TMS1000 MCU series. Anything more complex or clearly part of a series is (or will be) in its own driver. - + Let's use this driver for a list of known devices and their serials, excluding TI's own products (see for example ticalc1x.c, tispeak.c) @@ -53,7 +53,7 @@ @MP7334 TMS1400 1981, Coleco Total Control 4 inconsistent: - + @CD7282SL TMS1100 1981, Tandy/RadioShack Tandy-12 (serial is similar to TI Speak & Spell series?) (* denotes not yet emulated by MESS, @ denotes it's in this driver) @@ -102,7 +102,7 @@ void hh_tms1k_state::machine_start() memset(m_display_cache, ~0, sizeof(m_display_cache)); memset(m_display_decay, 0, sizeof(m_display_decay)); memset(m_display_segmask, 0, sizeof(m_display_segmask)); - + m_o = 0; m_r = 0; m_inp_mux = 0; @@ -190,7 +190,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hh_tms1k_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -203,7 +203,7 @@ void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety UINT32 mask = (1 << maxx) - 1; for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? (setx & mask) : 0; - + display_update(); } @@ -293,7 +293,7 @@ WRITE16_MEMBER(hh_tms1k_state::mathmagi_write_r) { // R3,R5-R7,R9,R10: input mux m_inp_mux = (data >> 3 & 1) | (data >> 4 & 0xe) | (data >> 5 & 0x30); - + // +others: m_r = data; mathmagi_display(); @@ -442,10 +442,10 @@ void hh_tms1k_state::amaztron_display() m_display_segmask[y] = 0x7f; m_display_state[y] = (m_r >> (y + 8) & 1) ? m_o : 0; } - + // R6,R7: lamps (-> lamp20,21) m_display_state[2] = m_r >> 6 & 3; - + display_update(); } @@ -453,7 +453,7 @@ WRITE16_MEMBER(hh_tms1k_state::amaztron_write_r) { // R0-R5: input mux m_inp_mux = data & 0x3f; - + // R10: speaker out m_speaker->level_w(data >> 10 & 1); @@ -582,12 +582,12 @@ MACHINE_CONFIG_END void hh_tms1k_state::tc4_display() { m_display_wait = 50; - + // R5,7,8,9 are 7segs for (int y = 0; y < 10; y++) if (y >= 5 && y <= 9 && y != 6) m_display_segmask[y] = 0x7f; - + // update current state (note: R6 as extra column!) display_matrix(9, 10, (m_o | (m_r << 2 & 0x100)), m_r); } @@ -600,7 +600,7 @@ WRITE16_MEMBER(hh_tms1k_state::tc4_write_r) // R0-R5: input mux // R9: to cartridge slot m_inp_mux = data & 0x23f; - + // R6: led column 8 // +other columns m_r = data; @@ -699,13 +699,13 @@ MACHINE_CONFIG_END Entex Electronic Baseball (1) * TMS1000NLP MP0914 (die labeled MP0914A) - + This is a handheld LED baseball game. One player controls the batter, the CPU or other player controls the pitcher. Pitcher throw buttons are on a 'joypad' obtained from a compartment in the back. Player scores are supposed to be written down manually, the game doesn't save scores or innings (this annoyance was resolved in the sequel). For more information, refer to the official manual. - + The overlay graphic is known to have 2 versions: one where the field players are denoted by words ("left", "center", "short", etc), and an alternate one with little guys drawn next to the LEDs. @@ -730,7 +730,7 @@ void hh_tms1k_state::ebball_display() { // R8 is a 7seg m_display_segmask[8] = 0x7f; - + display_matrix(7, 9, ~m_o, m_r); } @@ -738,10 +738,10 @@ WRITE16_MEMBER(hh_tms1k_state::ebball_write_r) { // R1-R5: input mux m_inp_mux = data >> 1 & 0x1f; - + // R9: speaker out m_speaker->level_w(data >> 9 & 1); - + // R0-R8: led columns m_r = data; ebball_display(); @@ -821,15 +821,15 @@ MACHINE_CONFIG_END Entex Electronic Baseball 2 * boards are labeled: ZENY * TMS1000 MCU, MP0923 (die labeled MP0923) - + The Japanese version was published by Gakken, black casing instead of white. - + The sequel to Entex Baseball, this version keeps up with score and innings. As its predecessor, the pitcher controls are on a separate joypad. lamp translation table: led zz from game PCB = MESS lampyx: - + 00 = - 10 = lamp94 20 = lamp74 30 = lamp50 01 = lamp53 11 = lamp93 21 = lamp75 31 = lamp51 02 = lamp7 12 = lamp92 22 = lamp80 32 = lamp52 @@ -848,7 +848,7 @@ void hh_tms1k_state::ebball2_display() // the first 3 are 7segs for (int y = 0; y < 3; y++) m_display_segmask[y] = 0x7f; - + display_matrix(8, 10, ~m_o, m_r ^ 0x7f); } @@ -856,10 +856,10 @@ WRITE16_MEMBER(hh_tms1k_state::ebball2_write_r) { // R3-R6: input mux m_inp_mux = data >> 3 & 0xf; - + // R10: speaker out m_speaker->level_w(data >> 10 & 1); - + // R0-R9: led columns m_r = data; ebball2_display(); @@ -932,14 +932,14 @@ MACHINE_CONFIG_END * boards are labeled: ZENY * TMS1100NLL 6007 MP1204 (die labeled MP1204) * 2*SN75492N LED display driver - + This is another improvement over Entex Baseball, where gameplay is a bit more varied. Like the others, the pitcher controls are on a separate joypad. lamp translation table: led zz from game PCB = MESS lampyx: note: unlabeled panel leds are listed here as Sz, Bz, Oz, Iz, z left-to-right - + 00 = - 10 = lamp75 20 = lamp72 01 = lamp60 11 = lamp65 21 = lamp84 02 = lamp61 12 = lamp55 22 = lamp85 @@ -969,12 +969,12 @@ void hh_tms1k_state::ebball3_display() // R0,R1 are normal 7segs m_display_segmask[0] = m_display_segmask[1] = 0x7f; - + // R4,R7 contain segments(only F and B) for the two other digits m_display_state[10] = (m_display_state[4] & 0x20) | (m_display_state[7] & 0x02); m_display_state[11] = ((m_display_state[4] & 0x10) | (m_display_state[7] & 0x01)) << 1; m_display_segmask[10] = m_display_segmask[11] = 0x22; - + display_update(); } @@ -982,10 +982,10 @@ WRITE16_MEMBER(hh_tms1k_state::ebball3_write_r) { // R0-R2: input mux m_inp_mux = data & 7; - + // R10: speaker out m_speaker->level_w(data >> 10 & 1); - + // R0-R9: led columns m_r = data; ebball3_display(); @@ -1118,7 +1118,7 @@ WRITE16_MEMBER(hh_tms1k_state::elecdet_write_o) { // O0,O1,O4,O6: input mux m_inp_mux = (data & 3) | (data >> 2 & 4) | (data >> 3 & 8); - + // O0-O6: led segments A-G // O7: speaker out m_o = data; @@ -1218,7 +1218,7 @@ void hh_tms1k_state::starwbc_display() { // R6,R8 are 7segs m_display_segmask[6] = m_display_segmask[8] = 0x7f; - + display_matrix(8, 10, m_o, m_r); } @@ -1569,7 +1569,7 @@ WRITE16_MEMBER(hh_tms1k_state::cnsector_write_r) // R6-R9: direction leds (-> lamp60-63) m_display_state[6] = data >> 6 & 0xf; - + display_update(); } @@ -1577,7 +1577,7 @@ WRITE16_MEMBER(hh_tms1k_state::cnsector_write_o) { // O0-O4: input mux m_inp_mux = data & 0x1f; - + // O0-O7: digit segments m_o = data; } @@ -1646,7 +1646,7 @@ MACHINE_CONFIG_END Parker Bros Merlin handheld game, by Bob Doyle * TMS1100NLL MP3404A-N2 * red LEDs and 1-bit sound - + Also published in Japan by Tomy as "Dr. Smith", white case instead of red. The one with dark-blue case is the rare sequel Master Merlin. More sequels followed too, but on other hardware. @@ -1780,7 +1780,7 @@ WRITE16_MEMBER(hh_tms1k_state::stopthief_write_o) { // O0,O6: input mux m_inp_mux = (data & 1) | (data >> 5 & 2); - + // O3: speaker out // O0-O2,O4-O7: led segments A-G m_o = data; diff --git a/src/mess/drivers/hh_ucom4.c b/src/mess/drivers/hh_ucom4.c index b258c9429421e..2c05bf029354e 100644 --- a/src/mess/drivers/hh_ucom4.c +++ b/src/mess/drivers/hh_ucom4.c @@ -6,7 +6,7 @@ known chips: - + serial device etc. ---------------------------------------------------------------- @031 uPD553C 1979, Bambino Superstar Football (ET-03) @@ -52,7 +52,7 @@ class hh_ucom4_state : public driver_device required_device m_maincpu; optional_ioport_array<5> m_inp_matrix; // max 5 optional_device m_speaker; - + // misc common UINT8 m_port[9]; // MCU port A-I write data UINT16 m_inp_mux; // multiplexed inputs mask @@ -65,11 +65,11 @@ class hh_ucom4_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - + UINT32 m_grid; // VFD current row data UINT32 m_plate; // VFD current column data - - UINT32 m_display_state[0x20]; // display matrix rows data + + UINT32 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT32 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x20]; // (internal use) @@ -95,7 +95,7 @@ class hh_ucom4_state : public driver_device DECLARE_WRITE8_MEMBER(edracula_grid_w); DECLARE_WRITE8_MEMBER(edracula_plate_w); - + DECLARE_WRITE8_MEMBER(tmtennis_grid_w); DECLARE_WRITE8_MEMBER(tmtennis_plate_w); DECLARE_WRITE8_MEMBER(tmtennis_port_e_w); @@ -107,7 +107,7 @@ class hh_ucom4_state : public driver_device void tmpacman_display(); DECLARE_WRITE8_MEMBER(tmpacman_grid_w); DECLARE_WRITE8_MEMBER(tmpacman_plate_w); - + DECLARE_WRITE8_MEMBER(alnchase_output_w); DECLARE_READ8_MEMBER(alnchase_input_r); }; @@ -120,7 +120,7 @@ void hh_ucom4_state::machine_start() memset(m_display_cache, ~0, sizeof(m_display_cache)); memset(m_display_decay, 0, sizeof(m_display_decay)); memset(m_display_segmask, 0, sizeof(m_display_segmask)); - + memset(m_port, 0, sizeof(m_port)); m_inp_mux = 0; m_grid = 0; @@ -203,7 +203,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hh_ucom4_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -216,7 +216,7 @@ void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety UINT32 mask = (1 << maxx) - 1; for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? (setx & mask) : 0; - + display_update(); } @@ -247,7 +247,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns) * PCB label Emix Corp. ET-03 * NEC uCOM-43 MCU, labeled D553C 031 * green VFD display Emix-102 - + Press the Kick button to start the game, an automatic sequence follows. Then choose a formation(A,B,C) and either pass the ball, and/or start running. For more information, refer to the official manual. @@ -274,15 +274,15 @@ WRITE8_MEMBER(hh_ucom4_state::ssfball_grid_w) WRITE8_MEMBER(hh_ucom4_state::ssfball_plate_w) { m_port[offset] = data; - + // E,F,G,H,I(not all!): vfd matrix plate int shift = (offset - NEC_UCOM4_PORTE) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); - + // F3,G3: input mux + speaker m_inp_mux = (m_port[NEC_UCOM4_PORTF] >> 3 & 1) | (m_port[NEC_UCOM4_PORTG] >> 2 & 2); m_speaker->level_w(m_inp_mux); - + // E3: vfd matrix grid 8 if (offset == NEC_UCOM4_PORTE) ssfball_grid_w(space, offset, data >> 3 & 1); @@ -376,10 +376,10 @@ WRITE8_MEMBER(hh_ucom4_state::splasfgt_grid_w) // G,H,I0: vfd matrix grid int shift = (offset - NEC_UCOM4_PORTG) * 4; m_grid = (m_grid & ~(0xf << shift)) | (data << shift); - + // G(grid 0-3): input mux m_inp_mux = m_grid & 0xf; - + // I2: vfd matrix plate 6 if (offset == NEC_UCOM4_PORTI) m_plate = (m_plate & 0xffff) | (data << 14 & 0x10000); @@ -392,11 +392,11 @@ WRITE8_MEMBER(hh_ucom4_state::splasfgt_plate_w) // C,D,E,F23: vfd matrix plate int shift = (offset - NEC_UCOM4_PORTC) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); - + // F01: speaker out if (offset == NEC_UCOM4_PORTF) m_speaker->level_w(data & 3); - + ssfball_display(); } @@ -408,7 +408,7 @@ READ8_MEMBER(hh_ucom4_state::splasfgt_input_b_r) /* physical button layout and labels is like this: - + * left = P1 side * * right = P2 side * (note: in 1P mode, switch sides between turns) [ JUMP ] [ HIGH ] (players sw) [ HIGH ] [ JUMP ] @@ -530,7 +530,7 @@ WRITE8_MEMBER(hh_ucom4_state::astrocmd_plate_w) { // E2: speaker out m_speaker->level_w(data >> 2 & 1); - + // E3: vfd matrix grid 8 astrocmd_grid_w(space, offset, data >> 3 & 1); } @@ -719,7 +719,7 @@ READ8_MEMBER(hh_ucom4_state::tmtennis_input_r) /* Pro-Tennis physical button layout and labels is like this: - + * left = P2/CPU side * * right = P1 side * [SERVE] [1] [2] [3] [3] [2] [1] [SERVE] @@ -818,7 +818,7 @@ MACHINE_CONFIG_END - USA: Pac Man - UK: Puckman (Tomy), and also published by Grandstand as Munchman - Australia: Pac Man-1, published by Futuretronics - + The game will start automatically after turning it on. This Pac Man refuses to eat dots with his butt, you can only eat them going right-to-left. @@ -830,7 +830,7 @@ void hh_ucom4_state::tmpacman_display() { UINT32 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7); UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15); - + display_matrix(19, 8, plate | 0x100, grid); // plate 8 (maze) is always on } @@ -930,7 +930,7 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_output_w) // C0(grid 0): input enable PL1 // D0(grid 4): input enable PL2 m_inp_mux = (m_grid & 1) | (m_grid >> 3 & 2); - + // E1: speaker out if (offset == NEC_UCOM4_PORTE) m_speaker->level_w(data >> 1 & 1); diff --git a/src/mess/drivers/imds2.c b/src/mess/drivers/imds2.c index cf192dd63e88a..eac8f9b7bb00e 100644 --- a/src/mess/drivers/imds2.c +++ b/src/mess/drivers/imds2.c @@ -89,543 +89,543 @@ #define IOC_BEEP_FREQ 3300 static ADDRESS_MAP_START(ipc_mem_map , AS_PROGRAM , 8 , imds2_state) - AM_RANGE(0x0000 , 0xffff) AM_READWRITE(ipc_mem_read, ipc_mem_write) + AM_RANGE(0x0000 , 0xffff) AM_READWRITE(ipc_mem_read, ipc_mem_write) ADDRESS_MAP_END static ADDRESS_MAP_START(ipc_io_map , AS_IO , 8 , imds2_state) - ADDRESS_MAP_UNMAP_LOW - AM_RANGE(0xc0 , 0xc0) AM_READWRITE(imds2_ipc_dbbout_r , imds2_ipc_dbbin_data_w) - AM_RANGE(0xc1 , 0xc1) AM_READWRITE(imds2_ipc_status_r , imds2_ipc_dbbin_cmd_w) - AM_RANGE(0xfa , 0xfb) AM_READWRITE(imds2_ipclocpic_r , imds2_ipclocpic_w) - AM_RANGE(0xfc , 0xfd) AM_READWRITE(imds2_ipcsyspic_r , imds2_ipcsyspic_w) - AM_RANGE(0xff , 0xff) AM_WRITE(imds2_ipc_control_w) + ADDRESS_MAP_UNMAP_LOW + AM_RANGE(0xc0 , 0xc0) AM_READWRITE(imds2_ipc_dbbout_r , imds2_ipc_dbbin_data_w) + AM_RANGE(0xc1 , 0xc1) AM_READWRITE(imds2_ipc_status_r , imds2_ipc_dbbin_cmd_w) + AM_RANGE(0xfa , 0xfb) AM_READWRITE(imds2_ipclocpic_r , imds2_ipclocpic_w) + AM_RANGE(0xfc , 0xfd) AM_READWRITE(imds2_ipcsyspic_r , imds2_ipcsyspic_w) + AM_RANGE(0xff , 0xff) AM_WRITE(imds2_ipc_control_w) ADDRESS_MAP_END - static ADDRESS_MAP_START(ioc_mem_map , AS_PROGRAM , 8 , imds2_state) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000 , 0x1fff) AM_ROM - AM_RANGE(0x4000 , 0x5fff) AM_RAM + static ADDRESS_MAP_START(ioc_mem_map , AS_PROGRAM , 8 , imds2_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000 , 0x1fff) AM_ROM + AM_RANGE(0x4000 , 0x5fff) AM_RAM ADDRESS_MAP_END static ADDRESS_MAP_START(ioc_io_map , AS_IO , 8 , imds2_state) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00 , 0x0f) AM_WRITE(imds2_ioc_dbbout_w) - AM_RANGE(0x20 , 0x2f) AM_WRITE(imds2_ioc_f0_w) - AM_RANGE(0x30 , 0x3f) AM_WRITE(imds2_ioc_set_f1_w) - AM_RANGE(0x40 , 0x4f) AM_WRITE(imds2_ioc_reset_f1_w) - AM_RANGE(0x50 , 0x5f) AM_WRITE(imds2_start_timer_w) - AM_RANGE(0x60 , 0x6f) AM_WRITE(imds2_miscout_w) - AM_RANGE(0x80 , 0x8f) AM_READ(imds2_miscin_r) - AM_RANGE(0x90 , 0x9f) AM_READ(imds2_kb_read) - AM_RANGE(0xa0 , 0xaf) AM_READ(imds2_ioc_status_r) - AM_RANGE(0xb0 , 0xbf) AM_READ(imds2_ioc_dbbin_r) - AM_RANGE(0xc0 , 0xcf) AM_DEVREADWRITE("iocfdc" , i8271_device , read , write) - AM_RANGE(0xd0 , 0xdf) AM_DEVREADWRITE("ioccrtc" , i8275_device , read , write) - AM_RANGE(0xe0 , 0xef) AM_DEVREADWRITE("ioctimer" , pit8253_device , read , write); + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x00 , 0x0f) AM_WRITE(imds2_ioc_dbbout_w) + AM_RANGE(0x20 , 0x2f) AM_WRITE(imds2_ioc_f0_w) + AM_RANGE(0x30 , 0x3f) AM_WRITE(imds2_ioc_set_f1_w) + AM_RANGE(0x40 , 0x4f) AM_WRITE(imds2_ioc_reset_f1_w) + AM_RANGE(0x50 , 0x5f) AM_WRITE(imds2_start_timer_w) + AM_RANGE(0x60 , 0x6f) AM_WRITE(imds2_miscout_w) + AM_RANGE(0x80 , 0x8f) AM_READ(imds2_miscin_r) + AM_RANGE(0x90 , 0x9f) AM_READ(imds2_kb_read) + AM_RANGE(0xa0 , 0xaf) AM_READ(imds2_ioc_status_r) + AM_RANGE(0xb0 , 0xbf) AM_READ(imds2_ioc_dbbin_r) + AM_RANGE(0xc0 , 0xcf) AM_DEVREADWRITE("iocfdc" , i8271_device , read , write) + AM_RANGE(0xd0 , 0xdf) AM_DEVREADWRITE("ioccrtc" , i8275_device , read , write) + AM_RANGE(0xe0 , 0xef) AM_DEVREADWRITE("ioctimer" , pit8253_device , read , write); // DMA controller range doesn't extend to 0xff because register 0xfd needs to be read as 0xff // This register is used by IOC firmware to detect DMA controller model (either 8237 or 8257) - AM_RANGE(0xf0 , 0xf8) AM_DEVREADWRITE("iocdma" , i8257_device , read , write) + AM_RANGE(0xf0 , 0xf8) AM_DEVREADWRITE("iocdma" , i8257_device , read , write) ADDRESS_MAP_END - + static ADDRESS_MAP_START(kb_io_map , AS_IO , 8 , imds2_state) - AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_kb_port_p1_w) - AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_kb_port_p2_r) - AM_RANGE(MCS48_PORT_T0 , MCS48_PORT_T0) AM_READ(imds2_kb_port_t0_r) - AM_RANGE(MCS48_PORT_T1 , MCS48_PORT_T1) AM_READ(imds2_kb_port_t1_r) + AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_kb_port_p1_w) + AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_kb_port_p2_r) + AM_RANGE(MCS48_PORT_T0 , MCS48_PORT_T0) AM_READ(imds2_kb_port_t0_r) + AM_RANGE(MCS48_PORT_T1 , MCS48_PORT_T1) AM_READ(imds2_kb_port_t1_r) ADDRESS_MAP_END - + imds2_state::imds2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig , type , tag), - m_ipccpu(*this , "ipccpu"), - m_ipcsyspic(*this , "ipcsyspic"), - m_ipclocpic(*this , "ipclocpic"), - m_ioccpu(*this , "ioccpu"), - m_iocdma(*this , "iocdma"), - m_ioccrtc(*this , "ioccrtc"), - m_iocbeep(*this , "iocbeep"), - m_ioctimer(*this , "ioctimer"), - m_iocfdc(*this , "iocfdc"), - m_kbcpu(*this , "kbcpu"), - m_palette(*this , "palette"), - m_gfxdecode(*this, "gfxdecode"), - m_floppy0(*this , FLOPPY_0), - m_io_key0(*this , "KEY0"), - m_io_key1(*this , "KEY1"), - m_io_key2(*this , "KEY2"), - m_io_key3(*this , "KEY3"), - m_io_key4(*this , "KEY4"), - m_io_key5(*this , "KEY5"), - m_io_key6(*this , "KEY6"), - m_io_key7(*this , "KEY7"), - m_ioc_options(*this , "IOC_OPTS") + : driver_device(mconfig , type , tag), + m_ipccpu(*this , "ipccpu"), + m_ipcsyspic(*this , "ipcsyspic"), + m_ipclocpic(*this , "ipclocpic"), + m_ioccpu(*this , "ioccpu"), + m_iocdma(*this , "iocdma"), + m_ioccrtc(*this , "ioccrtc"), + m_iocbeep(*this , "iocbeep"), + m_ioctimer(*this , "ioctimer"), + m_iocfdc(*this , "iocfdc"), + m_kbcpu(*this , "kbcpu"), + m_palette(*this , "palette"), + m_gfxdecode(*this, "gfxdecode"), + m_floppy0(*this , FLOPPY_0), + m_io_key0(*this , "KEY0"), + m_io_key1(*this , "KEY1"), + m_io_key2(*this , "KEY2"), + m_io_key3(*this , "KEY3"), + m_io_key4(*this , "KEY4"), + m_io_key5(*this , "KEY5"), + m_io_key6(*this , "KEY6"), + m_io_key7(*this , "KEY7"), + m_ioc_options(*this , "IOC_OPTS") { } READ8_MEMBER(imds2_state::ipc_mem_read) { - if (imds2_in_ipc_rom(offset)) { - return m_ipc_rom[ (offset & 0x07ff) | ((offset & 0x1000) >> 1) ]; - } else { - return m_ipc_ram[ offset ]; - } + if (imds2_in_ipc_rom(offset)) { + return m_ipc_rom[ (offset & 0x07ff) | ((offset & 0x1000) >> 1) ]; + } else { + return m_ipc_ram[ offset ]; + } } WRITE8_MEMBER(imds2_state::ipc_mem_write) { - if (!imds2_in_ipc_rom(offset)) { - m_ipc_ram[ offset ] = data; - } + if (!imds2_in_ipc_rom(offset)) { + m_ipc_ram[ offset ] = data; + } } WRITE8_MEMBER(imds2_state::imds2_ipc_control_w) { - // See A84, pg 28 of [1] - // b3 is ~(bit to be written) - // b2-b0 is ~(no. of bit to be written) - UINT8 mask = (1U << (~data & 0x07)); + // See A84, pg 28 of [1] + // b3 is ~(bit to be written) + // b2-b0 is ~(no. of bit to be written) + UINT8 mask = (1U << (~data & 0x07)); - if (BIT(data , 3)) { - m_ipc_control &= ~mask; - } else { - m_ipc_control |= mask; - } + if (BIT(data , 3)) { + m_ipc_control &= ~mask; + } else { + m_ipc_control |= mask; + } } WRITE_LINE_MEMBER(imds2_state::imds2_ipc_intr) { - m_ipccpu->set_input_line(I8085_INTR_LINE , (state != 0) && BIT(m_ipc_control , 2)); + m_ipccpu->set_input_line(I8085_INTR_LINE , (state != 0) && BIT(m_ipc_control , 2)); } READ8_MEMBER(imds2_state::imds2_ipcsyspic_r) { - return m_ipcsyspic->read(space , offset == 0); + return m_ipcsyspic->read(space , offset == 0); } READ8_MEMBER(imds2_state::imds2_ipclocpic_r) { - return m_ipclocpic->read(space , offset == 0); + return m_ipclocpic->read(space , offset == 0); } WRITE8_MEMBER(imds2_state::imds2_ipcsyspic_w) { - m_ipcsyspic->write(space , offset == 0 , data); + m_ipcsyspic->write(space , offset == 0 , data); } WRITE8_MEMBER(imds2_state::imds2_ipclocpic_w) { - m_ipclocpic->write(space , offset == 0 , data); + m_ipclocpic->write(space , offset == 0 , data); } WRITE8_MEMBER(imds2_state::imds2_miscout_w) { - m_miscout = data; - imds2_update_beeper(); - // Send INTR to IPC - m_ipclocpic->ir6_w(BIT(m_miscout , 1)); + m_miscout = data; + imds2_update_beeper(); + // Send INTR to IPC + m_ipclocpic->ir6_w(BIT(m_miscout , 1)); } READ8_MEMBER(imds2_state::imds2_miscin_r) { - UINT8 res = m_ioc_options->read(); - return res | ((m_beeper_timer == 0) << 2); + UINT8 res = m_ioc_options->read(); + return res | ((m_beeper_timer == 0) << 2); } WRITE_LINE_MEMBER(imds2_state::imds2_beep_timer_w) { - m_beeper_timer = state; - imds2_update_beeper(); + m_beeper_timer = state; + imds2_update_beeper(); } WRITE8_MEMBER(imds2_state::imds2_start_timer_w) { - // Trigger timer 2 of ioctimer - m_ioctimer->write_gate2(0); - m_ioctimer->write_gate2(1); + // Trigger timer 2 of ioctimer + m_ioctimer->write_gate2(0); + m_ioctimer->write_gate2(1); } READ8_MEMBER(imds2_state::imds2_kb_read) { - return m_kbcpu->upi41_master_r(space , (offset & 2) >> 1); + return m_kbcpu->upi41_master_r(space , (offset & 2) >> 1); } READ8_MEMBER(imds2_state::imds2_kb_port_p2_r) { - if ((m_kb_p1 & 3) == 0) { - // Row selected - // Row number is encoded on bits P15..P12, they are "backwards" (P15 is LSB) and keyboard rows are encoded starting with value 2 on these bits (see A4, pg 56 of [1]) - unsigned row = (m_kb_p1 >> 2) & 0x0f; - ioport_value data; - - switch (row) { - case 4: - // Row 0 - data = m_io_key0->read(); - break; - - case 12: - // Row 1 - data = m_io_key1->read(); - break; - - case 2: - // Row 2 - data = m_io_key2->read(); - break; - - case 10: - // Row 3 - data = m_io_key3->read(); - break; - - case 6: - // Row 4 - data = m_io_key4->read(); - break; - - case 14: - // Row 5 - data = m_io_key5->read(); - break; - - case 1: - // Row 6 - data = m_io_key6->read(); - break; - - case 9: - // Row 7 - data = m_io_key7->read(); - break; - - default: - data = 0xff; - break; - } - return data & 0xff; - } else { - // No row selected - return 0xff; - } + if ((m_kb_p1 & 3) == 0) { + // Row selected + // Row number is encoded on bits P15..P12, they are "backwards" (P15 is LSB) and keyboard rows are encoded starting with value 2 on these bits (see A4, pg 56 of [1]) + unsigned row = (m_kb_p1 >> 2) & 0x0f; + ioport_value data; + + switch (row) { + case 4: + // Row 0 + data = m_io_key0->read(); + break; + + case 12: + // Row 1 + data = m_io_key1->read(); + break; + + case 2: + // Row 2 + data = m_io_key2->read(); + break; + + case 10: + // Row 3 + data = m_io_key3->read(); + break; + + case 6: + // Row 4 + data = m_io_key4->read(); + break; + + case 14: + // Row 5 + data = m_io_key5->read(); + break; + + case 1: + // Row 6 + data = m_io_key6->read(); + break; + + case 9: + // Row 7 + data = m_io_key7->read(); + break; + + default: + data = 0xff; + break; + } + return data & 0xff; + } else { + // No row selected + return 0xff; + } } WRITE8_MEMBER(imds2_state::imds2_kb_port_p1_w) { - m_kb_p1 = data; + m_kb_p1 = data; } READ8_MEMBER(imds2_state::imds2_kb_port_t0_r) { - // T0 tied low - // It appears to be some kind of strapping option on kb hw - return 0; + // T0 tied low + // It appears to be some kind of strapping option on kb hw + return 0; } READ8_MEMBER(imds2_state::imds2_kb_port_t1_r) { - // T1 tied low - // It appears to be some kind of strapping option on kb hw - return 0; + // T1 tied low + // It appears to be some kind of strapping option on kb hw + return 0; } WRITE8_MEMBER(imds2_state::imds2_ioc_dbbout_w) { - m_ioc_obf = ~data; - // Set/reset OBF flag (b0) - m_ipc_ioc_status = ((offset & 1) == 0) | (m_ipc_ioc_status & ~0x01); + m_ioc_obf = ~data; + // Set/reset OBF flag (b0) + m_ipc_ioc_status = ((offset & 1) == 0) | (m_ipc_ioc_status & ~0x01); } WRITE8_MEMBER(imds2_state::imds2_ioc_f0_w) { - // Set/reset F0 flag (b2) - m_ipc_ioc_status = ((offset & 1) << 2) | (m_ipc_ioc_status & ~0x04); + // Set/reset F0 flag (b2) + m_ipc_ioc_status = ((offset & 1) << 2) | (m_ipc_ioc_status & ~0x04); } WRITE8_MEMBER(imds2_state::imds2_ioc_set_f1_w) { - // Set F1 flag (b3) - m_ipc_ioc_status |= 0x08; + // Set F1 flag (b3) + m_ipc_ioc_status |= 0x08; } WRITE8_MEMBER(imds2_state::imds2_ioc_reset_f1_w) { - // Reset F1 flag (b3) - m_ipc_ioc_status &= ~0x08; + // Reset F1 flag (b3) + m_ipc_ioc_status &= ~0x08; } READ8_MEMBER(imds2_state::imds2_ioc_status_r) { - return (~m_ipc_ioc_status & 0x0f) | 0xf0; + return (~m_ipc_ioc_status & 0x0f) | 0xf0; } READ8_MEMBER(imds2_state::imds2_ioc_dbbin_r) { - // Reset IBF flag (b1) - m_ipc_ioc_status &= ~0x02; - return ~m_ioc_ibf; + // Reset IBF flag (b1) + m_ipc_ioc_status &= ~0x02; + return ~m_ioc_ibf; } READ8_MEMBER(imds2_state::imds2_ipc_dbbout_r) { - // Reset OBF flag (b0) - m_ipc_ioc_status &= ~0x01; - return m_ioc_obf; + // Reset OBF flag (b0) + m_ipc_ioc_status &= ~0x01; + return m_ioc_obf; } READ8_MEMBER(imds2_state::imds2_ipc_status_r) { - return m_ipc_ioc_status; + return m_ipc_ioc_status; } WRITE8_MEMBER(imds2_state::imds2_ipc_dbbin_data_w) { - // Set IBF flag (b1) - m_ipc_ioc_status |= 0x02; - // Reset F1 flag (b3) - m_ipc_ioc_status &= ~0x08; - m_ioc_ibf = data; + // Set IBF flag (b1) + m_ipc_ioc_status |= 0x02; + // Reset F1 flag (b3) + m_ipc_ioc_status &= ~0x08; + m_ioc_ibf = data; } WRITE8_MEMBER(imds2_state::imds2_ipc_dbbin_cmd_w) { - // Set IBF flag (b1) - m_ipc_ioc_status |= 0x02; - // Set F1 flag (b3) - m_ipc_ioc_status |= 0x08; - m_ioc_ibf = data; + // Set IBF flag (b1) + m_ipc_ioc_status |= 0x02; + // Set F1 flag (b3) + m_ipc_ioc_status |= 0x08; + m_ioc_ibf = data; } WRITE_LINE_MEMBER(imds2_state::imds2_hrq_w) { - // Should be propagated to HOLD input of IOC CPU - m_iocdma->hlda_w(state); + // Should be propagated to HOLD input of IOC CPU + m_iocdma->hlda_w(state); } READ8_MEMBER(imds2_state::imds2_ioc_mem_r) { - address_space& prog_space = m_ioccpu->space(AS_PROGRAM); - return prog_space.read_byte(offset); + address_space& prog_space = m_ioccpu->space(AS_PROGRAM); + return prog_space.read_byte(offset); } WRITE8_MEMBER(imds2_state::imds2_ioc_mem_w) { - address_space& prog_space = m_ioccpu->space(AS_PROGRAM); - return prog_space.write_byte(offset , data); + address_space& prog_space = m_ioccpu->space(AS_PROGRAM); + return prog_space.write_byte(offset , data); } I8275_DRAW_CHARACTER_MEMBER(imds2_state::crtc_display_pixels) { - unsigned i; - const rgb_t *palette = m_palette->palette()->entry_list_raw(); - UINT8 chargen_byte = m_chargen[ (linecount & 7) | ((unsigned)charcode << 3) ]; - UINT16 pixels; - - if (lten) { - pixels = ~0; - } else if (vsp != 0 || (linecount & 8) != 0) { - pixels = 0; - } else { - // See [2], pg 58 for the very peculiar way of generating character images - // Here each half-pixel is translated into a full pixel - UINT16 exp_pix_l; - UINT16 exp_pix_r; - - exp_pix_l = (UINT16)chargen_byte; - exp_pix_l = ((exp_pix_l & 0x80) << 5) | - ((exp_pix_l & 0x40) << 4) | - ((exp_pix_l & 0x20) << 3) | - ((exp_pix_l & 0x10) << 2) | - ((exp_pix_l & 0x08) << 1) | - (exp_pix_l & 0x04); - exp_pix_l |= (exp_pix_l << 1); - exp_pix_r = exp_pix_l; - - // Layout of exp_pix_l/r: - // Bit # : F E D C B A 9 8 7 6 5 4 3 2 1 0 - // Bit of chargen_byte: 0 0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 0 0 - if ((chargen_byte & 2) == 0) { - exp_pix_l >>= 1; - } - exp_pix_l &= 0x3fc0; - - if ((chargen_byte & 1) == 0) { - exp_pix_r >>= 1; - } - exp_pix_r &= 0x003e; - - pixels = exp_pix_l | exp_pix_r; - } - - if (rvv) { - pixels = ~pixels; - } - - for (i = 0; i < 14; i++) { - bitmap.pix32(y, x + i) = palette[ (pixels & (1U << (13 - i))) != 0 ]; - } + unsigned i; + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT8 chargen_byte = m_chargen[ (linecount & 7) | ((unsigned)charcode << 3) ]; + UINT16 pixels; + + if (lten) { + pixels = ~0; + } else if (vsp != 0 || (linecount & 8) != 0) { + pixels = 0; + } else { + // See [2], pg 58 for the very peculiar way of generating character images + // Here each half-pixel is translated into a full pixel + UINT16 exp_pix_l; + UINT16 exp_pix_r; + + exp_pix_l = (UINT16)chargen_byte; + exp_pix_l = ((exp_pix_l & 0x80) << 5) | + ((exp_pix_l & 0x40) << 4) | + ((exp_pix_l & 0x20) << 3) | + ((exp_pix_l & 0x10) << 2) | + ((exp_pix_l & 0x08) << 1) | + (exp_pix_l & 0x04); + exp_pix_l |= (exp_pix_l << 1); + exp_pix_r = exp_pix_l; + + // Layout of exp_pix_l/r: + // Bit # : F E D C B A 9 8 7 6 5 4 3 2 1 0 + // Bit of chargen_byte: 0 0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 0 0 + if ((chargen_byte & 2) == 0) { + exp_pix_l >>= 1; + } + exp_pix_l &= 0x3fc0; + + if ((chargen_byte & 1) == 0) { + exp_pix_r >>= 1; + } + exp_pix_r &= 0x003e; + + pixels = exp_pix_l | exp_pix_r; + } + + if (rvv) { + pixels = ~pixels; + } + + for (i = 0; i < 14; i++) { + bitmap.pix32(y, x + i) = palette[ (pixels & (1U << (13 - i))) != 0 ]; + } } void imds2_state::driver_start() { - // Allocate 64k for IPC RAM - m_ipc_ram.resize(0x10000); + // Allocate 64k for IPC RAM + m_ipc_ram.resize(0x10000); - memory_region *ipcrom = memregion("ipcrom"); - if (ipcrom == NULL) { - fatalerror("Unable to find IPC ROM region\n"); - } else { - m_ipc_rom = ipcrom->base(); - } + memory_region *ipcrom = memregion("ipcrom"); + if (ipcrom == NULL) { + fatalerror("Unable to find IPC ROM region\n"); + } else { + m_ipc_rom = ipcrom->base(); + } } void imds2_state::machine_start() { - m_floppy0->floppy_mon_w(0); - m_floppy0->floppy_drive_set_ready_state(1 , 0); + m_floppy0->floppy_mon_w(0); + m_floppy0->floppy_drive_set_ready_state(1 , 0); } void imds2_state::video_start() { - m_chargen = memregion("gfx1")->base(); + m_chargen = memregion("gfx1")->base(); } void imds2_state::machine_reset() { - m_iocbeep->set_frequency(IOC_BEEP_FREQ); - m_ipc_control = 0x00; - m_ipc_ioc_status = 0x0f; + m_iocbeep->set_frequency(IOC_BEEP_FREQ); + m_ipc_control = 0x00; + m_ipc_ioc_status = 0x0f; } bool imds2_state::imds2_in_ipc_rom(offs_t offset) const { - offs_t masked_offset = offset & 0xf800; + offs_t masked_offset = offset & 0xf800; - // Region 0000-07ff is in ROM when START_UP/ == 0 && SEL_BOOT/ == 0 - if (masked_offset == 0x0000 && (m_ipc_control & 0x28) == 0) { - return true; - } + // Region 0000-07ff is in ROM when START_UP/ == 0 && SEL_BOOT/ == 0 + if (masked_offset == 0x0000 && (m_ipc_control & 0x28) == 0) { + return true; + } - // Region e800-efff is in ROM when SEL_BOOT/ == 0 - if (masked_offset == 0xe800 && (m_ipc_control & 0x08) == 0) { - return true; - } + // Region e800-efff is in ROM when SEL_BOOT/ == 0 + if (masked_offset == 0xe800 && (m_ipc_control & 0x08) == 0) { + return true; + } - // Region f800-ffff is always in ROM - if (masked_offset == 0xf800) { - return true; - } + // Region f800-ffff is always in ROM + if (masked_offset == 0xf800) { + return true; + } - return false; + return false; } - + void imds2_state::imds2_update_beeper(void) { - m_iocbeep->set_state(m_beeper_timer == 0 && BIT(m_miscout , 0) == 0); + m_iocbeep->set_state(m_beeper_timer == 0 && BIT(m_miscout , 0) == 0); } static INPUT_PORTS_START(imds2) - // See [1], pg 56 for key matrix layout - // See [1], pg 57 for keyboard layout - PORT_START("KEY0") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') // ' - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // . - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - - PORT_START("KEY1") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_UNUSED) - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') // OK - - PORT_START("KEY2") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') - - PORT_START("KEY3") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') // OK - - PORT_START("KEY4") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') // OK - - PORT_START("KEY5") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // OK - - PORT_START("KEY6") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) // BS - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') // OK - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) // OK - - PORT_START("KEY7") - PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('_') PORT_CHAR('^') - PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) // OK - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_UNUSED) - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_UNUSED) - - // Options on IOC: see [1], pg 40 - PORT_START("IOC_OPTS") - PORT_DIPNAME(0x80 , 0x80 , "Keyboard present") - PORT_DIPSETTING(0x80 , DEF_STR(Yes)) - PORT_DIPSETTING(0x00 , DEF_STR(No)) - PORT_DIPNAME(0x28 , 0x00 , "IOC mode") - PORT_DIPSETTING(0x00 , "On line") - PORT_DIPSETTING(0x08 , "Local") - PORT_DIPSETTING(0x20 , "Diagnostic") - PORT_DIPNAME(0x02 , 0x00 , "Floppy present") - PORT_DIPSETTING(0x02 , DEF_STR(Yes)) - PORT_DIPSETTING(0x00 , DEF_STR(No)) - PORT_DIPNAME(0x01 , 0x01 , "CRT frame frequency") - PORT_DIPSETTING(0x01 , "50 Hz") - PORT_DIPSETTING(0x00 , "60 Hz") + // See [1], pg 56 for key matrix layout + // See [1], pg 57 for keyboard layout + PORT_START("KEY0") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') // ' + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // . + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("KEY1") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_UNUSED) + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') // OK + + PORT_START("KEY2") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + + PORT_START("KEY3") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') // OK + + PORT_START("KEY4") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') // OK + + PORT_START("KEY5") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // OK + + PORT_START("KEY6") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) // BS + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') // OK + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) // OK + + PORT_START("KEY7") + PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // OK + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('_') PORT_CHAR('^') + PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // OK + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_UNUSED) + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_UNUSED) + + // Options on IOC: see [1], pg 40 + PORT_START("IOC_OPTS") + PORT_DIPNAME(0x80 , 0x80 , "Keyboard present") + PORT_DIPSETTING(0x80 , DEF_STR(Yes)) + PORT_DIPSETTING(0x00 , DEF_STR(No)) + PORT_DIPNAME(0x28 , 0x00 , "IOC mode") + PORT_DIPSETTING(0x00 , "On line") + PORT_DIPSETTING(0x08 , "Local") + PORT_DIPSETTING(0x20 , "Diagnostic") + PORT_DIPNAME(0x02 , 0x00 , "Floppy present") + PORT_DIPSETTING(0x02 , DEF_STR(Yes)) + PORT_DIPSETTING(0x00 , DEF_STR(No)) + PORT_DIPNAME(0x01 , 0x01 , "CRT frame frequency") + PORT_DIPSETTING(0x01 , "50 Hz") + PORT_DIPSETTING(0x00 , "60 Hz") INPUT_PORTS_END static GFXLAYOUT_RAW(imds2_charlayout , 8 , 8 , 8 , 64) static GFXDECODE_START(imds2) - GFXDECODE_ENTRY("gfx1" , 0x0000 , imds2_charlayout , 0 , 1) + GFXDECODE_ENTRY("gfx1" , 0x0000 , imds2_charlayout , 0 , 1) GFXDECODE_END static LEGACY_FLOPPY_OPTIONS_START(imds2) @@ -633,106 +633,106 @@ LEGACY_FLOPPY_OPTIONS_END static const floppy_interface imds2_floppy_interface = { - FLOPPY_STANDARD_8_SSSD, - LEGACY_FLOPPY_OPTIONS_NAME(imds2), - "floppy_8" + FLOPPY_STANDARD_8_SSSD, + LEGACY_FLOPPY_OPTIONS_NAME(imds2), + "floppy_8" }; static MACHINE_CONFIG_START(imds2 , imds2_state) - MCFG_CPU_ADD("ipccpu" , I8085A , IPC_XTAL_Y2 / 2) // 4 MHz - MCFG_CPU_PROGRAM_MAP(ipc_mem_map) - MCFG_CPU_IO_MAP(ipc_io_map) - MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("ipcsyspic" , pic8259_device , inta_cb) - MCFG_QUANTUM_TIME(attotime::from_hz(100)) - - MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC , NULL) - MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC , NULL) - - MCFG_CPU_ADD("ioccpu" , I8080A , IOC_XTAL_Y2 / 9) // 2.448 MHz - MCFG_CPU_PROGRAM_MAP(ioc_mem_map) - MCFG_CPU_IO_MAP(ioc_io_map) - MCFG_QUANTUM_TIME(attotime::from_hz(100)) - - // The IOC CRT hw is a bit complex, as the character clock (CCLK) to i8275 - // is varied according to the part of the video frame being scanned and according to - // the 50/60 Hz option jumper (W8). - // The basic clock (BCLK) runs at 22.032 MHz. - // CCLK = BCLK / 14 when in the active region of video - // CCLK = BCLK / 12 when in horizontal retrace (HRTC=1) - // CCLK = BCLK / 10 when in horizontal retrace of "short scan lines" (50 Hz only) - // - // ***** 50 Hz timings ***** - // 80 chars/row, 26 chars/h. retrace, 11 scan lines/row, 25 active rows, 3 vertical retrace rows - // Scan line: 80 chars * 14 BCLK + 26 chars * 12 BCLK = 1432 BCLK (64.996 usec) - // Scan row: 11 * scan lines = 15752 BCLK (714.960 usec) - // "Short" scan line: 80 chars * 14 BCLK + 26 chars * 10 BCLK = 1380 BCLK (62.636 usec) - // Frame: 28 scan rows (8 scan lines of 27th row are short): 27 * scan row + 3 * scan line + 8 * short scan line: 440640 BCLK (20 msec) - // - // ***** 60 Hz timings ***** - // 80 chars/row, 20 chars/h. retrace, 10 scan lines/row, 25 active rows, 2 vertical retrace rows - // Scan line: 80 chars * 14 BCLK + 20 chars * 12 BCLK = 1360 BCLK (61.728 usec) - // Scan row: 10 * scan lines = 13600 BCLK (617.284 usec) - // Frame: 27 scan rows : 367200 BCLK (16.667 msec) - // - // Clock here is semi-bogus: it gives the correct frame frequency at 50 Hz (with the incorrect - // assumption that CCLK is fixed at BCLK / 14) - MCFG_DEVICE_ADD("ioccrtc" , I8275 , 22853600 / 14) - MCFG_I8275_CHARACTER_WIDTH(14) - MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(imds2_state , crtc_display_pixels) - MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq2_w)) - MCFG_I8275_IRQ_CALLBACK(INPUTLINE("ioccpu" , I8085_INTR_LINE)) - - MCFG_SCREEN_ADD("screen" , RASTER) - MCFG_SCREEN_UPDATE_DEVICE("ioccrtc" , i8275_device , screen_update) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_GFXDECODE_ADD("gfxdecode" , "palette" , imds2) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") - - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("iocbeep" , BEEP , 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) - - MCFG_DEVICE_ADD("iocdma" , I8257 , IOC_XTAL_Y2 / 9) - MCFG_I8257_OUT_HRQ_CB(WRITELINE(imds2_state, imds2_hrq_w)) - MCFG_I8257_IN_MEMR_CB(READ8(imds2_state , imds2_ioc_mem_r)) - MCFG_I8257_OUT_MEMW_CB(WRITE8(imds2_state , imds2_ioc_mem_w)) - MCFG_I8257_IN_IOR_1_CB(DEVREAD8("iocfdc" , i8271_device , dack_r)) - MCFG_I8257_OUT_IOW_1_CB(DEVWRITE8("iocfdc" , i8271_device , dack_w)) - MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("ioccrtc" , i8275_device , dack_w)) - - MCFG_DEVICE_ADD("ioctimer" , PIT8253 , 0) - MCFG_PIT8253_CLK0(IOC_XTAL_Y1 / 4) - MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("ioctimer" , pit8253_device , write_clk2)); - MCFG_PIT8253_OUT2_HANDLER(WRITELINE(imds2_state , imds2_beep_timer_w)); - - MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2) - MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w)) - MCFG_I8271_FLOPPIES(FLOPPY_0 , FLOPPY_1) - - MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, imds2_floppy_interface) - - MCFG_CPU_ADD("kbcpu", I8741, XTAL_3_579545MHz) /* 3.579545 MHz */ - MCFG_CPU_IO_MAP(kb_io_map) - MCFG_QUANTUM_TIME(attotime::from_hz(100)) + MCFG_CPU_ADD("ipccpu" , I8085A , IPC_XTAL_Y2 / 2) // 4 MHz + MCFG_CPU_PROGRAM_MAP(ipc_mem_map) + MCFG_CPU_IO_MAP(ipc_io_map) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("ipcsyspic" , pic8259_device , inta_cb) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) + + MCFG_PIC8259_ADD("ipcsyspic" , WRITELINE(imds2_state , imds2_ipc_intr) , VCC , NULL) + MCFG_PIC8259_ADD("ipclocpic" , DEVWRITELINE("ipcsyspic" , pic8259_device , ir7_w) , VCC , NULL) + + MCFG_CPU_ADD("ioccpu" , I8080A , IOC_XTAL_Y2 / 9) // 2.448 MHz + MCFG_CPU_PROGRAM_MAP(ioc_mem_map) + MCFG_CPU_IO_MAP(ioc_io_map) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) + + // The IOC CRT hw is a bit complex, as the character clock (CCLK) to i8275 + // is varied according to the part of the video frame being scanned and according to + // the 50/60 Hz option jumper (W8). + // The basic clock (BCLK) runs at 22.032 MHz. + // CCLK = BCLK / 14 when in the active region of video + // CCLK = BCLK / 12 when in horizontal retrace (HRTC=1) + // CCLK = BCLK / 10 when in horizontal retrace of "short scan lines" (50 Hz only) + // + // ***** 50 Hz timings ***** + // 80 chars/row, 26 chars/h. retrace, 11 scan lines/row, 25 active rows, 3 vertical retrace rows + // Scan line: 80 chars * 14 BCLK + 26 chars * 12 BCLK = 1432 BCLK (64.996 usec) + // Scan row: 11 * scan lines = 15752 BCLK (714.960 usec) + // "Short" scan line: 80 chars * 14 BCLK + 26 chars * 10 BCLK = 1380 BCLK (62.636 usec) + // Frame: 28 scan rows (8 scan lines of 27th row are short): 27 * scan row + 3 * scan line + 8 * short scan line: 440640 BCLK (20 msec) + // + // ***** 60 Hz timings ***** + // 80 chars/row, 20 chars/h. retrace, 10 scan lines/row, 25 active rows, 2 vertical retrace rows + // Scan line: 80 chars * 14 BCLK + 20 chars * 12 BCLK = 1360 BCLK (61.728 usec) + // Scan row: 10 * scan lines = 13600 BCLK (617.284 usec) + // Frame: 27 scan rows : 367200 BCLK (16.667 msec) + // + // Clock here is semi-bogus: it gives the correct frame frequency at 50 Hz (with the incorrect + // assumption that CCLK is fixed at BCLK / 14) + MCFG_DEVICE_ADD("ioccrtc" , I8275 , 22853600 / 14) + MCFG_I8275_CHARACTER_WIDTH(14) + MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(imds2_state , crtc_display_pixels) + MCFG_I8275_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq2_w)) + MCFG_I8275_IRQ_CALLBACK(INPUTLINE("ioccpu" , I8085_INTR_LINE)) + + MCFG_SCREEN_ADD("screen" , RASTER) + MCFG_SCREEN_UPDATE_DEVICE("ioccrtc" , i8275_device , screen_update) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_GFXDECODE_ADD("gfxdecode" , "palette" , imds2) + MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") + + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("iocbeep" , BEEP , 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS , "mono" , 1.00) + + MCFG_DEVICE_ADD("iocdma" , I8257 , IOC_XTAL_Y2 / 9) + MCFG_I8257_OUT_HRQ_CB(WRITELINE(imds2_state, imds2_hrq_w)) + MCFG_I8257_IN_MEMR_CB(READ8(imds2_state , imds2_ioc_mem_r)) + MCFG_I8257_OUT_MEMW_CB(WRITE8(imds2_state , imds2_ioc_mem_w)) + MCFG_I8257_IN_IOR_1_CB(DEVREAD8("iocfdc" , i8271_device , dack_r)) + MCFG_I8257_OUT_IOW_1_CB(DEVWRITE8("iocfdc" , i8271_device , dack_w)) + MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("ioccrtc" , i8275_device , dack_w)) + + MCFG_DEVICE_ADD("ioctimer" , PIT8253 , 0) + MCFG_PIT8253_CLK0(IOC_XTAL_Y1 / 4) + MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("ioctimer" , pit8253_device , write_clk2)); + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(imds2_state , imds2_beep_timer_w)); + + MCFG_DEVICE_ADD("iocfdc" , I8271 , IOC_XTAL_Y1 / 2) + MCFG_I8271_DRQ_CALLBACK(DEVWRITELINE("iocdma" , i8257_device , dreq1_w)) + MCFG_I8271_FLOPPIES(FLOPPY_0 , FLOPPY_1) + + MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, imds2_floppy_interface) + + MCFG_CPU_ADD("kbcpu", I8741, XTAL_3_579545MHz) /* 3.579545 MHz */ + MCFG_CPU_IO_MAP(kb_io_map) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) MACHINE_CONFIG_END ROM_START(imds2) - // ROM definition of IPC cpu (8085A) - ROM_REGION(0x1000 , "ipcrom" , 0) - ROM_LOAD("ipc_a82.bin" , 0x0000 , 0x1000 , CRC(0889394f) SHA1(b7525baf1884a7d67402dea4b5566016a9861ef2)) - - // ROM definition of IOC cpu (8080A) - ROM_REGION(0x2000 , "ioccpu" , 0) - ROM_LOAD("ioc_a50.bin" , 0x0000 , 0x0800 , CRC(d9f926a1) SHA1(bd9d0f7458acc2806120a6dbaab9c48be315b060)) - ROM_LOAD("ioc_a51.bin" , 0x0800 , 0x0800 , CRC(6aa2f86c) SHA1(d3a5314d86e3366545b4c97b29e323dfab383d5f)) - ROM_LOAD("ioc_a52.bin" , 0x1000 , 0x0800 , CRC(b88a38d5) SHA1(934716a1daec852f4d1f846510f42408df0c9584)) - ROM_LOAD("ioc_a53.bin" , 0x1800 , 0x0800 , CRC(c8df4bb9) SHA1(2dfb921e94ae7033a7182457b2f00657674d1b77)) - // ROM definition of keyboard controller (8741) - ROM_REGION(0x400 , "kbcpu" , 0) - ROM_LOAD("kbd511.bin" , 0 , 0x400 , CRC(ba7c4303) SHA1(19899af732d0ae1247bfc79979b1ee5f339ee5cf)) - // ROM definition of character generator (2708, A19 on IOC) - ROM_REGION(0x400 , "gfx1" , 0) - ROM_LOAD ("ioc_a19.bin" , 0x0000 , 0x0400 , CRC(47487d0f) SHA1(0ed98f9f06622949ee3cc2ffc572fb9702db0f81)) + // ROM definition of IPC cpu (8085A) + ROM_REGION(0x1000 , "ipcrom" , 0) + ROM_LOAD("ipc_a82.bin" , 0x0000 , 0x1000 , CRC(0889394f) SHA1(b7525baf1884a7d67402dea4b5566016a9861ef2)) + + // ROM definition of IOC cpu (8080A) + ROM_REGION(0x2000 , "ioccpu" , 0) + ROM_LOAD("ioc_a50.bin" , 0x0000 , 0x0800 , CRC(d9f926a1) SHA1(bd9d0f7458acc2806120a6dbaab9c48be315b060)) + ROM_LOAD("ioc_a51.bin" , 0x0800 , 0x0800 , CRC(6aa2f86c) SHA1(d3a5314d86e3366545b4c97b29e323dfab383d5f)) + ROM_LOAD("ioc_a52.bin" , 0x1000 , 0x0800 , CRC(b88a38d5) SHA1(934716a1daec852f4d1f846510f42408df0c9584)) + ROM_LOAD("ioc_a53.bin" , 0x1800 , 0x0800 , CRC(c8df4bb9) SHA1(2dfb921e94ae7033a7182457b2f00657674d1b77)) + // ROM definition of keyboard controller (8741) + ROM_REGION(0x400 , "kbcpu" , 0) + ROM_LOAD("kbd511.bin" , 0 , 0x400 , CRC(ba7c4303) SHA1(19899af732d0ae1247bfc79979b1ee5f339ee5cf)) + // ROM definition of character generator (2708, A19 on IOC) + ROM_REGION(0x400 , "gfx1" , 0) + ROM_LOAD ("ioc_a19.bin" , 0x0000 , 0x0400 , CRC(47487d0f) SHA1(0ed98f9f06622949ee3cc2ffc572fb9702db0f81)) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ diff --git a/src/mess/drivers/mbdtower.c b/src/mess/drivers/mbdtower.c index 412cbf3a6a7ad..e9ff39fd7984c 100644 --- a/src/mess/drivers/mbdtower.c +++ b/src/mess/drivers/mbdtower.c @@ -14,7 +14,7 @@ The emulated part is the centerpiece, a black tower with a rotating card panel and LED digits for displaying health, amount of gold, etc. As far as MESS is concerned, the game works fine. - + To start up the game, first press [MOVE], the machine now does a self-test. Then select level and number of players and the game will start. Read the official manual on how to play the game. @@ -64,7 +64,7 @@ void mbdtower_state::mbdtower_display() m_display_maxx = 7; m_display_maxy = 3; m_display_segmask[1] = m_display_segmask[2] = 0x7f; - + // update current state if (~m_r & 0x10) { @@ -89,7 +89,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) if (m_motor_on) { m_motor_pos = (m_motor_pos - 1) & 0x7f; - + // give it some time to spin out when it's turned off if (m_r & 0x200) m_motor_decay += (m_motor_decay < 4); @@ -105,23 +105,23 @@ TIMER_DEVICE_CALLBACK_MEMBER(mbdtower_state::motor_sim_tick) m_sensor_blind = false; else m_sensor_blind = true; - + // on change, output info if (m_motor_pos != m_motor_pos_prev) output_set_value("motor_pos", 100 * (m_motor_pos / (float)0x80)); - + /* 3 display cards per hole, like this: - + (0) <---- display increments this way <---- (7) - CURSED VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void) - LOST WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void) - PLAGUE BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void) + CURSED VICTORY WIZARD DRAGON GOLD KEY SCOUT WARRIOR (void) + LOST WARRIORS BAZAAR CLOSED SWORD SILVER KEY HEALER FOOD (void) + PLAGUE BRIGANDS KEY MISSING PEGASUS BRASS KEY GOLD BEAST (void) */ int card_pos = m_motor_pos >> 4 & 7; if (card_pos != (m_motor_pos_prev >> 4 & 7)) output_set_value("card_pos", card_pos); - + m_motor_pos_prev = m_motor_pos; } @@ -137,7 +137,7 @@ WRITE16_MEMBER(mbdtower_state::write_r) { // R0-R2: input mux m_inp_mux = data & 7; - + // R9: motor on if ((m_r ^ data) & 0x200) output_set_value("motor_on", data >> 9 & 1); @@ -150,7 +150,7 @@ WRITE16_MEMBER(mbdtower_state::write_r) // R8: rotation sensor led m_r = data; mbdtower_display(); - + // R10: speaker out m_speaker->level_w(~data >> 4 & data >> 10 & 1); } @@ -182,14 +182,14 @@ READ8_MEMBER(mbdtower_state::read_k) (green) (l.blue) (red) [YES/ [REPEAT] [NO/ BUY] END] - + (yellow) (blue) (white) [HAGGLE] [BAZAAR] [CLEAR] - + (blue) (blue) (blue) [TOMB/ [MOVE] [SANCTUARY/ RUIN] CITADEL] - + (orange) (blue) (d.yellow) [DARK [FRONTIER] [INVENTORY] TOWER] @@ -233,7 +233,7 @@ void mbdtower_state::machine_start() m_motor_decay = 0; m_motor_on = false; m_sensor_blind = false; - + save_item(NAME(m_motor_pos)); /* save_item(NAME(m_motor_pos_prev)); */ // don't save! save_item(NAME(m_motor_decay)); diff --git a/src/mess/drivers/snes.c b/src/mess/drivers/snes.c index aff5e20e5f0d3..1703d126789f4 100644 --- a/src/mess/drivers/snes.c +++ b/src/mess/drivers/snes.c @@ -1005,9 +1005,9 @@ WRITE8_MEMBER( snes_console_state::pfest94_lo_w ) *************************************/ static ADDRESS_MAP_START( snes_map, AS_PROGRAM, 8, snes_console_state ) -// AM_RANGE(0x000000, 0x7dffff) AM_READWRITE(snes20_lo_r, snes20_lo_w) +// AM_RANGE(0x000000, 0x7dffff) AM_READWRITE(snes20_lo_r, snes20_lo_w) AM_RANGE(0x7e0000, 0x7fffff) AM_RAM /* 8KB Low RAM, 24KB High RAM, 96KB Expanded RAM */ -// AM_RANGE(0x800000, 0xffffff) AM_READWRITE(snes20_hi_r, snes20_hi_w) +// AM_RANGE(0x800000, 0xffffff) AM_READWRITE(snes20_hi_r, snes20_hi_w) ADDRESS_MAP_END static ADDRESS_MAP_START( spc_map, AS_PROGRAM, 8, snes_console_state ) @@ -1196,7 +1196,7 @@ void snes_console_state::machine_start() m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7dffff, read8_delegate(FUNC(snes_console_state::snes20_lo_r),this), write8_delegate(FUNC(snes_console_state::snes20_lo_w),this)); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x800000, 0xffffff, read8_delegate(FUNC(snes_console_state::snes20_hi_r),this), write8_delegate(FUNC(snes_console_state::snes20_hi_w),this)); m_maincpu->set_5a22_map(); - + m_type = m_cartslot->get_type(); switch (m_type) diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index 37d9060016283..eb7ee44940e40 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -59,8 +59,8 @@ class ticalc1x_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - - UINT32 m_display_state[0x20]; // display matrix rows data + + UINT32 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT32 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x20]; // (internal use) @@ -68,7 +68,7 @@ class ticalc1x_state : public driver_device TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask); - + // calculator-specific handlers void tisr16_display(); DECLARE_WRITE16_MEMBER(tisr16_write_o); @@ -105,7 +105,7 @@ void ticalc1x_state::machine_start() memset(m_display_cache, ~0, sizeof(m_display_cache)); memset(m_display_decay, 0, sizeof(m_display_decay)); memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // ! - + m_o = 0; m_r = 0; m_inp_mux = 0; @@ -193,7 +193,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(ticalc1x_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -209,7 +209,7 @@ void ticalc1x_state::display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 m_display_segmask[y] &= segmask; m_display_state[y] = (sety >> y & 1) ? (setx & colmask) : 0; } - + display_update(); } @@ -482,11 +482,11 @@ WRITE16_MEMBER(ticalc1x_state::wizatron_write_r) // \./ GAB // --- F // /.\ EDC - + // 3rd digit only has A and G for =, though some newer hardware revisions // (goes for both wizatron and lilprof) use a custom equals-sign digit here m_display_segmask[3] = 0x41; - + // R0-R8: select digit (right-to-left) display_matrix_seg(7, 9, m_o, data, 0x7f); } @@ -557,7 +557,7 @@ MACHINE_CONFIG_END TI Little Professor (1976 version) * TMS0970 MCU labeled TMS0975NL ZA0356, GP0975CS. die labeled 0970D-75C - + The hardware is nearly identical to Wiz-A-Tron (or vice versa, since this one is older). @@ -631,7 +631,7 @@ WRITE16_MEMBER(ticalc1x_state::lilprof78_write_r) // 3rd digit A/G(equals sign) is from O7 m_display_state[3] = (m_o & 0x80) ? 0x41 : 0; - + // 6th digit is a custom 7seg for math symbols (see wizatron_write_r) m_display_state[6] = BITSWAP8(m_display_state[6],7,6,1,4,2,3,5,0); diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c index cc2b432106f8d..cdacaf54b9b19 100644 --- a/src/mess/drivers/tispeak.c +++ b/src/mess/drivers/tispeak.c @@ -326,8 +326,8 @@ class tispeak_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - - UINT32 m_display_state[0x20]; // display matrix rows data + + UINT32 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT32 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x20]; // (internal use) @@ -454,7 +454,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::display_decay_tick) for (int x = 0; x < m_display_maxx; x++) if (m_display_decay[y][x] != 0) m_display_decay[y][x]--; - + display_update(); } @@ -470,7 +470,7 @@ void tispeak_state::display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 s m_display_segmask[y] &= segmask; m_display_state[y] = (sety >> y & 1) ? (setx & colmask) : 0; } - + display_update(); } @@ -501,7 +501,7 @@ WRITE16_MEMBER(tispeak_state::snspell_write_r) { // R15: filament on m_filament_on = data & 0x8000; - + // R13: power-off request, on falling edge if ((m_r >> 13 & 1) && !(data >> 13 & 1)) power_off(); diff --git a/src/mess/includes/hh_tms1k.h b/src/mess/includes/hh_tms1k.h index 1e10012bce019..1ab7b2cce9015 100644 --- a/src/mess/includes/hh_tms1k.h +++ b/src/mess/includes/hh_tms1k.h @@ -32,7 +32,7 @@ class hh_tms1k_state : public driver_device required_device m_maincpu; optional_ioport_array<7> m_inp_matrix; // max 7 optional_device m_speaker; - + // misc common UINT16 m_r; // MCU R-pins data UINT16 m_o; // MCU O-pins data @@ -47,8 +47,8 @@ class hh_tms1k_state : public driver_device int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) int m_display_maxy; // display matrix number of rows int m_display_maxx; // display matrix number of columns - - UINT32 m_display_state[0x20]; // display matrix rows data + + UINT32 m_display_state[0x20]; // display matrix rows data UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments UINT32 m_display_cache[0x20]; // (internal use) UINT8 m_display_decay[0x20][0x20]; // (internal use) diff --git a/src/mess/includes/imds2.h b/src/mess/includes/imds2.h index 62887b4b34e60..5fb1b513ecf36 100644 --- a/src/mess/includes/imds2.h +++ b/src/mess/includes/imds2.h @@ -18,105 +18,105 @@ class imds2_state : public driver_device { - public: - imds2_state(const machine_config &mconfig, device_type type, const char *tag); - - DECLARE_READ8_MEMBER(ipc_mem_read); - DECLARE_WRITE8_MEMBER(ipc_mem_write); - DECLARE_WRITE8_MEMBER(imds2_ipc_control_w); - DECLARE_WRITE_LINE_MEMBER(imds2_ipc_intr); - DECLARE_READ8_MEMBER(imds2_ipcsyspic_r); - DECLARE_READ8_MEMBER(imds2_ipclocpic_r); - DECLARE_WRITE8_MEMBER(imds2_ipcsyspic_w); - DECLARE_WRITE8_MEMBER(imds2_ipclocpic_w); - - DECLARE_WRITE8_MEMBER(imds2_miscout_w); - DECLARE_READ8_MEMBER(imds2_miscin_r); - DECLARE_WRITE_LINE_MEMBER(imds2_beep_timer_w); - DECLARE_WRITE8_MEMBER(imds2_start_timer_w); - DECLARE_READ8_MEMBER(imds2_kb_read); - DECLARE_READ8_MEMBER(imds2_kb_port_p2_r); - DECLARE_WRITE8_MEMBER(imds2_kb_port_p1_w); - DECLARE_READ8_MEMBER(imds2_kb_port_t0_r); - DECLARE_READ8_MEMBER(imds2_kb_port_t1_r); - DECLARE_WRITE8_MEMBER(imds2_ioc_dbbout_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_f0_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_set_f1_w); - DECLARE_WRITE8_MEMBER(imds2_ioc_reset_f1_w); - DECLARE_READ8_MEMBER(imds2_ioc_status_r); - DECLARE_READ8_MEMBER(imds2_ioc_dbbin_r); - DECLARE_READ8_MEMBER(imds2_ipc_dbbout_r); - DECLARE_READ8_MEMBER(imds2_ipc_status_r); - DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_data_w); - DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_cmd_w); - DECLARE_WRITE_LINE_MEMBER(imds2_hrq_w); - - DECLARE_READ8_MEMBER(imds2_ioc_mem_r); - DECLARE_WRITE8_MEMBER(imds2_ioc_mem_w); - - I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels); - - virtual void driver_start(); - virtual void machine_start(); - virtual void video_start(); - virtual void machine_reset(); - - private: - required_device m_ipccpu; - required_device m_ipcsyspic; - required_device m_ipclocpic; - required_device m_ioccpu; - required_device m_iocdma; - required_device m_ioccrtc; - required_device m_iocbeep; - required_device m_ioctimer; - required_device m_iocfdc; - required_device m_kbcpu; - required_device m_palette; - required_device m_gfxdecode; - required_device m_floppy0; - required_ioport m_io_key0; - required_ioport m_io_key1; - required_ioport m_io_key2; - required_ioport m_io_key3; - required_ioport m_io_key4; - required_ioport m_io_key5; - required_ioport m_io_key6; - required_ioport m_io_key7; - required_ioport m_ioc_options; - - dynamic_array m_ipc_ram; - - bool imds2_in_ipc_rom(offs_t offset) const; - - void imds2_update_beeper(void); - - // IPC control port - UINT8 m_ipc_control; - - // IPC ROM content - const UINT8 *m_ipc_rom; - - // Character generator - const UINT8 *m_chargen; - - // MISCOUT state - UINT8 m_miscout; - - // Beeper timer line - int m_beeper_timer; - - // Keyboard state - UINT8 m_kb_p1; - - // IPC to IOC buffer - UINT8 m_ioc_ibf; - - // IOC to IPC buffer - UINT8 m_ioc_obf; - - // IPC/IOC status - UINT8 m_ipc_ioc_status; + public: + imds2_state(const machine_config &mconfig, device_type type, const char *tag); + + DECLARE_READ8_MEMBER(ipc_mem_read); + DECLARE_WRITE8_MEMBER(ipc_mem_write); + DECLARE_WRITE8_MEMBER(imds2_ipc_control_w); + DECLARE_WRITE_LINE_MEMBER(imds2_ipc_intr); + DECLARE_READ8_MEMBER(imds2_ipcsyspic_r); + DECLARE_READ8_MEMBER(imds2_ipclocpic_r); + DECLARE_WRITE8_MEMBER(imds2_ipcsyspic_w); + DECLARE_WRITE8_MEMBER(imds2_ipclocpic_w); + + DECLARE_WRITE8_MEMBER(imds2_miscout_w); + DECLARE_READ8_MEMBER(imds2_miscin_r); + DECLARE_WRITE_LINE_MEMBER(imds2_beep_timer_w); + DECLARE_WRITE8_MEMBER(imds2_start_timer_w); + DECLARE_READ8_MEMBER(imds2_kb_read); + DECLARE_READ8_MEMBER(imds2_kb_port_p2_r); + DECLARE_WRITE8_MEMBER(imds2_kb_port_p1_w); + DECLARE_READ8_MEMBER(imds2_kb_port_t0_r); + DECLARE_READ8_MEMBER(imds2_kb_port_t1_r); + DECLARE_WRITE8_MEMBER(imds2_ioc_dbbout_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_f0_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_set_f1_w); + DECLARE_WRITE8_MEMBER(imds2_ioc_reset_f1_w); + DECLARE_READ8_MEMBER(imds2_ioc_status_r); + DECLARE_READ8_MEMBER(imds2_ioc_dbbin_r); + DECLARE_READ8_MEMBER(imds2_ipc_dbbout_r); + DECLARE_READ8_MEMBER(imds2_ipc_status_r); + DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_data_w); + DECLARE_WRITE8_MEMBER(imds2_ipc_dbbin_cmd_w); + DECLARE_WRITE_LINE_MEMBER(imds2_hrq_w); + + DECLARE_READ8_MEMBER(imds2_ioc_mem_r); + DECLARE_WRITE8_MEMBER(imds2_ioc_mem_w); + + I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels); + + virtual void driver_start(); + virtual void machine_start(); + virtual void video_start(); + virtual void machine_reset(); + + private: + required_device m_ipccpu; + required_device m_ipcsyspic; + required_device m_ipclocpic; + required_device m_ioccpu; + required_device m_iocdma; + required_device m_ioccrtc; + required_device m_iocbeep; + required_device m_ioctimer; + required_device m_iocfdc; + required_device m_kbcpu; + required_device m_palette; + required_device m_gfxdecode; + required_device m_floppy0; + required_ioport m_io_key0; + required_ioport m_io_key1; + required_ioport m_io_key2; + required_ioport m_io_key3; + required_ioport m_io_key4; + required_ioport m_io_key5; + required_ioport m_io_key6; + required_ioport m_io_key7; + required_ioport m_ioc_options; + + dynamic_array m_ipc_ram; + + bool imds2_in_ipc_rom(offs_t offset) const; + + void imds2_update_beeper(void); + + // IPC control port + UINT8 m_ipc_control; + + // IPC ROM content + const UINT8 *m_ipc_rom; + + // Character generator + const UINT8 *m_chargen; + + // MISCOUT state + UINT8 m_miscout; + + // Beeper timer line + int m_beeper_timer; + + // Keyboard state + UINT8 m_kb_p1; + + // IPC to IOC buffer + UINT8 m_ioc_ibf; + + // IOC to IPC buffer + UINT8 m_ioc_obf; + + // IPC/IOC status + UINT8 m_ipc_ioc_status; }; #endif /* _IMDS2_H_ */ diff --git a/src/mess/layout/mbdtower.lay b/src/mess/layout/mbdtower.lay index 98bbfc231a420..7dc9b1b61e7ec 100644 --- a/src/mess/layout/mbdtower.lay +++ b/src/mess/layout/mbdtower.lay @@ -22,7 +22,7 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 69845afe992db..bac7f3487c036 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1335,7 +1335,7 @@ $(MESSOBJ)/intel.a: \ $(MESS_DRIVERS)/rex6000.o \ $(MESS_DRIVERS)/sdk85.o \ $(MESS_DRIVERS)/sdk86.o \ - $(MESS_DRIVERS)/imds2.o \ + $(MESS_DRIVERS)/imds2.o \ $(MESSOBJ)/imp.a: \ $(MESS_DRIVERS)/tim011.o \ @@ -2137,22 +2137,22 @@ $(MESS_DRIVERS)/h8.o: $(MESS_LAYOUT)/h8.lh $(MESS_DRIVERS)/hh_hmcs40.o:$(MESS_LAYOUT)/hh_hmcs40_test.lh $(MESS_DRIVERS)/hh_pic16.o: $(MESS_LAYOUT)/maniac.lh $(MESS_DRIVERS)/hh_tms1k.o: $(MESS_LAYOUT)/amaztron.lh \ - $(MESS_LAYOUT)/bankshot.lh \ - $(MESS_LAYOUT)/cnsector.lh \ - $(MESS_LAYOUT)/comp4.lh \ - $(MESS_LAYOUT)/ebball.lh \ - $(MESS_LAYOUT)/ebball2.lh \ - $(MESS_LAYOUT)/ebball3.lh \ - $(MESS_LAYOUT)/elecdet.lh \ - $(MESS_LAYOUT)/mathmagi.lh \ - $(MESS_LAYOUT)/merlin.lh \ - $(MESS_LAYOUT)/simon.lh \ - $(MESS_LAYOUT)/ssimon.lh \ - $(MESS_LAYOUT)/splitsec.lh \ - $(MESS_LAYOUT)/starwbc.lh \ - $(MESS_LAYOUT)/stopthie.lh \ - $(MESS_LAYOUT)/tandy12.lh \ - $(MESS_LAYOUT)/tc4.lh + $(MESS_LAYOUT)/bankshot.lh \ + $(MESS_LAYOUT)/cnsector.lh \ + $(MESS_LAYOUT)/comp4.lh \ + $(MESS_LAYOUT)/ebball.lh \ + $(MESS_LAYOUT)/ebball2.lh \ + $(MESS_LAYOUT)/ebball3.lh \ + $(MESS_LAYOUT)/elecdet.lh \ + $(MESS_LAYOUT)/mathmagi.lh \ + $(MESS_LAYOUT)/merlin.lh \ + $(MESS_LAYOUT)/simon.lh \ + $(MESS_LAYOUT)/ssimon.lh \ + $(MESS_LAYOUT)/splitsec.lh \ + $(MESS_LAYOUT)/starwbc.lh \ + $(MESS_LAYOUT)/stopthie.lh \ + $(MESS_LAYOUT)/tandy12.lh \ + $(MESS_LAYOUT)/tc4.lh $(MESS_DRIVERS)/hh_ucom4.o: $(MESS_LAYOUT)/hh_ucom4_test.lh $(MESS_DRIVERS)/ie15.o: $(MESS_LAYOUT)/ie15.lh $(MESS_DRIVERS)/instruct.o: $(MESS_LAYOUT)/instruct.lh diff --git a/src/osd/modules/opengl/osd_opengl.h b/src/osd/modules/opengl/osd_opengl.h index 829cad43bf56f..a0084ebdb6df1 100644 --- a/src/osd/modules/opengl/osd_opengl.h +++ b/src/osd/modules/opengl/osd_opengl.h @@ -61,11 +61,11 @@ virtual const char *LastErrorMsg() = 0; virtual void *getProcAddress(const char *proc) = 0; /* - * 0 for immediate updates, - * 1 for updates synchronized with the vertical retrace, - * -1 for late swap tearing + * 0 for immediate updates, + * 1 for updates synchronized with the vertical retrace, + * -1 for late swap tearing * - * returns -1 if swap interval is not supported + * returns -1 if swap interval is not supported * */ virtual int SetSwapInterval(const int swap) = 0; @@ -99,7 +99,7 @@ #undef GET_GLFUNC }; #ifdef _MSC_VER - } + } #endif #undef OSD_GL diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h index 993866984a24f..edafeb303cae3 100644 --- a/src/osd/modules/osdwindow.h +++ b/src/osd/modules/osdwindow.h @@ -78,9 +78,9 @@ class osd_window #endif render_primitive_list *m_primlist; - osd_window_config m_win_config; + osd_window_config m_win_config; protected: - int m_prescale; + int m_prescale; }; class osd_renderer @@ -131,7 +131,7 @@ class osd_renderer private: osd_window *m_window; - int m_flags; + int m_flags; }; diff --git a/src/osd/modules/render/draw13.c b/src/osd/modules/render/draw13.c index acc64a1f982f1..fb52a725562c6 100644 --- a/src/osd/modules/render/draw13.c +++ b/src/osd/modules/render/draw13.c @@ -118,7 +118,7 @@ class texture_info private: Uint32 m_sdl_access; - sdl_info13 * m_renderer; + sdl_info13 * m_renderer; render_texinfo m_texinfo; // copy of the texture info HashT m_hash; // hash value for the texture (must be >= pointer size) UINT32 m_flags; // rendering flags diff --git a/src/osd/modules/render/drawogl.c b/src/osd/modules/render/drawogl.c index 328310ba9c61c..4a3bf4d1e45bd 100644 --- a/src/osd/modules/render/drawogl.c +++ b/src/osd/modules/render/drawogl.c @@ -281,50 +281,50 @@ class win_gl_context : public osd_gl_context int setupPixelFormat(HDC hDC) { - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), /* size */ - 1, /* version */ - PFD_SUPPORT_OPENGL | - PFD_DRAW_TO_WINDOW | - PFD_DOUBLEBUFFER, /* support double-buffering */ - PFD_TYPE_RGBA, /* color type */ - 32, /* prefered color depth */ - 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ - 0, /* no alpha buffer */ - 0, /* alpha bits (ignored) */ - 0, /* no accumulation buffer */ - 0, 0, 0, 0, /* accum bits (ignored) */ - 16, /* depth buffer */ - 0, /* no stencil buffer */ - 0, /* no auxiliary buffers */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0, /* no layer, visible, damage masks */ - }; - int pixelFormat; - - pixelFormat = ChoosePixelFormat(hDC, &pfd); - if (pixelFormat == 0) { - strcpy(m_error, "ChoosePixelFormat failed"); - return 1; - } - - if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { - strcpy(m_error, "SetPixelFormat failed."); - return 1; - } - return 0; + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), /* size */ + 1, /* version */ + PFD_SUPPORT_OPENGL | + PFD_DRAW_TO_WINDOW | + PFD_DOUBLEBUFFER, /* support double-buffering */ + PFD_TYPE_RGBA, /* color type */ + 32, /* prefered color depth */ + 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ + 0, /* no alpha buffer */ + 0, /* alpha bits (ignored) */ + 0, /* no accumulation buffer */ + 0, 0, 0, 0, /* accum bits (ignored) */ + 16, /* depth buffer */ + 0, /* no stencil buffer */ + 0, /* no auxiliary buffers */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0, /* no layer, visible, damage masks */ + }; + int pixelFormat; + + pixelFormat = ChoosePixelFormat(hDC, &pfd); + if (pixelFormat == 0) { + strcpy(m_error, "ChoosePixelFormat failed"); + return 1; + } + + if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { + strcpy(m_error, "SetPixelFormat failed."); + return 1; + } + return 0; } bool WGLExtensionSupported(const char *extension_name) { - //if (pfn_wglGetExtensionsStringEXT != NULL) - // printf("%s\n", this->pfn_wglGetExtensionsStringEXT()); + //if (pfn_wglGetExtensionsStringEXT != NULL) + // printf("%s\n", this->pfn_wglGetExtensionsStringEXT()); - if (pfn_wglGetExtensionsStringEXT != NULL && strstr(pfn_wglGetExtensionsStringEXT(), extension_name) != NULL) - return true; - else - return false; + if (pfn_wglGetExtensionsStringEXT != NULL && strstr(pfn_wglGetExtensionsStringEXT(), extension_name) != NULL) + return true; + else + return false; } HGLRC m_context; @@ -589,7 +589,7 @@ class sdl_info_ogl : public osd_renderer int m_height; osd_dim m_blit_dim; - osd_gl_context *m_gl_context; + osd_gl_context *m_gl_context; int m_initialized; // is everything well initialized, i.e. all GL stuff etc. // 3D info (GL mode only) diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 2f188762da5ca..7f2de3c430001 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -429,7 +429,7 @@ OBJDIRS += $(SDLOBJ) \ $(OSDOBJ)/modules/netdev \ $(OSDOBJ)/modules/opengl \ $(OSDOBJ)/modules/render - + #------------------------------------------------- # OSD core library #------------------------------------------------- @@ -827,7 +827,7 @@ OSDOBJS += \ $(OSDOBJ)/modules/render/drawogl.o \ $(OSDOBJ)/modules/opengl/gl_shader_tool.o \ $(OSDOBJ)/modules/opengl/gl_shader_mgr.o - + DEFS += -DUSE_OPENGL=1 ifeq ($(USE_DISPATCH_GL),1) DEFS += -DUSE_DISPATCH_GL=1 diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index 4a3d8b69f9d5f..913116f6b627c 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -131,9 +131,9 @@ class osd_monitor_info osd_monitor_info *m_next; // pointer to next monitor in list protected: virtual void refresh() = 0; - osd_rect m_pos_size; - osd_rect m_usuable_pos_size; - bool m_is_primary; + osd_rect m_pos_size; + osd_rect m_usuable_pos_size; + bool m_is_primary; char m_name[64]; private: @@ -185,7 +185,7 @@ struct osd_video_config int syncrefresh; // sync only to refresh rate int switchres; // switch resolutions - int fullstretch; // FXIME: implement in windows! + int fullstretch; // FXIME: implement in windows! // ddraw options int hwstretch; // stretch using the hardware diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index 2f183ef447bdc..b41bf3bc7e5f7 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -1153,8 +1153,8 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) #ifdef SDLMAME_MACOSX /* FIMXE: On OSX, SDL_WINDOW_FULLSCREEN_DESKTOP seems to be more reliable. - * It however creates issues with white borders, i.e. the screen clear - * does not work. This happens both with opengl and accel. + * It however creates issues with white borders, i.e. the screen clear + * does not work. This happens both with opengl and accel. */ #endif diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index ba00c6bf3680b..87ce0d8527ce7 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -131,9 +131,9 @@ class osd_monitor_info osd_monitor_info *m_next; // pointer to next monitor in list protected: virtual void refresh() = 0; - osd_rect m_pos_size; - osd_rect m_usuable_pos_size; - bool m_is_primary; + osd_rect m_pos_size; + osd_rect m_usuable_pos_size; + bool m_is_primary; char m_name[64]; private: @@ -175,7 +175,7 @@ struct osd_video_config int syncrefresh; // sync only to refresh rate int switchres; // switch resolutions - int fullstretch; // FXIME: implement in windows! + int fullstretch; // FXIME: implement in windows! // ddraw options int hwstretch; // stretch using the hardware diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 53d8be9518a5e..633ae52b7b93f 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -406,9 +406,9 @@ OSDOBJS += \ $(OSDOBJ)/modules/render/drawogl.o \ $(OSDOBJ)/modules/opengl/gl_shader_tool.o \ $(OSDOBJ)/modules/opengl/gl_shader_mgr.o - + OBJDIRS += \ - $(OSDOBJ)/modules/opengl + $(OSDOBJ)/modules/opengl DEFS += -DUSE_OPENGL=1 diff --git a/src/version.c b/src/version.c index 5707b25f03178..da26f7e0bbe24 100644 --- a/src/version.c +++ b/src/version.c @@ -8,7 +8,7 @@ ***************************************************************************/ -#define BARE_BUILD_VERSION "0.159" +#define BARE_BUILD_VERSION "0.160" extern const char bare_build_version[]; extern const char build_version[];