English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Contest

 
 
Thread Tools
Old 14 October 2019, 18:41   #1501
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,179
Quote:
Originally Posted by Toni Wilen View Post
Could someone collect all the information in single post?

CD32 pad is slightly different because buttons have pullup resistors which means it always works even if POTGO is set "wrong".
I try, making it simple.

McGeezer Final ADF do not use OS to set POTGO, but force it during game (where the OS is disabled) = $C000 ($D500 for the WinUAE pull-up).
McGeezer Test ADF (from previous Retro-Nerd message) do not touch POTGO (so the default KS3.x POTGO=$5F00 value is used).
I've made another test ADF where I setup POTGO through potgo.resource in bootblock and removed write to POTGO in game, so the value is everytime $FF00

Are there Joy/pad that need I/O data in POTGO=0?

Last edited by ross; 14 October 2019 at 18:53. Reason: added WinUAE I/O values
ross is offline  
Old 14 October 2019, 18:45   #1502
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
@Retro_Nerd

This ADF now works with both my monster joystick and my Sega game pad with button C - please could you try it to see if it makes a difference for your stick?

http://109.228.4.199/downloads/Rygar_2ButtonTest.adf

Technically I'm cheating with this... but it fixes my issues here nicely.

On odd frames I'm writing $0000 to POTGO and on even frames writing $C000. I also on game start use Ross' OS init code to set POTGO.
mcgeezer is online now  
Old 14 October 2019, 19:03   #1503
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,179
Quote:
Originally Posted by mcgeezer View Post
On odd frames I'm writing $0000 to POTGO and on even frames writing $C000. I also on game start use Ross' OS init code to set POTGO.
Nice trick
But better wait Toni for possible collateral effect (apart the possible lose of one frame response).
ross is offline  
Old 14 October 2019, 19:06   #1504
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,275
I can only see one reason for this to make a difference: pad is some weird one that connects to +5v (not ground) when button is pressed.

Latency increase probably is noticeable in some situations.

EDIT: Pot line caps should charge/discharge in ~30-40us (but I guess it is good idea to wait few scanlines between reads if hardware is "weak") so it is possible to do both reads in single field without latency problems.
Toni Wilen is offline  
Old 14 October 2019, 19:20   #1505
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,179
Quote:
Originally Posted by Toni Wilen View Post
I can only see one reason for this to make a difference: pad is some weird one that connects to +5v (not ground) when button is pressed.
But isn't it a little dangerous for Paula? (using the default POTGO value)
ross is offline  
Old 14 October 2019, 19:21   #1506
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
Quote:
Originally Posted by Toni Wilen View Post
I can only see one reason for this to make a difference: pad is some weird one that connects to +5v (not ground) when button is pressed.

Latency increase probably is noticeable in some situations.

EDIT: Pot line caps should charge/discharge in ~30-40us (but I guess it is good idea to wait few scanlines between reads if hardware is "weak") so it is possible to do both reads in single field without latency problems.
Just so I understand this completely Toni/Ross.

At the start of the video frame I need to write $c000 or $ff00 to POTGO... then wait several scanlines afterwards (until discharge) and read POTINP?
mcgeezer is online now  
Old 14 October 2019, 19:34   #1507
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,778
Quote:
Originally Posted by mcgeezer View Post
@Retro_Nerd

This ADF now works with both my monster joystick and my Sega game pad with button C - please could you try it to see if it makes a difference for your stick?

http://109.228.4.199/downloads/Rygar_2ButtonTest.adf

Technically I'm cheating with this... but it fixes my issues here nicely.

On odd frames I'm writing $0000 to POTGO and on even frames writing $C000. I also on game start use Ross' OS init code to set POTGO.

Looks like you've nailed it.


CD32 Honey Bee = works
Tecno Plus = works
Mega Drive Pad, directly connected = works
Retro-Nerd is offline  
Old 14 October 2019, 19:35   #1508
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
Quote:
Originally Posted by Retro-Nerd View Post
Looks like you've nailed it.


