Thanks, RB! I've got some fixes for the sirius joyport that I'll submit a PR for once I've fixed up my git.

Here's the relevant bits (I think this is correct now:)

Code
READ_LINE_MEMBER(apple2_joyport_device::sw0_r)
{
        u8 port_read = m_an0 ? m_player2->read() : m_player1->read();
        return BIT(port_read, 4);
}

READ_LINE_MEMBER(apple2_joyport_device::sw1_r)
{
        u8 port_read = m_an0 ? m_player2->read() : m_player1->read();
        return m_an1 ? BIT(port_read, 0) : BIT(port_read, 3);
} // 0 is up 3 is left

READ_LINE_MEMBER(apple2_joyport_device::sw2_r)
{
        u8 port_read = m_an0 ? m_player2->read() : m_player1->read();
        return m_an1 ? BIT(port_read, 2) : BIT(port_read, 1);
}  // 2 is  down 1 is right




I did some reading at https://git-scm.com/book/en/v2 and I think I'm finally getting closer to understanding git.

It's hard to fathom, but there's no 2 player games I could find that really use the sirius joyport. I think there's a dearth in general of 2 player games on the apple 2, probably because very few people had more than 1 joystick. (I wonder how hard it would be to patch the karateka 2 player patch to use the joyport?)

The only game that really tested out the 2 player setting is boulderdash where it alternates between joystick 1 and 2.

Vindicators actually uses the second joystick, which is kinda different.

Most use the first joystick, like stellar 7.


There's a Computer Foosball game that uses the 4 paddle mode of the sirius joyport (you can hook up 2x2 paddle controllers and play with 2 teams of each paddle and button controlling one group of foosball flippers). I copied your joystick device and modified it to do the joyport with paddles, I called it joyportpaddle.
You hit Ctrl+R to reset then you can choose 1 / 2 / 4 player with the 1,2,and 4 keys. Once a game has started you can't change the number of players but you can type N or F for Normal/Fast. The 4 player mode says "requires JOYPORT." The ball tends to get stuck so you have to hit Ctrl+B to do another serve.

This is probably the only game that used the 4 paddle mode. (That would be good for a warlords type game).

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

Code
// This  should be m_joy_y
u8 apple2_joyportpaddle_device::pdl3_r()
{
        return m_joy_y[1]->read();
}

READ_LINE_MEMBER(apple2_joyportpaddle_device::sw0_r)
{
        return m_an0 ? BIT(m_buttons->read(), 6) : BIT(m_buttons->read(), 4);

// m_an0  true = bit 6  false = bit4 
// this makes sense for normal two player with a single paddle, 
//    we read bits 4 and 5 on switch 0 and 1
// For 4 paddles, we read bits 6 and 7 on switch 0 and 1 when m_an0 is true
}

READ_LINE_MEMBER(apple2_joyportpaddle_device::sw1_r)
{
        return m_an0 ? BIT(m_buttons->read(), 7) : BIT(m_buttons->read(), 5);
}

READ_LINE_MEMBER(apple2_joyportpaddle_device::sw2_r)
{
return 0;
}

READ_LINE_MEMBER(apple2_joyportpaddle_device::sw3_r)
{
return 0;
}


Last edited by Golden Child; 09/06/19 11:55 PM.