VCCE / VCC

Tandy Color Computer 3 Emulator
GNU General Public License v3.0
64 stars 22 forks source link

Bug: Tetris game is uncontrollable #72

Closed maxdlpee closed 2 years ago

maxdlpee commented 3 years ago

The Tetris (Tandy version btw) game is unable to be controlled with the keyboard. The keys are inputting things all over the place, making the game unplayable as a result. I'm sorry I can't explain this any better, but my English is limited. I tried with different keyboard layouts, different regional layouts, different physical keyboards (I'm on a laptop without a number pad) but keyboards inputs are still wrong. I can only assume the emulator is the culpirit here, which is quite something to say for a quote "accurate CoCo 3 emulator". Any ideas?

BGPierce commented 3 years ago

This is the first I've heard of this.

VCC has been around now for almost 20 years and I think an erratic keyboard would have been noticed by someone in the well over 200 downloads of this release alone. I suspect your software, your settings, or your computer "is the culprit here". I personally use VCC at least 4-6 hours a day and when I'm on a roll, 8-10 hours a day and I've NEVER had a keyboard issue. One game acting erratic out of over 1,000... I'd say there's a problem with the game. I'm not saying you don't have a problem, I'm just saying that problem can't be VCC. You either have a bad copy of Tetris or something's wrong with your computer. Are you trying to use the arrows in stead of the joystick/mouse in the joystick settings? In some software, that would be a disaster, others may work. Also, are you trying to run a game with the CPU overclocked or the with "Throttle Speed" unchecked? Both of those will affect most games and make them unplayable. Most games are based on timing cycles and when those cycles are sped up, then gameplay is affected greatly. Sorry to be of no help, but VCC's keyboard scan is identical to the Coco 3 and rock solid and has been for many years.

-----Original Message----- From: maxdlpee notifications@github.com To: VCCE/VCC VCC@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Sent: Wed, Jan 13, 2021 2:21 am Subject: [VCCE/VCC] Bug: Tetris game is uncontrollable (#72)

The Tetris (Tandy version btw) game is unable to be controlled with the keyboard. The keys are inputting things all over the place, making the game unplayable as a result. I'm sorry I can't explain this any better, but my English is limited. I tried with different keyboard layouts, different regional layouts, different physical keyboards (I'm on a laptop without a number pad) but keyboards inputs are still wrong. I can only assume the emulator is the culpirit here, which is quite something to say for a quote "accurate CoCo 3 emulator". Any ideas?— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

maxdlpee commented 3 years ago
  1. I left everything at the default settings, so if Throttle Speed is checked by default, then there is no way that is the issue. I don't mess with CPU overclocking either.
  2. Using the arrows as a joystick is one of the first things I tried. Needless to say, I was unable to control the game this way, but maybe that's because of user error by my part. That's one of the things I'm gonna try. EDIT: I tried changing to joystick control, to no avail. The J key is being registered as some other key for some reason...
  3. I never thought the cart copy from the page I got it from would be broken... huh. I'll also try downloading that again to see if maybe I got unlucky. EDIT: Downloaded it again, and no difference. Still broken. Tried cartridge, cassette, disk... All versions give the same results. If I manage to make sense of anything, I'll close this issue with an edit, and you could just write it off as user error lol EDIT: If someone could test this out, it would be great, given that I can't manage to make heads nor tails of this. It's as if... it were completely random.
maxdlpee commented 3 years ago

I think I have something plausible to explain this. Maybe the game messes with the keyboard matrix in some sort of way that the emulator does not know how to handle? That would explain why it only happens with this game specifically. EDIT: I just noticed my game is a 1.0 version. Maybe my theory isn't as far-fetched as it seemed?

BGPierce commented 3 years ago

I don't think it could do that. I wonder if you maybe have a Dragon version. The Dragon is identical to the Coco in most ways but had a different keyboard matrix.

-----Original Message----- From: maxdlpee notifications@github.com To: VCCE/VCC VCC@noreply.github.com Cc: Bill Pierce ooogalapasooo@aol.com; Comment comment@noreply.github.com Sent: Thu, Jan 14, 2021 2:08 am Subject: Re: [VCCE/VCC] Bug: Tetris game is uncontrollable (#72)

I think I have something plausible to explain this. Maybe the game messes with the keyboard matrix in some sort of way that the emulator does not know how to handle? That would explain why it only happens with this game specifically.— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

maxdlpee commented 3 years ago

That is not a possibility, since the game is Coco-exclusive.

maxdlpee commented 3 years ago

Tried now on a different computer, and this is still happening. I honestly don't know what is wrong anymore.

ejaquay commented 3 years ago

The RS tetris game I have uses ghj keys to control the moves not arrow keys. Difficult but not impossible.

On Sat, Mar 13, 2021, 10:28 maxdlpee @.***> wrote:

Tried now on a different computer, and this is still happening. I honestly don't know what is wrong anymore.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VCCE/VCC/issues/72#issuecomment-798511206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIUKNEANWY2M53FKL2YRXLTDOABJANCNFSM4WALMSXQ .

maxdlpee commented 3 years ago

That's what I figured out as well, given the in-game instructions and a copy of the manual, but it still freaks out.

ejaquay commented 3 years ago

I recently saw from a timbo-tek post that RS Tetris has it's own keyboard scan routine that uses an atyical reversal of the data direction to strobe the 6821. This could explain how the keys are responding in Vcc and should be further investigated.

ejaquay commented 3 years ago

After looking at mc6821 code is seems the way Tetris is coded combined with Vcc assuming normal data direction is causing the issue.

maxdlpee commented 3 years ago

So it looks like the problem is from the emulator... Makes me wonder how it went unnoticed for so long...

ejaquay commented 3 years ago

This would be difficult to fix properly. PIA operations are sycronized with port I/O in the emulation rather than being asyncronous. A proper fix would be to desyncronize the by doing peripheral operations at the end of each scan or in a seperate thread. There are important timing things tied to the PIA's and the sycronizing allows them to work very simply. It also makes some things work on the emulator that will not work on a real CoCo so such a fix has many potential places to break things. I have spent a fair amount of time adding comments to the PIA code to make such a fix easier, but have not committed to actually changing how it currently works.

maxdlpee commented 2 years ago

Just noticed that the version I did my testing on was outdated (2.1.0c). However, it still happens on 2.1.0d. Are there any news about a possible solution?

maxdlpee commented 2 years ago

Almost a whole year later, and nothing was done. What are you doing?

BGPierce commented 2 years ago

Would you like to fix it? We are going through 20+ year old code that has no comments, explanations, nor documentation and the original author has disappeared. We are lucky to even be able to relabel menu items sometimes. There is only one person even attempting to program at the moment and his priorities are not to fix problems with one flakey game. We have a life and with the current situation (covid and all) it's not so easy to just sit down and fix someone's game problem. VCC is a hobby for us and no one is paying us. You are lucky it has been updated at all. Originally, it sat here on GitHub with NO ONE volunteering to work on it for three years.

So, until more people step up to help out, things will be done when someone gets around to it.

-----Original Message----- From: maxdlpee @.> To: VCCE/VCC @.> Cc: Bill Pierce @.>; Comment @.> Sent: Mon, Jan 10, 2022 8:42 pm Subject: Re: [VCCE/VCC] Bug: Tetris game is uncontrollable (#72)

Almost a whole year later, and nothing was done. What are you doing?— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

ejaquay commented 2 years ago

Spent a few days last year looking at this and looking again now. Tetris reads the rollover table by strobing the data direction register instead of the conventional method of strobing port a. I think I have some understating of the problem with 6821 code but am still trying to find an easy way to fix it without breaking everything else that relies on the pia logic. I don't want to completly re-write the code just to fix tetris. But I will spend another day of two because the issue got fixed on mame. Unfortunatly mame code is way too different to drop it. No promises on this one,

ejaquay commented 2 years ago

No easy fix found, backburnered again.

ejaquay commented 2 years ago

I think I have a fix for this. (my branch tetris-fix) But I need someone willing to test it.

ejaquay commented 2 years ago

This is fixed pending testing.

On Tue, Jan 11, 2022, 4:42 PM Bill Pierce @.***> wrote:

Would you like to fix it? We are going through 20+ year old code that has no comments, explanations, nor documentation and the original author has disappeared. We are lucky to even be able to relabel menu items sometimes. There is only one person even attempting to program at the moment and his priorities are not to fix problems with one flakey game. We have a life and with the current situation (covid and all) it's not so easy to just sit down and fix someone's game problem. VCC is a hobby for us and no one is paying us. You are lucky it has been updated at all. Originally, it sat here on GitHub with NO ONE volunteering to work on it for three years.

So, until more people step up to help out, things will be done when someone gets around to it.

-----Original Message----- From: maxdlpee @.> To: VCCE/VCC @.> Cc: Bill Pierce @.>; Comment @.> Sent: Mon, Jan 10, 2022 8:42 pm Subject: Re: [VCCE/VCC] Bug: Tetris game is uncontrollable (#72)

Almost a whole year later, and nothing was done. What are you doing?— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/VCCE/VCC/issues/72#issuecomment-1010385061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIUKNG7XFHCS7QAEHUETULUVSP4ZANCNFSM4WALMSXQ . You are receiving this because you commented.Message ID: @.***>

maxdlpee commented 2 years ago

I might be able to test it tomorrow. The thing is, I don't think I have an enviroment where I can compile the program.

ejaquay commented 2 years ago

beta with tetris fix: https://github.com/ejaquay/VCC/releases/download/tetris-fix-beta/Vcc-tetris-fix-beta.zip

On Mon, Jan 31, 2022, 7:03 PM maxdlpee @.***> wrote:

I might be able to test it tomorrow. The thing is, I don't think I have an enviroment where I can compile the program.

— Reply to this email directly, view it on GitHub https://github.com/VCCE/VCC/issues/72#issuecomment-1026333428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIUKNG6LNDCA7M62XIKMUDUY4PMJANCNFSM4WALMSXQ . You are receiving this because you were assigned.Message ID: @.***>

maxdlpee commented 2 years ago

It is fixed, and I can properly play the game now. Closing this.

ejaquay commented 2 years ago

The fix is in a beta version built from the latest sources on github.

On Tue, Feb 1, 2022, 3:15 PM maxdlpee @.***> wrote:

It is fixed, and I can properly play the game now. Closing this.

— Reply to this email directly, view it on GitHub https://github.com/VCCE/VCC/issues/72#issuecomment-1027246290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIUKNBAYL67FVRD4DTQLNDUZA5ONANCNFSM4WALMSXQ . You are receiving this because you were assigned.Message ID: @.***>

maxdlpee commented 1 month ago

Can confirm that the game is playable with the latest main release. Sorry for the premature issue closure and any unfortunate tone I may have used with the devs, you guys are doing great things with this project and I was a bit rude with you all.