TheMole Posted October 4, 2023 Share Posted October 4, 2023 Hi all, I've been working on adding some new features to Ghostbusters that require keyboard input. One of these features is the scrolling status bar that shows your battery charge, men and traps when you press the spacebar. Unfortunately, I'm running into a discrepancy between mess and the other emulators I can run on my system (js99er and bulwip). When running the game in Mess, the code that checks the spacebar will also return true if fire is pressed on joystick 1. This does not seem to happen in the other emulators. Now, given that I'm on a mac, and mess has had some issues with the mac keyboard for me in the past (mostly weird key definitions and not reading some meta keys, nothing major), I'm wondering if there's a bug in my code that is not triggering on js99er and bulwip, or if it's a mess keyboard issue... Here's the code that scans the keyboard matrix for a spacebar press: unsigned char read_spacebar() { unsigned int col = 0, key; __asm__ ( "li r12,>0024 \n\t" "ldcr %1,3 \n\t" "src r12,7 \n\t" "li r12,>0006 \n\t" "clr %0 \n\t" "stcr %0,8" : "=r"(key) : "r"(col) : "r12" ); return !(key & 0x0200); } I've attached a bin and an rpk for testing, I'd be really grateful if someone could test this on classic99 or mess-on-windows for me. If pressing fire shows something like the below (scrolling text in the blue bar), the bug exists there as well (pressing spacebar should show this message): ghostbusters.rpk ghostbusters.bin 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted October 4, 2023 Share Posted October 4, 2023 Please check the key mapping in the OSD menu ("input"). This should explain why some key is detected when you press an expected different one. 2 Quote Link to comment Share on other sites More sharing options...
TheMole Posted October 4, 2023 Author Share Posted October 4, 2023 Yeah, first thing I did was double check the assignments, but those looked fine. I went back now to try some different configurations and did notice that if I changed the keyboard mode from 'natural' to 'emulated' the problem went away, so I guess that confirms its an issue with the way mess implement the natural keyboard routines. 2 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted October 4, 2023 Share Posted October 4, 2023 Natural keyboard sucks. Don't use it. You can't even check for CTRL combinations, and the lag is a pain. Quote Link to comment Share on other sites More sharing options...
PeteE Posted October 4, 2023 Share Posted October 4, 2023 Classic99 works as you would expect: pressing spacebar shows the message, Tab (Fire) does not. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.