Previous 199869 Revisions Next

r44488 Monday 25th January, 2016 at 23:27:07 UTC by Joakim Larsson Edström
Fixed keyboard lag issue due to faulty clock setup
[/trunk]makefile
[scripts]genie.lua toolchain.lua
[src/devices/bus/intv]ecs.cpp
[src/devices/cpu/i86]i86.cpp
[src/emu/debug]dvdisasm.cpp
[src/mame]arcade.lst
[src/mame/audio]cclimber.cpp
[src/mame/drivers]didact.cpp jclub2.cpp legionna.cpp marywu.cpp ssv.cpp st_mp200.cpp viper.cpp
[src/mame/machine]kc.cpp midwayic.cpp naomi.cpp
[src/mame/video]m107.cpp st0020.cpp st0020.h

trunk/makefile
r252999r253000
11791179
11801180
11811181#-------------------------------------------------
1182# gmake-steamlink
1183#-------------------------------------------------
1184
1185$(PROJECTDIR)/gmake-steamlink/Makefile: makefile $(SCRIPTS) $(GENIE)
1186ifndef MARVELL_SDK_PATH
1187   $(error MARVELL_SDK_PATH is not set)
1188endif
1189ifndef MARVELL_ROOTFS
1190   $(error MARVELL_ROOTFS is not set)
1191endif
1192   $(SILENT) $(GENIE) $(PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --USE_BGFX=0 --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr  gmake
1193
1194.PHONY: steamlink
1195ifndef MARVELL_SDK_PATH
1196   $(error MARVELL_SDK_PATH is not set)
1197endif
1198ifndef MARVELL_ROOTFS
1199   $(error MARVELL_ROOTFS is not set)
1200endif
1201steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile
1202   $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile
1203   $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG)
1204
1205
1206
1207#-------------------------------------------------
12081182# cmake
12091183#-------------------------------------------------
12101184cmake: generate
trunk/scripts/genie.lua
r252999r253000
108108      { "os2",           "OS/2 eComStation"       },
109109      { "haiku",         "Haiku"                  },
110110      { "solaris",       "Solaris SunOS"          },
111      { "steamlink",     "Steam Link"             },
112111   },
113112}
114113
r252999r253000
10531052      end
10541053
10551054
1056
1057configuration { "steamlink" }
1058   links {
1059      "dl",
1060   }
1061   defines {
1062      "EGL_API_FB",
1063   }
1064
10651055configuration { "osx*" }
10661056      links {
10671057         "pthread",
trunk/scripts/toolchain.lua
r252999r253000
3232      { "qnx-arm",       "QNX/Blackberry - ARM"   },
3333      { "rpi",           "RaspberryPi"            },
3434      { "solaris",       "Solaris"                },
35      { "steamlink",       "Steam Link"             },
3635   },
3736}
3837
r252999r253000
190189         location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux-clang")
191190      end
192191
193      if "steamlink" == _OPTIONS["gcc"] then
194         if not os.getenv("MARVELL_SDK_PATH") then
195            print("Set MARVELL_SDK_PATH envrionment variable.")
196         end
197         premake.gcc.cc  = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-gcc"
198         premake.gcc.cxx = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-g++"
199         premake.gcc.ar  = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-ar"
200         location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink")
201      end
202
203192      if "mingw32-gcc" == _OPTIONS["gcc"] then
204         if not os.getenv("MINGW32") then
193         if not os.getenv("MINGW32") or not os.getenv("MINGW32") then
205194            print("Set MINGW32 envrionment variable.")
206195         end
207196         premake.gcc.cc  = "$(MINGW32)/bin/i686-w64-mingw32-gcc"
r252999r253000
218207      end
219208
220209      if "mingw64-gcc" == _OPTIONS["gcc"] then
221         if not os.getenv("MINGW64") then
210         if not os.getenv("MINGW64") or not os.getenv("MINGW64") then
222211            print("Set MINGW64 envrionment variable.")
223212         end
224213         premake.gcc.cc  = "$(MINGW64)/bin/x86_64-w64-mingw32-gcc"
r252999r253000
494483   configuration { "x64", "mingw64-gcc", "Debug" }
495484      targetdir (_buildDir .. "mingw-gcc" .. "/bin/x64/Debug")
496485
497   configuration { "steamlink" }
498      objdir ( _buildDir .. "steamlink/obj")
499
500      buildoptions {
501         "-marm",
502         "-mfloat-abi=hard",
503         "--sysroot=$(MARVELL_SDK_PATH)/rootfs",
504      }
505      linkoptions {
506         "-static-libgcc",
507         "-static-libstdc++",
508         "--sysroot=$(MARVELL_SDK_PATH)/rootfs",
509      }
510
511   configuration { "steamlink", "Release" }
512      targetdir (_buildDir .. "steamlink/bin/Release")
513
514   configuration { "steamlink", "Debug" }
515      targetdir (_buildDir .. "steamlink/bin/Debug")
516
517486   configuration { "mingw-clang" }
518487      linkoptions {
519488         "-Wl,--allow-multiple-definition",
r252999r253000
527496      targetdir (_buildDir .. "mingw-clang/bin/x32/Release")
528497
529498   configuration { "x32", "mingw-clang", "Debug" }
530      targetdir (_buildDir .. "mingw-clang/bin/x32/Debug")
499      targetdir (_buildDir .. "win32_mingw-clang/bin/x32/Debug")
531500
532501   configuration { "x64", "mingw-clang" }
533502      objdir (_buildDir .. "mingw-clang/obj")
trunk/src/devices/bus/intv/ecs.cpp
r252999r253000
138138      }
139139   }
140140
141   y = (m_options->read() >> ((hand + 2) * 2)) & 3;
142   switch (y)
141   switch ((m_options->read() >> hand) & 4)
143142   {
144      case 0: /* disc == digital 8-way */
145      case 1: /* disc == digital 16-way */
143      case 0: /* disc == digital */
146144      default:
147145
148146         x = m_disc[hand]->read();
149         if (!!x && (!y || !(x & 0x7777)))
150         {
151            // merge cardinals to form true diagonals
152            y = ((x >> 2) & (x << 2)) | ((x >> (16 - 2)) & (x >> 2));
153            x = y | (x & ~((y << 2) | (y >> 2) | (y << (16 - 2))));
154         }
155
156         // only one disc direction is allowed
157         x &= -x;
158
159147         for (y = 0; y < 16; y++)
160148         {
161149            if (x & (1 << y))
r252999r253000
165153         }
166154         break;
167155
168      case 2: /* disc == _fake_ analog */
156      case 4: /* disc == _fake_ analog */
169157
170158         x = m_discx[hand]->read();
171159         y = m_discy[hand]->read();
r252999r253000
429417static INPUT_PORTS_START( intv_ecs_pads )
430418   // First ECS Hand Controller
431419   PORT_START("KEYPAD.0")
432   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
433   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
434   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
435   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
436   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
437   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
438   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
439   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
440   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
441   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
442   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
443   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3 Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
444   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Upper") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
445   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Lower-Left") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
446   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Lower-Right") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
420   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
421   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
422   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
423   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
424   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
425   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
426   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
427   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
428   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
429   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
430   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
431   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P3/Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
432   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3/Upper") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
433   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3/Lower-Left") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
434   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3/Lower-Right") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
447435   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
448436
449437   PORT_START("DISC.0")
450   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P3 Up") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
451   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
452   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
453   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Right-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
454   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P3 Right") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
455   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Right-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
456   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
457   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
458   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P3 Down") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
459   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
460   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
461   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Left-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
462   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P3 Left") PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,NOTEQUALS,0x20)
463   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Left-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
464   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
465   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3 Up-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x10)
438   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P3/Up") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
439   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
440   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
441   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Up-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
442   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P3/Right") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
443   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Right-Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
444   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
445   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Right") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
446   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P3/Down") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
447   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
448   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
449   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Down-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
450   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P3/Left") PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
451   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Left-Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
452   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
453   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P3/Up-Up-Left") PORT_CONDITION("OPTIONS",0x04,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
466454
467455   PORT_START("DISCX.0")
468   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P3 X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x20)
456   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P3/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x04) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
469457
470458   PORT_START("DISCY.0")
471   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P3 Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0x30,EQUALS,0x20)
459   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P3/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_PLAYER(3) PORT_CONDITION("OPTIONS",0x04,EQUALS,0x04) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
472460
473461   // Second ECS Hand Controller
474462   PORT_START("KEYPAD.1")
475   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
476   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
477   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
478   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
479   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
480   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
481   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
482   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
483   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
484   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
485   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
486   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4 Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
487   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Upper") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
488   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Lower-Left") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
489   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Lower-Right") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
463   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/1") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
464   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/2") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
465   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/3") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
466   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/4") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
467   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/5") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
468   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/6") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
469   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/7") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
470   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/8") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
471   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/9") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
472   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Clear") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
473   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/0") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
474   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P4/Enter") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
475   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4/Upper") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
476   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4/Lower-Left") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
477   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4/Lower-Right") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
490478   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_UNUSED )
491479
492480   PORT_START("DISC.1")
493   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P4 Up") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
494   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
495   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
496   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Right-Up-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
497   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P4 Right") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
498   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Right-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
499   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
500   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Down-Right") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
501   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P4 Down") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
502   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
503   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
504   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Left-Down-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
505   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P4 Left") PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,NOTEQUALS,0x80)
506   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Left-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
507   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
508   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4 Up-Up-Left") PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x40)
481   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P4/Up") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
482   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
483   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
484   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Up-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
485   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P4/Right") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
486   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Right-Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
487   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
488   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Right") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
489   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P4/Down") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
490   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
491   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
492   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Down-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
493   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("P4/Left") PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
494   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Left-Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
495   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
496   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P4/Up-Up-Left") PORT_CONDITION("OPTIONS",0x08,EQUALS,0x00) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
509497
510498   PORT_START("DISCX.1")
511   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P4 X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x80)
499   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_X ) PORT_NAME("P4/X") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_D) PORT_CODE_INC(KEYCODE_G) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x08) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
512500
513501   PORT_START("DISCY.1")
514   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P4 Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(4) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00) PORT_CONDITION("OPTIONS",0xC0,EQUALS,0x80)
502   PORT_BIT( 0xff, 0x50, IPT_AD_STICK_Y ) PORT_NAME("P4/Y") PORT_MINMAX(0x00,0x9f) PORT_SENSITIVITY(100) PORT_KEYDELTA(0x50) PORT_CODE_DEC(KEYCODE_R) PORT_CODE_INC(KEYCODE_F) PORT_PLAYER(4) PORT_CONDITION("OPTIONS",0x08,EQUALS,0x08) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
515503INPUT_PORTS_END
516504
517505static INPUT_PORTS_START( intv_ecs )
r252999r253000
520508   PORT_INCLUDE( intv_ecs_kbd )
521509
522510   PORT_START("OPTIONS")
523   PORT_CONFNAME( 0x30, 0x00, "ECS P3 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
524   PORT_CONFSETTING(    0x00, "Digital 8-way" )
525   PORT_CONFSETTING(    0x10, "Digital 16-way" )
526   PORT_CONFSETTING(    0x20, "Analog" )
527   PORT_CONFNAME( 0xC0, 0x00, "ECS P4 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
528   PORT_CONFSETTING(    0x00, "Digital 8-way" )
529   PORT_CONFSETTING(    0x40, "Digital 16-way" )
530   PORT_CONFSETTING(    0x80, "Analog" )
511   PORT_CONFNAME( 0x04, 0x00, "ECS_P3 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
512   PORT_CONFSETTING(    0x00, "Digital" )
513   PORT_CONFSETTING(    0x04, "Analog" )
514   PORT_CONFNAME( 0x08, 0x00, "ECS_P4 Disc" ) PORT_CONDITION("CNTRLSEL",0x0f,EQUALS,0x00)
515   PORT_CONFSETTING(    0x00, "Digital" )
516   PORT_CONFSETTING(    0x08, "Analog" )
531517
532518   PORT_START("CNTRLSEL")
533519   PORT_CONFNAME( 0x0F, 0x02, "ECS Controller")
trunk/src/devices/cpu/i86/i86.cpp
r252999r253000
144144         m_seg_prefix = false;
145145
146146            /* Dispatch IRQ */
147         if ( m_pending_irq && (m_no_interrupt == 0) )
147         if ( m_pending_irq && m_no_interrupt == 0 )
148148         {
149149            if ( m_pending_irq & NMI_IRQ )
150150            {
r252999r253000
159159            }
160160         }
161161
162         /* Trap should allow one instruction to be executed.
163            CPUID.ASM (by Bob Smith, 1985) suggests that in situations where m_no_interrupt is 1,
164            (directly after POP SS / MOV_SREG), single step IRQs don't fire.
165         */
166         if (m_fire_trap )
162         /* No interrupt allowed between last instruction and this one */
163         if ( m_no_interrupt )
167164         {
168            if ( (m_fire_trap >= 2) && (m_no_interrupt == 0) )
165            m_no_interrupt--;
166         }
167
168         /* trap should allow one instruction to be executed */
169         if ( m_fire_trap )
170         {
171            if ( m_fire_trap >= 2 )
169172            {
170               m_fire_trap = 0; // reset trap flag upon entry
171173               interrupt(1);
174               m_fire_trap = 0;
172175            }
173176            else
174177            {
175178               m_fire_trap++;
176179            }
177180         }
178
179         /* No interrupt allowed between last instruction and this one */
180         if ( m_no_interrupt )
181         {
182            m_no_interrupt--;
183         }
184
185181      }
186182
187183      if (!m_seg_prefix)
r252999r253000
14081404         m_src = GetRMWord();
14091405         m_sregs[(m_modrm & 0x18) >> 3] = m_src; // confirmed on hw: modrm bit 5 ignored
14101406         CLKM(MOV_SR,MOV_SM);
1411         m_no_interrupt = 1; // Disable IRQ after load segment register.
14121407         break;
14131408
14141409      case 0x8f: // i_popw
trunk/src/emu/debug/dvdisasm.cpp
r252999r253000
100100   for (device_disasm_interface *dasm = iter.first(); dasm != nullptr; dasm = iter.next())
101101   {
102102      strprintf(name,"%s '%s'", dasm->device().name(), dasm->device().tag());
103      if (dasm->device().memory().space_config(AS_PROGRAM)!=nullptr)
104         m_source_list.append(*global_alloc(debug_view_disasm_source(name.c_str(), dasm->device())));
103      m_source_list.append(*global_alloc(debug_view_disasm_source(name.c_str(), dasm->device())));
105104   }
106105
107106   // reset the source to a known good entry
trunk/src/mame/arcade.lst
r252999r253000
88378837skysmash        // (c) 1990 Nihon System Inc.
88388838legionna        // (c) 1992 Tad (World)
88398839legionnau       // (c) 1992 Tad + Fabtek license (US)
8840legionnaj      // (c) 1992 Tad (Japan)
88418840heatbrl         // (c) 1992 Tad (World version 3)
88428841heatbrl2        // (c) 1992 Tad (World version 2)
88438842heatbrlo        // (c) 1992 Tad (World)
trunk/src/mame/audio/cclimber.cpp
r252999r253000
5252   m_sample_freq(0),
5353   m_sample_volume(0),
5454   m_samples(*this, "samples"),
55   m_samples_region(*this, "^samples")
55   m_samples_region(*this, "samples")
5656{
5757}
5858
trunk/src/mame/drivers/didact.cpp
r252999r253000
105105 *  - Expansion bus
106106 *  - Expansion overlay
107107 *
108 *  - The md6802 has a strange delay in keyboard input that needs to be investigated
109 *
110108 ****************************************************************************/
111109
112110#include "emu.h"
r252999r253000
593591}
594592
595593static MACHINE_CONFIG_START( e100, e100_state )
596   MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz/4)
594   MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz)
597595   MCFG_CPU_PROGRAM_MAP(e100_map)
598596
599597   /* devices */
r252999r253000
602600MACHINE_CONFIG_END
603601
604602static MACHINE_CONFIG_START( md6802, md6802_state )
605   MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz/4)
603   MCFG_CPU_ADD("maincpu", M6802, XTAL_4MHz)
606604   MCFG_CPU_PROGRAM_MAP(md6802_map)
607605   MCFG_DEFAULT_LAYOUT(layout_md6802)
608606
trunk/src/mame/drivers/jclub2.cpp
r252999r253000
500500   AM_RANGE(0x600000, 0x67ffff) AM_DEVREADWRITE16( "st0020_spr", st0020_device, st0020_sprram_r, st0020_sprram_w, 0xffffffff );
501501   AM_RANGE(0x680000, 0x69ffff) AM_RAM AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
502502   AM_RANGE(0x6a0000, 0x6bffff) AM_RAM
503   AM_RANGE(0x6C0000, 0x6C00ff) AM_DEVREADWRITE16( "st0020_spr", st0020_device, st0020_blitram_r, st0020_blitram_w, 0xffffffff );
503   //AM_RANGE(0x6C0000, 0x6C00ff) AM_DEVREADWRITE16( "st0020_spr", st0020_device, st0020_blitram_r, st0020_blitram_w, 0xffffffff );
504504   AM_RANGE(0x700000, 0x7fffff) AM_DEVREADWRITE16( "st0020_spr", st0020_device, st0020_gfxram_r, st0020_gfxram_w, 0xffffffff );
505505
506506ADDRESS_MAP_END
trunk/src/mame/drivers/legionna.cpp
r252999r253000
14881488
14891489***************************************************************************/
14901490
1491// all 3 Legionnaire sets differ only by the region byte at 0x1ef in rom 4 (Japan 0x00, US 0x01, World 0x02)
14921491ROM_START( legionna )
14931492   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
14941493   ROM_LOAD32_BYTE( "1.u025",  0x00000, 0x20000, CRC(9e2d3ec8) SHA1(8af9ca349389cbbd2b541aafa09de57f87f6fd72) )
r252999r253000
15371536   ROM_LOAD( "leg007.u091",   0x000000, 0x000200, NO_DUMP ) /* N82S147N type BPROM */
15381537ROM_END
15391538
1540ROM_START( legionnaj )
1541   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
1542   ROM_LOAD32_BYTE( "1.u025",  0x00000, 0x20000, CRC(9e2d3ec8) SHA1(8af9ca349389cbbd2b541aafa09de57f87f6fd72) )
1543   ROM_LOAD32_BYTE( "2.u024",  0x00001, 0x20000, CRC(35c8a28f) SHA1(31a1f2f9e04dfcab4b3357d6d27c24b434a8c14b) )
1544   ROM_LOAD32_BYTE( "3.u026",  0x00002, 0x20000, CRC(553fc7c0) SHA1(b12a2eea6b2c9bd76c0c74ddf2765d58510f586a) )
1545   ROM_LOAD32_BYTE( "4.u023",  0x00003, 0x20000, CRC(4c385dc7) SHA1(75ec869a5553228369faa8f8487d92ac5df7e563) ) // sldh
1546
1547   ROM_REGION( 0x20000, "audiocpu", 0 )    /* Z80 code, banked data */
1548   ROM_LOAD( "6.u1110",     0x000000, 0x08000, CRC(fe7b8d06) SHA1(1e5b52ea4b4042940e2ee2db75c7c0f24973422a) )
1549   ROM_CONTINUE(            0x010000, 0x08000 )    /* banked stuff */
1550   ROM_COPY( "audiocpu", 0x000000, 0x018000, 0x08000 )
1551
1552   ROM_REGION( 0x020000, "user1", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
1553   ROM_LOAD16_BYTE( "7.u077", 0x000000, 0x10000, CRC(88e26809) SHA1(40ee55d3b5329b6f657e0621d93c4caf6a035fdf) )
1554   ROM_LOAD16_BYTE( "8.u072", 0x000001, 0x10000, CRC(06e35407) SHA1(affeeb97b7f3cfa9b65a584ebe25c16a5b2c9a89) )
1555
1556   ROM_REGION( 0x010000, "char", 0 )  /* FG Tiles */
1557   ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
1558
1559   ROM_REGION( 0x010000, "gfx5", 0 )  /* BK3 */
1560   ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
1561
1562   ROM_REGION( 0x200000, "sprite", 0 )
1563   ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) )   /* sprites */
1564   ROM_LOAD( "legionnire_obj2.u0814", 0x100000, 0x100000, CRC(351d3917) SHA1(014562ac55c09227c08275df3129df19d81af164) )
1565
1566   ROM_REGION( 0x100000, "user2", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
1567   ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) )    /* 3 sets of tiles ('MBK','LBK','BK3') */
1568
1569   ROM_REGION( 0x80000, "gfx3", 0 )  /* MBK */
1570   ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
1571
1572   ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
1573   /* Not Used */
1574
1575   ROM_REGION( 0x80000, "gfx6", 0 )    /* LBK */
1576   ROM_COPY( "user2", 0x080000, 0x000000, 0x78000 )
1577
1578   ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
1579   ROM_LOAD( "5.u106", 0x00000, 0x20000, CRC(21d09bde) SHA1(8dce5011e083706ac7b57c5aee4b79d30fa8d4cb) )
1580
1581   ROM_REGION( 0x080000, "copx", 0 ) /* SEI300 data rom */
1582   ROM_LOAD( "copx-d1.u0330",  0x000000, 0x080000, CRC(029bc402) SHA1(0f64e4c32d95abfa3920b39ed3cf0cc6eb50191b) ) /* not dumped from this PCB assumed to be the same */
1583
1584   ROM_REGION( 0x200, "proms", 0 ) /* Priority? */
1585   ROM_LOAD( "leg007.u091",   0x000000, 0x000200, NO_DUMP ) /* N82S147N type BPROM */
1586ROM_END
1587
15881539ROM_START( legionnau )
15891540   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
15901541   ROM_LOAD32_BYTE( "1.u025", 0x00000, 0x20000, CRC(9e2d3ec8) SHA1(8af9ca349389cbbd2b541aafa09de57f87f6fd72) )
r252999r253000
27352686
27362687
27372688
2738GAME( 1992, legionna, 0,        legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation",                  "Legionnaire (World)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
2689GAME( 1992, legionna, 0,        legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation", "Legionnaire (World)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
27392690GAME( 1992, legionnau,legionna, legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation (Fabtek license)", "Legionnaire (US)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
2740GAME( 1992, legionnaj,legionna, legionna, legionna, legionna_state, legiongfx, ROT0, "TAD Corporation",                  "Legionnaire (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
27412691
27422692GAME( 1992, heatbrl,  0,        heatbrl,  heatbrl, driver_device,  0,         ROT0, "TAD Corporation", "Heated Barrel (World version 3)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
27432693GAME( 1992, heatbrl2, heatbrl,  heatbrl,  heatbrl, driver_device,  0,         ROT0, "TAD Corporation", "Heated Barrel (World version 2)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
trunk/src/mame/drivers/marywu.cpp
r252999r253000
102102WRITE8_MEMBER( marywu_state::ay1_port_a_w )
103103{
104104    for (uint8_t i=0; i<8; i++){
105        output().set_led_value(i, (data & (1 << i)) ? 1 : 0);
105        output_set_led_value(i, (data & (1 << i)) ? 1 : 0);
106106    }
107107}
108108
109109WRITE8_MEMBER( marywu_state::ay1_port_b_w )
110110{
111111    for (uint8_t i=0; i<8; i++){
112        output().set_led_value(i+8, (data & (1 << i)) ? 1 : 0);
112        output_set_led_value(i+8, (data & (1 << i)) ? 1 : 0);
113113    }
114114}
115115
116116WRITE8_MEMBER( marywu_state::ay2_port_a_w )
117117{
118118    for (uint8_t i=0; i<8; i++){
119        output().set_led_value(i+16, (data & (1 << i)) ? 1 : 0);
119        output_set_led_value(i+16, (data & (1 << i)) ? 1 : 0);
120120    }
121121}
122122
r252999r253000
124124{
125125    for (uint8_t i=0; i<6; i++){
126126        /* we only have 30 LEDs. The last 2 bits in this port are unused.  */
127        output().set_led_value(i+24, (data & (1 << i)) ? 1 : 0);
127        output_set_led_value(i+24, (data & (1 << i)) ? 1 : 0);
128128    }
129129}
130130
r252999r253000
160160{
161161    static const UINT8 patterns[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0, 0, 0, 0, 0, 0 }; // HEF4511BP (7 seg display driver)
162162
163    output().set_digit_value(2 * m_selected_7seg_module + 0, patterns[data & 0x0F]);
164    output().set_digit_value(2 * m_selected_7seg_module + 1, patterns[(data >> 4) & 0x0F]);
163    output_set_digit_value(2 * m_selected_7seg_module + 0, patterns[data & 0x0F]);
164    output_set_digit_value(2 * m_selected_7seg_module + 1, patterns[(data >> 4) & 0x0F]);
165165}
166166
167167static ADDRESS_MAP_START( program_map, AS_PROGRAM, 8, marywu_state )
trunk/src/mame/drivers/ssv.cpp
r252999r253000
46754675   ROM_LOAD( "vg004-10.u45", 0x200000, 0x200000, CRC(b3c6b1cb) SHA1(c601213e35d8dfd1244921da5c093f82145706d2) )
46764676   ROM_LOAD( "vg004-11.u48", 0x400000, 0x200000, CRC(1491def1) SHA1(344043302c81b4118cac4f692375b8af7ea68570) )
46774677
4678   ROM_REGION( 0x1000000, "st0020_spr", /*0*/0 )   // Zooming Sprites, read by a blitter
4678   ROM_REGION( 0x1000000, "st0020", /*0*/0 )   // Zooming Sprites, read by a blitter
46794679   ROM_LOAD( "vg004-01.u33", 0x0000000, 0x200000, CRC(aa9a81c2) SHA1(a7d005f9be199e317aa4c6aed8a2ab322fe82119) )
46804680   ROM_LOAD( "vg004-02.u34", 0x0200000, 0x200000, CRC(fa40ecb4) SHA1(0513f3b6879dc7d207646d949d6ddb7251f77bcc) )
46814681   ROM_LOAD( "vg004-03.u35", 0x0400000, 0x200000, CRC(90004023) SHA1(041edb77b34e6677ac5b85ce542d87a9bb1baf31) )
trunk/src/mame/drivers/st_mp200.cpp
r252999r253000
7373   bool m_u11_cb2;
7474   bool m_timer_x;
7575   bool m_u11_timer;
76   bool m_su; // speech unit fitted yes/no
7677   bool m_7d; // 7-digit display yes/no
7778   UINT8 m_digit;
7879   UINT8 m_counter;
r252999r253000
320321
321322WRITE_LINE_MEMBER( st_mp200_state::u10_cb2_w )
322323{
323   if (m_s14001a)
324   if (m_su)
324325   {
325326      if (m_s14001a->busy_r())
326327         m_pia_u11->cb1_w(0);
r252999r253000
333334{
334335   output().set_value("led0", !state);
335336
336   if (m_s14001a && state)
337   if ((m_su) & (state))
337338   {
338339      if BIT(m_u10a, 7)
339340      {
r252999r253000
551552DRIVER_INIT_MEMBER( st_mp200_state, st_mp200 )
552553{
553554   m_7d = 1;
555   m_su = 0;
554556}
555557
556558DRIVER_INIT_MEMBER( st_mp200_state, st_mp201 )
557559{
558560   m_7d = 1;
561   m_su = 1;
559562}
560563
561564DRIVER_INIT_MEMBER( st_mp200_state, st_mp202 )
562565{
563566   m_7d = 0;
567   m_su = 0;
564568}
565569
566570// zero-cross detection
trunk/src/mame/drivers/viper.cpp
r252999r253000
22282228ROM_START(gticlub2ea) //*
22292229   VIPER_BIOS
22302230
2231   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
2232
22332231   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)     /* M48T58 Timekeeper NVRAM */
22342232   ROM_LOAD("941eaa_nvram.u39", 0x00000, 0x2000, CRC(5ee7004d) SHA1(92e0ce01049308f459985d466fbfcfac82f34a47))
22352233
r252999r253000
24932491ROM_START(wcombatk) //*
24942492   VIPER_BIOS
24952493
2496   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
2497
24982494   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)     /* M48T58 Timekeeper NVRAM */
24992495   ROM_LOAD("wcombatk_nvram.u39", 0x00000, 0x2000, CRC(ebd4d645) SHA1(2fa7e2c6b113214f3eb1900c8ceef4d5fcf0bb76))
25002496
r252999r253000
25052501ROM_START(wcombatu) //*
25062502   VIPER_BIOS
25072503
2508   ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00)       /* DS2430 */
2509
25102504   ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00)     /* M48T58 Timekeeper NVRAM */
25112505   ROM_LOAD("Warzaid u39 c22d02", 0x00000, 0x2000, CRC(71744990) SHA1(19ed07572f183e7b3a712704ebddf7a848c48a78) )
25122506
trunk/src/mame/machine/kc.cpp
r252999r253000
332332{
333333   address_space &space = m_maincpu->space( AS_PROGRAM );
334334
335   if ((m_pio_data[0] & (1<<7)) && memregion("basic") != nullptr)
335   if ((m_pio_data[0] & (1<<7)) && memregion("basic")->base() != nullptr)
336336   {
337337      /* BASIC takes next priority */
338338         LOG(("BASIC rom 0x0c000\n"));
trunk/src/mame/machine/midwayic.cpp
r252999r253000
645645   m_cage = machine().device<atari_cage_device>("cage");
646646   m_has_cage = (m_cage != nullptr);
647647
648   if (m_has_dcs)
649   {
650      m_dcs_cpu = m_dcs->subdevice("dcs2");
651      if (m_dcs_cpu == nullptr)
652         m_dcs_cpu = m_dcs->subdevice("dsio");
653      if (m_dcs_cpu == nullptr)
654         m_dcs_cpu = m_dcs->subdevice("denver");
655   }
656
648   m_dcs_cpu = m_dcs->subdevice("dcs2");
649   if (m_dcs_cpu == nullptr)
650      m_dcs_cpu = m_dcs->subdevice("dsio");
651   if (m_dcs_cpu == nullptr)
652      m_dcs_cpu = m_dcs->subdevice("denver");
657653   m_shuffle_map = &shuffle_maps[m_shuffle_type][0];
658654   // resolve callbacks
659655   m_irq_callback.resolve_safe();
r252999r253000
666662
667663   m_reg[IOASIC_SOUNDCTL] = 0x0001;
668664
669
670665   /* configure the fifo */
671666   if (m_has_dcs)
672667   {
r252999r253000
676671      m_dcs->set_io_callbacks(write_line_delegate(FUNC(midway_ioasic_device::ioasic_output_full),this),
677672         write_line_delegate(FUNC(midway_ioasic_device::ioasic_input_empty),this));
678673   }
679
680674   fifo_reset_w(1);
681675}
682676
trunk/src/mame/machine/naomi.cpp
r252999r253000
8787void naomi_state::create_pic_from_retdat()
8888{
8989   {
90      memory_region * rgn_hexregion = memregion("pichex");
91      memory_region * rgn_retregion = memregion("picreturn");
92      memory_region * rgn_newregion = memregion("pic");
90      UINT8* hexregion = memregion("pichex")->base();
91      UINT8* retregion = memregion("picreturn")->base();
92      UINT8* newregion = memregion("pic")->base();
9393      int outcount = 0;
9494
95      if (rgn_hexregion && rgn_newregion)
95      if (hexregion && retregion && newregion)
9696      {
97         UINT8* hexregion = rgn_hexregion->base();
98         UINT8* newregion = rgn_newregion->base();
99
100
10197         int hexoffs = 0;
10298         int line;
10399
r252999r253000
135131
136132         }
137133
138         if (rgn_retregion && rgn_newregion)
139134         {
140            UINT8* retregion = rgn_retregion->base();
141            UINT8* newregion = rgn_newregion->base();
142
143
144135            int i;
145136            printf("string 1 (key1)\n");
146137            for (i=0;i<7;i++)
r252999r253000
175166            }
176167         }
177168
178         if (rgn_newregion)
179         {
180            UINT8* newregion = rgn_newregion->base();
181169
170         {
182171            FILE *fp;
183172            char filename[256];
184173            sprintf(filename,"picbin_%s", machine().system().name);
trunk/src/mame/video/m107.cpp
r252999r253000
160160void m107_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
161161{
162162   UINT16 *spriteram = m_buffered_spriteram.get();
163   int offs;
164   UINT8 *rom = m_user1_ptr;
165   
166   for (offs = 0;offs < 0x800;offs += 4)
163
164   for (int offs = 0; offs < 0x800; offs += 4)
167165   {
168      int x,y,sprite,colour,fx,fy,y_multi,i,s_ptr,pri_mask;
166      int pri_mask = (!(spriteram[offs + 2] & 0x80)) ? 2 : 0;
169167
170      pri_mask = (!(spriteram[offs+2]&0x80)) ? 2 : 0;
168      int y = spriteram[offs + 0] & 0x1ff;
169      int x = spriteram[offs + 3] & 0x1ff;
171170
172      y=spriteram[offs+0];
173      x=spriteram[offs+3];
174      x&=0x1ff;
175      y&=0x1ff;
176
177171      if (x==0 || y==0) continue; /* offscreen */
178172
179      sprite=spriteram[offs+1]&0x7fff;
173      int sprite_code = spriteram[offs + 1] & 0x7fff;
180174
181175      x = x - 16;
182176      y = 384 - 16 - y;
183177
184      colour=spriteram[offs+2]&0x7f;
185      fx=(spriteram[offs+2]>>8)&0x1;
186      fy=(spriteram[offs+2]>>8)&0x2;
187      y_multi=(spriteram[offs+0]>>11)&0x3;
178      int colour = spriteram[offs + 2] & 0x7f;
179      bool fx = (spriteram[offs + 2] >> 8) & 0x1;
180      bool fy = (spriteram[offs + 2] >> 8) & 0x2;
181      int y_multi=(spriteram[offs + 0] >> 11) & 0x3;
188182
189183      if (m_spritesystem == 0)
190184      {
191         y_multi=1 << y_multi; /* 1, 2, 4 or 8 */
185         y_multi = 1 << y_multi; /* 1, 2, 4 or 8 */
192186
193         s_ptr = 0;
194         if (!fy) s_ptr+=y_multi-1;
187         int s_ptr = fy ? 0 : y_multi - 1;
195188
196         for (i=0; i<y_multi; i++)
189         for (int i = 0; i < y_multi; i++)
197190         {
198            m_gfxdecode->gfx(1)->prio_transpen(bitmap,cliprect,
199                  sprite + s_ptr,
200                  colour,
201                  fx,fy,
202                  x,y-i*16,
203                  screen.priority(),pri_mask,0);
191            m_gfxdecode->gfx(1)->prio_transpen(bitmap, cliprect, sprite_code + s_ptr, colour, fx, fy, x, y - i * 16, screen.priority(), pri_mask, 0);
192            m_gfxdecode->gfx(1)->prio_transpen(bitmap, cliprect, sprite_code + s_ptr, colour, fx, fy, x, (y - i * 16) - 0x200, screen.priority(), pri_mask, 0); /* wrap-around y */
204193
205            /* wrap-around y */
206            m_gfxdecode->gfx(1)->prio_transpen(bitmap,cliprect,
207                  sprite + s_ptr,
208                  colour,
209                  fx,fy,
210                  x,(y-i*16) - 0x200,
211                  screen.priority(),pri_mask,0);
212
213            if (fy) s_ptr++; else s_ptr--;
194            if (fy)
195               s_ptr++;
196            else
197               s_ptr--;
214198         }
215199      }
216200      else
217201      {
218         int rom_offs = sprite*8;
202         int rom_offs = sprite_code * 8;
219203
220         if (!rom)
221            return;
222
223         if (rom[rom_offs+1] || rom[rom_offs+3] || rom[rom_offs+5] || rom[rom_offs+7])
204         if (m_user1_ptr[rom_offs + 1] || m_user1_ptr[rom_offs + 3] || m_user1_ptr[rom_offs + 5] || m_user1_ptr[rom_offs + 7])
224205         {
225206            while (rom_offs < 0x40000)  /* safety check */
226207            {
208               UINT8 *sprite = m_user1_ptr + rom_offs;
227209               /*
228210               [1]
229211               x--- ---- end of block marker
r252999r253000
244226               ---- ---x X offs hi byte
245227               */
246228
247               int xdisp = rom[rom_offs+6]+256*rom[rom_offs+7];
248               int ydisp = rom[rom_offs+2]+256*rom[rom_offs+3];
249               int ffx=fx^(rom[rom_offs+1]&1);
250               int ffy=fy^(rom[rom_offs+1]&2);
251               sprite=rom[rom_offs+4]+256*rom[rom_offs+5];
252               y_multi=1<<((rom[rom_offs+3]>>1)&0x3);
253               if (fx) xdisp = -xdisp-16;
254               if (fy) ydisp = -ydisp - (16*y_multi-1);
255               if (!ffy) sprite+=y_multi-1;
256               for (i=0; i<y_multi; i++)
229               int xdisp = (sprite[7] << 8) | sprite[6];
230               int ydisp = (sprite[3] << 8) | sprite[2];
231               int ffx = fx ^ (sprite[1] & 1);
232               int ffy = fy ^ (sprite[1] & 2);
233               sprite_code = (sprite[5] << 8) | sprite[4];
234               y_multi = 1 << ((sprite[3] >> 1) & 0x3);
235               if (fx)
236                  xdisp = -xdisp - 16;
237               if (fy)
238                  ydisp = -ydisp - (16 * y_multi - 1);
239               if (!ffy)
240                  sprite += y_multi - 1;
241
242               for (int i = 0; i < y_multi; i++)
257243               {
258                  m_gfxdecode->gfx(1)->prio_transpen(bitmap,cliprect,
259                        sprite+(ffy?i:-i),
260                        colour,
261                        ffx,ffy,
262                        (x+xdisp)&0x1ff,(y-ydisp-16*i)&0x1ff,
263                        screen.priority(),pri_mask,0);
244                  m_gfxdecode->gfx(1)->prio_transpen(bitmap, cliprect, sprite_code + (ffy ? i : -i), colour, ffx, ffy, (x + xdisp) & 0x1ff, (y - ydisp - 16 * i) & 0x1ff, screen.priority(), pri_mask, 0);
264245
265246                  /* wrap-around y */
266                  m_gfxdecode->gfx(1)->prio_transpen(bitmap,cliprect,
267                        sprite+(ffy?i:-i),
268                        colour,
269                        ffx,ffy,
270                        (x+xdisp)&0x1ff,((y-ydisp-16*i)&0x1ff)-0x200,
271                        screen.priority(),pri_mask,0);
247                  m_gfxdecode->gfx(1)->prio_transpen(bitmap, cliprect, sprite_code + (ffy ? i : -i), colour, ffx, ffy, (x + xdisp) & 0x1ff, ((y - ydisp - 16 * i) & 0x1ff) - 0x200, screen.priority(), pri_mask, 0);
272248               }
273249
274               if (rom[rom_offs+1]&0x80) break;    /* end of block */
250               if (sprite[1] & 0x80)
251                  break;    /* end of block */
275252
276253               rom_offs += 8;
277254            }
trunk/src/mame/video/st0020.cpp
r252999r253000
1919   : device_t(mconfig, ST0020_SPRITES, "Seta ST0020 Sprites", tag, owner, clock, "st0020", __FILE__)
2020   , m_gfxdecode(*this)
2121   , m_palette(*this)
22   , m_rom_ptr(*this, ":st0020")
2223{
2324   m_is_st0032 = 0;
2425   m_is_jclub2 = 0;
r252999r253000
7374
7475void st0020_device::device_start()
7576{
76   memory_region* rgn = memregion(tag());
77
78   if (rgn)
79   {
80      m_rom_ptr = rgn->base();
81      m_rom_size = rgn->bytes();
82   }
83   else
84   {
85      m_rom_ptr = nullptr;
86      m_rom_size = 0;
87   }
88
8977   m_st0020_gfxram = make_unique_clear<UINT16[]>(4 * 0x100000 / 2);
9078   m_st0020_spriteram = make_unique_clear<UINT16[]>(0x80000 / 2);
9179   m_st0020_blitram = make_unique_clear<UINT16[]>(0x100 / 2);
r252999r253000
202190            return;
203191         }
204192
205         size_t size = m_rom_size;
193         size_t size =   m_rom_ptr.bytes();
206194
207195         if ( (src+len <= size) && (dst+len <= 4 * 0x100000) )
208196         {
trunk/src/mame/video/st0020.h
r252999r253000
4747   DECLARE_WRITE16_MEMBER(st0020_blit_w);
4848   required_device<gfxdecode_device> m_gfxdecode;
4949   required_device<palette_device> m_palette;
50   UINT8* m_rom_ptr;
51   size_t m_rom_size;
50   optional_region_ptr<UINT8> m_rom_ptr;
5251};
5352
5453#define ST0020_ST0032_BYTESWAP_DATA \


Previous 199869 Revisions Next


© 1997-2024 The MAME Team