CD32 Honey Bee = works
Tecno Plus = works
Mega Drive Pad, directly connected = works
Hurray!!!
mcgeezer is online now  
Old 14 October 2019, 19:37   #1509
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,179
Quote:
Originally Posted by mcgeezer View Post
Just so I understand this completely Toni/Ross.

At the start of the video frame I need to write $c000 or $ff00 to POTGO... then wait several scanlines afterwards (until discharge) and read POTINP?
No, exactly like now but without one other frame, on the same at distant time (like at start and then at half frame).
[or maybe you mean POTGOR?]

EDIT: HRM says 300us which is like 5 lines (or more if weak?), but you can't lose 5 lines to wait for nothing
A copper IRQ could be a solution to not have latency.

Last edited by ross; 14 October 2019 at 19:47.
ross is offline  
Old 14 October 2019, 19:38   #1510
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,778
Now i need a cheat. It a god damn hard game!!!
Retro-Nerd is offline  
Old 14 October 2019, 19:42   #1511
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
Quote:
Originally Posted by Retro-Nerd View Post
Now i need a cheat. It a god damn hard game!!!
You probably need a non-debug version first.

The problem is jotd fixed an issue previously with the slave so I need to look at what he did for the patch and replicate in the game.

Will do it tonight.
mcgeezer is online now  
Old 14 October 2019, 19:46   #1512
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,778
Many thanks for all your hard work and the fast fix. I'm sure 2-button only Amiga stick/pad users will thank your for that too.
Retro-Nerd is offline  
Old 14 October 2019, 20:31   #1513
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,491
Quote:
Originally Posted by Retro-Nerd View Post
Now i need a cheat. It a god damn hard game!!!
Attached Files
File Type: txt Rygar_Cheats_LevelCodes_Messages.txt (1.8 KB, 28 views)
DamienD is online now  
Old 14 October 2019, 20:34   #1514
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,778
Nice, but a bit inconvenient. I'm playing with a wirless pad and don't want to press the F6 key for extra lives. Well, maybe Jotd will make some nice WHDLoad cheats.
Retro-Nerd is offline  
Old 14 October 2019, 20:47   #1515
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
Quote:
Originally Posted by Retro-Nerd View Post
Nice, but a bit inconvenient. I'm playing with a wirless pad and don't want to press the F6 key for extra lives. Well, maybe Jotd will make some nice WHDLoad cheats.
I would strongly advise you to try and beat the game without cheats.

The round password is given to you every 5th round so try and master the game in sections of 4 rounds.
mcgeezer is online now  
Old 14 October 2019, 20:49   #1516
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,778
We'll see. I mostly get bored if i can't complete a level in a reasonable time.
Retro-Nerd is offline  
Old 14 October 2019, 20:55   #1517
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,488
Quote:
Originally Posted by Retro-Nerd View Post
We'll see. I mostly get bored if i can't complete a level in a reasonable time.
hmmm...the thing about Rygar is that it's a game that needs alot of respect.

It took many a kids pocket money in the arcade.
mcgeezer is online now  
Old 14 October 2019, 21:24   #1518
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 15,491
Quote:
Originally Posted by mcgeezer View Post
I would strongly advise you to try and beat the game without cheats.
It's an extremely difficult game

When I enable the cheat code, I only really ever use the "Extra Lives" key

Quote:
Originally Posted by mcgeezer View Post
hmmm...the thing about Rygar is that it's a game that needs alot of respect.

It took many a kids pocket money in the arcade.
Yup, I was one of them

...but even when I play these days via MAME, I enable unlimited lives.
DamienD is online now  
Old 14 October 2019, 22:29   #1519
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 42
Posts: 8,198
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by mcgeezer View Post
You probably need a non-debug version first.

