Previous Thread
Next Thread
Print Thread
Page 23 of 24 1 2 21 22 23 24
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114527
01/01/19 12:17 AM
01/01/19 12:17 AM
Joined: Mar 2001
Posts: 16,088
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,088
USA
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.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114557
01/09/19 03:40 AM
01/09/19 03:40 AM
Joined: Feb 2014
Posts: 157
G
Golden Child Online content
Senior Member
Golden Child  Online Content
Senior Member
G
Joined: Feb 2014
Posts: 157
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]


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


Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114558
01/09/19 04:01 AM
01/09/19 04:01 AM
Joined: Mar 2001
Posts: 16,088
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,088
USA
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.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114559
01/09/19 04:51 AM
01/09/19 04:51 AM
Joined: Feb 2004
Posts: 2,023
Sydney, Australia
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,023
Sydney, Australia
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?

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: Vas Crabb] #114560
01/09/19 05:33 AM
01/09/19 05:33 AM
Joined: Feb 2014
Posts: 157
G
Golden Child Online content
Senior Member
Golden Child  Online Content
Senior Member
G
Joined: Feb 2014
Posts: 157
[Linked Image]

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.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114561
01/09/19 05:59 AM
01/09/19 05:59 AM
Joined: Feb 2004
Posts: 2,023
Sydney, Australia
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,023
Sydney, Australia
Yeah, it's just that "thing that plugs in" is usually supposed to be a slot device, potentially exposing more slots.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114562
01/09/19 12:37 PM
01/09/19 12:37 PM
Joined: Mar 2001
Posts: 16,088
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,088
USA
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.
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114564
01/12/19 03:39 AM
01/12/19 03:39 AM
Joined: Sep 2013
Posts: 7
S
Spk Offline
Member
Spk  Offline
Member
S
Joined: Sep 2013
Posts: 7
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?

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: Spk] #114575
01/14/19 02:42 PM
01/14/19 02:42 PM
Joined: Feb 2014
Posts: 157
G
Golden Child Online content
Senior Member
Golden Child  Online Content
Senior Member
G
Joined: Feb 2014
Posts: 157
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]

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114576
01/14/19 03:37 PM
01/14/19 03:37 PM
Joined: Mar 2001
Posts: 16,088
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,088
USA
The lines are a side effect of the imperfect screen-split support and will eventually go away.

Page 23 of 24 1 2 21 22 23 24

Who's Online Now
1 registered members (AJR), 159 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,613
Posts112,666
Members4,834
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.041s Queries: 15 (0.020s) Memory: 5.7374 MB (Peak: 5.9614 MB) Zlib enabled. Server Time: 2019-01-23 23:54:51 UTC