Post Reply 
EMU48 Remove Input Buffer/Lag?
09-02-2024, 05:46 PM
Post: #1
EMU48 Remove Input Buffer/Lag?
Hello everyone, I love the EMU48 emulator with a burning passion (the only thing that beats it is the real thing). When using the 48GX Rom, it appears there is always an input buffer displaying a timer for a miniscule amount of time before displaying the digit on the virtual screen. This seems quite arbitrary and I was wondering if there was any way to bypass this input buffer. It creates an odd delay in my brain when I watch the inputs on the screen, especially when typing a large number very quickly. I have never had such troubles with the physical 48GX, but it feel disconnected when using a numpad.

Thank you for reading,
David.
Find all posts by this user
Quote this message in a reply
09-03-2024, 08:16 PM
Post: #2
RE: EMU48 Remove Input Buffer/Lag?
On Android, I see the egg-timer glyph in the top bar, but it doesn't seem to interfere with digit typing, even going as fast as I can.

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
09-04-2024, 01:42 PM
Post: #3
RE: EMU48 Remove Input Buffer/Lag?
(09-02-2024 05:46 PM)davidscalculator Wrote:  When using the 48GX Rom, it appears there is always an input buffer displaying a timer for a miniscule amount of time before displaying the digit on the virtual screen.

Two effects maybe responsible.

First, the key input is limited to 10 chars/sec. This limitation has it origin from the key debouncing algorithm in ROM. But I don't think that you can enter more than 10 chars/sec on the real calculator. This cannot be changed.

Second, there's a option in the setting dialog "File/Settings..", Tab "General", Option "Enable Virtual LCD Delay" which controls the way of display update. This option should be unchecked for faster display update. This option must be checked when you run programs with 4 color grayscale output.
Visit this user's website Find all posts by this user
Quote this message in a reply
09-06-2024, 05:58 AM
Post: #4
RE: EMU48 Remove Input Buffer/Lag?
It is kind of annoying. I primarily use Emu48 with a 48GX ROM and a 50g ROM, and both have their own annoyances with the keyboard.

With the 48G series ROM, there is the input lag that you mention. It never misses keystrokes, but there's always a delay even when running at full speed on my rather fast (i9-13900K) PC. Now, this can be solved by switching to a 49/50 series ROM.

However, with the 49/50 ROM, there is no input lag, but keystrokes are missed. I am not talking about missing strokes when the same key is pressed twice in quick succession due to software debouncing found in the 49/50 that the 48 doesn't have (that's easily resolved by setting ->KEYTIME to something low like 200). The problem is that when you are at the stack with no input line, if you press three keys in quick succession, it only registers the first one. If you press four keys in quick succession it registers the first and fourth. If you press even more keys it registers the first and the fourth and subsequent ones, but still not the second and third. However, if you only press two in quick succession it reads both. It's all very strange. But then once the input line is up and the cursor is blinking, it reads every keystroke no matter how fast you type. So if you press one key, it works, and then press 3 more keys in quick succession and it reads all three of those too. I thought maybe it was a relative of the so-called "busy bug" so I tried turning on the ticking clock but that doesn't fix it so it's probably something unrelated. I think this is probably a bug in the underlying 49/50 ROM and not an emulator bug, but it's frustrating.

Example:

Go to the stack and press 1 2 as fast as you can. You get 12. Press 1 2 3 as fast as you can. You get 1. Press 1 2 3 4 as fast as you can. You get 14. Press 1 2 3 4 5 6 as fast as you can. You get 1456. This is consistent, every time. But press 1, wait a bit, and press 2 3 and you get 123. Press 1, wait a bit, and press 2 3 4 5 6 and you get 123456.

So basically, when the calculator switches from the stack mode to the input line mode, which happens after the first keystroke, if the subsequent keystrokes come too quickly, the next two keystrokes are lost, but if you only press one subsequent keystroke then it works. Very strange.
Visit this user's website Find all posts by this user
Quote this message in a reply
09-06-2024, 07:06 AM
Post: #5
RE: EMU48 Remove Input Buffer/Lag?
I just rebuild Emu48+ from the sources emu48-svn20230917.zip with VS2005 and the binary from

https://www.hpcalc.org/details/6523

Emu48 v1.65+

I made tests with both Emu48 binaries with the HP48GX (rev. R) and with the HP50G with emulator ROM 2.15.

Never see the input lag on the 48GX or the key drop on the HP50G emulation.

But my testing PC is quite old, it' a HP Z600 workstation with 2 Xeon X5650 CPU's and Win10 Prof x64. So maybe the modern CPU's with P and E cores or Win11 are responsible for the behavior.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)