randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
488 stars 59 forks source link

2.5 with final cartridge iii crt and keyrah #79

Closed Larswad closed 4 years ago

Larswad commented 5 years ago

At first I thought I did something wrong. But in the 2.5 version (not sure how far back) the joysticks connected to keyrah doesn't work in the tfc iii desktop anymore. I am totally sure that it did work before in an earlier version. If I disconnect the cartridge and load a game, the joysticks work just fine in the game.

What is strange and makes me doubt myself doing something wrong is that the emulator shouldn't be bothered by what software is loaded when controlling the joystick.

What is going on? Am I missing something completely?

randyrossi commented 5 years ago

I can check tonight to see if they work for me with tfc iii. They are just usb keys really so I don't see how they would not work. Instead of a game, try running a joystick test app with/without the cart?

On Thu, Oct 17, 2019 at 2:45 PM Lars Wadefalk notifications@github.com wrote:

At first I thought I did something wrong. But in the 2.5 version (not sure how far back) the joysticks connected to keyrah doesn't work in the tfc iii desktop anymore. I am totally sure that it did work before. If I disconnect the cartridge and load a game, the joysticks work just fine in the game.

What is going on? Am I missing something completely?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/79?email_source=notifications&email_token=AAI3HKDXD5KEJOWLQPDHEJTQPCXDJA5CNFSM4JB5ZXHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSRO2OA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKAIGBEEJDBJNFYD44DQPCXDJANCNFSM4JB5ZXHA .

-- Randy Rossi

C:(+1)416-605-5112 (Canada)

randyrossi commented 5 years ago

I'm able to use the keyrah joysticks with FCIII installed. Tried both using the joystick to control the mouse and a joystick testing app.

Larswad commented 5 years ago

Ok, many thanks randyrossy for confirming!

Guess I have to check everything from start. Maybe I have to delete the config file so that a new one in created. Otherwise I'm pretty clueless what is going on. The really weird thing was that it worked in games. Maybe something could be off with the crt image perhaps.

Larswad commented 4 years ago

I have done some more investigation on this, in fact a whole long evening :-). Well, I did a whole lot of experimenting. Everything with joystick works in joystick testers and games, both ports. What happens is that the final cartridge detects mouse 1351 as being present and refuses joystick inputs, every time. Tried removing Mouse=1 in vice.ini, didn't help.

What finally drove me into the right direction was to change to another version of TFCIII. The 1987 version DOES work, the 1988 version and final cartridge III plus versions does NOT. I do think they work just fine in desktop vice (but I am to double check that).

What is strange is that I could have sworn that I had this working for the 1988 version at some time. I also tried falling back to 2.4 but that didn't help.

So this is STILL kind of strange. Anyhow, once being in that state, it is impossible to get out of that TFCIII desktop just by using a keyrah. Because the function keys in TFCIII uses the C= key as a selection key, and two keys at the same time for some reason doesn't work well with keyrah/BMC64. Menus are not possible to select in that state, tried many different combinations of keyboard mapping but it just doesn't work. I did completely unmap the BMC functions for the C=/fkey but that didn't help.

I do have a suspicion that the CBM key is not properly forwarded to the emulator at all times. I mean, even if special functions are unmapped from it, it still doesn't seem to react properly. But MAYBE this is an issue with keyrah itself, that multiple keys at the same time is not handled well.

So, the big question: Why does TFC III newer version falsely detect the commodore mouse as being present?

Anyway, I just wanted to forward my findings. I will keep investigating!

BTW, I just love the new solution to switch between emulators, I could even add a new resolution that I needed in that common configuration file. Very neat solution!

randyrossi commented 4 years ago

Ah, okay. This might be because I force the mouse on always here:

https://github.com/randyrossi/bmc64/blob/431007ff1059844b545cab75f6b31e360af0162c/third_party/vice-3.3/src/arch/raspi/menu.c#L3165

Instead, I should make this a menu option or perhaps only set it on when the user actually choses the 1351 emulation. I didn't think it would cause any apps to behave differently. (So even if you remove it from vice.ini, it will come back)

There are locations in the code where I am assuming the commodore key is the left control key rather than actually lifting the set value from the keymap. That's probably why you were unable to change the mapping successfully. I have a TODO for myself to fix this.

I think there are some key combinations that are unfriendly to USB keyboards. For example, on my wireless keyboard, I can't do CNTRL+F5 for some reason. But other CNTRL+F# work fine. So yes, there might be an issue with keyrah with some combos.

Can you point me to your version of FCIII that doesn't work I will try to repro the issue on my end.

On Thu, Oct 24, 2019 at 3:38 AM Lars Wadefalk notifications@github.com wrote:

I have done some more investigation on this, in fact a whole long evening :-). Well, I did a whole lot of experimenting. Everything with joystick works in joystick testers and games, both ports. What happens is that the final cartridge detects mouse 1351 as being present and refuses joystick inputs, every time. Tried removing Mouse=1 in vice.ini, didn't help.

What finally drove me into the right direction was to change to another version of TFCIII. The 1987 version DOES work, the 1988 version and final cartridge III plus versions does NOT. I do think they work just fine in desktop vice (but I am to double check that).

What is strange is that I could have sworn that I had this working for the 1988 version at some time. I also tried falling back to 2.4 but that didn't help.

So this is STILL kind of strange. Anyhow, once being in that state, it is impossible to get out of that TFCIII desktop just by using a keyrah. Because the function keys in TFCIII uses the C= key as a selection key, and two keys at the same time for some reason doesn't work well with keyrah/BMC64. Menus are not possible to select in that state, tried many different combinations of keyboard mapping but it just doesn't work. I did completely unmap the BMC functions for the C=/fkey but that didn't help.

I do have a suspicion that the CBM key is not properly forwarded to the emulator at all times. I mean, even if special functions are unmapped from it, it still doesn't seem to react properly. But MAYBE this is an issue with keyrah itself, that multiple keys at the same time is not handled well.

So, the big question: Why does TFC III newer version falsely detect the commodore mouse as being present?

Anyway, I just wanted to forward my findings. I will keep investigating!

BTW, I just love the new solution to switch between emulators, I could even add a new resolution that I needed in that common configuration file. Very neat solution!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/79?email_source=notifications&email_token=AAI3HKA7ADIGDJNJ76UOZILQQFGF7A5CNFSM4JB5ZXHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECEBDKA#issuecomment-545788328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKABP4TIQIKN3US556TQQFGF7ANCNFSM4JB5ZXHA .

-- Randy Rossi

C:(+1)416-605-5112 (Canada)

Larswad commented 4 years ago

Thanks for looking into it! The link www.siemappelman.nl/download/FinalIII+V4.1.zip with md5sum: 36abf58796604d583c90b5e581e06f91 (on the unpacked CRT is the final iii+ I have used, the one that doesn't work).

The other versions are on lemon, both the 1987 and 1988 one: https://www.lemon64.com/?mainurl=https%3A//www.lemon64.com/apps/list.php%3FGenre%3Dcarts

randyrossi commented 4 years ago

I think I have a fix for this issue. Will show up in v3.1 which I plan to release near the end of the month.

randyrossi commented 4 years ago

I think this is fixed in 3.1.