IBMulator icon indicating copy to clipboard operation
IBMulator copied to clipboard

KeyStrokes to manipulate floppies

Open blindphoneman opened this issue 2 years ago • 4 comments

Hi:

I am a blind computer user and wonder if you might be able to help.

First, this is a fascinating thing to play with. I love the hard-drive and floppy sounds. Other than MAME, most emulators do not go this route, making them fast, but, a little dull. Here, you have something that even I, as a blind user, can get feedback from. I find that I can navigate to the "DOS Prompt", and hear the hard-drive doing its thing.

I have been able to boot the emulator, and even install a DOS screen reader on the system, albeit using DOSBox-X to put the program on the HD image. It actually works in a weird way--I tell the emulator to route serial output to com1 and it works, since I use a null modem emulator to route com1 to a speech synthesizer emulator listening on the other side of the virtual null modem cable, and it works.

I would like to experiment with a few things, but, this would involve changing floppy images, to make the simulation work authentically.

However, from what I can tell, the floppy disk is selected/changed through a button on the interface which I cannot find with my windows screen reader on the host.

Might it be possible to have a shortcut key in the system so I could type a floppy image file name, be returned to the emulator with that disk inserted? I imagine the file dialog already works like that, but, I currently have no way to press the button since I cannot actually see the screen. It might also be helpful to have shortcut keys for some other things, but, I realize this could interfere with certain things. But, it could be something the user could turn off if it wasn't wanted, which probably would be the case with most users, though you couldn't tell.

Anyway, I'll get some sighted assistance for a couple things, and will see what I can do. After all, I didn't know I'd get this far.

Let me know what you think, and, if you have any questions/suggestions, let me know.

Again, thanks for this fascinating project!

blindphoneman avatar Jun 12 '22 21:06 blindphoneman

Hi, thanks, yes very early in the development I realised that good sound effects are crucial for realism, but it didn't occur to me they are also important from a usability standpoint.

You are using features like the com port in a way I didn't imagine even possible, I'm glad it works!

I tried to make the emulator controllable via the keyboard or a game controller as much as possible, without the need to interact with the graphical interface.

Unfortunately the current public version 0.14 does not have key bindings to interact with the floppy drive. This is something I added only recently and the next version will give you the possibility to insert and eject the floppy using the keyboard.

There's already a setting in ibmulator.ini that allows you to use the default file dialog of your operating system to browse for a floppy disk image, instead of the emulator's GUI, and that window should be usable with a screen reader. But key bindings to open that window will only be present from the next 0.15 version.

I'm currently working on the last details of the next release so it souldn't take too long... (crossing fingers).

Let me know if you have suggestions for additional key bindings or other features to improve usability.

barotto avatar Jun 12 '22 22:06 barotto

Hi: Thanks so much for your reply. I just thought I’d try using com1 as the file name.  MAME doesn’t like that at all, but, I said, “what the heck,” and tried it, and it worked.  In this case, the information goes one way, so that’s all right. As for other key bindings, I don’t know all the ins and outs of what could be done with them.  The graphics for the functions are not visible to my screen reader, though, something comes up when I do ctrl+f4.  However, I have to use OCR to even know about it, and it doesn’t seem to respond to keyboard presses anyway.  Think it has to do with debugger and statistics and such. Mainly, the ones I’d like to see are a key to open the file selection dialog for disks, a way to eject a disk and one to insert a disk. Just how to do it so as not to interfere too much with the PS1 side of things. There are 2 approaches to how to make these bindings not interfere too much. One would be to have a setting in the .ini file to enable or disable them. Also, the screen reader makers have a hotkey that passes the next keypress to the system, regardless of what it does.  That way, if you used a common keystroke, but needed it to pass to the emulation, you could have a hotkey that then lets the user press any other key combination and it’d be passed directly to the PS1.  Of course, I see folks are wanting to do alt-tab, and I know Windows on the host takes that one over.  I think alt-tab is used in Linux as well, so that’s probably a hard one to do.  Probably a totally different keystroke or click for that one. I did figure out how to do an acceptable ctrl+alt+del, and also shift+f9 to get to the command prompt in the DOSShell--I used both shift keys to get around that one. Glad to hear you’re thinking about this. I’m thinking of starting a podcast relating to stuff like this, as it relates to blind users, and how it used to be.  IBMulator will definitely be featured if I get that far. The sound effects will blow ‘em away. If I could ask you a question about the PS1, I would appreciate you letting me know if I’m correct. I was thinking of talking about what a blind person would need to do once he bought a PS1 and got it home. See if I am correct. Say, I’m using a serial speech synthesizer. So, upon coming home with my shiny new PS1, plugging all the cables in, and turning it on, my impression is that I’d be presented with a menu, from which I’d need to figure out how to get to a DOS prompt, then type “customize”.  From there, I find that I need to arrow down 7 times, press space, then Enter.  Then, I can reboot the machine.  This would make the HD boot up, instead of the built-in DOS.  Next, again, I’d get back into the command prompt, run my screen reader’s install, making sure I select the com port my synthesizer is plugged into, then, I can start it up, go into edlin and get rid of the shell startup command, which happens to be in config.sys.  After that, one more edit of the autoexec to put the startup command for my screen reader, and I should now be able to boot up with speech. I did all this, using my Windows screen reader’s OCR and a couple other things.  One of my DOS screen readers actually spoke the things I was arrowing to in the customize program enough that I found where I needed to change them. Are my impressions correct? I didn’t mind figuring it out—it’s been a lot of fun.   I think many of the prebuilt systems had menu programs similar to this. Back then, sighted assistance was a must to get started. Now, I can go to any Windows computer, or Mac, and press the appropriate keystroke and it starts talking—no external speech needed.  I can get a new iPhone out of the box and set it up without sighted assistance.  Think I can do it with an Android phone, but, don’t use those much. We’ve come a long way, for sure. Thanks, though, for this neat emulator.

