Previous Thread
Next Thread
Print Thread
Page 23 of 80 1 2 21 22 23 24 25 79 80
Joined: Mar 2001
Posts: 17,234
Likes: 260
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 260
No, feel free to keep going on about the game, it's pretty much the only really good test we have for the hardware :-)

It makes perfect sense to me that it has to run 1 MHz during active video because they're still using Woz's A2 video timings, I don't know why I didn't think of that earlier myself.

Joined: Feb 2014
Posts: 1,124
Likes: 193
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,124
Likes: 193
So I was playing Miner 2049er II recently and every time I'd start up it would ask me if I wanted the Apple Joystick or Joyport Atari Joystick. It got me to thinking and doing some reading I found an article that explains how the Sirius Joyport worked:

https://en.wikipedia.org/wiki/Sirius_Joyport

https://www.atarimagazines.com/cva/v1n1/joysticks.php

the original article on archive:

https://archive.org/details/Video_Arcade_Games_Vol_1_No_1_1983-09_Creative_Computing_US/page/n101

[Linked Image from i.imgur.com]


so I thought, gee, this looks easy all it does is change the annunciator #1 to on, and then you can read pushbuttons 0, 1 and 2 to get the firebutton, left, right. It sets ann #1 to off, and then you can get the firebutton, up and down.



It's too bad that atari joysticks of this era didn't have two buttons because theoretically there's an ability to have two fire buttons on the PB0 input.


What complicates things is that it does everything backwards from typical Apple conventions. When you press the fire button on an Apple Joystick, it sets PB0 to > 128. When you press the firebutton on the Sirius Joyport Atari Joystick, PB0 is < 128. The same goes for left/right and up/down, low = pressed.

And the biggest complication of all is that the Sirius Gameport is incompatible with the Apple 2e. After hooking it up, the apple2e driver wouldn't boot. It totally freaked me out, but then I figured out that it was holding PB0 high which is also open-apple and that goes into the self-test routine.

So what to do about that? My solution is to not engage PB0 or PB1 high until after a second of machine run time. That seems to work pretty well.

It actually reads it right away, within the first 1/1000 of a second.

from my debugging junk:

C000R READ M_AN1 FALSE pb1 MDJOY_READ VALUE RAW= ff INVERT= ffffff00 RETURN= 80
Machine Time:0.000956
pb0 MDJOY_READ VALUE RAW= ff INVERT= ffffff00 RETURN= 80
Machine Time:0.000962



Okay, so the actual code: It seems to work with Miner II, Miner 2049er, Berzap, Stellar 7. The controls are definitely "tighter" since it's digital and may actually run the game a little bit faster.


One of the things I ran into is that reading/writing c05a/c05b to set/clear the annunciator would get lost, so I added a bunch of printing messages and some extra code that is probably unnecessary. I have no idea what IOUDIS is.

I wanted to be able to switch between the regular joystick and the atari joystick on the fly so I made a configuration option, I didn't think bit 0x80 was being used.


diff against mame205_extract/mame/src/mame/drivers/apple2e.cpp

Code

