CPCWiki forum

General Category => Emulators => Topic started by: EgoTrip on 11:57, 29 October 10

Title: WinAPE bugs
Post by: EgoTrip on 11:57, 29 October 10
These bugs have been annoying me for a while now.


First bug is a lot of the time, WinAPE fails to respond to the keyboard unless I open the assembler. This bug has happened regularly on XP, Vista and 7.


The other is not a bug as such, more a case of lacking a useful feature in the assembler editor. Is it possible the author could add a "Select All" feature to the context and edit menus, and enable the keyboard shortcut too (CTRL & A)?


Other than this, WinAPE is an excellent emulator and my main choice. Thanks for making it!
Title: Re: WinAPE bugs
Post by: fano on 12:00, 29 October 10
Quote from: EgoTrip on 11:57, 29 October 10First bug is a lot of the time, WinAPE fails to respond to the keyboard unless I open the assembler. This bug has happened regularly on XP, Vista and 7.
This one is annoying, you can push F7 to open debugger so you'll catch the focus.
About focus, another problem is Winape take keyboard entries when typing on other programs like MSN so you have the text typed in MSN in AMSDOS command line.
Title: Re: WinAPE bugs
Post by: norecess on 16:15, 29 October 10
My advice : don't WinAPE's sourcecode editor. Instead, get this :


read "main.asm"


.. where main.asm is actually being edited with a real text editor (Notepad++ is my prefered free editor for that).
Title: Re: WinAPE bugs
Post by: EgoTrip on 16:37, 29 October 10
I forgot the other thing that is badly needed on the assembler editor: an undo feature (with CTRL&Z keyboard shortcut please!)
Title: Re: WinAPE bugs
Post by: TFM on 21:41, 29 October 10
Well, my favorite bug is that the BCD format of the SF2 RTC is not (properly) emulated.
So the watch is screwed up under FutureOS. However, other emulators don't do better :-)
Title: Re: WinAPE bugs
Post by: AMSDOS on 07:13, 01 November 10
I like Winape too!  ;D  Unfortunately one of my favourite crappy CPC games "Street Gang Football" is unplayable in Winape!  ???  At first I thought it might have been my cracked copy which played fine on my 6128, though the version on NVG also has the same problem (at first I thought the game Crashed - which was normal), but I think the Tune on the opening screen was running a bit differently on that compared to on the real machine. But you simply cannot miss the playability problem in the game itself, it pauses for some reason. I was just wondering if might of had something to do with Winape being a Plus Emulator? I'm only running it with a Normal CPC6128 ROM, and vagerally recall their being some annoying Input/Output difference between the original CPCs and the CPC Plus.  :-[
Title: Re: WinAPE bugs
Post by: TFM on 16:09, 01 November 10
Quote from: CP/M User on 07:13, 01 November 10
I like Winape too!  ;D  Unfortunately one of my favourite crappy CPC games "Street Gang Football" is unplayable in Winape!  ???  At first I thought it might have been my cracked copy which played fine on my 6128, though the version on NVG also has the same problem (at first I thought the game Crashed - which was normal), but I think the Tune on the opening screen was running a bit differently on that compared to on the real machine. But you simply cannot miss the playability problem in the game itself, it pauses for some reason. I was just wondering if might of had something to do with Winape being a Plus Emulator? I'm only running it with a Normal CPC6128 ROM, and vagerally recall their being some annoying Input/Output difference between the original CPCs and the CPC Plus.  :-[

Have you ever checked this game with WinCPC, JavaCPC, Caprice or Arnold?
Title: Re: WinAPE bugs
Post by: AMSDOS on 00:31, 02 November 10
TFM/FS wrote:

Have you ever checked this game with WinCPC, JavaCPC, Caprice or Arnold?

