13 October 2012, 13:53 | #81 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
Buttons 1 and 2 on the Sega Master System joypad correlate with buttons B and C on a Sega Megadrive pad and, as such, work with an Amiga too. However, I found on games that usually the Master System pads work more often than the Megadrive pads, in games like R-Type 2 and Alien Breed, the second button acts as if it was the spacebar (and tehse games are really old), so there *might* be some difference in the wiring.
|
13 October 2012, 18:19 | #82 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
@Akira
If you are having problems with the Sega Genesis "C" button on the Amiga, some versions of WHDLoad cause a problem and some cheap Sega style controllers are not fully compatible. I've never had a compatibility problem here. |
13 October 2012, 18:47 | #83 | |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
Quote:
Old games don't do anything on the second button, stuff like R-Type II was way beyond games started to implement joypad functionality in them. However Master System pads apply button 2 as if it was the spacebar. Give it a try. I know WHDLoad has problems and, as said by Cammy before, that seems to be a problem of WHDLoad. |
|
14 October 2012, 17:12 | #84 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Cool, thanks guys.
|
18 October 2012, 14:55 | #85 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
Attached is a test version which additionally uses the 2nd button for jumping. Would be nice when any joypad user could tell me if this is ok.
Last edited by phx; 07 December 2020 at 11:51. |
18 October 2012, 16:25 | #86 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
Tested on my A1200.
CD-32 pad: Red button brings up menu, blue button jumps. Awesome Sega Genesis original 6-button pad: B brings up menu, C jumps. Fantastic! Sega Genesis original Megafire pad: B menu C jumps Sega Megadrive (JP) original pad: B menu C jump Awesome work phx! This is a lot more comfortable for me now! I hope someone can test a Master System pad to be thorough. I don't have one, unfortunately (should get one) I did notice a strange thing now: when you first start the game, the scrolling is not as smooth as it should be. feels like it's updating at 25FPS. Once you lose a life, the scrolling is smoother. I am running this in an A1200 with a 030@50 with 882 FPU @ 50. I thought it could be a workbench thing conflicting but I tested on a clean, no startup sequence setup, and the same happens. I don't know if this happens on my A600 or if it happened before, I should check but now I gotta run. |
18 October 2012, 19:47 | #87 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
|
19 October 2012, 10:21 | #88 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
Thanks for the tests!
Quote:
Your system might be at the border between 25 and 50fps. The frame rate measurement is resetted every time a level restarts. |
|
19 October 2012, 11:35 | #89 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
But why does it happen always like that and, more importantly, why do i have such a problem in quite a fast system?
|
22 October 2012, 09:44 | #90 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
Do you really want to hear it again?
Ok. Because the scrolling is crap! I took the easiest approach, in the hope it will be sufficient for such an easy game. I am redrawing *all* blocks in the display, every frame, instead of just drawing new blocks in the borders. Certainly I won't do that again, but changing it means to rewrite all drawing routines. So also Sqrxz2 will use the same suboptimal scrolling. |
22 October 2012, 09:57 | #91 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
Quote:
I would tend to ignore that bug, since I couldn't reproduce it with my E-UAE versions. But then it occured on my A3000! Unfortunately only once, completely unreproducible! Can anybody confirm that jumping no longer works when pushing the stick up, but only when releasing it, after pushing it down? I have no idea what is causing that. It feels like bit 10 of POTGOR is stuck at 0, which should only happen when the 2nd button remains pressed. |
|
22 October 2012, 10:40 | #92 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,545
|
This is the usual pullup resistor issue.
No pullup joystick 2nd/3rd button only works properly if button pin is set to output mode (POTGO, forces it high when button not pressed), if it is in input mode, it may get stuck (probably depends on Amiga model, component tolerances etc..) because pin is floating when not pressed. |
22 October 2012, 11:03 | #93 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
|
22 October 2012, 11:33 | #94 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,646
|
Well i thought this was a problem only with the intro screen. Also, the very first time you play it is choppy but it isnt after you loose a life on the exact same level. If this made any sense the speed would always be the same on the same level or constant throughout the game, wouldn't it? Perhaps the problem is in the calculation and forced limiting of the scrolling. Ocasional slowdown i feel is ten times better than constant choppiness decided by the computer.
|
22 October 2012, 15:54 | #95 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
Quote:
But what do I have exactly to do to check the 2nd button in a compatible way? I tried to set all lines to output and the data bits to 1. For example: Code:
move.w #$ffff,POTGO(a6) btst #6,POTGOR(a6) Asman's joypad routine also sets POTGO to $ffff at the end of the function. So I guess it will still have this state when the 2nd button is checked in POTGOR next time. |
|
22 October 2012, 16:17 | #96 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,545
|
Quote:
Interesting method, this will work in input mode, even without button pullups. Writing 1 to first bit charges POT capacitors (if button is not pressed), next vblank is guaranteed to return correct pin state. Nice idea btw, technically FFFF should be FF01 but of course chipset won't care. |
|
22 October 2012, 16:55 | #97 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,521
|
I'm still confused. What I did last time was to write $ffff into POTGO once, when the game starts. Then I never touched POTGO again, and hoped to read the correct pin state from POTGOR. That failed.
I'm not sure what you mean. Should I now: 1. Write $ff00 to POTGO once, then read the button bit from POTGOR on each controller-check. 2. Write $ff00 to POTGO each time at the beginning of the controller-check, followed by reading POTGOR. 3. First read from POTGOR in the controller-check routine, and then write $ff01 to POTGO at the end. 4. In the controller-check routine: first write $ff00 to POTGO, then read the button from POTOGR and finally write $ff01 to POTGO to recharge. It would be nice to know exactly what to do, because I have no joypad to experiment with and I could only reproduce the floating-pin problem once during several dozends of tests in the last three days. |
22 October 2012, 18:07 | #98 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,545
|
Output mode: Write FF00 once (or multiple times, it does not matter), read normally, anytime.
Input mode using method in linked example: in vblank, set 2nd button to input mode by writing to POTGO, read normally, write FF01 (or FFFF) to POTGO. (I am still not sure whats the point of this extra complexity. I guess I must be missing something.) |
23 October 2012, 08:03 | #99 | |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
Quote:
After move.w #$ffff,POTGO(a6) you should wait a bit (I read in some book about 300 miliseconds) and then you can read POTGOR. but as far as I remember bits 1-7 are useless, so checking bit 6 is useless if I understand correct. Check read_potinp.c. In that example there is simple wait done by getchar() function. Joypad routine it is interpretation of joypad routine from Aminet + some things from lowlevel.library + my approach about reading joystick direction. I still don't understand what this code doing (I saw that too in Lowlevel.library) Code:
bset d3,(ciapra,a1) bclr d3,(ciapra,a1) Regards |
|
23 October 2012, 08:12 | #100 | |||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,545
|
Quote:
Quote:
Quote:
Where did FFFF POTGO write originate? Lowlevel.library or some other routine? |
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sqrxz 2 for AmigaOCS | vitux | Amiga scene | 11 | 25 November 2013 02:21 |
WTB: Plastic Dust Cover for Amiga 500 & Amiga 600 | S0nic | MarketPlace | 0 | 14 February 2013 16:41 |
Compatibility with Amiga 500 and 500+ games | ErickDF | Amiga scene | 2 | 23 May 2008 20:16 |
WTB: Amiga 600, 500, 500 +, 1200 (NTSC) | JeremyDay | MarketPlace | 2 | 30 November 2006 03:27 |
Will the Amiga 500 or Amiga 1000 run workbench 2? | anim8 | support.Hardware | 12 | 18 August 2001 05:02 |
|
|