220,221d219
< m_djoy_0_1(*this, "djoy_0_1"),
< m_djoy_b(*this, "djoy_b"),
265d262
< required_ioport m_djoy_0_1, m_djoy_b;
1387,1388d1383
< 
< 
1445,1451d1439
< 		case 0x5a: // AN1 off
< printf("IOUDIS = 1 GETTING HIT HERE EXECUTING 0X5A DOIO M_AN1 FALSE\n");
< 			m_an1 = false; break;
< 
< 		case 0x5b: // AN1 on
< printf("IOUDIS = 1 GETTING HIT HERE DOIO M_AN1 TRUE\n");
< 			m_an1 = true; break;
1571d1558
< printf("DOIO M_AN1 FALSE");
1575d1561
< printf("DOIO M_AN1 TRUE");
1616,1618d1601
< 
< int joyreturnvalue;
< 
1680,1689d1662
< 		case 0x5a: // AN1 off
< printf("IOUDIS %x\n",m_ioudis);
< printf("C000R READ M_AN1 FALSE");
< 			m_an1 = false; break;
< 
< 		case 0x5b: // AN1 on
< printf("IOUDIS %x\n",m_ioudis);
< printf("C000R READ M_AN1 TRUE");
< 			m_an1 = true; break;
< 
1699,1701c1672
< 		case 0x69:  
< 
< if (!(m_sysconfig->read() & 0x80))
---
> 		case 0x69:
1703,1709c1674
< else {
< //NEWSTUFF (just a text target to search for)
< joyreturnvalue=(~(m_djoy_b->read()) & 0x01) ? 0x0 : 0x80;
< printf("pb0 MDJOY_READ VALUE RAW= %x INVERT= %x  RETURN= %x \n",m_djoy_b->read(),~m_djoy_b->read(),joyreturnvalue);
< if (machine().time().as_double() < 5.0) printf("Machine Time:%lf\n",machine().time().as_double());
< if (machine().time().as_double() < 1.0) return 0; else return joyreturnvalue;
< }
---
> 
1712d1676
< if (!(m_sysconfig->read() & 0x80))
1714,1719d1677
< else {
< joyreturnvalue=((~(m_djoy_0_1->read())) & ((m_an1) ? 0x01 : 0x04)) ? 0x0 : 0x80;
< printf("pb1 MDJOY_READ VALUE RAW= %x INVERT= %x  RETURN= %x \n",m_djoy_0_1->read(),~m_djoy_0_1->read(),joyreturnvalue);
< if (machine().time().as_double() < 5.0) printf("Machine Time:%lf\n",machine().time().as_double());
< if (machine().time().as_double() < 1.0) return 0; else return joyreturnvalue;
< }
1723d1680
< if (!(m_sysconfig->read() & 0x80))
1725,1731d1681
< else {
< joyreturnvalue=((~(m_djoy_0_1->read())) & ((m_an1) ? 0x02 : 0x08)) ? 0x0 : 0x80;
< printf("pb2 MDJOY_READ VALUE RAW= %x INVERT= %x  RETURN= %x \n",m_djoy_0_1->read(),~m_djoy_0_1->read(),joyreturnvalue);
< 
< if (machine().time().as_double() < 5.0) printf("Machine Time:%lf\n",machine().time().as_double());
< if (machine().time().as_double() < 1.0) return 0; else return joyreturnvalue;
< }
1756,1757d1705
< //printf("DEFAULT DO-IO in c000R offset %x\n",offset);
< 
1888d1835
< if (offset==0x5a || offset==0x5b) printf("WRITE8 C000W DEFAULT %X\n",offset);
3145,3168d3091
< 
< static INPUT_PORTS_START( apple2_sirius_joyport )
<         PORT_START("djoy_0_1")
<         PORT_BIT(0x01, 0x01, IPT_JOYSTICK_UP)    PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH)    PORT_PLAYER(1)
<         PORT_BIT(0x02, 0x02, IPT_JOYSTICK_DOWN)  PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH)  PORT_PLAYER(1)
<         PORT_BIT(0x04, 0x04, IPT_JOYSTICK_LEFT)  PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH)  PORT_PLAYER(1)
<         PORT_BIT(0x08, 0x08, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1)
<         PORT_BIT(0x10, 0x10, IPT_JOYSTICK_UP)    PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH)    PORT_PLAYER(2)
<         PORT_BIT(0x20, 0x20, IPT_JOYSTICK_DOWN)  PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH)  PORT_PLAYER(2)
<         PORT_BIT(0x40, 0x40, IPT_JOYSTICK_LEFT)  PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH)  PORT_PLAYER(2)
<         PORT_BIT(0x80, 0x80, IPT_JOYSTICK_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2)
< 
<         PORT_START("djoy_b")
<         PORT_BIT(0x01, 0x01, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1)
<         PORT_BIT(0x02, 0x02, IPT_BUTTON1) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2)
<         PORT_BIT(0x04, 0x04, IPT_UNUSED)
<         PORT_BIT(0x08, 0x08, IPT_UNUSED)
<         PORT_BIT(0x10, 0x10, IPT_BUTTON2) PORT_CODE(KEYCODE_DEL_PAD) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(1)
<         PORT_BIT(0x20, 0x20, IPT_BUTTON2) PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2)
<         PORT_BIT(0x40, 0x40, IPT_UNUSED)
<         PORT_BIT(0x80, 0x80, IPT_UNUSED)
< INPUT_PORTS_END
< 
< 
3171d3093
<         PORT_INCLUDE( apple2_sirius_joyport )
3181,3183d3102
<         PORT_CONFNAME(0x80, 0x00, "Gameport type")
<         PORT_CONFSETTING(0x00, "Normal")
<         PORT_CONFSETTING(0X80, "Sirius Joyport (Atari Digital)")


