English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 06 October 2020, 13:08   #1
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
CD32 Emulator not recognising additional buttons

Hi!

I have some strange probs (didn´t occure on my other (sold) A1200):

The CD32pad doesn´t work properly while using the CD32 emulator provided with the CD1200 PCMCIA controller (IDEfix ´97 emu = same problem).
Randomly some additional buttons work, but most of the time only the red one (normal fire button) plus the d-pad.

Tried several controllers:
-Original CD32 pad
-HoneyBee pad
-PS2 pad + adapter
-KTRL pad


WHDload games work with no problem.


Hardware:

A1200 Rev. 1D4 (Escom)
Kick 3.1
Classic WB
(tried basic 3.0 and 3.1 installed WB, too)
Vampire

Any ideas?
viddi is offline  
Old 06 October 2020, 13:18   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
you mean the joypad buttons work with whdload slaves but not with the emu? maybe a motherboard issue due to bad joypad reading routine. whdload joypad support uses a routine honef through the years and thanks to several contributors of this forum
jotd is offline  
Old 06 October 2020, 13:20   #3
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
So the pad works fully when playing the same game through WHDLoad? Can you try it without the Vampire? Some buttons randomly working sounds like something is messing up the protocol, so maybe a timing problem between accessing the Paula pins and the CIA pins that WHDLoad has already fixed for fast accelerators. These reads and writes to both chips have to be synchronised to read a CD32 pad properly.
Daedalus is offline  
Old 06 October 2020, 13:25   #4
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Quote:
Originally Posted by jotd View Post
you mean the joypad buttons work with whdload slaves but not with the emu? maybe a motherboard issue due to bad joypad reading routine. whdload joypad support uses a routine honef through the years and thanks to several contributors of this forum
Yes! Works fine here.

Quote:
Originally Posted by Daedalus View Post
So the pad works fully when playing the same game through WHDLoad? Can you try it without the Vampire? Some buttons randomly working sounds like something is messing up the protocol, so maybe a timing problem between accessing the Paula pins and the CIA pins that WHDLoad has already fixed for fast accelerators. These reads and writes to both chips have to be synchronised to read a CD32 pad properly.

Will try it later today without Vampire.

BTW, some games work:
E.g.: Alien Breed 3D


Flink, Brian the Lion or Death Mask don´t.
viddi is offline  
Old 06 October 2020, 14:53   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
whdload FTW!
jotd is offline  
Old 06 October 2020, 14:57   #6
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Quote:
Originally Posted by jotd View Post
whdload FTW!
Problem:

No music, no Death Mask CD32 slave.
viddi is offline  
Old 06 October 2020, 15:37   #7
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
No difference without Vampire.
viddi is offline  
Old 06 October 2020, 16:22   #8
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,335
That's very odd - timing should be identical to the CD32 with the A1200's '020. It's a long time since I ran the IDEFix CD32 emulator, but it worked fine back then on my A1200. I don't know what could be causing it so...
Daedalus is offline  
Old 06 October 2020, 18:06   #9
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
Quote:
No music, no Death Mask CD32 slave
it should probably be possible to fix the CD32 version of games that don't use a proper joypad routine.
... or create slaves for CD32 versions that's missing, but the CD music will still be missing if there were some.
jotd is offline  
Old 06 October 2020, 18:48   #10
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Strange!
It worked in the past with or without 030 turbo board.

Any ideas?
viddi is offline  
Old 06 October 2020, 21:01   #11
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
there seems to exist issues for mobo v1B: http://eab.abime.net/showthread.php?...05#post1324405

My theory: there's a weakness in those mobos and some component is ageing badly, and hardware is less tolerant to routines with bad timing.

Reading CD32 joypads has always been complex & time consuming/CPU intensive no thanks to commodore and their serial protocol (did they have a choice when they built the CD32 ? I'm not sure. Are those joypads supposed to work with all revisions of motherboards? I'm not sure either)
jotd is offline  
Old 06 October 2020, 21:25   #12
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Thanks jotd.
Interesting. My 1D4 was recapped a few years ago.
Using an A-Power PSU now, but had the same probs with several C= ones, too.

In the end, you are right:
A slave for Death Mask CD32 or CD32 controls for the AGA version would be good enough.

Pad support for Brian the Lion AGA would be also fine.

Flink is a different story, though.


Anyway, it´s still a strange thing...
viddi is offline  
Old 06 October 2020, 21:42   #13
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
Brian the lion is planned already with second button for jump
Death Mask: okay, I'll add it to my (long) list.
jotd is offline  
Old 07 October 2020, 09:45   #14
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Great! Thx mate.
viddi is offline  
Old 10 October 2020, 23:32   #15
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
check the zone. Beta whdload install for CD32 version is there. Tell me if the buttons work better. It should.
jotd is offline  
Old 11 October 2020, 12:46   #16
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Quote:
Originally Posted by jotd View Post
check the zone. Beta whdload install for CD32 version is there. Tell me if the buttons work better. It should.
Working fine!!

May I ask for another feature?
Is it possible to activate player 2 map instantly after starting Two Player mode?
Player two needs unlimited energy, too.

