summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Tom <37988779+TwistedTom@users.noreply.github.com>2019-11-29 02:37:49 +0000
committer Vas Crabb <cuavas@users.noreply.github.com>2019-11-29 13:37:49 +1100
commit5ac3afc381cc49bdb2a90658f7621944876c5852 (patch)
tree19839f9f94da040fda252d3bc1a4cfe91c4aa4ba
parent33770118878f0b9e375521e86d47d901ed71665d (diff)
Sam Coupe: fix, additions (#5947)
* fix mode 1/2 colours * add some sw * added joysticks * added f16demo to cassette softlist * remove evil joycode
-rw-r--r--hash/samcoupe_cass.xml16
-rw-r--r--hash/samcoupe_flop.xml80
-rw-r--r--src/mame/drivers/samcoupe.cpp22
-rw-r--r--src/mame/includes/samcoupe.h6
-rw-r--r--src/mame/video/samcoupe.cpp2
5 files changed, 116 insertions, 10 deletions
diff --git a/hash/samcoupe_cass.xml b/hash/samcoupe_cass.xml
index c42eeaa404b..25e50a17d91 100644
--- a/hash/samcoupe_cass.xml
+++ b/hash/samcoupe_cass.xml
@@ -23,8 +23,16 @@
</dataarea>
</part>
</software>
+ <!-- extracted from covertape of Crash magazine issue 92 (the full game was never released) -->
+ <software name="f16demo">
+ <description>F-16 Combat Pilot (Demo)</description>
+ <year>1991</year>
+ <publisher>Digital Integration</publisher>
+ <part name="cass" interface="samcoupe_cass">
+ <!-- only side/section A-2 is for the Sam Coupe, see spectrum_cass.xml for full image -->
+ <dataarea name="cass" size="91381">
+ <rom name="f-16 combat pilot (demo).tzx" size="91381" crc="91e9b7f6" sha1="2849059091d59041f13a36db0e8d5dc44020fa48"/>
+ </dataarea>
+ </part>
+ </software>
</softwarelist>
-
-
-
-
diff --git a/hash/samcoupe_flop.xml b/hash/samcoupe_flop.xml
index f90840a9be2..1a9bfb99393 100644
--- a/hash/samcoupe_flop.xml
+++ b/hash/samcoupe_flop.xml
@@ -3,6 +3,22 @@
<!-- to boot disks type 'BOOT' and press return
alternatively press numpad 9 which seems to do the same thing
+
+ disk image formats:
+ .mgt .dsk .sad
+ confusingly there seems to be two types of .dsk image, one is just the same as .mgt in all but the extension,
+ the other is "extended DSK disk image" (sometimes with .edsk extension) which is often used for Amstrad CPC and Spectrum +3 images.
+ .sad seems to be a more advanced format that allows copy-protected images etc.
+
+ currently only .mgt/.dsk is supported in coupedsk.cpp
+ should be trivial to add "extended DSK disk image" support as it's already in Mame.
+
+ most game images have trainers/pokes.
+ all Sam Coupe games will probably need re-dumping at some point as there seems to be very few clean images available.
+ TOSEC and GoodSamC don't have much, mostly hacked, demos, unlicensed/homebrew etc.
+ www.worldofsam.org is a good source of infomation but most commercial games are not available for download.
+
+ SAMDOS disks include the official MGT ZX Spectrum emulator.
-->
<softwarelist name="samcoupe_flop" description="Sam Coupe Floppy Disks">
@@ -17,8 +33,64 @@
</dataarea>
</part>
</software>
+ <software name="samdos1">
+ <description>Sam Coupe System Disk (SAMDOS v1.1)</description>
+ <year>1990</year>
+ <publisher>Miles Gordon Technology</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="sam coupe system disk (SAMDOS v1.1).dsk" size="819200" crc="2d871850" sha1="6982d32a0a4b45e9bcb7239b2207e62a7de343dd"/>
+ </dataarea>
+ </part>
+ </software>
+ <software name="samdos2">
+ <description>Sam Coupe System Disk (SAMDOS v2.0)</description>
+ <year>1990</year>
+ <publisher>Miles Gordon Technology</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="sam coupe system disk (SAMDOS v2.0).dsk" size="819200" crc="6634f061" sha1="a0b6696ea81356bff052daeb7fc49cc4a9f7ff17"/>
+ </dataarea>
+ </part>
+ </software>
+ <software name="boing">
+ <description>Boing!</description>
+ <year>1992</year>
+ <publisher>Noesis Software</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="boing.dsk" size="819200" crc="c7f81167" sha1="7305db3c9db95980d5e167e4b71aa680edef6055"/>
+ </dataarea>
+ </part>
+ </software>
+ <software name="defenders">
+ <description>Defenders Of The Earth</description>
+ <year>1990</year>
+ <publisher>Enigma Variations</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="defenders of the earth.dsk" size="819200" crc="ba7dc965" sha1="13a7ac6b437433604ad6044238380c322b87fc43"/>
+ </dataarea>
+ </part>
+ </software>
+ <software name="samstrikes">
+ <description>Sam Strikes Out!</description>
+ <year>1990</year>
+ <publisher>Enigma Variations</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="sam strikes out.dsk" size="819200" crc="c11bbd22" sha1="6f6bdd9add07e6ce319fa93c83177d0ab9221829"/>
+ </dataarea>
+ </part>
+ </software>
+ <software name="sphera">
+ <description>Sphera</description>
+ <year>1990</year>
+ <publisher>Enigma Variations</publisher>
+ <part name="flop1" interface="floppy_3_5">
+ <dataarea name="flop" size="819200">
+ <rom name="sphera.dsk" size="819200" crc="6e8cc190" sha1="5502ae252d570129a82aecc8e17b1a4d197ab4ff"/>
+ </dataarea>
+ </part>
+ </software>
</softwarelist>
-
-
-
-
diff --git a/src/mame/drivers/samcoupe.cpp b/src/mame/drivers/samcoupe.cpp
index 45457852d94..a95336bd29a 100644
--- a/src/mame/drivers/samcoupe.cpp
+++ b/src/mame/drivers/samcoupe.cpp
@@ -235,6 +235,10 @@ READ8_MEMBER(samcoupe_state::samcoupe_keyboard_r)
/* bit 7, external memory */
data |= 1 << 7;
+
+ /* joysticks */
+ if (!BIT(offset, 12)) data &= m_joy1->read() | (0xff ^ 0x1f);
+ if (!BIT(offset, 11)) data &= m_joy2->read() | (0xff ^ 0x1f);
return data;
}
@@ -458,6 +462,24 @@ static INPUT_PORTS_START( samcoupe )
PORT_CONFNAME(0x01, 0x00, "Real Time Clock")
PORT_CONFSETTING( 0x00, DEF_STR(None))
PORT_CONFSETTING( 0x01, "SAMBUS")
+
+ /* Sam Coupe has single 9-pin ATARI-compatible connector but supports 2 joysticks via a splitter,
+ this works by using a different ground for each stick (pin 8: stick 1 gnd, pin 9: stick 2 gnd.)
+ Joysticks overlay number keys 6-0 for the stick 1 and 1-5 for stick 2 (same scheme as ZX Spectrum) */
+
+ PORT_START("joy_1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(1)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(1)
+
+ PORT_START("joy_2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY PORT_PLAYER(2)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
INPUT_PORTS_END
diff --git a/src/mame/includes/samcoupe.h b/src/mame/includes/samcoupe.h
index 52eed56b196..d467c7e8eee 100644
--- a/src/mame/includes/samcoupe.h
+++ b/src/mame/includes/samcoupe.h
@@ -74,7 +74,9 @@ public:
m_mouse_buttons(*this, "mouse_buttons"),
m_io_mouse_x(*this, "mouse_x"),
m_io_mouse_y(*this, "mouse_y"),
- m_config(*this, "config")
+ m_config(*this, "config"),
+ m_joy1(*this, "joy_1"),
+ m_joy2(*this, "joy_2")
{
sam_bank_read_ptr[0] = nullptr;
sam_bank_write_ptr[0] = nullptr;
@@ -192,6 +194,8 @@ private:
required_ioport m_io_mouse_x;
required_ioport m_io_mouse_y;
required_ioport m_config;
+ required_ioport m_joy1;
+ required_ioport m_joy2;
void draw_mode4_line(int y, int hpos);
void draw_mode3_line(int y, int hpos);
diff --git a/src/mame/video/samcoupe.cpp b/src/mame/video/samcoupe.cpp
index 57e924ecde1..780f93ed1f1 100644
--- a/src/mame/video/samcoupe.cpp
+++ b/src/mame/video/samcoupe.cpp
@@ -18,7 +18,7 @@
#define BORDER_COLOR(x) ((x & 0x20) >> 2 | (x & 0x07))
/* foreground and background color from attribute byte in mode 1 and 2 */
-#define ATTR_BG(x) ((x >> 3) & 0x07)
+#define ATTR_BG(x) ((x >> 3) & 0x0f)
#define ATTR_FG(x) (((x >> 3) & 0x08) | (x & 0x07))