Sam Coupe: fix, additions (#5947)

* fix mode 1/2 colours

* add some sw

* added joysticks

* added f16demo to cassette softlist

* remove evil joycode
This commit is contained in:
Tom 2019-11-29 02:37:49 +00:00 committed by Vas Crabb
parent 3377011887
commit 5ac3afc381
5 changed files with 116 additions and 10 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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

View file

@ -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);

View file

@ -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))