GideonZ / 1541ultimate

Official GIT archive of 1541 ultimate II sources
GNU General Public License v3.0
173 stars 45 forks source link

C64 demos which run or don't run on 1571 #276

Open Jusalak opened 1 year ago

Jusalak commented 1 year ago

Hello,

With demo "Still Ready" the screen goes blank after some time when drive is set to 1571. However, the demo does not crash immediately, since the music continues to play. But when I go to menu, then on returning to the program it crashes. This also when I copied the file to RAM disk and mounted it from there.

Can others reproduce this.

Edit: With U64 Elite, latest board revision with latest firmware.

Best regards, Jussi Ala-Könni still_ready.zip

GideonZ commented 1 year ago

From your post, I cannot conclude whether it was verified to work on a real 1571...?

Jusalak commented 1 year ago

Well, VICE had another (not the same) issue with the demo ( https://sourceforge.net/p/vice-emu/bugs/1760/ ). They did confirm it working on a real 1571. (I don't have a real 1571 drive at hand.)

Jusalak commented 1 year ago

With .g64 file (created by VICE) the behaviour is also weird. A bit different though.

still_ready_g64.zip

Jusalak commented 1 year ago

Thinking it more closely, this may actually be related to the issue with VICE. See comments in that thread. In earlier VICE releases 1571 actually ran it fine from .p64.

Jusalak commented 1 year ago

I did some more testing with U64 + virtual 1571, comparing with VICE r42514 x128 in 64 mode with virtual 1571.

01 Edge of Disgrace - doesn't get past the first disk swapping screen, the same with VICE - a real compatibility issue? 02 Coma Light - U64 crashed after flipping to disk side b, VICE ran ok. Coma_Light.zip EdgeOfDisgrace.zip

Jusalak commented 1 year ago

"Coma light" ran fine with U64 + 1571 when disk images were copied to RAM disk and mounted from there. 1541 emulation didn't have problems when mounted from USB.

Jusalak commented 1 year ago

One more clue: When running "Still Ready", going to the menu and then returning to the demo occasionally brings the screen display back. But the program also has a tendency to crash as a result.

I have continued testing and kept the drive set to 1571 and relying on its 1541 compatibility. (Yes, that is the drive which I actually had in good old days, with a C128 - I never had a C64.)

There seem to be some issues of stability, and/or mounting, with 1571 emulation in U64E. My impression is that 1571 emulation itself is very good. I ran "Project: Stealth Fighter" from .g64 images (apparently from original disks and not a cracked version, I am not aware if such cracked version of this title exists) and it runs fine with U64E + 1571 emulation. (I thought this is a good test case since the original disk had a pretty tough copy protection.)

Grrrolf commented 1 year ago

I did some more testing with U64 + virtual 1571, comparing with VICE r42514 x128 in 64 mode with virtual 1571.

Please use real hardware to compare whether software works as expected on the U64. It makes no sense to compare emulation because either can be broken compared to real hardware.

Jusalak commented 1 year ago

I now tested "Still Ready" with a real 1571 drive. The demo ran flawlessly and the problems when running from a virtual 1571 were not present.

Jusalak commented 1 year ago

I tested "Still Ready" now on a real C64C + real 1571, compared also to running on C64C + real 1541-II. The demo runs flawlessly on real 1571, as on 1541-II.

I suppose that this demo is adequately tested on real hardware. There are other demos as well which suffer from apparently the same display freezing/stuttering problem with emulated 1571.

More extensive testing of demos is perhaps a bit pointless at this stage, I might be willing to do it if we get an initial fix to this problem.

Jusalak commented 1 year ago

"01 Edge of Disgrace" mentioned earlier in this thread does not like the 1571. Behaviour is the same on real HW (C64C + real 1571) - does not get past the first disk swapping screen. So the 1571 not running "Edge of Disgrace" is correct.

Jusalak commented 10 months ago

With U64 and 1571, "Still Ready" seems to run even worse with the latest firmware. Now it is just a black screen, with the previous firmware at least the beginning of the demo tended to run with 1571.

As noted earlier, this seems a system stability issue rather than a drive emulation accuracy issue.

GideonZ commented 10 months ago

:-(

Could you indicate the firmware versions, rather than referring to them as "current and previous"? This won't be valid when new versions come out.

Jusalak commented 10 months ago

:-( Could you indicate the firmware versions, rather than referring to them as "current and previous"? This won't be valid when new versions come out.

V1.42 - 3.10j

The previous was V1.41 -3.10a

GideonZ commented 10 months ago

And the previous? V1.41 - 3.10a?

Message ID: @.***>

Jusalak commented 10 months ago

And the previous? V1.41 - 3.10a? Message ID: @.***>

Yes.

Jusalak commented 10 months ago

If anyone could test whether the demo "Still Ready" runs with a real C64/128 and UII+ (L or not), with drive set to 1571, that would give a confirmation. I predict that with UII+/1571 the demo does run.

radius75 commented 10 months ago

I tested it yesterday on u2+, C64c, PAL, 1571, d71 (340KB), Copied from d64 file by file. The demo sometimes runs to the end. And sometimes it's just a black screen. Sometimes a black screen during the rest of the demo. It's random.

Rather, it works fine right after Power ON C64 But that's hard to confirm.

Jusalak commented 10 months ago

I tested it yesterday on u2+, C64c, PAL, 1571, d71 (340KB), Copied from d64 file by file. The demo sometimes runs to the end. And sometimes it's just a black screen. Sometimes a black screen during the rest of the demo. It's random.

Rather, it works fine right after Power ON C64 But that's hard to confirm.

What about .d64 mounted to 1571 as such? Ensure also 1541 mode by typing: OPEN1,8,15,"U0>M0":CLOSE1

radius75 commented 10 months ago

Out of 4 attempts failed to run this demo. Black screen from start and no sound.

Jusalak commented 10 months ago

So it is not U64 specific after all, but emulation accuracy is not the issue if it (sometimes) runs to the end. U64/1571, I think, never ran it to the end flawless.

GideonZ commented 10 months ago

Sounds like a buggy demo to me.

Message ID: @.***>

Jusalak commented 10 months ago

Out of 4 attempts failed to run this demo. Black screen from start and no sound.

The presence of the second disk side definitely improves running. Then my results are almost the same as yours. I have not yet observed it running faultless to the end, however. still_ready_g71.zip

radius75 commented 10 months ago

demo on d64 in emulating 1571 doesn't work for me.

demo on d71 formatted to 170 or 340 KB (mode M0 or M1) works fine until the end, but I have to run it right after Reboot or run it via Run Disk Otherwise it may glitch (black screen) or it won't even start.

These are my observations I don't have a real 1571 to compare these three types of floppy disks with.

And each of these floppy disks would have to be checked for Disk Drive 1571 in M0 and M1 mode

radius75 commented 10 months ago

I have observed strange behavior When the demo is run on 1571 (no matter if d64 or d71) and the screen stays black Entering/exiting the u2+ menu via the middle button unlocks the program and the demo continues Whenever the demo stops on a black screen, using the middle button can unlock it with a 50% probability. Abusing the middle button results in u2+ being blocked, only reset works. You have to do Power Off/On to unlock u2+ I'll try to record it on video

radius75 commented 10 months ago

https://mega.nz/file/nNRjSAAK#4kMiViLt11vXyMKqFcbMh5d374UnJrr1URVa1ibwtj8

Here the demo was blocked at the very beginning, the first time it was unlocked, then not anymore. With my other trials and tests, after such unlocking, the demo even reached the end.

radius75 commented 10 months ago

I ran tests on three types of floppy disks, formatted in M0 and M1 modes on 1571 emulation. d64-m0.d64, d71-m0.d71, d71-m1.d71

All tested on one trial. I ran the demo on u2+, run by Run Disk command: d64-m0 in 1541 - OK d71-m0 in 1541 - UNABLE d71-m1 in 1541 - UNABLE d64-m0 in 1571 Mode1 - NOK d71-m0 in 1571 Mode1 - NOK d71-m1 in 1571 Mode1 - OK

here change to u0>m0 and started by typing load and run d64-m0 in 1571 Mode0 - NOK d71-m0 in 1571 Mode0 - NOK d71-m1 in 1571 Mode0 - NOK

The behavior is at least strange. Everywhere I had NOK I was able to "push" the demo forward using the middle button on u2+ The same test on real Disk Drives would dispel doubts whether it should work like this or not.

test disks.zip

Jusalak commented 10 months ago

I ran tests on three types of floppy disks, formatted in M0 and M1 modes on 1571 emulation. d64-m0.d64, d71-m0.d71, d71-m1.d71

Thank you for testing.

That d71-m1 ran it ok is interesting, since in order for Vice bug to be fixed, in Vice V 3.7. the following change was made:

  • More realistic behaviour when mounting images:
    • When attaching a d64 image to a 1571 drive, create an 'unformatted' image for the second side.

This is quite similar to the fact that UII/U64 runs it better from a double sided disk image. Hardly a coincidence?

What comes to the glitches, the author of Z64K emulator wrote to me in a private communication:

I've investigated the issue and the cause for Z64K seems to be different to what was causing the issue with VICE. I have isolated the issue and it seems to have something to do with the VIA 2 CA2 (SOE signal). It is low when the demo freezes and is waiting for byte ready which never eventuates because SOE is low.

Z64K got stuck at track 5, but with a manual hack the demo continued loading. This may be related to the glitches with UII/U64.

So, it may be two different issues at stake here.

As far as it is known, a real 1571 runs the demo fine from whatever disk. Also this type of loader seems to be quite common among demos of later years.

Grrrolf commented 10 months ago

You shouldn't trust file copiers when copying multi-part demos (it is asking for problems). This demo was never released on a d71 disk image. Stick to the original disk image type, use a full disk copier and you should be ok.

radius75 commented 10 months ago

It doesn't seem like this demo requires a full-disk copy. I copied to formatted d64 file by file and work without problem in 1541 U2+. I won't be surprised if it works from a USB folder if I put these PRG files in it and set it as IEC ID8.

Jusalak commented 8 months ago

I have done some quite extensive testing of 1571 emulation in 1541 compatibility mode, with real hardware testing, and found that Z64K emulator shares with U64 more or less the same pattern of success/failure. This strongly suggests a common root cause (quoted above).

What is even more important is that the author of Denise C64 emulator (which also has 1571 emulation) seems to have identified the exact cause and corrected that in his emulator.

https://sourceforge.net/p/deniseemu/tickets/43/

The actual cause might be quite easily readable from the code itself:

https://bitbucket.org/piciji/denise/commits/5f21d8c12dc262e230dda3c477e99898e4e0b389

I understand enough of it to see that in 1571 the hardware behaviour is different.

Jusalak commented 7 months ago

I did some real hardware tests of real 1571 disk drive compatibility.

I chose the top 100 demos at The C-64 Scene Database as ranked on 20th August 2014 as the test material. Those demos which displayed problems in emulation were selected for real harware testing. Compared emulators were: UII+ as implemented in U64, firmware V1.42 - 3.10j; VICE x64sc 3.7.1 r44522 and Z64K C64 Build 20230617.0852, all with drive 8 set to 1571. The results are attached as a PDF. The new ROM was used as a default, but old ROM was also tested with real hw tested demos. ROM verson made no difference in none of these real hw tested demos.

Real_1571_Tests.pdf

Of the real hardware tested demos which ran on a real 1571, only Biba 3 ran correctly on U64.

Edit. Also Denise 2.1 was tested - of the test results of mentioned emulators, those of Denise 2.2.1 match real 1571 most closely.