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

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
polluks
Vic 20 Amateur
Posts: 43
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")

Post by polluks »

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 Scientist
Posts: 1329
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

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

Post by pixel »

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
User avatar
polluks
Vic 20 Amateur
Posts: 43
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")

Post by polluks »

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: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post by Mike »

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

Please try out your Power20 with this simple BASIC program (download). 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):

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.
User avatar
polluks
Vic 20 Amateur
Posts: 43
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")

Post by polluks »

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: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post by Mike »

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 ...
User avatar
polluks
Vic 20 Amateur
Posts: 43
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")

Post by polluks »

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: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post by Mike »

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.
User avatar
polluks
Vic 20 Amateur
Posts: 43
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")

Post by polluks »

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
Post Reply