summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2008-04-14 11:12:42 +0000
committer Nathan Woods <npwoods@mess.org>2008-04-14 11:12:42 +0000
commitf9766f2052d2808e9eeb2076aa00c92ce8b2c4d7 (patch)
treeb23ea481a82e2f96b9c6bac5bbbe2f0f897998b8
parent4df26527bce3c2d181f239ef1b61a50bb5e140a5 (diff)
Changes from MESS:
src/emu/cpu/m68000/m68kmame.c: src/emu/cpu/minx/minx.c: - Fixed compilation errors on CPU cores not enabled in MAME src/emu/inptport.c: src/emu/inptport.h: - Readded input_port_set_digital_value() (which is needed for natural keyboard inpout in MESS) - Added a running_machine parameter to inputx_update()
-rw-r--r--src/emu/cpu/m68000/m68kmame.c2
-rw-r--r--src/emu/cpu/minx/minx.c4
-rw-r--r--src/emu/inptport.c18
-rw-r--r--src/emu/inptport.h2
4 files changed, 22 insertions, 4 deletions
diff --git a/src/emu/cpu/m68000/m68kmame.c b/src/emu/cpu/m68000/m68kmame.c
index 32c7a37e58b..43fd57adb6b 100644
--- a/src/emu/cpu/m68000/m68kmame.c
+++ b/src/emu/cpu/m68000/m68kmame.c
@@ -241,7 +241,7 @@ static void m68008_get_context(void *dst)
static void m68008_set_context(void *src)
{
- if (m68k_memory_intf.read8 != program_read_byte_8)
+ if (m68k_memory_intf.read8 != program_read_byte_8be)
m68k_memory_intf = interface_d8;
m68k_set_context(src);
}
diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c
index 7ea7a0b8409..6ea6311b39c 100644
--- a/src/emu/cpu/minx/minx.c
+++ b/src/emu/cpu/minx/minx.c
@@ -90,8 +90,8 @@ typedef struct {
static minx_regs regs;
static int minx_icount;
-#define rd(offset) program_read_byte_8( offset )
-#define wr(offset,data) program_write_byte_8( offset, data )
+#define rd(offset) program_read_byte_8be( offset )
+#define wr(offset,data) program_write_byte_8be( offset, data )
#define minx_PC ( ( regs.PC & 0x8000 ) ? ( regs.V << 15 ) | (regs.PC & 0x7FFF ) : regs.PC )
INLINE UINT16 rd16( UINT32 offset ) {
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index ab8d4d035a4..6d09f42bdf9 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -2904,7 +2904,7 @@ profiler_mark(PROFILER_INPUT);
#ifdef MESS
/* less MESS to MESSy things */
- inputx_update();
+ inputx_update(machine);
#endif
/* handle playback/record */
@@ -3361,6 +3361,22 @@ UINT32 input_port_read_safe(running_machine *machine, const char *tag, UINT32 de
/*************************************
*
+ * Input port writing
+ *
+ *************************************/
+
+void input_port_set_digital_value(running_machine *machine, int port_num, UINT32 value, UINT32 mask)
+{
+ /* used by MESS for natural keyboard input */
+ input_port_info *portinfo = &port_info[port_num];
+ portinfo->digital &= ~mask;
+ portinfo->digital |= value;
+}
+
+
+
+/*************************************
+ *
* Return position of crosshair axis
*
*************************************/
diff --git a/src/emu/inptport.h b/src/emu/inptport.h
index 9b600980229..65f9615e52a 100644
--- a/src/emu/inptport.h
+++ b/src/emu/inptport.h
@@ -937,6 +937,8 @@ int input_ui_pressed_repeat(int code, int speed);
void input_port_update_defaults(void);
+void input_port_set_digital_value(running_machine *machine, int port_num, UINT32 value, UINT32 mask);
+
UINT32 get_crosshair_pos(int port_num, UINT8 player, UINT8 axis);
UINT32 input_port_read_indexed(running_machine *machine, int port);