I would have been playing it just fine when I was using the emulators made under DOS, don't recall playing it in all of them (e.g. CPCEMU 1,4, RWCPC, no$cpc), most likely it would have been CPE52 and Caprice32 v1.10. Can try it in here with WinCPC - may well be if WinCPC is using elements applied in Winape then it may struggle, but we'll see!  :-[
Title: Re: WinAPE bugs
Post by: AMSDOS on 01:39, 02 November 10
Hmm, it seems the Street Gang Football Input error is an extremely isolated one. Because I've used Caprice a lot in the past the Joystick is configured to use Home as Up, End as Down, Delete (next to the End Key) for Left and Page Down for Right, Right CTRL for Fire 1. In Winape I had the Joystick setup like this, though once I changed that combination to the Numeric Keypad keys the problem disappeared.  ::)  What's odd though is other games in Winape don't mind the Home, Delete, End & Page Down Combination!
Title: Re: WinAPE bugs
Post by: Xyphoe on 08:42, 25 November 10
Interesting bug I discovered last night.

All dumps of "Express Raider" in WinApe (tried a very old version and the latest) have zero sound.
Same dumps in CPCE has music and sound effects!

Wonder if that could be explained?
Title: Re: WinAPE bugs
Post by: Axelay on 09:24, 25 November 10
Quote from: Xyphoe on 08:42, 25 November 10
Interesting bug I discovered last night.

All dumps of "Express Raider" in WinApe (tried a very old version and the latest) have zero sound.
Same dumps in CPCE has music and sound effects!

Wonder if that could be explained?


Well having just tried an image in WinAPE & WinCPC, I reckon WinAPE is just trying to do your ears a favour!  ;)  That was one title tune I didnt need to hear again.  :laugh:
Title: Re: WinAPE bugs
Post by: Devilmarkus on 13:12, 26 November 10
Well I figured something out in JEMU's/JavaCPC's sound emulation.
(WinAPE uses similar routines here I think)

I am not sure if I can fix that for JavaCPC (I already got the music working but it's possible that then for other games/demos the music would fail, I need more testing here...)

Wilson uses the value "attack" in case "ESHAPE" (He knows what I mean here)
His (original) JEMU code:
attack = (value & 0x04) == 0 ? 0 : 0x0f;
When I change it to:
attack = (value & 0x04) == 0 ? 0x0f : 0;
then the music plays well. But, as I said, need more testing here.

Also funny: The game "Thing on a spring" has the same music bug in WinAPE and also in JavaCPC/JEMU!
But interesting here: When I record the music as YM while it is playing worse, and later I playback it, the music plays well!  :o
Example: http://cpc-live.com/crap

I think it's the way how the envelope forms are calculated here.
Title: Re: WinAPE bugs
Post by: robcfg on 16:03, 26 November 10
From my experience trying to emulate the AY chip, I was surprised to see that no one uses the envelope registers. Maybe it's that it implies many port writes and it's not worth it.


Of course I can be wrong but I remember the breakpoints in the envelope code not getting hit in most of the YM files I tried.
Title: Re: WinAPE bugs
Post by: Devilmarkus on 17:54, 26 November 10
Well, I experimented much with JavaCPC's AY emulation today.
I found a possible patch to let the music for Express Raider play well.
(code snippet)                    case ESHAPE: {
                        attack = (value & 0x04) == 0 ? 0 : 0x0f;
                        if ((value & 0x08) == 0) {
                            hold = 1;
                            alternate = attack;
                        } else {
                            hold = value & 0x01;
                            alternate = attack = value & 0x02;
                        }

Trick: I also update attack in "else" case.
Original code here:
alternate = value & 0x02;

I also patched the BDIR settings so that "Thing on a Spring" should playback well now, too.

(code snippet)    public void setBDIR_BC2_BC1(int value, int dataValue) {
        if (bdirBC2BC1 != value) {
            bdirBC2BC1 = value;
            state = STATES[bdirBC2BC1];
            if (blockWRITE && state == WRITE){
                blockWRITE = false;
                return;
            }
            writePort(20, dataValue);
        }
    }

    protected boolean blockWRITE = false;
   
    @Override
    public void writePort(int port, int value) {
        switch (state) {
            case LATCH:
                selReg = value & 0x0f;
                break;
            case WRITE:
                if (port != 20){
                    blockWRITE = true;
                }
                setReg(value & 0xff);
                break;
        }
    }


Trick: I use a boolean which can block writePort from BDIR settings.
So I avoid a double port write.

For this I could need your help:
I already tested many games / demos if they still play properly.

What I need now is a list for all games or demos which play wrong or no sound in WinApe, where they should play some...

Who can help me here?

I also uploaded a new Beta for JavaCPC here:
http://cpc-live.com/data/list.php?dir=-beta (http://cpc-live.com/data/list.php?dir=-beta)
(see last file)

Please check and test some games and demos, too... This would help me much to improve AY emulation...
Powered by SMFPacks Menu Editor Mod