English Amiga Board


Go Back   English Amiga Board > Support > support.Games

 
 
Thread Tools
Old 12 July 2019, 22:58   #21
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,356
Quote:
Originally Posted by Retro-Nerd View Post
I can confirm this for Menace with WinUAE, latest Beta zip. The CD32 controls don't work properly, Blue button quits to WB. Very strange.
WinUAE thinks game isn't switching to CD32 pad when reading pad buttons. I need to do some more tests with real pad, unfortunately I only have the Boomerang pad which may not have 100% identical hardware compared to official pad.
Toni Wilen is offline  
Old 13 July 2019, 00:39   #22
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,303
Blue button quits to WB means that WinUAE isn't configured for CD32 pad but just "joystick" or "joypad" and the joypad reading routine doesn't check if a joystick or a CD32 pad is connected

So blue button enables all button bits and it triggers pause/quit whatever. Typical.
jotd is offline  
Old 13 July 2019, 01:10   #23
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,816
Probably not the problem. Of course i'd set it to "CD32 pad" controller type in WinUAE. And Toni confirmed it too.

Quote:
Xenon = Pause key not working in WinUAE
Snow Bros= you can't start the game in WinUAE
Both confirmed too. Snow Bros though starts with CD32 pad controls enabled in WinUAE if you disable the "Blue button for jump" tooltype.

Last edited by Retro-Nerd; 13 July 2019 at 01:55.
Retro-Nerd is online now  
Old 13 July 2019, 09:44   #24
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,232
Send a message via MSN to dlfrsilver
Hello JOTD, i have tried your update for the premiere game (core design), and it just failed big time.

The graphics are completely trashed, right once level 1 has loaded, otherwise i get a system error and then my A1200 reboots straight.
dlfrsilver is offline  
Old 13 July 2019, 11:03   #25
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,303
It's because I allowed it to use fastmem and there are blitter errors (strange as the code uses tons of blitwaits...). You can try with EXPCHIP in the meanwhile.

I'll publish a update with 2 separate slaves (so 512k chip users with slow ram can play the game)

Last edited by jotd; 13 July 2019 at 11:13.
jotd is offline  
Old 13 July 2019, 11:35   #26
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,356
Attached is test program (improved version of previous "ciabutton"). WinUAE results match real hardware (=boomerang pad) behavior.

Setup difference is in Paula POTGO register which means pad is the only variable in this test. Any Amiga hardware should return valid results, it does not need to be CD32.

