Emulation problems with Power-20 (split from: "WIP: Arukanoido")

You need an actual VIC.

Moderator: Moderators

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby polluks » Mon Aug 14, 2017 4:57 am

pixel wrote:When the hardware check shows up, Arukanoido actually scans memory for add-ons. (There'll be one for the Ultimem expansion at least.)

Power20 hangs at 08
>36BC: 36 00 6F 02 FB nv-BdIZc LDA 9111
>36BF: 34 6F 6F 02 FB nv-BdIzc AND #10
>36C1: 36 00 6F 02 FB nv-BdIZc BEQ 36BC

>VIA1 Zustand (Versatile Interface Adapter $9110-$911F)
> PortB Daten: $00 (%00000000)
> PortB Richtg.: $00 (%00000000)
>
> PortA Daten: $6F (%01101111)
> PortA Richtg.: $80 (%10000000)
>
> Timer1: An (Systemtakt (ø2), Automat. Neustart)
> Zählerstand: $A520 - Startwert: $FFFF
>
> Timer2: An (PB6 Impuls, Stop bei Erreichen von Null)
> Zählerstand: $8826 - Startwert: $--00
>
> Aux. Control Reg: $40 (%01000000)
> Periph. Cntr. Reg: $FE (%11111110)
>
> Serielle Daten: $00
> Serieller Modus: Eingabe - Leerlauf
>
> Zugelassene Interr.: Keine
> Anstehende Interr.: Timer2 - Timer1
VC20 [WGA103574] + UltiMem

User avatar
pixel
Vic 20 Nerd
Posts: 867
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/pixel/
Location: various
Occupation: Pan–galactic shaman

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby pixel » Mon Aug 14, 2017 8:20 am

polluks wrote:
pixel wrote:When the hardware check shows up, Arukanoido actually scans memory for add-ons. (There'll be one for the Ultimem expansion at least.)

Power20 hangs at 08

Oh. I'm sorry about that. Looks like a bug in power20. Please let the developer of power20 know about it.

IMHO VICE is the emulator of choice – also on Mac. :)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby polluks » Mon Aug 14, 2017 6:15 pm

At least I made a patch

Code: Select all

a36c1
,36C1:  EA        NOP
,36C2:  EA        NOP
,36C3:
g

it may help with other buggy VIAs.
Please go on!
VC20 [WGA103574] + UltiMem

User avatar
Mike
Herr VC
Posts: 2933
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby Mike » Tue Aug 15, 2017 2:46 am

No point patching a program to work with a defective emulator.

Please try out your Power20 with this simple BASIC program. It reads out the joystick with essentially the same method as shown in the WIKI, just it uses 37137 (=$9111) instead of the more easier to remember 37151 (both registers work on real hardware, they just show different behaviour when it comes to handshake control on port A, which isn't relevant here):

joystick.zip
(254 Bytes) Downloaded 2 times

Code: Select all

1 S=PEEK(37137):POKE37154,127:T=PEEK(37152):POKE37154,255
2 IF(16ANDS)=0THENPRINT"LEFT ";
3 IF(128ANDT)=0THENPRINT"RIGHT ";
4 IF(4ANDS)=0THENPRINT"UP ";
5 IF(8ANDS)=0THENPRINT"DOWN ";
6 IF(32ANDS)=0THENPRINT"FIRE ";
7 PRINT:GOTO1

P.S. I saved this with a load address of $1201, so you'll have to activate at least a +8K RAM expansion.

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby polluks » Wed Aug 23, 2017 7:23 am

Mike wrote:No point patching a program to work with a defective emulator.

Please try out your Power20 with this simple BASIC program. It reads out the joystick with essentially the same method as shown in the WIKI, just it uses 37137 (=$9111) instead of the more easier to remember 37151 (both registers work on real hardware, they just show different behaviour when it comes to handshake control on port A, which isn't relevant here):

joystick.zip

Code: Select all

1 S=PEEK(37137):POKE37154,127:T=PEEK(37152):POKE37154,255
2 IF(16ANDS)=0THENPRINT"LEFT ";
3 IF(128ANDT)=0THENPRINT"RIGHT ";
4 IF(4ANDS)=0THENPRINT"UP ";
5 IF(8ANDS)=0THENPRINT"DOWN ";
6 IF(32ANDS)=0THENPRINT"FIRE ";
7 PRINT:GOTO1


Indeed, left is always set. I wonder why it works at all but Arukanoido.
VC20 [WGA103574] + UltiMem

User avatar
Mike
Herr VC
Posts: 2933
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby Mike » Wed Aug 23, 2017 11:24 am

polluks wrote:Indeed, left is always set. I wonder why it works at all but Arukanoido.

You should now cross check like thus:

1. replace 37137 in the test programm with 37151 to confirm (in Power-20) the joystick routine indeed works as intended with the other register, and

2. in my Games Collection, start the game "Workman". Incidentally, this also uses 37137 in its joystick routine. It was published 1985 as type-in in the German computer magazine "Computronic", so one can't insinuate it was written to make life hard for Power-20. ;)

If the tests give the results I expect, there's only one thing you can do: ditch Power-20 and use a current build of VICE. Power-20 already appeared non fanciable in its emulation fidelity in earlier times, and there have been no updates since 2011 ...

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby polluks » Thu Aug 24, 2017 12:25 pm

Mike, I found the cause of the problem: It's the paddle emulation!
Paddle sets joystick left.
Light pen sets joystick left and right.
Strange...

BTW Power20 includes a 1351 emulation, funny.
However my Vice 3.0 is very slow...
VC20 [WGA103574] + UltiMem

User avatar
Mike
Herr VC
Posts: 2933
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby Mike » Thu Aug 24, 2017 2:14 pm

polluks wrote:Paddle sets joystick left.
Light pen sets joystick left and right.
Strange...

BTW Power20 includes a 1351 emulation, funny.

Neither of these three use cases show sensible behaviour in Power-20. On real h/w:

- the paddles for sure assert two of the joystick lines *when* their fire buttons are pressed (IIRC, left or right directions for left or right player, not necessarily fire),
- light pens *) use the fire line with a short low-pulse to signal the electron beam has just passed, optionally one of the joystick directions to signal a trigger switch has been pressed, and
- the 1351 mouse doesn't work at all in proportional mode.



*) just for the 'fun' of it, you could try whether you can get MINISKETCH working at all in Power-20. Especially getting beyond the calibration screen.

polluks
Vic 20 Newbie
Posts: 9
Joined: Sat Apr 29, 2017 4:53 pm
Website: http://www.bilskaja.de
Location: Germany
Occupation: FI

Re: Emulation problems with Power-20 (split from: "WIP: Arukanoido")

Postby polluks » Mon Aug 28, 2017 5:00 am

Indeed, the calibration hangs.
By the way my Trojan light pen has no trigger, maybe there should be a fallback. How about the shift key?
VC20 [WGA103574] + UltiMem


Return to “Emulation and Cross Development”

Who is online

Users browsing this forum: No registered users and 1 guest