We could use it for a one player game with map on screen all the time.
viddi is offline  
Old 11 October 2020, 15:41   #17
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
another proof that official lowlevel.library needs fixing so every game using it would work under CD emulation, with sound. I'm going to have a look at the differences.

You have to explain your enhancement request more, because I'm at a loss reading your text
jotd is offline  
Old 11 October 2020, 16:22   #18
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Quote:
Originally Posted by jotd View Post
another proof that official lowlevel.library needs fixing so every game using it would work under CD emulation, with sound. I'm going to have a look at the differences.

You have to explain your enhancement request more, because I'm at a loss reading your text
Ha ha!
Okay. I started this thread a while ago:
http://eab.abime.net/showthread.php?t=102216


Death Mask uses split screen all the time. Even in one player mode.
The right half of the screen ends up unused.

In two player mode the right half is of course used for the second player.
But only one player needs to reach the exit to finish a level. So two player mode can be used for one player game as well.

Now, if you´re switching to the map screen it always shows up in your very own playfield window.

Instead you can use two player game mode for one a player game.
So switch to the map screen (player two playfield window) and use it for the player on the left side.

Would be cool, if player one doesn´t have to press the joypad button for player two: The game should switch to map mode for player 2 immediately.

Player 2 also needs to have unlimited energy...because afair there are some levels with enemies in the same room as the player right from the start.

The arrow keys should be assigned for player 2 so that the map can be moved around with the keyboard.
Attached Thumbnails
Click image for larger version

Name:	Unbenannt.png
Views:	58
Size:	241.2 KB
ID:	69220  
viddi is offline  
Old 11 October 2020, 16:28   #19
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,170
okay I get it! how could they NOT use that half screen for map in the first place?

I'm going to check if there's not another way of hacking the game so first player has map on second half of the screen.

I checked code from lowlevel library and compared to our readjoyport routine used in whdload

ROM official version joypad button read (in readjoyport.asm, don't ask me where I got this source code )

Code:
                bra.s   1$
                                                            ; Loop for all bits :
0$
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
1$
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
                tst.b   ciapra(a4)
                move.w  (a0),d2                             ; d2 gets POTGOR data
                                                            ;Clock for next value.
                bset    d4,ciapra(a4)                       ;Make the clock high
                bclr    d4,ciapra(a4)                       ;Lower the clock.
                                                            ;Munge the button data bit into d3.
                and.w   d1,d2
                bne.s   6$                                  ;Buttons are active low.
                                                            ;The button was pressed.
                bset    d0,d3                               ;set button down in temp reg.
6$:             dbra    d0,0$
now whdload slave version

Code:
		bra.b	.gamecont4

.gamecont3	tst.b	ciapra(a1)
		tst.b	ciapra(a1)
.gamecont4
                tst.b	ciapra(a1)	; wepl timing fix
		tst.b	ciapra(a1)
		tst.b	ciapra(a1)
		tst.b	ciapra(a1)
		tst.b	ciapra(a1)
		tst.b	ciapra(a1)

		move.w	potinp(a0),d2

		bset	d3,ciapra(a1)
		bclr	d3,ciapra(a1)
	
		btst	d4,d2
		bne.b	.gamecont5

		bset	d1,d0

.gamecont5	dbf	d1,.gamecont3
note the "wepl timing fix" comment. Bert probably moved the branch so the first loop timer is slightly longer here (6 "tst.b ciapra(a4)" instructions instead of 5). In lowlevel.library version, that's not the case. It probably explains the issue with some motherboards.

There's a simple fix to be done to lowlevel.library. Just change one branch offset and it should probably fix it (that would require re-burn all CD games that include lowlevel library too, unless CD simulation is able to use another lowlevel library than the one on disk, which is probably the case since lowlevel.library is in CD32 ROM)

fixed version of lowlevel.library including Wepl timing fixes (JOTD 2020 exclusive ): lowlevel_wepl_timing_fix.zip

Last edited by jotd; 11 October 2020 at 16:59.
jotd is offline  
Old 11 October 2020, 16:32   #20
viddi
Moderator
 
viddi's Avatar
 
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
Quote:
Originally Posted by jotd View Post
okay I get it! how could they NOT use that half screen for map in the first place?

I'm going to check if there's not another way of hacking the game so first player has map on second half of the screen.

Fantastic!


The main problem might be that you can move the map around when activated.
So movement with your character plus the map screen could be tricky.
viddi is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only 2 Buttons and D-Pad Work on CD32 Joypad fondpondforever support.Hardware 18 08 June 2023 00:08
CD32 colours buttons... Stl75 support.WinUAE 15 07 July 2020 00:50
CD32 buttons how do they work? rsn8887 support.WinUAE 1 31 December 2016 08:37
WinUAE: 1 key = All 4 CD32 Buttons JemyM support.WinUAE 2 03 March 2012 10:55
Cannot configurate cd32 coloured buttons danny-666 support.WinUAE 2 15 June 2011 02:32

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 17:57.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.30001 seconds with 16 queries