Important bits in output are 4 10 character columns. 3rd column "mode" is the one that lowlevel.library and other read routines use. (Menace uses second or fourth, I didn't bother to check it yet)

Test 1: press pad blue button. Only 3rd column should have 3 stars (*-------**), others should be filled with stars. Does same happen with non-Boomerang pads?

Test 2: press other buttons than red or blue: First 3rd column star should move, last two should be always active. Other columns should be completely blank. Does same happen with other pads?

Wait 1 second after pressing because updating is slow and partial updates are possible.

Last 3 characters should always have same state in 3rd column: -**. This can be used to detect if pad is inserted without pressing any buttons but I suspect some 3rd party pads don't work identically.. Also check if other columns have same state when using other pad(s).

EDIT: mouse button exits. Pad must be in joystick port.
Attached Files
File Type: zip buttontest.zip (505 Bytes, 29 views)

Last edited by Toni Wilen; 13 July 2019 at 11:43.
Toni Wilen is offline  
Old 13 July 2019, 12:29   #27
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,232
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by jotd View Post
It's because I allowed it to use fastmem and there are blitter errors (strange as the code uses tons of blitwaits...). You can try with EXPCHIP in the meanwhile.

I'll publish a update with 2 separate slaves (so 512k chip users with slow ram can play the game)
who use whdload with 512kb only ?
dlfrsilver is offline  
Old 13 July 2019, 12:44   #28
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,303
Some users have 68000/A500 + IDE and some slow extra ram.

About Snow Bros: cfou! released the source, I think I can easily fix it

Last edited by jotd; 13 July 2019 at 15:07.
jotd is offline  
Old 13 July 2019, 14:22   #29
wairnair
Registered User

 
Join Date: Jul 2017
Location: Budapest
Posts: 289
Quote:
Originally Posted by Retro-Nerd View Post
I can confirm this for Menace with WinUAE, latest Beta zip. The CD32 controls don't work properly, Blue button quits to WB. Very strange.



Are you sure that you use the latest patch version v1.4 (disk version)? Superfrog works fine on my A1200 with a CD32 pad.

edit: The CD32 version v1.3 works properly too. Looks like a hardware/software imcompatibility somehow.
I'll double check and report back, thank you.
wairnair is offline  
Old 13 July 2019, 16:06   #30
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,816
Quote:
Test 1: press pad blue button. Only 3rd column should have 3 stars (*-------**), others should be filled with stars. Does same happen with non-Boomerang pads?

Yes, that happens with the Honeybee CD32 controller. And my Genesis2AmigaCD32 adapter+Sega 6 Button controller too.


Quote:
Test 2: press other buttons than red or blue: First 3rd column star should move, last two should be always active. Other columns should be completely blank. Does same happen with other pads?

Yes, happens. Same pads tested as above.


Quote:
Last 3 characters should always have same state in 3rd column: -**. This can be used to detect if pad is inserted without pressing any buttons but I suspect some 3rd party pads don't work identically.. Also check if other columns have same state when using other pad(s)

Yes, -** here for both pads.
Retro-Nerd is online now  
Old 13 July 2019, 21:54   #31
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,356
Thanks. Official CD32 pad test still needed.

Menace problem is solved. This also finally explains why some CD32 pad read code sets POTGO START bit. It is useless in most code variants (which made me to assume it is never needed) but this pad read code really requires it.

POTGO setting is wrong at the beginning of read code. It should set middle button=output mode, data=0 ($2x00) to set pad in CD32 pad mode.

But it writes $dx00: input mode,data=1. Because it is in input mode, charge level in pot cap is the voltage level that CD32 pad sees. In this case it is always 0v (=CD32 pad mode gets enabled) because POTGO START bit first discharges the cap. (Paula pulls all pot lines to zero during first 7 or so scan lines after START bit is set, then original mode is restored. Don't attempt to read other port's second or third button immediately after setting START bit..)

This can also cause side-effects: first pad read can return all buttons pressed because cap charge is not "initialized" until after first read (unless some earlier init code accidentally set it it to output mode).. It is also possible if time between pad reads is long enough, pot cap value may change enough to cause random button presses.

Hopefully this was the last unknown bit in CD32 pad behavior
Toni Wilen is offline  
Old 13 July 2019, 22:12   #32
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,816
Great, thanks for investigating this. Menace is fixed now. Xenon pause key works too. Only the Snow Bros problem is left, if you select "Second button to jump" at the slash screen. Not sure if this indicates an improper WHDLoad patch solution though.
Retro-Nerd is online now  
Old 13 July 2019, 22:58   #33
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,303
I added the CD32 support in Superfrog. I use the same code for all WHDLoad slaves now. Modified version of "ReadJoyPad.s" with first joystick/joypad detection to avoid the "blue pressed => all pressed" error when joystick is set (not CD32 joy).

Killergorilla: thanks for allowing me to write in the spreadsheet. I'll make my additions in the end, left in white. I'll let you officialize them. Ok?

Last edited by jotd; 13 July 2019 at 23:04.
jotd is offline  
Old 14 July 2019, 09:39   #34
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,356
Quote:
Originally Posted by Retro-Nerd View Post
Great, thanks for investigating this. Menace is fixed now. Xenon pause key works too. Only the Snow Bros problem is left, if you select "Second button to jump" at the slash screen. Not sure if this indicates an improper WHDLoad patch solution though.
Patch does word read from $bfe001 which wasn't handled correctly (because weird CIA accesses were originally only made to work with bad 68000 programs and 68000 can't do word/long odd accesses. This is apparently first known 68020+ program that does odd word CIA access )

