VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

It runs fine until reaching the level select screen(multiple colorful images rasterized on the screen inputting the name to use)? When specifying a name, it doesn't respond to any input? Afaik the keyboard should be working without problems on UniPCemu, but California Games doesn't respond when reaching that point in execution? Anyone from the Dosbox people knows the possible cause(Keyboard emulation(8042 or XT-based) should be very accurate afaik). It's probably a CPU bug, but what might be the cause in this case? It used to run without problems somewhere before applying CPU cycle-accuracy, but a lot of accuracy improvements have been done since(regarding 80386+ flags compatibility). Although two BCD instructions fail on the NEC V30 testsuite, but succeed on the 80386 testsuite?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 1 of 3, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

It's not a CPU bug, but a game bug, specifically a bug when using enhanced keyboards. The game redirects Int 16 function 0 to work with the game's custom Int09 keyboard handler, then calls the Int 21 function 8 to read characters, expecting DOS to call Int 16 function 0 internally. But if you have an enhanced keyboard, DOS will call Int 16 function 10h instead, which is not redirected by the game. The solution is to use SWITCHES=/K in CONFIG.SYS to "make an enhanced keyboard behave as a conventional keyboard", which means that DOS calls Int 16 function 00 instead of 10h.

Reply 2 of 3, by superfury

User metadata
Rank l33t++
Rank
l33t++

So if I understand it correctly, for some odd reason even the XT keyboard connected during the XT emulation of UniPCemu is detected as an enhanced keyboard for some odd reason?

I'm using the latest Generic Super PC/Turbo XT BIOS on the XT architecture emulation for testing(afaik oddly enough, the authentic XT BIOSes have failed for some time now, faulting before any output is given, due to unknown reasons).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 3 of 3, by pantercat

User metadata
Rank Newbie
Rank
Newbie

Hi, here's a patch.

hexedit CALGAMES.EXE and replace:
b6 08 a1 5c 5e 0a e4 75 08 c7 06 5c 5e ff ff eb 05 92 cd 21
to:
30 f6 a1 5c 5e 0a e4 75 08 c7 06 5c 5e ff ff eb 05 92 cd 16

Enjoy playing EGA/VGA California Games in dosbox 😀