The problem is jotd fixed an issue previously with the slave so I need to look at what he did for the patch and replicate in the game.

Will do it tonight.
In fact, one of the purpose of whdload is brilliant debugging ability.

It nails out any code error, then you can fix it in your code easily than crawling and head scratching finding how
dlfrsilver is offline  
Old 15 October 2019, 18:28   #1520
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 2,179
Two-buttons low-latency multi-pad reading

I've implemented a two-buttons low-latency multi-pad reading based on latest thread discussion.

It use an 'innovative' Copper/IRQ5 approach, using double time-spaced read in every single frame.

Buttons status are available in time for your VBI/IRQ3 main handler.

Attached an ADF that do the black/red/cyan/white video report.
Retro-Nerd made some test with his pads and all is working properly.

Source code:
Code:
start	
potgo	        movea.l	$4.w,a6
		lea	pot(pc),a1
		jsr	-498(a6)	;OpenResource()
		tst.l	d0
		beq.b	.ex
		movea.l	d0,a6
		moveq	#-1,d0
		move.w	#$ff00,d1
		jsr	-18(a6)		;WritePotgo()

.ex		lea	$dff000,a6
		move.w	#$7fff,d0
		move.w	d0,$9a(a6)
		move.w	d0,$9c(a6)
		move.w	d0,$96(a6)
		lea	$400.w,a0
		lea	copperend(pc),a1
		moveq	#(copperend-copper)/4-1,d0
.cl		move.l	-(a1),-(a0)
		dbf	d0,.cl
		move.l	a0,$80(a6)
		move.w	d0,$88(a6)
.wv		moveq	#$20,d0
		and.w	$1e(a6),d0
		beq.b	.wv
		move.w	#$8280,$96(a6)
		lea	irq5(pc),a0
		move.l	a0,$74.w
		move.w	#$d800,$9a(a6)
.lol	        bra.b	.lol


irq5	        movem.l	d0/a5-a6,-(sp)
		lea	$dff000,a6
		lea	.2nd(pc),a5

.rbtn	        moveq	#0,d0
		btst	#7,$bfe001
		seq	d0
		lsl.w	#4,d0
		btst	#14-8,$16(a6)
		seq	d0

		btst	#12-8,$1e(a6)
		beq.b	.rbf

.syn	        move.w	d0,(a5)
		move.w	#$5f00,d0
		bra.b	.set

.rbf	        or.w	(a5),d0
		move.w	d0,($400-(copperend-copper)+6).w
		move.w	#$ff00,d0

.set	        move.w	d0,$34(a6)
		
		move.w	#$1800,$9c(a6)
		move.w	#$8400,$96(a6)
		movem.l	(sp)+,d0/a5-a6
		rte

.2nd	       ds.w	1
		
pot	       dc.b	'potgo.resource',0


copper	dc.l	$1807fffe
		dc.l	$01800000
		dc.l	$ffe1fffe
		dc.l	$1801ff00
		dc.l	$00960400
		dc.l	$009c9000
		dc.l	$3701ff00
		dc.l	$00960400
		dc.l	$009c8800
		dc.l	$fffffffe
copperend
Was designed primarily for the needs and use of Rygar's IRQs /copperlist but can be applied with minor modifications in other situations.
Attached Files
File Type: zip lowlatency.zip (1.3 KB, 9 views)
ross 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
Entry: Rygar AGA Edition mcgeezer Coders. Entries 75 28 February 2019 21:41
On the Ball - World Cup Edition AGA djcasey request.Old Rare Games 4 25 January 2013 13:39
On The Ball League Edition AGA , Player Manager 2 StarEye Games images which need to be WHDified 11 22 January 2010 19:21
The Vague #1 AGA-RTG edition is released ! kas1e Amiga scene 12 30 October 2007 01:27
On The Ball: World Cup Edition AGA CodyJarrett request.Old Rare Games 11 27 May 2003 07:14

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 01:26.


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