It also has another strange code sequence in fire button read code:

Code:
_PatchFIRE1
		bsr	_CD32_Read
		BSR	 _CD32_Fire1_Red
		BEQ	.Fire1Pressed
		move.l	d7,-(a7)
		move.b	#-1,d7
		tst.l d7
		move.l	(a7)+,d7
		rts
.Fire1Pressed
		tst.w	$bfe001	
		rts
It tries to change condition codes but move.l (a7)+,d7 overwrites them.

EDIT: Looks like game is 68000 compatible so tst.w probably should be fixed. (If those unnecessarily big movem.l's don't slow it down too much on 68000..)

Last edited by Toni Wilen; 14 July 2019 at 12:03.
Toni Wilen is offline  
Old 14 July 2019, 10:29   #35
AmigaHope
Registered User
 
Join Date: Sep 2006
Location: New Sandusky
Posts: 330
Imagine if C= had provided a proper controller port protocol in 1985 instead of just copying the Atari 2600's. =( I guess it made sense for the VIC-20 and they wanted to save a few $ on controllers since they already had VIC-20/C64 stock. =(
AmigaHope is offline  
Old 14 July 2019, 11:27   #36
jotd
This cat is no more
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 48
Posts: 3,303
yeah, this button read is just hell. But with the proper read routine, finetuned by several EAB users, you don't have that many problems. It's even reported that this "ReadJoypad.s" routine works on some A1200 motherboard revs where lowlevel library doesn't!
jotd is offline  
Old 14 July 2019, 15:56   #37
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,816
Excellent. We'll see if more strange CD32 controller patched WHDLoad games pop up that need to be fixed. Updated the Google sheet with infos about Menace, Xenon and Snow Bros.

Last edited by Retro-Nerd; 14 July 2019 at 16:11.
Retro-Nerd is online now  
Old 15 July 2019, 10:21   #38
Asman
68k

Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 697
@jotd
Can you post (in the Zone or via PM ) newest ReadJoypad.s source code. Thanks a lot.
Asman is offline  
Old 15 July 2019, 19:56   #39
wairnair
Registered User

 
Join Date: Jul 2017
Location: Budapest
Posts: 289
Quote:
Originally Posted by Retro-Nerd View Post
Are you sure that you use the latest patch version v1.4 (disk version)? Superfrog works fine on my A1200 with a CD32 pad.

edit: The CD32 version v1.3 works properly too. Looks like a hardware/software imcompatibility somehow.
I had v1.2.
Now I've installed version 1.3 using the Islona release.

Same thing happens: FIRE (red) button pauses/unpauses and shoots at the same time. It's like pressing pause right after shooting.
wairnair is offline  
Old 15 July 2019, 20:44   #40
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,741
...so as Retro already mentioned, try 1.4.

Here is Retroplay's package, all you need to do is download / extract / play: Superfrog_v1.4_0035.lha
DamienD is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you own a 2 button gamepad or joystick? Steril707 Amiga scene 63 07 March 2018 23:07
Usb and PS2 Joystick/Gamepad Adapter for Amiga Atari Commodore 9pin D port! ikonsgr MarketPlace 0 27 December 2016 19:13
Usb and PS2 Joystick/Gamepad Adapter for Amiga Atari Commodore 9pin D port! ikonsgr MarketPlace 0 09 November 2016 00:00
Analog gamepad/joystick - problems zygzak support.WinUAE 9 24 April 2014 18:20
Joystick vs. Gamepad laser Retrogaming General Discussion 83 24 June 2008 16:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09115 seconds with 14 queries