blindphoneman avatar Jun 13 '22 06:06 blindphoneman

something comes up when I do ctrl+f4. However, I have to use OCR to even know about it, and it doesn’t seem to respond to keyboard presses anyway. Think it has to do with debugger and statistics and such.

That's correct, CTRL+F4 opens the debugging tools by default. Those are tools mainly used for developing software and checking the status of the emulator at the machine level. They are not needed to use the PS1.

All the default key bindings are listed in the README file and the project's GitHub home page.

Mainly, the ones I’d like to see are a key to open the file selection dialog for disks, a way to eject a disk and one to insert a disk.

I can confirm all of these key bindings will be available in the next release :-)

Just how to do it so as not to interfere too much with the PS1 side of things. There are 2 approaches to how to make these bindings not interfere too much. One would be to have a setting in the .ini file to enable or disable them.

I think there's already a solution for this.

Every key combination is specified in a keymap file (which is a regular text file), including the emulator's commands.

You can create multiple keymap files and specify them in ibmulator.ini. Then you can switch between the keymaps while the emulator is running using a defined key combination. This way you can for example create 2 keymaps: one with only key bindings that pass keystrokes to the PS1 directly, the other with only bindings that activate the emulator's special functions or special key combinations for the PS1 (eg. ctrl+alt+del or alt+tab).

The default keymap file is present in the same directory of ibmulator.ini and it's called keymap.map

The ini file setting to update with the keymaps list is called "keymap" and is in the "gui" section. Multiple keymap files are separated by the character "|"

The function to switch between keymaps is called FUNC_SWITCH_KEYMAPS and is binded to SHIFT + SPACE by default.

There's some documentation on how to edit and use keymaps in the README and in the keymap.map file itself. Though a bit complicated, this keymap system is also very flexible and potent as every keystroke translates to a programmable macro.

I've prepared an example for you, with 2 keymaps arranged like I said before: keymap_ps1.map is for normal PS1 use, keymap_special.map have only emu functions and special key combinations.

keymaps.zip

Put both files in the same folder with ibmulator.ini and set the "keymap" value in ibmulator.ini like so: keymap=keymap_special.map | keymap_ps1.map

When IBMulator starts normal emulator commands apply and you can start the PS1 with CTRL+F3. Then you switch to PS1 keyboard only mode with SHIFT+SPACE You can switch back to emulator control mode pressing SHIFT+SPACE again.

If SHIFT+SPACE is conflicting with something you can change it with some other key, but in that case you have to update both keymaps.

Please let me know if this solution works for you.

You can define and load more keymaps if you want.

See if I am correct ... Are my impressions correct?

Spot on!

barotto avatar Jun 13 '22 14:06 barotto

Hi:  Thanks for those keymaps.  I’ll take a look at them. I’ll keep an eye out for the next release, but, am still having fun with this one. Take care!

blindphoneman avatar Jun 13 '22 15:06 blindphoneman

New keybindings in v0.15:

  • SHIFT+F7 : open the floppy select dialog for the active drive
  • CTRL+F7 : eject the floppy inserted in the active drive
  • CTRL+SHIFT+F7: change the active floppy drive when 2 floppy drives are installed

You may want to change the file select dialog from custom to native in ibmulator.ini if you need to use your OS' assistive tech:

[gui_dialogs]
file_type=native

barotto avatar Sep 15 '22 17:09 barotto

Hi: Thanks so much for putting these shortcuts for drive operations in the program.  I see them in the keymap, so I know if someone needs shift-f7 and such, they can get them by deleting from the keymap.  And, of course, the keymap gives one the flexibility to even change them if needed. This came right on time, since I’m thinking of featuring IBMulator in a podcast relating to blind people accessing computers back in the day. It’s not exactly realistic, since I’m using the comport com1 for speech output, something I believe I’m not supposed to be able to do, but, it works ok in Win 10.  From looking over the manual, COM1 was the internal modem in the real thing.  Guess one could install an adapter card for a COM2 for a serial speech synthesizer, so, it isn’t too far off.  But, it’ll show what kind of things we blinks (blind people) had to consider when bringing a computer home back then. Anyway, this makes it so much easier if I need to feature something that requires changing disks. Thanks again!  Sent from Mail for Windows From: barottoSent: Thursday, September 15, 2022 1:05 PMTo: barotto/IBMulatorCc: blindphoneman; AuthorSubject: Re: [barotto/IBMulator] KeyStrokes to manipulate floppies (Issue #66) New keybindings in v0.15:SHIFT+F7 : open the floppy select dialog for the active driveCTRL+F7 : eject the floppy inserted in the active driveCTRL+SHIFT+F7: change the active floppy drive when 2 floppy drives are installedYou may want to change the file select dialog from custom to native in ibmulator.ini if you need to use your OS' assistive tech:[gui_dialogs]file_type=native—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 

blindphoneman avatar Sep 15 '22 18:09 blindphoneman