Joined: Mar 2001
Posts: 17,234
Likes: 260
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 260
IOUDIS is the other reason the Joyport can't work with the //e. That signal is used for other things in those machines (like enabling double-hi-res).

I'll add correct support for the II/II Plus sometime though.

Joined: Feb 2004
Posts: 2,603
Likes: 307
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,603
Likes: 307
Shouln't it be a slot device? Or is this actually a hardware mod? Or is it some kind of adapter you plug in the regular Apple II analog joystick/paddle port?

Joined: Feb 2014
Posts: 1,124
Likes: 193
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,124
Likes: 193
[Linked Image from i.imgur.com]

The Sirius Joyport would plug into the 16 pin gameport socket in an Apple 2 and allow you to plug in two Atari 9 pin digital joysticks.

I just put in a hacky config thing so I could enable it/disable it, because if a program doesn't support the Joyport, you need to be able to switch back to the normal gameport behavior.


Joined: Feb 2004
Posts: 2,603
Likes: 307
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,603
Likes: 307
Yeah, it's just that "thing that plugs in" is usually supposed to be a slot device, potentially exposing more slots.

Joined: Mar 2001
Posts: 17,234
Likes: 260
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 260
Right, the joysticks should be converted to a slot device (which would also allow adding support for Woz's original Atari-clone paddles in addition to this). But I'm allergic to all the inexplicable and undocumented stuff people have slammed into a2bus since Vas originally made it nice and clean.

The Atari 9-pin situation is a giant mess in MAME because the 7800 guys decided to stop contributing to MAME when I asked if they'd help clean that situation up rather than make it worse.

Last edited by R. Belmont; 01/09/19 12:41 PM.
Joined: Sep 2013
Posts: 14
S
Spk Offline
Member
Offline
Member
S
Joined: Sep 2013
Posts: 14
Running Mame64 0.205 on Windows, I'm having a video problem with the Apple IIe and certain games like Rescue Raiders and Wings of Fury.

There are flickering horizontal lines all over the screen which are quite distracting. No matter what Mame video settings I change (bgfx, d3d, gdi, etc.) the lines persist.

I've tried running Mame on three different computers with Nvidia, AMD and Intel GPUs but it doesn't make any difference, the flickering lines are always there.
I also tried the Apple II+ and Apple IIc drivers and they both suffer the same problem. However, the Apple IIgs driver does not have any problems and looks fine.

I traced the start of the problem back to Mame 167. Mame 166 and prior versions look fine.

Anybody else seeing this?

Joined: Feb 2014
Posts: 1,124
Likes: 193
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,124
Likes: 193
I noticed a little glitching running minr2049 under apple2p and apple2e but only on the startup screen. Gameplay seems to be fine.

./mame64 apple2p minr2049

it will do it while it scrolls up the title.

[Linked Image from i.imgur.com]

Joined: Mar 2001
Posts: 17,234
Likes: 260
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 260
The lines are a side effect of the imperfect screen-split support and will eventually go away.

Page 23 of 80 1 2 21 22 23 24 25 79 80

Link Copied to Clipboard
Who's Online Now
1 members (Vas Crabb), 177 guests, and 0 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,328
Posts122,128
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com