summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author tim lindner <tlindner@macmess.org>2021-06-01 15:56:22 -0700
committer GitHub <noreply@github.com>2021-06-01 18:56:22 -0400
commit11af4de459bf100251a0d4ec77ded303dfb918db (patch)
tree73063f0171794232c0054d2e65883a4fbd3a1e31
parent7a262b51b69d06c96b165ca23e50b565bfa38054 (diff)
fix style. fix mask. (#8129)
CoCo MAX fixes - address white space comments from @cuavas. - add keyboard inc and dec to mouse movements - fix mask in ff90_read()
-rw-r--r--src/devices/bus/coco/coco_max.cpp10
-rw-r--r--src/mame/machine/6883sam.cpp12
2 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/bus/coco/coco_max.cpp b/src/devices/bus/coco/coco_max.cpp
index 82103e531d9..731a922a4ee 100644
--- a/src/devices/bus/coco/coco_max.cpp
+++ b/src/devices/bus/coco/coco_max.cpp
@@ -11,8 +11,6 @@
#include "emu.h"
#include "coco_max.h"
-#include "machine/ram.h"
-
#define MOUSE_SENSITIVITY 75
#define COCOMAX_X_TAG "cocomax_x"
#define COCOMAX_Y_TAG "cocomax_y"
@@ -27,9 +25,9 @@
INPUT_PORTS_START( cocomax_mouse )
PORT_START(COCOMAX_X_TAG)
- PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X) PORT_NAME("CoCo Max Mouse X") PORT_SENSITIVITY(MOUSE_SENSITIVITY) PORT_MINMAX(0x00,0xff) PORT_PLAYER(1)
+ PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_NAME("CoCo Max Mouse X") PORT_SENSITIVITY(MOUSE_SENSITIVITY) PORT_MINMAX(0x00,0xff) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_4_PAD) PORT_CODE_INC(KEYCODE_6_PAD) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1)
PORT_START(COCOMAX_Y_TAG)
- PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y) PORT_NAME("CoCo Max Mouse Y") PORT_SENSITIVITY(MOUSE_SENSITIVITY) PORT_MINMAX(0x00,0xff) PORT_PLAYER(1)
+ PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_NAME("CoCo Max Mouse Y") PORT_SENSITIVITY(MOUSE_SENSITIVITY) PORT_MINMAX(0x00,0xff) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_8_PAD) PORT_CODE_INC(KEYCODE_2_PAD) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1)
PORT_START(COCOMAX_BUTTONS)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("CoCo Max Left Button") PORT_CODE(KEYCODE_0_PAD) PORT_CODE(MOUSECODE_BUTTON1) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("CoCo Max Right Button") PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(MOUSECODE_BUTTON2) PORT_PLAYER(1)
@@ -113,7 +111,7 @@ void coco_pak_max_device::device_start()
// save state
save_item(NAME(m_a2d_result));
- // install $ff90-$ff93 handler
+ // install $ff90-$ff97 handler
install_read_handler(0xff90, 0xff97, read8sm_delegate(*this, FUNC(coco_pak_max_device::ff90_read)));
}
@@ -138,7 +136,7 @@ u8 coco_pak_max_device::ff90_read(offs_t offset)
{
uint8_t result = m_a2d_result;
- switch (offset & 0x08)
+ switch (offset & 0x07)
{
case 0:
m_a2d_result = m_mouse_y->read();
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index 89ae03b2bc4..7abff7a9160 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -382,7 +382,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
if (xorval & (SAM_STATE_R1|SAM_STATE_R0))
update_cpu_clock();
- if( xorval & (SAM_STATE_F6|SAM_STATE_F5|SAM_STATE_F4|SAM_STATE_F3|SAM_STATE_F2|SAM_STATE_F1|SAM_STATE_F0))
+ if (xorval & (SAM_STATE_F6|SAM_STATE_F5|SAM_STATE_F4|SAM_STATE_F3|SAM_STATE_F2|SAM_STATE_F1|SAM_STATE_F0))
{
/* Video frame buffer address changed */
LOGFBITS("%s: SAM F Address: $%04x\n",
@@ -390,7 +390,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
display_offset() );
}
- if( xorval & (SAM_STATE_V0|SAM_STATE_V1|SAM_STATE_V2))
+ if (xorval & (SAM_STATE_V0|SAM_STATE_V1|SAM_STATE_V2))
{
/* Video frame buffer address changed */
LOGVBITS("%s: SAM V Bits: $%02x\n",
@@ -398,7 +398,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
(m_sam_state & (SAM_STATE_V0|SAM_STATE_V1|SAM_STATE_V2)) );
}
- if( xorval & (SAM_STATE_P1))
+ if (xorval & (SAM_STATE_P1))
{
/* Video frame buffer address changed */
LOGPBITS("%s: SAM P1 Bit: $%02x\n",
@@ -406,7 +406,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
(m_sam_state & (SAM_STATE_P1)) >> 10 );
}
- if( xorval & (SAM_STATE_TY))
+ if (xorval & (SAM_STATE_TY))
{
/* Video frame buffer address changed */
LOGTBITS("%s: SAM TY Bits: $%02x\n",
@@ -414,7 +414,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
(m_sam_state & (SAM_STATE_TY)) >> 15 );
}
- if( xorval & (SAM_STATE_M0|SAM_STATE_M1))
+ if (xorval & (SAM_STATE_M0|SAM_STATE_M1))
{
/* Video frame buffer address changed */
LOGMBITS("%s: SAM M Bits: $%02x\n",
@@ -422,7 +422,7 @@ void sam6883_device::internal_write(offs_t offset, uint8_t data)
(m_sam_state & (SAM_STATE_M0|SAM_STATE_M1)) >> 9 );
}
- if( xorval & (SAM_STATE_R0|SAM_STATE_R1))
+ if (xorval & (SAM_STATE_R0|SAM_STATE_R1))
{
/* Video frame buffer address changed */
LOGRBITS("%s: SAM R Bits: $%02x\n",